SmolLM2-135M-Instruct for Unity Sentis
This repository contains optimized versions of the SmolLM2-135M-Instruct model, specifically formatted for use in Unity Sentis.
SmolLM2-135M is an ultra-compact model that excels at on-device tasks like text rewriting, summarization, and simple NPC dialogue while maintaining an exceptionally small memory footprint.
Available Versions
| File Name | Format | Precision | Size | Best For |
|---|---|---|---|---|
model.onnx |
ONNX | FP32 | ~530MB | High-fidelity source / Desktop |
model_FP16.sentis |
Sentis | FP16 | ~320MB | Balanced Performance / Mobile |
model_Uint8.sentis |
Sentis | Uint8 | ~160MB | Maximum Performance / WebGL / Low-end Mobile |
How to use in Unity
- Install Sentis: Use the Unity Package Manager to install
com.unity.sentis(2.1.0+ recommended). - Download Model: Choose the
.sentisfile based on your target platform's memory constraints. - Import: Drag the
.sentisfile and thetokenizer.jsoninto your Unity project.
Basic C# Loading Snippet
using Unity.Sentis;
using UnityEngine;
public class TinyLLM : MonoBehaviour {
public ModelAsset modelAsset;
private IWorker engine;
void Start() {
Model runtimeModel = ModelLoader.Load(modelAsset);
// GPUCompute is recommended for mobile performance
engine = WorkerFactory.CreateWorker(BackendType.GPUCompute, runtimeModel);
}
}
- Downloads last month
- 5
Model tree for dtaddis/SmolLM2-135M-Unity
Base model
HuggingFaceTB/SmolLM2-135M
Quantized
HuggingFaceTB/SmolLM2-135M-Instruct