Views
No views yet
Qwen/Qwen2.5-7B-Instruct that
classifies a banking customer message into one of the 77 Banking77 intents.| Metric | Base Qwen2.5-7B-Instruct (prompted) | This model (QLoRA) |
|---|---|---|
| Accuracy | 60.0% | 93.5% |
| Macro-F1 | 0.493 | 0.935 |
| Invalid-label rate | 2.1% | 0.0% |
| Mean latency / query | 125 ms | 163 ms |
Qwen/Qwen2.5-7B-Instructpeft, trl, bitsandbytes, transformers.1vllm serve Qwen/Qwen2.5-7B-Instruct \
2 --enable-lora --lora-modules router=MCMZ10/Qwen2.5-7B-Banking77-Router-QLoRA \
3 --max-lora-rank 16
4# then POST /v1/chat/completions with model="router"1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4base = AutoModelForCausalLM.from_pretrained("Qwen/Qwen2.5-7B-Instruct", device_map="auto")
5model = PeftModel.from_pretrained(base, "MCMZ10/Qwen2.5-7B-Banking77-Router-QLoRA")
6tok = AutoTokenizer.from_pretrained("Qwen/Qwen2.5-7B-Instruct")ml/prepare_data.py).