File size: 1,051 Bytes
ab1e40d
11eee88
dea59e5
2e4f09d
4a6db11
 
ab1e40d
11eee88
4a6db11
11eee88
4a6db11
11eee88
 
 
4a6db11
 
 
 
 
11eee88
4a6db11
 
24438fc
4a6db11
 
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
---
license: apache-2.0
library_name: unity-sentis
pipeline_tag: sentence-similarity
tags:
  - unity-inference-engine
---

# Mini LM in Unity 6 with Inference Engine

This is the [Mini LM v6 model](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) model running in Unity 6 with Inference Engine. Mini LM is a sentence similarity model that compares different sentences and gives a score depending on how similar they are.

## How to Use

* Create a new scene in Unity 6;
* Install `com.unity.ai.inference` from the package manager;
* Add the `RunMiniLM.cs` script to the Main Camera;
* Drag the `MiniLMv6.onnx` asset from the `models` folder into the `Model Asset` field;
* Drag the `vocab.txt` asset from the `data` folder into the `Vocab Asset` field;

## Preview
Enter play mode. If working correctly the sentence similarity score will be logged to the console.

## Inference Engine
Inference Engine is a neural network inference library for Unity. Find out more [here](https://docs.unity3d.com/Packages/com.unity.ai.inference@latest).