finetuning-LLM
Collection
Fine-tuned LLMs (SFT / DPO / GRPO) on Qwen3.x, Llama 3.2, SmolLM3, EuroLLM, Spark and Ling: personas, HTML/UI generation, tool calling, math. โข 27 items โข Updated
How to use wesjos/Qwen3-4B-toolcall with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="wesjos/Qwen3-4B-toolcall")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("wesjos/Qwen3-4B-toolcall")
model = AutoModelForCausalLM.from_pretrained("wesjos/Qwen3-4B-toolcall", device_map="auto")
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=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use wesjos/Qwen3-4B-toolcall with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "wesjos/Qwen3-4B-toolcall"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "wesjos/Qwen3-4B-toolcall",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/wesjos/Qwen3-4B-toolcall
How to use wesjos/Qwen3-4B-toolcall with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "wesjos/Qwen3-4B-toolcall" \
--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": "wesjos/Qwen3-4B-toolcall",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "wesjos/Qwen3-4B-toolcall" \
--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": "wesjos/Qwen3-4B-toolcall",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use wesjos/Qwen3-4B-toolcall with Docker Model Runner:
docker model run hf.co/wesjos/Qwen3-4B-toolcall
| Model | Dataset | Metric | Subset | Num | Score | Cat.0 |
|---|---|---|---|---|---|---|
| qwen | gpqa | AveragePass@1 | gpqa_extended | 50 | 0.24 | default |
| qwen | gpqa | AveragePass@1 | gpqa_main | 50 | 0.26 | default |
| qwen | gpqa | AveragePass@1 | gpqa_diamond | 50 | 0.22 | default |
| qwen | gpqa | AveragePass@1 | OVERALL | 150 | 0.24 | - |
| qwen | gsm8k | AverageAccuracy | main | 50 | 0.50 | default |
| qwen | tool_bench | Act.EM | in_domain | 42 | 0.1667 | default |
| qwen | tool_bench | Act.EM | out_of_domain | 48 | 0.1667 | default |
| qwen | tool_bench | Act.EM | OVERALL | 90 | 0.1667 | - |
| Model | Dataset | Metric | Subset | Num | Score | Cat.0 |
|---|---|---|---|---|---|---|
| model | gpqa | AveragePass@1 | gpqa_extended | 50 | 0.26 | default |
| model | gpqa | AveragePass@1 | gpqa_main | 50 | 0.36 | default |
| model | gpqa | AveragePass@1 | gpqa_diamond | 50 | 0.38 | default |
| model | gpqa | AveragePass@1 | OVERALL | 150 | 0.3333 | - |
| model | gsm8k | AverageAccuracy | main | 50 | 0.68 | default |
| model | tool_bench | Act.EM | in_domain | 41 | 0.3171 | default |
| model | tool_bench | Act.EM | out_of_domain | 47 | 0.3191 | default |
| model | tool_bench | Act.EM | OVERALL | 88 | 0.3182 | - |
| Model | Dataset | Metric | Subset | Num | Score | Cat.0 |
|---|---|---|---|---|---|---|
| model | gpqa | AveragePass@1 | gpqa_extended | 50 | 0.32 | default |
| model | gpqa | AveragePass@1 | gpqa_main | 50 | 0.22 | default |
| model | gpqa | AveragePass@1 | gpqa_diamond | 50 | 0.18 | default |
| model | gpqa | AveragePass@1 | OVERALL | 150 | 0.24 | - |
| model | gsm8k | AverageAccuracy | main | 50 | 0.48 | default |
| model | tool_bench | Act.EM | in_domain | 43 | 0.1628 | default |
| model | tool_bench | Act.EM | out_of_domain | 47 | 0.1702 | default |
| model | tool_bench | Act.EM | OVERALL | 90 | 0.1667 | - |