Team Ai
Modelpublic

dtaddis/SmolLM3-3B-Unity

sourceHugging Faceapache-2.0updated 9mo agoView on Hugging Face
0likes21downloads
Model Card

SmolLM3-3B for Unity Sentis

This repository contains optimized versions of the SmolLM3-3B model, specifically formatted for use in Unity Sentis.

Available Versions

File NameFormatPrecisionSizeBest For
model.sentisSentisFP32~13GBHigh-fidelity source / Desktop
model_FP16.sentisSentisFP16~6.5GBBalanced Performance / Modern GPUs
model_Uint8.sentisSentisUint8~3.3GBMaximum Performance / Mobile / Low-end PC

How to use in Unity

  1. 1.Install Sentis: Ensure you have the com.unity.sentis package installed via the Unity Package Manager (2.1.0+ recommended).
  2. 2.Download Model: Download the .sentis file of your choice.
  3. 3.Import: Drag the .sentis file into your Unity Project.
  4. 4.Setup Tokenizer: You will need a compatible tokenizer (like the tokenizer.json from the base SmolLM3 repo) to convert text to tokens.

Basic C# Loading Snippet

csharp
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);
    }
}