Text Generation
GGUF
Safetensors
qwen3_5_moe
Mixture of Experts
apex
quantized
imatrix
torch-imatrix
mtp
speculative-decoding
coding
agentic-coding
llama.cpp
conversational
Instructions to use Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF # Run inference directly in the terminal: llama cli -hf Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF # Run inference directly in the terminal: llama cli -hf Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF
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 Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF # Run inference directly in the terminal: ./llama-cli -hf Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF
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 Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF
Use Docker
docker model run hf.co/Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF
- LM Studio
- Jan
- vLLM
How to use Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Myric/KAT-Coder-V2.5-Dev-MTP-APEX-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": "Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF
- Ollama
How to use Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF with Ollama:
ollama run hf.co/Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF
- Unsloth Desktop
- Pi
How to use Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF with Docker Model Runner:
docker model run hf.co/Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF
- Lemonade
How to use Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF
Run and chat with the model
lemonade run user.KAT-Coder-V2.5-Dev-MTP-APEX-GGUF-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF
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 Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "Myric/KAT-Coder-V2.5-Dev-MTP-APEX-GGUF" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Upload TOOL_CALLING.md with huggingface_hub
Browse files- TOOL_CALLING.md +152 -0
TOOL_CALLING.md
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Tool calling with these APEX quants (reproducible)
|
| 2 |
+
|
| 3 |
+
Captured against the `IQ3_XXS` quant. Turn 2 depends on turn 1's result (a chained call, not a one-off), and a distractor tool (`search_web`) is offered but correctly never called.
|
| 4 |
+
|
| 5 |
+
## Server
|
| 6 |
+
|
| 7 |
+
```bash
|
| 8 |
+
llama-server --jinja --ctx-size 8192 -fa on --temp 0.6 --top-p 0.9 --repeat-penalty 1.05 --model <this-quant>.gguf --host 127.0.0.1 --port 8092
|
| 9 |
+
```
|
| 10 |
+
|
| 11 |
+
(this GGUF carries its own chat template, so `--jinja` alone is enough — no `--chat-template-file` needed.)
|
| 12 |
+
|
| 13 |
+
## System prompt
|
| 14 |
+
|
| 15 |
+
```
|
| 16 |
+
You are a helpful assistant with access to tools. When a tool is needed, call it; when it returns a result, answer the user directly using that result.
|
| 17 |
+
```
|
| 18 |
+
|
| 19 |
+
## Tools offered
|
| 20 |
+
|
| 21 |
+
```json
|
| 22 |
+
[
|
| 23 |
+
{
|
| 24 |
+
"type": "function",
|
| 25 |
+
"function": {
|
| 26 |
+
"name": "get_user_location",
|
| 27 |
+
"description": "Get the user's current city.",
|
| 28 |
+
"parameters": {
|
| 29 |
+
"type": "object",
|
| 30 |
+
"properties": {}
|
| 31 |
+
}
|
| 32 |
+
}
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"type": "function",
|
| 36 |
+
"function": {
|
| 37 |
+
"name": "get_weather",
|
| 38 |
+
"description": "Get the current weather for a location.",
|
| 39 |
+
"parameters": {
|
| 40 |
+
"type": "object",
|
| 41 |
+
"properties": {
|
| 42 |
+
"location": {
|
| 43 |
+
"type": "string",
|
| 44 |
+
"description": "City name"
|
| 45 |
+
},
|
| 46 |
+
"unit": {
|
| 47 |
+
"type": "string",
|
| 48 |
+
"enum": [
|
| 49 |
+
"celsius",
|
| 50 |
+
"fahrenheit"
|
| 51 |
+
]
|
| 52 |
+
}
|
| 53 |
+
},
|
| 54 |
+
"required": [
|
| 55 |
+
"location"
|
| 56 |
+
]
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "function",
|
| 62 |
+
"function": {
|
| 63 |
+
"name": "search_web",
|
| 64 |
+
"description": "Search the web for a query.",
|
| 65 |
+
"parameters": {
|
| 66 |
+
"type": "object",
|
| 67 |
+
"properties": {
|
| 68 |
+
"query": {
|
| 69 |
+
"type": "string"
|
| 70 |
+
}
|
| 71 |
+
},
|
| 72 |
+
"required": [
|
| 73 |
+
"query"
|
| 74 |
+
]
|
| 75 |
+
}
|
| 76 |
+
}
|
| 77 |
+
}
|
| 78 |
+
]
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
## Conversation
|
| 82 |
+
|
| 83 |
+
**User:** What is the weather at my current location? Use celsius.
|
| 84 |
+
|
| 85 |
+
**Turn 1:** LLM sent properly formatted JSON to the test server
|
| 86 |
+
|
| 87 |
+
<details><summary>raw response JSON</summary>
|
| 88 |
+
|
| 89 |
+
```json
|
| 90 |
+
{
|
| 91 |
+
"role": "assistant",
|
| 92 |
+
"content": "",
|
| 93 |
+
"reasoning_content": "I need to get the user's current location first, and then get the weather for that location in celsius. Let me start by getting the user's location.\n",
|
| 94 |
+
"tool_calls": [
|
| 95 |
+
{
|
| 96 |
+
"type": "function",
|
| 97 |
+
"function": {
|
| 98 |
+
"name": "get_user_location",
|
| 99 |
+
"arguments": "{}"
|
| 100 |
+
},
|
| 101 |
+
"id": "ubllaF0cqjmv496J8GurXOhRxQ1X0VDw"
|
| 102 |
+
}
|
| 103 |
+
]
|
| 104 |
+
}
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
</details>
|
| 108 |
+
|
| 109 |
+
**Tool result (`get_user_location`):** `{"city": "Tokyo"}`
|
| 110 |
+
|
| 111 |
+
**Turn 2:** LLM sent properly formatted JSON to the test server
|
| 112 |
+
|
| 113 |
+
<details><summary>raw response JSON</summary>
|
| 114 |
+
|
| 115 |
+
```json
|
| 116 |
+
{
|
| 117 |
+
"role": "assistant",
|
| 118 |
+
"content": "",
|
| 119 |
+
"reasoning_content": "Now I have the user's location: Tokyo. Let me get the weather for Tokyo in celsius.\n",
|
| 120 |
+
"tool_calls": [
|
| 121 |
+
{
|
| 122 |
+
"type": "function",
|
| 123 |
+
"function": {
|
| 124 |
+
"name": "get_weather",
|
| 125 |
+
"arguments": "{\"location\":\"Tokyo\",\"unit\":\"celsius\"}"
|
| 126 |
+
},
|
| 127 |
+
"id": "9LZjmuRGczb44iPrUACoU9LIqQDdK4Op"
|
| 128 |
+
}
|
| 129 |
+
]
|
| 130 |
+
}
|
| 131 |
+
```
|
| 132 |
+
|
| 133 |
+
</details>
|
| 134 |
+
|
| 135 |
+
**Tool result (`get_weather`):** `{"temp_c": 18, "conditions": "cloudy"}`
|
| 136 |
+
|
| 137 |
+
**Turn 3:** LLM correctly gave a plain-language final answer, no further tool call
|
| 138 |
+
|
| 139 |
+
> The weather at your current location (Tokyo) is **18°C** and **cloudy**.
|
| 140 |
+
|
| 141 |
+
<details><summary>raw response JSON</summary>
|
| 142 |
+
|
| 143 |
+
```json
|
| 144 |
+
{
|
| 145 |
+
"role": "assistant",
|
| 146 |
+
"content": "The weather at your current location (Tokyo) is **18\u00b0C** and **cloudy**.",
|
| 147 |
+
"reasoning_content": "I got the weather for Tokyo. The temperature is 18\u00b0C and it's cloudy. Let me provide this information to the user.\n"
|
| 148 |
+
}
|
| 149 |
+
```
|
| 150 |
+
|
| 151 |
+
</details>
|
| 152 |
+
|