Sana Phrase Model

The phrase model of Sana Sender, a macOS app that turns speech into OSC messages for Max/MSP teaching. Its ML Phrases feature compares what a student said with trigger phrases they wrote, by meaning rather than exact words ("switch off the lights" and "valot pois" both match "turn the lights off"). The app downloads these files itself; you don't need to fetch them by hand.

This is a Core ML conversion of sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2 (Apache 2.0, by Nils Reimers and Iryna Gurevych, Making Monolingual Sentence Embeddings Multilingual using Knowledge Distillation, EMNLP 2020). The weights are unchanged apart from int8 quantisation.

Files

Path What
SanaPhraseEmbedder.mlpackage/ Core ML model, int8 weights (118 MB), macOS 15+
tokenizer/ The original model's XLM-R SentencePiece tokenizer (tokenizer.json)

Model

  • Inputs: input_ids, attention_mask: int32, shape (1, 64). Pad with id 1 and mask 0.
  • Output: embedding: float, shape (1, 384). Mean pooling over the mask and L2 normalisation are built in, so the dot product of two outputs is their cosine similarity.
  • Matches the original PyTorch model to cosine ≥ 0.9997; about 6 ms per sentence on Apple Silicon.
  • Lower-case the text and drop punctuation before embedding. The model is case-sensitive, and speech-to-text output is capitalised.

Converted with coremltools 9 (torch 2.7, transformers 4.52); tokenizer_class is set to XLMRobertaTokenizer so that swift-transformers picks the Unigram tokenizer.

License

Apache 2.0, as the original model.

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

Model tree for eetteri/sana-phrase-model