Qwen3.5-0.8B-LoRA-Voice-Commands-EN-AR
intent extraction from text commands
2 min readupdated
This model is a LoRA adapter (a lightweight add-on for fine-tuning a base model) built on top of the compact LLM (large language model) Qwen/Qwen3.5-0.8B. It is designed for NLU (natural language understanding) tasks and text assistants: it takes an English or Arabic text command as input and returns a structured JSON object containing the intent and parameters (slots). The model does not process audio directly, working strictly with text across a specific list of 60 intents and 55 slots. This release will be useful for voice interface and smart home developers who need a lightweight command parser for English and Arabic.
Key features
- Bilingual support: supports English and Arabic (with higher quality in English).
- Compact footprint: only 0.8 billion parameters in the base model, suitable for modest hardware.
- Strict format: outputs results as a ready-to-use JSON object with predefined keys and values.
- Specialization: trained on the MASSIVE 1.1 dataset to work with a fixed set of commands.
What you can do
- Bot integration: use in a text assistant to parse user queries.
- IoT control: apply for smart home command recognition ("turn off the lights", "wake me up at seven in the morning").
- Research: study how LoRA adapters perform on classification and entity extraction tasks.
- NLU testing: run a local script to generate intents and slots for English and Arabic phrases.
Example
A prompt containing a system instruction and a text command returns a JSON response:
import torch
from huggingface_hub import hf_hub_download
from peft import PeftModel
from transformers import AutoTokenizer, AutoModelForImageTextToText
repo = "bola23/Qwen3.5-0.8B-LoRA-Voice-Commands-EN-AR"
base = "Qwen/Qwen3.5-0.8B"
tokenizer = AutoTokenizer.from_pretrained(base)
model = AutoModelForImageTextToText.from_pretrained(base)
model = PeftModel.from_pretrained(model, repo).merge_and_unload().to("cuda", torch.float16).eval()Read more
DetailsBenchmarks (on the MASSIVE 1.1 test): intent accuracy of 77.4% (85.2% for English and 69.5% for Arabic), full slot match rate of 56.8%, slot F1 score of 0.692.
Hardware requirements: a single NVIDIA T4 GPU, peak VRAM usage of 7.6 GB, training time of 104 minutes.
Limitations: beta version, works only with the predefined list of 60 intents and 55 slots; conversational speech and Arabic dialects were not tested.
Training details: LoRA (rank 16, alpha 32, dropout 0.05) applied to the language model projection layers, 3 epochs (741 steps), dataset of 3,945 labeled phrases.










Comments