Instructions to use Jun1801/telco-fc-m1b-qwen3-4b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use Jun1801/telco-fc-m1b-qwen3-4b with PEFT:
from peft import PeftModel from transformers import AutoModelForCausalLM base_model = AutoModelForCausalLM.from_pretrained("/workspace/models/Qwen3-4B") model = PeftModel.from_pretrained(base_model, "Jun1801/telco-fc-m1b-qwen3-4b") - Transformers
How to use Jun1801/telco-fc-m1b-qwen3-4b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Jun1801/telco-fc-m1b-qwen3-4b") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Jun1801/telco-fc-m1b-qwen3-4b", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Jun1801/telco-fc-m1b-qwen3-4b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Jun1801/telco-fc-m1b-qwen3-4b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Jun1801/telco-fc-m1b-qwen3-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Jun1801/telco-fc-m1b-qwen3-4b
- SGLang
How to use Jun1801/telco-fc-m1b-qwen3-4b with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Jun1801/telco-fc-m1b-qwen3-4b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Jun1801/telco-fc-m1b-qwen3-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Jun1801/telco-fc-m1b-qwen3-4b" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Jun1801/telco-fc-m1b-qwen3-4b", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Jun1801/telco-fc-m1b-qwen3-4b with Docker Model Runner:
docker model run hf.co/Jun1801/telco-fc-m1b-qwen3-4b
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
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 โ 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
Output format
{"action": "call_function", "call": {"tool_name": "...", "arguments": {...}}}
{"action": "call_functions", "calls": [{...}, ...]}
{"action": "ask_clarification", "asked_slots": ["..."]}
{"action": "abstain", "reason": "..."}
- Downloads last month
- 8