Instructions to use python3isfun/qwen3-1.7b-toolcall-gguf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use python3isfun/qwen3-1.7b-toolcall-gguf with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="python3isfun/qwen3-1.7b-toolcall-gguf", filename="qwen3-1.7b-toolcall-Q5_K_M.gguf", )
llm.create_chat_completion( messages = [ { "role": "user", "content": "What is the capital of France?" } ] ) - Notebooks
- Google Colab
- Kaggle
- Local Apps
- llama.cpp
How to use python3isfun/qwen3-1.7b-toolcall-gguf with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M # Run inference directly in the terminal: llama-cli -hf python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M # Run inference directly in the terminal: llama-cli -hf python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M # Run inference directly in the terminal: ./llama-cli -hf python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M
Use Docker
docker model run hf.co/python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M
- LM Studio
- Jan
- vLLM
How to use python3isfun/qwen3-1.7b-toolcall-gguf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "python3isfun/qwen3-1.7b-toolcall-gguf" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "python3isfun/qwen3-1.7b-toolcall-gguf", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M
- Ollama
How to use python3isfun/qwen3-1.7b-toolcall-gguf with Ollama:
ollama run hf.co/python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M
- Unsloth Studio
How to use python3isfun/qwen3-1.7b-toolcall-gguf with Unsloth Studio:
Install Unsloth Studio (macOS, Linux, WSL)
curl -fsSL https://unsloth.ai/install.sh | sh # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for python3isfun/qwen3-1.7b-toolcall-gguf to start chatting
Install Unsloth Studio (Windows)
irm https://unsloth.ai/install.ps1 | iex # Run unsloth studio unsloth studio -H 0.0.0.0 -p 8888 # Then open http://localhost:8888 in your browser # Search for python3isfun/qwen3-1.7b-toolcall-gguf to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for python3isfun/qwen3-1.7b-toolcall-gguf to start chatting
- Pi
How to use python3isfun/qwen3-1.7b-toolcall-gguf with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M
Configure the model in Pi
# Install Pi: npm install -g @mariozechner/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use python3isfun/qwen3-1.7b-toolcall-gguf with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M
Run Hermes
hermes
- Docker Model Runner
How to use python3isfun/qwen3-1.7b-toolcall-gguf with Docker Model Runner:
docker model run hf.co/python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M
- Lemonade
How to use python3isfun/qwen3-1.7b-toolcall-gguf with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull python3isfun/qwen3-1.7b-toolcall-gguf:Q5_K_M
Run and chat with the model
lemonade run user.qwen3-1.7b-toolcall-gguf-Q5_K_M
List all available models
lemonade list
| license: apache-2.0 | |
| base_model: Qwen/Qwen3-1.7B | |
| tags: | |
| - tool-calling | |
| - function-calling | |
| - gguf | |
| - llama.cpp | |
| - on-device | |
| - qwen3 | |
| library_name: llama.cpp | |
| pipeline_tag: text-generation | |
| # qwen3-1.7b-toolcall (Q5_K_M GGUF) | |
| A QLoRA fine-tune of **Qwen3-1.7B** that reliably emits `<tool_call>` blocks for four | |
| local search tools, intended for **on-device inference** (iOS / llama.cpp). Quantized to | |
| **Q5_K_M** (~1.2 GB). | |
| - **Base model:** [Qwen/Qwen3-1.7B](https://huggingface.co/Qwen/Qwen3-1.7B) (Apache-2.0) | |
| - **Method:** QLoRA (Unsloth) — r=16, α=32, all 7 attn/MLP projections, 3 epochs, lr 2e-4, cosine, AdamW-8bit | |
| - **Format:** bare ChatML, no `<think>` blocks | |
| ## What it does | |
| Given a user message, it either calls one of four tools or answers directly (math, chitchat, | |
| general knowledge, questions about the tools). | |
| | Tool | Purpose | | |
| |---|---| | |
| | `search_recipes(query, sort_by)` | find recipes by dish / ingredient | | |
| | `search_events(query, region, max_price)` | find concerts, sports, shows | | |
| | `search_food_categories(query, min_tier)` | browse dish categories by popularity tier (1–5) | | |
| | `search_regions(query)` | look up which cities a region covers | | |
| A tool call is emitted as exactly: | |
| ``` | |
| <tool_call> | |
| {"name": "search_recipes", "arguments": {"query": "cubano"}} | |
| </tool_call> | |
| ``` | |
| ## Prompt format | |
| Plain ChatML, one block per message, then an empty assistant turn to generate: | |
| ``` | |
| <|im_start|>system | |
| {system prompt}<|im_end|> | |
| <|im_start|>user | |
| {user message}<|im_end|> | |
| <|im_start|>assistant | |
| ``` | |
| System prompt the model was trained on: | |
| ``` | |
| You have access to these tools. To use one, reply ONLY with a tool_call block: | |
| <tool_call> | |
| {"name": "TOOL_NAME", "arguments": {"key": "value"}} | |
| </tool_call> | |
| Tools: | |
| - search_recipes(query, sort_by): Find recipes by dish name or ingredient. | |
| - search_events(query, region, max_price): Find concerts, sports, shows. | |
| - search_food_categories(query, min_tier): Browse 100 dish categories by tier (1-5). | |
| - search_regions(query): Look up which cities a region covers. | |
| If the question does NOT need a tool, answer directly without a tool_call block. | |
| ``` | |
| Two-turn flow: the model emits a `<tool_call>`; your app runs the tool and feeds the result | |
| back as a system message (`Tool results:\n{...}\n\nNow answer the user's question using the | |
| results above.`), then the model writes the final natural-language answer. | |
| ## Evaluation | |
| 12-test tool-use suite + a 250-example held-out set. Q5_K_M, temperature 0: | |
| | Metric | Base Qwen3-1.7B | This model (Q5_K_M) | | |
| |---|---|---| | |
| | Overall score | 0.767 | **0.850** | | |
| | Pass rate (≥0.8) | 8/12 | **10/12** | | |
| | Tool-call rate | 70% | **100%** | | |
| | Valid tool-call JSON | 70% | **100%** | | |
| | Correct tool name | 70% | **100%** | | |
| | Held-out tool-name acc (unseen) | 47% | **100%** | | |
| Q5_K_M matches the full-precision model (0.85) and passes under both the trained (no-few-shot) | |
| prompt and a few-shot variant. An **overfitting check** showed train acc = holdout acc = 100% | |
| (zero gap) and 94% on deliberately off-template slang/typo queries — it learned the skill, not | |
| the training set. | |
| ## Usage (llama.cpp) | |
| ```bash | |
| hf download python3isfun/qwen3-1.7b-toolcall-gguf qwen3-1.7b-toolcall-Q5_K_M.gguf --local-dir . | |
| ./llama-cli -m qwen3-1.7b-toolcall-Q5_K_M.gguf --temp 0 -p "<your ChatML prompt>" | |
| ``` | |
| ```python | |
| from llama_cpp import Llama | |
| llm = Llama(model_path="qwen3-1.7b-toolcall-Q5_K_M.gguf", n_ctx=2048) | |
| prompt = ("<|im_start|>system\n" + SYSTEM_PROMPT + "<|im_end|>\n" | |
| "<|im_start|>user\nFind me a recipe for tacos<|im_end|>\n" | |
| "<|im_start|>assistant\n") | |
| print(llm(prompt, temperature=0.0, stop=["<|im_end|>"])["choices"][0]["text"]) | |
| # -> <tool_call>\n{"name": "search_recipes", "arguments": {"query": "tacos"}}\n</tool_call> | |
| ``` | |
| ## Notes & limitations | |
| - Trained against a specific local dataset (recipes/events/food categories/regions); tool | |
| *results* must come from that data for grounded final answers. | |
| - Constrained task (4 tools) — strong scores mean "no overfitting on this skill," not "flawless | |
| on every input." | |
| - A `Q4_K_M` variant (~1.06 GB) also exists; it matches Q5 under the trained prompt but is | |
| slightly less robust under a longer few-shot prompt. | |
| ## License | |
| Apache-2.0, inherited from the Qwen3-1.7B base model. | |