A fine-tuned Qwen3-0.6B model for multi-turn bash function calling. Trained using knowledge distillation from Qwen3-235B, this 0.6B parameter model achieves 100% tool-call accuracy on our test set over multiple turns while being small enough to run locally on any machine.
You can follow instructions in our demo repository:
github
1# Download and create Ollama model
2hf download distil-labs/distil-qwen3-0.6b-SHELLper model_fp16.gguf Modelfile --local-dir distil_model
3cd distil_model && ollama create distil_model -f Modelfile
4cd ..
1from transformers import AutoModelForCausalLM, AutoTokenizer
2
3model = AutoModelForCausalLM.from_pretrained("distil-labs/distil-qwen3-0.6b-SHELLper")
4tokenizer = AutoTokenizer.from_pretrained("distil-labs/distil-qwen3-0.6b-SHELLper")
5
6tools = [
7 {
8 "type": "function",
9 "function": {
10 "name": "ls",
11 "description": "List directory contents",
12 "parameters": {
13 "type": "object",
14 "properties": {
15 "folder": {"type": "string", "description": "Path to the folder to list"}
16 },
17 "required": ["folder"]
18 }
19 }
20 }
21]
22
23messages = [
24 {"role": "system", "content": "You are a helpful assistant that executes bash commands."},
25 {"role": "user", "content": "List all files in the current directory"}
26]
27
28text = tokenizer.apply_chat_template(messages, tools=tools, tokenize=False, add_generation_prompt=True)
29inputs = tokenizer(text, return_tensors="pt")
30outputs = model.generate(**inputs, max_new_tokens=256, temperature=0)
31print(tokenizer.decode(outputs[0], skip_special_tokens=True))
1[
2 {"role": "user", "content": "List all files in the current directory"},
3 {"role": "assistant", "tool_calls": [{"function": {"name": "ls", "arguments": {"folder": "."}}}]},
4 {"role": "user", "content": "Now go to the src folder"}
5]
This model is released under the Apache 2.0 license.
1@misc{distil-qwen3-0.6b-shellper,
2 author = {Distil Labs},
3 title = {Distil-Qwen3-0.6B-SHELLper: A Fine-tuned Model for Multi-turn Bash Function Calling},
4 year = {2025},
5 publisher = {Hugging Face},
6 url = {https://huggingface.co/distil-labs/distil-qwen3-0.6b-SHELLper}
7}