File size: 1,534 Bytes
a5a755a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
6029ac9
191a042
 
a5a755a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
library_name: sentis
tags:
- unity-sentis
- onnx
- smollm
- causal-lm
license: apache-2.0
language:
- en
base_model: HuggingFaceTB/SmolLM3-3B
pipeline_tag: text-generation
---

# SmolLM3-3B for Unity Sentis

This repository contains optimized versions of the [SmolLM3-3B](https://huggingface.co/HuggingFaceTB/SmolLM3-3B) model, specifically formatted for use in **Unity Sentis**.

## Available Versions

| File Name | Format | Precision | Size | Best For |
| :--- | :--- | :--- | :--- | :--- |
| `model.sentis` | Sentis | FP32 | ~13GB | High-fidelity source / Desktop |
| `model_FP16.sentis` | Sentis | FP16 | ~6.5GB | Balanced Performance / Modern GPUs |
| `model_Uint8.sentis` | Sentis | Uint8 | ~3.3GB | Maximum Performance / Mobile / Low-end PC |

## How to use in Unity

1. **Install Sentis**: Ensure you have the `com.unity.sentis` package installed via the Unity Package Manager (2.1.0+ recommended).
2. **Download Model**: Download the `.sentis` file of your choice.
3. **Import**: Drag the `.sentis` file into your Unity Project.
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);
    }
}