Instructions to use beyoru/Qwen3-4B-I-1509 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use beyoru/Qwen3-4B-I-1509 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="beyoru/Qwen3-4B-I-1509") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("beyoru/Qwen3-4B-I-1509") model = AutoModelForCausalLM.from_pretrained("beyoru/Qwen3-4B-I-1509") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use beyoru/Qwen3-4B-I-1509 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "beyoru/Qwen3-4B-I-1509" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "beyoru/Qwen3-4B-I-1509", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/beyoru/Qwen3-4B-I-1509
- SGLang
How to use beyoru/Qwen3-4B-I-1509 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 "beyoru/Qwen3-4B-I-1509" \ --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": "beyoru/Qwen3-4B-I-1509", "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 "beyoru/Qwen3-4B-I-1509" \ --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": "beyoru/Qwen3-4B-I-1509", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use beyoru/Qwen3-4B-I-1509 with Docker Model Runner:
docker model run hf.co/beyoru/Qwen3-4B-I-1509
๐ Qwen3-4B-I-1509
๐งพ Model Overview
- ๐๏ธ Base Model: Qwen3-4B-Instruct-2507
- ๐ฏ Training Method: Reinforcement Learning (GRPO) with multiple reward functions
This model (Qwen3-4B-I-1509) is finetuned for ๐ง tool-use and ๐ function call generation.
๐ Reward Functions
The model was trained with multi-signal rewards:
๐ Rule-based Reward
โ๏ธ Checks correctness of function call name and arguments.
โ Partial credit for matching subsets of arguments.๐ Self-Certainty Reward
โก Encourages confident predictions.๐ง Tool-Call Reward
โ Validates structural correctness.
โ๏ธ Training Configuration
- โก Optimizer: AdamW
- ๐ Learning Rate: 5e-6 with cosine decay (
min_lr_rate=0.1) - โณ Scheduler: cosine_with_min_lr
- ๐ Generations per Prompt: 4
๐ Eval Result:
Important notes:
Why it lower than technical report?
There have a limit of hardware so have to reduce some max tokens when evaluation for both 2 models
Fair evaluate ?
I use the same configuration for all the models I review for larger or with a same size model.
Tau-Bench
| ๐ง Model | โ๏ธ Airline | ๐๏ธ Retail |
|---|---|---|
| Qwen3-4B-I-1509 | 0.2800 | 0.2783 |
| Base Model | 0.3000 | 0.2261 |
ACEBench
| Model | Overall Accuracy |
|---|---|
| Qwen3-4B-I-1509 | 0.677 |
| Qwen3-4B-Instruct-2507 (base) | 0.635 |
| Salesforce/Llama-xLAM-2-8b-fc-r | 0.5792 |
curently upadate more
Contribute:
I would be happy to receive a contribution to this model and get feedback about performance, quality of model
Support me at:
๐ Citation
If you use this model in your research or application, please cite:
@misc{qwen3-4b-i-1509,
title = {Qwen3-4B-I-1509: Fine-tuned Qwen3-4B-Instruct with GRPO for Tool-Use and Function Calling},
author = {Beyoru},
year = {2025},
howpublished = {\url{https://huggingface.co/beyoru/Qwen3-4B-I-1509}}
}
- Downloads last month
- 16
Model tree for beyoru/Qwen3-4B-I-1509
Unable to build the model tree, the base model loops to the model itself. Learn more.