Instructions to use ubergarm/Kimi-K2.6-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use ubergarm/Kimi-K2.6-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="ubergarm/Kimi-K2.6-GGUF", filename="IQ3_K/Kimi-K2.6-IQ3_K-00001-of-00012.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 ubergarm/Kimi-K2.6-GGUF with llama.cpp:
Install from brew
brew install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf ubergarm/Kimi-K2.6-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf ubergarm/Kimi-K2.6-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama-server -hf ubergarm/Kimi-K2.6-GGUF:Q2_K # Run inference directly in the terminal: llama-cli -hf ubergarm/Kimi-K2.6-GGUF:Q2_K
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 ubergarm/Kimi-K2.6-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf ubergarm/Kimi-K2.6-GGUF:Q2_K
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 ubergarm/Kimi-K2.6-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf ubergarm/Kimi-K2.6-GGUF:Q2_K
Use Docker
docker model run hf.co/ubergarm/Kimi-K2.6-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use ubergarm/Kimi-K2.6-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ubergarm/Kimi-K2.6-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": "ubergarm/Kimi-K2.6-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/ubergarm/Kimi-K2.6-GGUF:Q2_K
- Ollama
How to use ubergarm/Kimi-K2.6-GGUF with Ollama:
ollama run hf.co/ubergarm/Kimi-K2.6-GGUF:Q2_K
- Unsloth Studio new
How to use ubergarm/Kimi-K2.6-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 ubergarm/Kimi-K2.6-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 ubergarm/Kimi-K2.6-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for ubergarm/Kimi-K2.6-GGUF to start chatting
- Pi new
How to use ubergarm/Kimi-K2.6-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama-server -hf ubergarm/Kimi-K2.6-GGUF:Q2_K
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": "ubergarm/Kimi-K2.6-GGUF:Q2_K" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Hermes Agent new
How to use ubergarm/Kimi-K2.6-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 ubergarm/Kimi-K2.6-GGUF:Q2_K
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 ubergarm/Kimi-K2.6-GGUF:Q2_K
Run Hermes
hermes
- Docker Model Runner
How to use ubergarm/Kimi-K2.6-GGUF with Docker Model Runner:
docker model run hf.co/ubergarm/Kimi-K2.6-GGUF:Q2_K
- Lemonade
How to use ubergarm/Kimi-K2.6-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull ubergarm/Kimi-K2.6-GGUF:Q2_K
Run and chat with the model
lemonade run user.Kimi-K2.6-GGUF-Q2_K
List all available models
lemonade list
How to disable thinking?
Hi there,
I'm struggeling to disable thinking. I'm using Q4_X and tried different settings.
At the end of the start process there is "srv init: init: chat template, thinking = 0"
But it is still thinking, and it is thinking much.
Latest start batch :
export CUDA_VISIBLE_DEVICES=0
/home/user/LLMDATA/llama/ik_llama.cpp/build/bin/llama-server
--alias kimi-k26-q4-vis-nt
--model /home/user/LLMMODELS/llm_gguf/Kimi-K2.6-Q4_X-00001-of-00014.gguf
--mmproj /home/user/LLMMODELS/llm_gguf/mmproj-Kimi-K2.6-F16.gguf
-muge
--merge-qkv
--ctx-size 131072
-ctk f16
-mla 3
-amb 512
--fit
--parallel 1
-ub 4096 -b 4096
--threads 16
--threads-batch 16
--no-mmap
--jinja
--chat-template-file /home/user/LLMMODELS/llm_gguf/Kimi-k26nt.jinja
--chat-template-kwargs '{"enable_thinking":false}'
--reasoning-budget 0
--host 0.0.0.0
--port 8888
--no-mmap
results in:
...
djust batch size for mtmd: u_batch = 4096, batch = 4096
llama_init_from_model: n_ctx = 131072
llama_init_from_model: n_batch = 4096
llama_init_from_model: n_ubatch = 4096
llama_init_from_model: flash_attn = 1
llama_init_from_model: mla_attn = 3
llama_init_from_model: attn_max_b = 512
llama_init_from_model: fused_moe = 1
llama_init_from_model: grouped er = 0
llama_init_from_model: fused_up_gate = 1
llama_init_from_model: fused_mmad = 1
llama_init_from_model: rope_cache = 0
llama_init_from_model: graph_reuse = 1
llama_init_from_model: k_cache_hadam = 0
llama_init_from_model: v_cache_hadam = 0
llama_init_from_model: split_mode_graph_scheduling = 0
llama_init_from_model: reduce_type = f16
llama_init_from_model: sched_async = 0
llama_init_from_model: ser = -1, 0
llama_init_from_model: freq_base = 50000.0
llama_init_from_model: freq_scale = 0.015625
llama_kv_cache_init: CUDA0 KV buffer size = 8784.00 MiB
llama_init_from_model: KV self size = 8784.00 MiB, c^KV (f16): 8784.00 MiB, kv^T: not used
llama_init_from_model: CUDA_Host output buffer size = 0.62 MiB
llama_repack_up_gate_exps: repacking up/gate experts weight in layer 1
...
llama_repack_up_gate_exps: repacking up/gate experts weight in layer 60
llama_init_from_model: CUDA0 compute buffer size = 7570.02 MiB
llama_init_from_model: CUDA_Host compute buffer size = 1136.05 MiB
llama_init_from_model: graph nodes = 13408
llama_init_from_model: graph splits = 122
llama_init_from_model: enabling only_active_experts scheduling
clip_model_loader: model name: Kimi K2.6
clip_model_loader: description:
clip_model_loader: GGUF version: 3
clip_model_loader: alignment: 32
clip_model_loader: n_tensors: 335
clip_model_loader: n_kv: 28
clip_model_loader: has vision encoder
clip_ctx: have 2 back-ends:
0: CPU
1: CUDA0
ggml_backend_cuda_context: a context for device 0 already exists?
clip_ctx: CLIP using CUDA0 backend
load_hparams: projector: kimik25
load_hparams: n_embd: 1152
load_hparams: n_head: 16
load_hparams: n_ff: 4304
load_hparams: n_layer: 27
load_hparams: ffn_op: gelu
load_hparams: projection_dim: 7168
--- vision hparams ---
load_hparams: image_size: 896
load_hparams: patch_size: 14
load_hparams: has_llava_proj: 0
load_hparams: minicpmv_version: 0
load_hparams: n_merge: 2
load_hparams: n_wa_pattern: 0
load_hparams: image_min_pixels: 1568
load_hparams: image_max_pixels: 3211264
load_hparams: model size: 908.42 MiB
load_hparams: metadata size: 0.12 MiB
warmup: warmup with image size = 448 x 448
alloc_compute_meta: CUDA0 compute buffer size = 102.30 MiB
alloc_compute_meta: CPU compute buffer size = 2.30 MiB
alloc_compute_meta: graph splits = 1, nodes = 1088
warmup: flash attention is disabled
INFO [ load_model] loaded multimodal model, '%s'
| ="/home/user/LLMMODELS/llm_gguf/mmproj-Kimi-K2.6-F16.gguf"
INFO [ init] initializing slots | tid="140621012520960" timestamp=1776921886 n_slots=1
INFO [ init] new slot | tid="140621012520960" timestamp=1776921886 id_slot=0 n_ctx_slot=131072
srv init: Exclude reasoning tokens when selecting slot based on similarity: start: , end:
use --reasoning-tokens none to disable.
no implementations specified for speculative decoding
slot init: id 0 | task -1 | speculative decoding context not initialized
prompt cache is enabled, size limit: 8192 MiB
use --cache-ram 0 to disable the prompt cache
init: chat template, example_format: '<|im_system|>system<|im_middle|>You are a helpful assistant<|im_end|><|im_user|>user<|im_middle|>Hello<|im_end|><|im_assistant|>assistant<|im_middle|>Hi there<|im_end|><|im_user|>user<|im_middle|>How are you?<|im_end|><|im_assistant|>assistant<|im_middle|>'
INFO [ main] model loaded | tid="140621012520960" timestamp=1776921886
srv init: init: chat template, thinking = 0
INFO [ main] HTTP server listening | tid="140621012520960" timestamp=1776921886 n_threads_http="31" port="8888" hostname="0.0.0.0"
INFO [ slots_idle] all slots are idle | tid="140621012520960" timestamp=1776921886
Yeah for Kimi it's different from GLM:
--chat-template-kwargs '{"thinking": false}'
is it good or bad to disable thinking? i think thinking is good right? in my experience it always produces better results.
you can decide at runtime on the client as well.. instead of passing it to llama-server --chat-template-kwargs ... to turn it off always on the server, you can pass extra paramters in the API body e.g.:
here are a few possibilities:
to prevent thinking there are a few ways sure:
- on startup with
llama-server --chat-template-kwargs '{"thinking": false}'as mentioned by @gghfez - if you're using
--jinjaand a chat template (like i have on the modelcard linked to a discussion now) you can do it dynamically per API request, read some here: https://github.com/ggml-org/llama.cpp/issues/20182#issuecomment-4230494838 - there may be other ways with "reasoning" stuff to coax it into more or less, not sure if that works on this model
- if you're using ST and text endpoint you can pre-fill a think block on behalf of the assistant sayin "okay that's good let's answer" or whatever
Thank you all,
working now. with the wrong kwargs it could not work. Next I'll check the API and hints for ST.
@mtcl : of course the quality is better with active reasoning, but if the "quality" is not needed it speeds up the response massively as I only get 9t/s from my setup and Kimi is thinking very long.