dtaddis/SmolLM3-3B-Unity
021
SmolLM3-3B for Unity Sentis
This repository contains optimized versions of the SmolLM3-3B model, specifically formatted for use in Unity Sentis.
Available Versions
How to use in Unity
- Install Sentis: Ensure you have the
com.unity.sentispackage installed via the Unity Package Manager (2.1.0+ recommended). - Download Model: Download the
.sentisfile of your choice. - Import: Drag the
.sentisfile into your Unity Project. - Setup Tokenizer: You will need a compatible tokenizer (like the
tokenizer.jsonfrom the base SmolLM3 repo) to convert text to tokens.
Basic C# Loading Snippet
using Unity.Sentis;
using UnityEngine;
public class MyLLM : MonoBehaviour {
public ModelAsset modelAsset;
private IWorker engine;
void Start() {
Model runtimeModel = ModelLoader.Load(modelAsset);
engine = WorkerFactory.CreateWorker(BackendType.GPUCompute, runtimeModel);
}
}