Pippe's picture
Upgraded to sentis 1.4.0-pre3
ca685d7
metadata
license: mit
library_name: unity-sentis
pipeline_tag: zero-shot-classification

Deberta v3 zeroshot for Unity Sentis

This is the DeBERTaV3 Model in the Sentis format to run on Unity 2023. The model can do one universal classification task: determine whether a hypothesis is "true" or "not true" given a text.

There are more models of different sizes that are compatible made by MoritzLaurer

How to Use

  • Ensure Sentis version is 1.4.0-pre.3
  • Create a new scene in Unity 2023
  • Add the DebertaV3.cs file to a GameObject in the scene
  • Assign model and vocabulary
  • Press play, the classification scores will show in the Console

Example Inputs

text = "Angela Merkel is a politician in Germany and leader of the CDU"

classes = ["This example is about politics", "This example is about economy", "This example is about entertainment", "This example is about environment"]

Example Outputs

[politics] Entailment Score: 0.9998765

[economy] Entailment Score: 0.0008297313

[entertainment] Entailment Score: 4.86502E-05

[environment] Entailment Score: 6.163981E-05

Unity Sentis

Sentis is the inference engine for Unity. More can be found about it here