Skip to content

OpenVoiceOS/ovos-m2v-pipeline

Repository files navigation

Ask DeepWiki

OVOS Model2Vec Intent Pipeline

An intent matching pipeline for OpenVoiceOS (OVOS), powered by the Model2Vec model for intent classification.

This plugin uses a pretrained Model2Vec model to classify natural language utterances into intent labels registered with the system (Adapt, Padatious, and plugin-specific labels). It only considers intents from loaded skills and ignores any labels from unregistered intents. This pipeline is ideal for use cases where other deterministic engines fail to provide a high-confidence match.


✨ Features

  • ✅ Powered by Model2Vec for high-quality intent classification
  • ✅ Plug-and-play integration with OVOS pipelines
  • ✅ Model2Vec trained on GitLocalize exports
  • ✅ English models in various sizes, distilled from Potion
  • ✅ Multilingual model, distilled from LaBSE
  • ✅ Syncs Adapt and Padatious intents dynamically at runtime
  • ✅ Only considers intents from loaded skills, ignoring unregistered labels

💡 english models size ranges from 8MB to 150MB, the multilingual model (default) is over 500MB


📦 Installation

You can install the plugin via pip:

pip install ovos-m2v-pipeline

⚙️ Configuration

In your mycroft.conf:

{
  "intents": {
    "ovos-m2v-pipeline": {
      "model": "Jarbas/ovos-model2vec-intents-LaBSE",
      "conf_high": 0.7,
      "conf_medium": 0.5,
      "conf_low": 0.15,
      "ignore_intents": []
    }
  }
}
  • model: Path to your pretrained Model2Vec model or huggingface repo.
  • conf_xxx: Minimum confidence threshold for intent matching.
  • ignore_intents: List of intents to ignore during matching.
  • prototype_strategy: Scoring strategy for prototype mode ("max_over_all" default — back-compatible). See docs/strategies.md.
  • prototype_top_k: Top-k cosines averaged by the top_k_mean strategy (default 3).
  • prototype_tau: Softmax temperature for the softmax_weighted strategy (default 0.1).

⚠️ The Model2Vec model is pretrained based on GitLocalize exports and cannot learn new skills dynamically.


🧠 Usage

The Model2VecIntentPipeline class integrates with the OVOS intent system. It:

  1. Receives an utterance (text).
  2. Predicts intent labels using the pretrained Model2Vec model.
  3. Filters out intents that are not part of the loaded skills.
  4. Returns a match for the highest-confidence intent from the list of valid intents.

🧪 Tips

  • Tune min_conf to control the confidence threshold for intent matching.
  • Use the ignore_intents list to filter out specific problematic intent from predictions.
  • Syncing of Adapt and Padatious intents is done automatically at runtime via the OVOS message bus.

💡 pre-trained models available in this huggingface collection ovos-model2vec-intents


🛡 License

This project is licensed under the Apache 2.0 License.


🙏 Credits

Originally an experimental research project by TigreGoticoLda, polished and donated to OpenVoiceOS as part of the NLnet NGI0 Commons Fund under grant agreement No 101135429.

NGI0 / NLnet

About

No description or website provided.

Topics

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages