加载中…
加载中…
A sentence-similarity model that tells whether a spoken sentence makes a given point. It is all-MiniLM-L12-v2, fine-tuned on short written points paired with real and synthetic speech.
General-purpose embedding models score topic overlap. To them, "We had slow support tickets with the vendor" looks about as close to "Delay came from the vendor API change" as a true paraphrase does. This model is trained to separate the two: a sentence that makes the point scores high, and a sentence on the same topic that makes a different claim scores low. It keeps the base model's size (33M parameters, 34 MB as int8 ONNX) and speed, so it runs in a browser.
In the browser with Transformers.js (int8, 34 MB):
import { pipeline } from '@huggingface/transformers';
const embed = await pipeline('feature-extraction', 'struan-assembly/spoken-point-minilm', { dtype: 'q8' });
const [a, b] = await Promise.all(['Data migration is finished', 'All the old records have been moved over and verified']
.map(t => embed(t, { pooling: 'mean', normalize: true })));
const similarity = a.data.reduce((s, v, i) => s + v * b.data[i], 0);
In Python with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer('struan-assembly/spoken-point-minilm')
a, b = model.encode(['Data migration is finished', 'All the old records have been moved over and verified'], normalize_embeddings=True)
similarity = a @ b
On 84 held-out points (252 sentences that make them and 168 near misses), compared with the base model:
| all-MiniLM-L12-v2 | spoken-point-minilm | |
|---|---|---|
| Ranks a true paraphrase above a near miss | 51.1% | 86.1% |
| Paraphrases scoring 0.48 or higher | 65.5% | 74.2% |
| Near misses scoring 0.48 or higher | 66.7% | 17.3% |
The base model ranks paraphrases above near misses at about chance level. The fine-tuned model separates them well, though not perfectly.
Apache 2.0, the same as the base model, all-MiniLM-L12-v2 by the sentence-transformers team. Training uses the AMI Meeting Corpus (CC BY 4.0, University of Edinburgh and the AMI Consortium). Fine-tuned by Struan Assembly, LLC.