Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

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.


🧩 Which entrypoint do I want?

This plugin ships two opm.pipeline entrypoints, backed by the same Model2VecIntentPipeline class but running in different modes:

  • ovos-m2v-pipeline (Model2VecIntentPipeline, mode: "classifier", the default) loads a pretrained, frozen classification head with a fixed label set baked in at training time. It is fast and needs no runtime fitting, but it can only ever return the labels it was trained on. It still tracks OVOS-INTENT-4 ovos.intent.register.template registrations from skills so it can gate/allowlist a trained label, but registering a new intent that was not part of training does not teach it to that skill — it will never be matched.
  • ovos-m2v-prototype-pipeline (Model2VecPrototypePipeline, mode: "prototype") loads a bare embedding model with no classification head and builds its label set entirely at runtime, from the example utterances supplied by Adapt/Padatious registrations and OVOS-INTENT-4 template registrations. Use this entrypoint whenever skills need to register new intents (including custom/dynamically-created skills) that must actually be matched.

Both entrypoints can be enabled together — configure each independently under its own intents.<entrypoint-name> key (see Model2VecPrototypePipeline docstring for an example) — so a deployment can keep the fast frozen classifier for its core trained intents while the prototype matcher picks up everything else.


🧠 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

The model2vec intent pipeline was first prototyped by TigreGótico under the ILENIA project for OpenVoiceOS and substantially extended — an embeddings-only mode and new models — through the NGI0 Commons Fund.

This project was funded by the Ministerio para la Transformación Digital y de la Función Pública and Plan de Recuperación, Transformación y Resiliencia - Funded by EU – NextGenerationEU within the framework of the project ILENIA with reference 2022/TL22/00215337

NGI0 Commons Fund

This project was funded through the NGI0 Commons Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101135429.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ovos_m2v_pipeline-0.5.4a1.tar.gz (44.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ovos_m2v_pipeline-0.5.4a1-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file ovos_m2v_pipeline-0.5.4a1.tar.gz.

File metadata

  • Download URL: ovos_m2v_pipeline-0.5.4a1.tar.gz
  • Upload date:
  • Size: 44.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for ovos_m2v_pipeline-0.5.4a1.tar.gz
Algorithm Hash digest
SHA256 7fcf30eeb288df2b10d682bf77c7c632178f59e99c58358ac5004a71dcae96ae
MD5 4fb33211ad0d1f45155f1c0ffe7771cf
BLAKE2b-256 c1373f1850c8300324efd941ec6ace10a914e12000f4a66ccbe3a98c51583d62

See more details on using hashes here.

File details

Details for the file ovos_m2v_pipeline-0.5.4a1-py3-none-any.whl.

File metadata

File hashes

Hashes for ovos_m2v_pipeline-0.5.4a1-py3-none-any.whl
Algorithm Hash digest
SHA256 ad64a88160b3d19370559a4b3d7baf541772bb3e2ca35bf666e8daac0a523151
MD5 68395094e1fa0becba3a43a983fced45
BLAKE2b-256 ec6f084f42440f956ba0efe337c583afa456bc4ca9a30e11a1ec84e0b4196cb6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page