How to use from the
Use from the
unity-sentis library
string modelName = "[Your model name here].sentis";
Model model = ModelLoader.Load(Application.streamingAssetsPath + "/" + modelName);
IWorker engine = WorkerFactory.CreateWorker(BackendType.GPUCompute, model);
// Please see provided C# file for more details

Mini LM in Unity 6 with Inference Engine

This is the Mini LM v6 model 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.

Downloads last month
38
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support