Unity logo
Cancel
Cart
Applications
Sell Assets

Over 11,000 five-star assets

Rated by 85,000+ customers

Supported by 100,000+ forum members

Every asset moderated by Unity

Home
Tools
AI-ML Integration
1/7
Llama.cpp inference async wrapper with demo LLM model for text stylization compiled for Mobile, Web and PC platforms. It will assist you in transforming generic texts into stylized, tailored content.
Render pipeline compatibility
The Built-in Render Pipeline is Unity’s default render pipeline. It is a general-purpose render pipeline that has limited options for customization. The Universal Render Pipeline (URP) is a Scriptable Render Pipeline that is quick and easy to customize, and lets you create optimized graphics across a wide range of platforms. The High Definition Render Pipeline (HDRP) is a Scriptable Render Pipeline that lets you create cutting-edge, high-fidelity graphics on high-end platforms.
Unity VersionBuilt-inURPHDRP
2022.3.42f1
Compatible
Compatible
Compatible
Additional compatibility information

The package is focused on text generation, so there are no dependencies on the renderer type. Tested with iOS, WebGL, Android, Windows and MacOS.

Description

This is a set of mobile friendly LLAMA and GPT2-based GenAI LLM models for text line rewriting with iOS and WebGL wrappers beased on LLama.cpp.


We ship it with three model quantised resolutions, try it online entirely in your browser with the quantised (simplified) one :

- Automated NPC Dialogue stylisation demo (LLAMA based Q4_K_M ~110mb)

- Single Prompt Debug demo (LLAMA based Q8_0 ~170mb)

Inside the package, you will also find Q8_0, Q4 and original bf16 (~321mb) resolutions of our models ready to run inside a cross-platform game engine!


You give it:

```

<input> How are you today? <inputEnds>

<style> Pirate's Poetic Question <styleEnds>

<output>

```

It prints out: Hey there, how fares ye today?


We hope that this model and wrapper can help you save a day! (or, more realistically, 3 months with a dedicated team of 3 people in our estimates).

  • Model finetuned on a corpus of more than 0.5+ million dialogue lines (64343812 tokens).
  • All our training data was purely syntactical and generated.
  • Tools for output filtering are provided with release in CSharp - thus easely editable!
  • All generative LLM models can make mistakes in their output. In some cases, they can turn questions into statements and add minor hallucinated info based on the input text and style data.

The bounded model inference wrapper is based on open-source model runtime and supports the latest 405b models, so you can try them out on platforms with enough RAM/time available.


The bundled wrapper allows:

  • Build and tested for: Web, Mobile, PC.
  • To execute model setup and execution in asynchronous mode based on threads in C++ code. (this is needed if one wants parallel code run when building targeting the Web platform)
  • It allows tapping into Logs, output Tokens, and completion callbacks from generation.
  • Setup model update callbacks in editor UI using events and helper scripts. Also, you can configure most model configuration/run parameters from the editor UI and at runtime.
Technical details
  • Cross-Platform: Compatible with WebGL, iOS, Android, Windows x64, and MacOS (ARM).
  • Mobile ahead-of-time compilation friendliness.
  • Async mode uses cross-platform C++20 threads and is compatible with Web platform
  • The training was done from the open-source model and weights in ORPO mode.
  • The model is fast and slim. Weights are provided in fp16, int8 .gguf format.

Use recommendations

Please try out to free form style line - be creative, yet to get the most from them think about combining in your style line:


Mood styles to try out:

  • Inquisitive (Questioning, Curious, Skeptical, Intrigued)
  • Emotional (Joyful, Melancholic, Indignant, Compassionate, Euphoric, Grieving, Impassioned, Jovial)
  • Intellectual (Reflective, Pensive, Cynical)
  • Dynamic (Confident, Resigned, Agitated, Hopeful, Fearful, Optimistic, Defiant, Adventurous, Bewildered, Determined, Hesitant, Mischievous, Overwhelmed, Melodramatic)
  • Noble (Regal, Dignified)
  • Light (Lighthearted, Whimsical, Nostalgic)
  • Foreboding (Sarcastic, Foreboding)

Writing styles to try out:

  • Historical (Victorian, Gothic, Classic Literature, Folkloric, Pirates)
  • Modern and Contemporary (Modern, Minimalist, Journalistic, Futuristic Sci-Fi, Dark Futurism, Post-Apocalyptic)
  • Genre-Specific (Noir, Magical Realism, Dystopian, Epic, Hard-boiled, Pulp Adventure, Steampunk, Romantic Comedy, Surrealist)
  • Expressive and Creative (Poetic, Lyrical, Beat Generation, Inspirational, Absurdist, Satirical, Whimsical, Mythological)

Keep styles short. They can be phrases or simple words. Using definitions like "Simple" may help debug lines rewritten in too LLMish style.


Integration notes:

  • Web platform is RAM limited up to 4GB (x86), so only smallish models fit into it.
  • Web published pages do not work if ram is limmited to 0.5-1GB making them fail to run on some mobile devices.
  • Instructions for building cpp wrapper code from scratch are provided.
  • AI LLM model may output tokens unparsable by selected Font
  • In demo scenes restart the postprocessing layer on camera if you get NullReferenceException PostProcessing AmbientOcclusion IsEnabledAndSupported exception
  • LLM models have various sizes, that impacts ram requirements on devices you run them on
  • LLM model was trained on one-liners and single sentences. This is when it works the best way possible.

Online-Docs - see motivation-usage example:

Created with AI

Model training data was synthetically.


Package artwork design were AI generated:

  • images,
  • 3d models,
  • rigging and animations,
  • cubemaps.

Style Text WebGL+iOS Stand-alone LLM (+Llama.cpp wrapper)

(not enough ratings)
12 users have favourite this asset
(12)
$20
Taxes/VAT calculated at checkout
License type: Single Entity
Single Entity
Recommended for individuals and small businesses.
Multi Entity
Recommended for large enterprises working across multiple locations.
Refund policy
This asset is covered by the Unity Asset Store Refund Policy. Please see section 2.9.3 of the EULA for details.
Secure checkout:
Supported payment methods: Visa, Mastercard, Maestro, Paypal, Amex
License type
File size
1.5 GB
Latest version
2.0.2
Latest release date
Dec 27, 2024
Original Unity version
2022.3.42
Quality assets
Over 11,000 five-star assets
Trusted
Rated by 85,000+ customers
Community support
Supported by 100,000+ forum members
Unity logo
Language
Feedback
Partners Program
Partners
USD
EUR
Copyright © 2025 Unity Technologies
All prices are exclusive of tax
USD
EUR