Downloads · 30 days
0
Balasandhya/llm-tool-call-lora-Qwen0.5B
llm-tool-call-lora-Qwen0.5B is a machine learning model from Balasandhya. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
Fine-tuning Qwen 2.5-0.5B on a small synthetic dataset to make structured JSON tool calls using QLoRA.
Downloads · 30 days
0
Access
Public
Updated Mar 12, 2026
Repo size
156 MB
Likes
0
Public
Click a slice to open those files.
.safetensors88.2 MB · 46%
From the Hugging Face model README
Fine-tuning Qwen 2.5-0.5B on a small synthetic dataset to make structured JSON tool calls using QLoRA.
This is Phase 1 of a 3-phase experiment. See the full experiment repo for SFT + GRPO on real data.
Trains a 0.5B model to respond to natural language with structured tool calls:
{"tool": "get_stock_price", "arguments": {"ticker": "MSFT"}}
| Model | Qwen/Qwen2.5-0.5B-Instruct |
| Method | QLoRA (4-bit, LoRA rank 16) |
| Dataset | 14 hand-written synthetic examples |
| Tools | get_weather, search_web, calculator, get_stock_price |
| Platform | Google Colab (T4 GPU) |
Evaluated on 10 queries (5 seen during training, 5 unseen):
| Metric | Score |
|---|---|
| JSON Valid | 30% |
| Correct Tool Name | 20% |
| Correct Arguments | 10% |
| Full Match (strict) | 0% |
| In-distribution | 0/5 |
| Out-of-distribution | 0/5 |
Key observations:
"weather" instead of "get_weather")"ticker_symbol" instead of "ticker")| File | Description |
|---|---|
qwen25_tool_call_finetune.py | Training script — SFT with synthetic data |
Qwen2.5-0.5B_tool_call_finetune_eval.py | Evaluation script — scores model on 10 queries |
"ticker_symbol" vs "ticker" counts as failureQwen2.5-0.5B • QLoRA • SFT • trl • peft • Google Colab T4