Instructions to use GrEarl/Kimi-K3-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- llama-cpp-python
How to use GrEarl/Kimi-K3-GGUF with llama-cpp-python:
# !pip install llama-cpp-python from llama_cpp import Llama llm = Llama.from_pretrained( repo_id="GrEarl/Kimi-K3-GGUF", filename="Kimi-K3-Q2_K-00001-of-00094.gguf", )
output = llm( "Once upon a time,", max_tokens=512, echo=True ) print(output)
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use GrEarl/Kimi-K3-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 GrEarl/Kimi-K3-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf GrEarl/Kimi-K3-GGUF:Q2_K
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf GrEarl/Kimi-K3-GGUF:Q2_K # Run inference directly in the terminal: llama cli -hf GrEarl/Kimi-K3-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 GrEarl/Kimi-K3-GGUF:Q2_K # Run inference directly in the terminal: ./llama-cli -hf GrEarl/Kimi-K3-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 GrEarl/Kimi-K3-GGUF:Q2_K # Run inference directly in the terminal: ./build/bin/llama-cli -hf GrEarl/Kimi-K3-GGUF:Q2_K
Use Docker
docker model run hf.co/GrEarl/Kimi-K3-GGUF:Q2_K
- LM Studio
- Jan
- vLLM
How to use GrEarl/Kimi-K3-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GrEarl/Kimi-K3-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GrEarl/Kimi-K3-GGUF", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/GrEarl/Kimi-K3-GGUF:Q2_K
- Ollama
How to use GrEarl/Kimi-K3-GGUF with Ollama:
ollama run hf.co/GrEarl/Kimi-K3-GGUF:Q2_K
- Unsloth Studio
How to use GrEarl/Kimi-K3-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 GrEarl/Kimi-K3-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 GrEarl/Kimi-K3-GGUF to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for GrEarl/Kimi-K3-GGUF to start chatting
- Atomic Chat new
- Docker Model Runner
How to use GrEarl/Kimi-K3-GGUF with Docker Model Runner:
docker model run hf.co/GrEarl/Kimi-K3-GGUF:Q2_K
- Lemonade
How to use GrEarl/Kimi-K3-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull GrEarl/Kimi-K3-GGUF:Q2_K
Run and chat with the model
lemonade run user.Kimi-K3-GGUF-Q2_K
List all available models
lemonade list
Kimi-K3 GGUF โ Q2_K experts / Q4_K dense (2.671 bpw)
864.26 GiB in 94 parts. Text model only. Regenerated 2026-07-28 to the
llama.cpp PR #26185
(pwilkin/kimi-k3-text) tensor contract.
Source: moonshotai/Kimi-K3 at revision
9f62e4e9fffbd0a83ddd60e1c209d828994b3569 (pinned for every download).
| Parts | 94 (Kimi-K3-Q2_K-000NN-of-00094.gguf) |
| Size | 864.26 GiB (source 1,453.8 GiB โ 0.594x) |
| Tensors | 2,573 (matches the contract exactly) |
| Effective rate | 2.671 bpw |
| Architecture | kimi-k3 |
general.file_type |
10 (MOSTLY_Q2_K) |
| imatrix | no (round-to-nearest only) |
Quantization layout
| ggml type | tensors | size | bpw | what |
|---|---|---|---|---|
Q2_K |
276 | 832.04 GiB | 2.6250 | routed expert stacks (ffn_{gate,up,down}_exps) |
Q4_K |
1,068 | 29.19 GiB | 4.5000 | dense 2-D weights, token_embd, output |
F32 |
1,112 | 2.25 GiB | 32 | norms, router, ssm_a, ssm_conv1d, fused AttnRes scores |
F16 |
117 | 0.76 GiB | 16 | attn_k_b / attn_v_b (row length not a multiple of 256) |
The experts hold 2.72 T of the 2.78 T parameters, so they set the overall rate. Dense weights are kept at Q4_K rather than Q2_K: they are 3.4% of the bytes, and spending 4.5 bpw there is cheap insurance for the layers that every token passes through.
Measured quantization error
MXFP4 source dequantized to F32, requantized to Q2_K, then dequantized again and compared against the source. 92 expert tensors sampled, one per routed layer:
| metric | value |
|---|---|
| relative RMSE | 0.3309 |
| cosine similarity | 0.951450 |
For reference, the same measurement on the IQ1_S sibling is 0.5375 / 0.848230. This repo is 1.64x larger and noticeably closer to the source.
The Q2_K encoder is a numpy implementation of block_q2_K (84 B / 256 elements).
Its output bytes are fed to gguf-py's own dequantizer and compared against our
dequantizer: max absolute difference 0.0, 0 mismatching elements, on both
synthetic data and a real K3 expert tensor. Sub-block scale search uses direct
min/max rather than ggml's 15-step iterative make_qkx2_quants, so the byte format
is identical but quality is marginally below what llama-quantize would produce.
Status: not loadable yet
No released llama.cpp can load this. kimi-k3 support is not merged upstream;
it exists only in PR #26185. This repo is built to that PR's contract so that it
becomes loadable when K3 support lands.
What has been verified, and what has not:
| level | status |
|---|---|
| GGUF structure, split metadata, tensor names/types, hparams, vocab | verified on the published files (headers read over HTTP Range) |
| Numeric agreement of our quant bytes with gguf-py's dequantizer | verified, exact |
Actual llama.cpp model load |
not verified โ no implementation exists to test against |
| Token generation / perplexity | not measured |
Do not read the structural checks as a runtime guarantee.
What was fixed relative to the previous 96-part upload
The earlier Q2_K release in this repo (96 parts, 938.59 GiB) could not have been loaded even with K3 support present. All four defects required regenerating every part, so this upload replaces it entirely.
- Tensor names were raw Hugging Face names. 668 names across 92 of the 96
parts exceeded
GGML_MAX_NAME(64). Now every name follows the PR contract; longest is 29 characters. - Part 1 had no model metadata. No hparams, no vocabulary. Now part 1 carries
66 KV entries: 25 required hparams plus the full vocabulary (163,840 tokens /
163,328 merges,
gpt2/ prekimi-k2, chkhsh verified). split.tensors.countwas UINT16 and per-part.llama-model-loader.cppreads it as a required key and compares it againstweights_map.size(), throwingcorrupted modelon mismatch. Now INT32 / 2573 in all 94 parts, equal to the actual sum of per-part tensor counts.- Vision tensors were mixed into the text model. HF shards 95 and 96 hold 168
vision_tower/mm_projectortensors.done_getting_tensors()is called withpartial=false, so a single extra tensor triggerswrong number of tensors. Those two shards are excluded, which is why there are 94 parts and not 96.
Conversion details
Recorded in the file itself under kimi-k3.conversion.*:
a_log_transform=-exp(A_log[:n_head])โ K3 storesA_logas 128 elements but only the firstnum_attention_heads= 96 are usedkv_b_split=k_b(transposed)+v_bโkv_b_projsplit intoattn_k_b/attn_v_battn_res_fused=res_norm*res_proj[0] in float32โ the AttnRes norm/proj pair is fused into one score vector, matching the reference_apply_attn_res()expert_stack_dim= 0 โ 896 experts stacked on dim 0source_quant=compressed-tensors/mxfp4-pack-quantizeddefaults_used=rope_thetaโ the only value not present inconfig.json, taken from theconfiguration_kimi_k3.pyclass default (10000.0)
Usage (once upstream support exists)
Pass the first part; llama.cpp follows the split metadata to the rest.
llama-cli -m Kimi-K3-Q2_K-00001-of-00094.gguf -p "..."
All 94 parts must be present in the same directory.
Cost
Regeneration: $4.242 of Modal compute (94 CPU containers, 8 cores / 16 GiB each, no GPU), 15.8 minutes wall clock, 0 failures. Per-part cost came from the returned per-container measurements, summed over the 94 result records.
- Downloads last month
- -
2-bit
Model tree for GrEarl/Kimi-K3-GGUF
Base model
moonshotai/Kimi-K3