intent-classifier / README.md
kon171verma's picture
Update repository references for kon171verma Hugging Face account
dc11e84
|
Raw History Blame Contribute Delete
6.65 kB
---
base_model:
- Qwen/Qwen3-0.6B
- Qwen/Qwen2.5-0.5B-Instruct
- HuggingFaceTB/SmolLM2-360M-Instruct
- meta-llama/Llama-3.2-1B-Instruct
library_name: transformers
pipeline_tag: text-classification
tags:
- intent-classification
- tool-routing
- gguf
- onnx
- llama.cpp
- onnxruntime
license: other
---
# Intent Classifier — Release Models
Small, fine-tuned language models for routing a user request to one tool. Each
model returns a compact routing label, not a natural-language response.
The current recommended release is **v2.1 Qwen2.5-0.5B** (`v2.1-qwen2.5-0.5b`):
it achieved 99.9% test accuracy in the v2.1 evaluation.
## Choose a release
| Version | Scope | Recommended completed models |
| --- | --- | --- |
| v2.1 | Full 10k positional-ID DoRA+ experiments, configuration D | Qwen3-0.6B: 99.8% test; Qwen2.5-0.5B: 99.9% test; SmolLM2-360M: 99.7% test. **Recommended: Qwen2.5-0.5B**—the highest-scoring and fastest of the three (253 ms P50). |
| v2.0 | 1k positional-ID experiment matrix (800/100/100) | **DoRA+ Qwen3-0.6B D** (99% validation, 100% test) and **DoRA+ Llama3.2-1B C** (96% validation, 100% test). |
| v1.0 | Initial 1k name-output experiments | **LoRA Qwen3-0.6B C** (99% test) and **LoRA Llama3.2-1B C** (100% test). |
Use v2.1 or v2.0 when your application can map a positional ID back to its
tool. Use v1.0 only when your integration requires the model to emit a tool
name directly.
## Output contract
These are generative routing models. Build the prompt as plain text exactly in
the relevant format below, tokenize that text directly, and read only the
generated continuation. Do **not** wrap the prompt in the base model's chat
template: the examples below are the complete prompt content before any model
tokenizer adds its own special or chat-template tokens.
| Release | Native output | No-tool output | Evaluator behavior |
| --- | --- | --- | --- |
| v1.0 | Tool name, such as `call_handler` | `none` | Used directly as the canonical tool name. |
| v2.x | Positional tool ID, such as `d` | `-` | Convert the ID to the tool name from the prompt's tool list before scoring or invoking the tool. |
### Example: v1.0 (tool-name output)
For `Call my wife.`, the expected raw model output is `call_handler`.
```text
You are a tool router.
Rules:
- Return only the tool name.
- Return "none" if no tool matches.
- Do not explain.
Available Tools:
Name: health_monitor
Description: Monitors driver biometrics such as heart rate, blood oxygen, and cumulative fatigue score from wearables.
Name: insurance_claims
Description: Initiates, documents, and tracks vehicle insurance claims including photo upload and damage assessment.
Name: nav_route_planner
Description: Plans optimal routes, provides turn-by-turn navigation, and recalculates routes around obstacles.
Name: call_handler
Description: Initiates, receives, holds, and terminates hands-free phone calls.
Name: remote_vehicle_lock
Description: Remotely locks or unlocks vehicle doors, boot, and windows and reports current lock state.
User Request:
Call my wife.
Selected Tool:
```
### Example: v2.x (positional-ID output)
For the same request, `call_handler` is the fourth displayed tool, so the
expected raw model output is `d`. Convert `d` back to `call_handler` using the
tool list before calculating accuracy or calling the tool.
```text
You are a tool router.
Available tools are listed with id, name, and description.
Rules:
- Return only the tool id.
- Use the id from the available tools list.
- Return "-" if no tool matches.
- Do not explain.
Available Tools:
ID | Name | Description
a | health_monitor | Monitors driver biometrics such as heart rate, blood oxygen, and cumulative fatigue score from wearables.
b | insurance_claims | Initiates, documents, and tracks vehicle insurance claims including photo upload and damage assessment.
c | nav_route_planner | Plans optimal routes, provides turn-by-turn navigation, and recalculates routes around obstacles.
d | call_handler | Initiates, receives, holds, and terminates hands-free phone calls.
e | remote_vehicle_lock | Remotely locks or unlocks vehicle doors, boot, and windows and reports current lock state.
User Request:
Call my wife.
Selected Tool:
```
## Artifacts
Each release/model folder contains the same inference formats.
- `transformers/`: merged full-weight Transformers checkpoint in safetensors
format, plus tokenizer and generation configuration.
- `gguf/<quant>/model.gguf`: llama.cpp-compatible exports (`Q4_K_M`, `Q6_K`,
and `Q8_0`).
- `onnx/<variant>/`: ONNX Runtime exports. Keep every file in a variant folder
together; `model.onnx` can reference an adjacent external-data file.
The individual release README and `benchmark_provenance.json` record the exact
base-model revision, adapter configuration, prompt format, and artifact
provenance.
## Licensing and notices
This is a **mixed-license repository**, so its Hugging Face metadata is marked
`other` rather than `apache-2.0`. Fine-tuning, merging, quantizing, and
exporting a model do not replace the license of its base-model weights.
The Llama release artifacts are **Built with Llama**.
| Artifacts | Upstream license | What a redistributor must do |
| --- | --- | --- |
| Qwen3-0.6B and Qwen2.5-0.5B derivatives | [Apache License 2.0](https://huggingface.co/Qwen/Qwen3-0.6B) | Comply with Apache-2.0, including its license and notice requirements. |
| SmolLM2-360M derivatives | [Apache License 2.0](https://huggingface.co/HuggingFaceTB/SmolLM2-360M-Instruct) | Comply with Apache-2.0, including its license and notice requirements. |
| Llama-3.2-1B derivatives | [Llama 3.2 Community License](https://huggingface.co/meta-llama/Llama-3.2-1B-Instruct) | Comply with the agreement and Acceptable Use Policy. Distributed copies must include the agreement and a `Notice` text file containing Meta's required attribution. |
For a release containing Llama artifacts, include the Llama 3.2 Community
License Agreement and a `Notice` file with this attribution:
```text
Llama 3.2 is licensed under the Llama 3.2 Community License, Copyright © Meta Platforms, Inc. All Rights Reserved.
```
Before publishing, also confirm that the training/evaluation data and any
third-party conversion code permit the intended distribution. This summary is
operational guidance, not legal advice.
## Related repositories
- Training code: <https://github.com/kon171verma/intent-classifier>
- Inference and benchmarking: <https://github.com/kon171verma/intent-classifier-edge-inference>
- Experiment adapters: <https://huggingface.co/kon171verma/intent-classifier-experiments>