--- library_name: peft base_model: Qwen/Qwen3-4B tags: - lora - sft - transformers - trl - function-calling - telco pipeline_tag: text-generation --- # M1b — Telco Function Calling SFT (Qwen3-4B + LoRA) LoRA adapter fine-tuned on 26 real Viettel KPI functions (Vietnamese, read-only). ## Results (1806 eval samples) | Split | Accuracy | |-------|----------| | abstain | 100.0% | | missing_slot | 99.4% | | unseen | 97.4% | | masked | 94.6% | | seen | 94.0% | | parallel | 80.2% | | multi_step | 54.3% | | **Overall** | **84.9%** | ## Usage ```python from transformers import AutoModelForCausalLM, AutoTokenizer from peft import PeftModel base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B", torch_dtype="bfloat16", device_map="auto") model = PeftModel.from_pretrained(base, "Jun1801/telco-fc-m1b-qwen3-4b") tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen3-4B") ``` ## Training - **Base model**: Qwen/Qwen3-4B - **Dataset**: [Jun1801/telco-fc-dataset](https://huggingface.co/datasets/Jun1801/telco-fc-dataset) — 7,526 samples (real KPI + warmup) - **Method**: SFT with TRL SFTTrainer, LoRA (r=16, alpha=32) - **Epochs**: 3, LR: 2e-4 (cosine decay) - **Final train loss**: 0.088 | **eval loss**: 0.012 - **W&B**: [run fhjp6hke](https://wandb.ai/tiendungcbh1801-hanoi-university-of-science-and-technology/telco-fc/runs/fhjp6hke) ## Output format ```json {"action": "call_function", "call": {"tool_name": "...", "arguments": {...}}} {"action": "call_functions", "calls": [{...}, ...]} {"action": "ask_clarification", "asked_slots": ["..."]} {"action": "abstain", "reason": "..."} ```