Instructions to use stressthismess/Kimi-K3 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 stressthismess/Kimi-K3 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 stressthismess/Kimi-K3:F16 # Run inference directly in the terminal: llama cli -hf stressthismess/Kimi-K3:F16
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf stressthismess/Kimi-K3:F16 # Run inference directly in the terminal: llama cli -hf stressthismess/Kimi-K3:F16
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 stressthismess/Kimi-K3:F16 # Run inference directly in the terminal: ./llama-cli -hf stressthismess/Kimi-K3:F16
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 stressthismess/Kimi-K3:F16 # Run inference directly in the terminal: ./build/bin/llama-cli -hf stressthismess/Kimi-K3:F16
Use Docker
docker model run hf.co/stressthismess/Kimi-K3:F16
- LM Studio
- Jan
- Ollama
How to use stressthismess/Kimi-K3 with Ollama:
ollama run hf.co/stressthismess/Kimi-K3:F16
- Unsloth Studio
How to use stressthismess/Kimi-K3 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 stressthismess/Kimi-K3 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 stressthismess/Kimi-K3 to start chatting
Using HuggingFace Spaces for Unsloth
# No setup required # Open https://huggingface.co/spaces/unsloth/studio in your browser # Search for stressthismess/Kimi-K3 to start chatting
- Docker Model Runner
How to use stressthismess/Kimi-K3 with Docker Model Runner:
docker model run hf.co/stressthismess/Kimi-K3:F16
- Lemonade
How to use stressthismess/Kimi-K3 with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull stressthismess/Kimi-K3:F16
Run and chat with the model
lemonade run user.Kimi-K3-F16
List all available models
lemonade list
- Atomic Chat
How to use from
llama.cppInstall from WinGet (Windows)
winget install llama.cpp
# Start a local OpenAI-compatible server with a web UI:
llama serve -hf stressthismess/Kimi-K3:F16# Run inference directly in the terminal:
llama cli -hf stressthismess/Kimi-K3:F16Use 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 stressthismess/Kimi-K3:F16# Run inference directly in the terminal:
./llama-cli -hf stressthismess/Kimi-K3:F16Build 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 stressthismess/Kimi-K3:F16# Run inference directly in the terminal:
./build/bin/llama-cli -hf stressthismess/Kimi-K3:F16Use Docker
docker model run hf.co/stressthismess/Kimi-K3:F16Quick Links
Kimi-K3-0.40B-F16-GGUF
This repository contains an F16 GGUF conversion of inference-optimization/Kimi-K3-0.40B, a tiny test/development version of moonshotai/Kimi-K3.
Model Overview
| Property | Value |
|---|---|
| Base Model | moonshotai/Kimi-K3 |
| Architecture | KimiK3ForConditionalGeneration (kimi_linear) |
| Total Parameters | 0.40B |
| Activated Parameters | ~0.06B (2 of 8 experts active per token) |
| Quantization | F16 (16-bit floating point) |
| File Size | ~748 MB |
| GGUF Tensors | 218 |
Architecture Highlights
Kimi-K3 introduces a novel hybrid attention architecture that combines:
Kimi Delta Attention (KDA)
- Type: Linear/delta attention
- Used on layers: 0β2, 4β6 (6 of 8 layers)
- Benefits: Efficient sequence processing with linear complexity
- Key parameters: head_dim=32, num_heads=8, short_conv_kernel_size=4
Multi-Latent Attention (MLA)
- Type: Full multi-latent attention (similar to DeepSeek-V2)
- Used on layers: 3, 7 (2 of 8 layers)
- Benefits: High-quality attention with KV cache compression
- Key parameters: q_lora_rank=256, kv_lora_rank=128, qk_nope_head_dim=64
Attention Ratio
- 3:1 KDA:MLA pattern (preserved from the original model)
- Attention + MLP residuals: Enabled with block_size=4
Mixture of Experts (MoE)
- Total experts: 8
- Active experts per token: 2
- Shared experts: 1
- Expert hidden size: 512
- Router activation: Sigmoid
- MoE layers: 1-7 (layer 0 uses dense MLP)
Configuration Details
| Parameter | Value |
|---|---|
num_hidden_layers |
8 |
hidden_size |
1024 |
intermediate_size |
2048 |
num_attention_heads |
8 |
num_key_value_heads |
8 |
vocab_size |
163,840 |
max_position_embeddings |
4096 |
rope_theta |
10000.0 |
rms_norm_eps |
1e-5 |
hidden_act |
situ |
GGUF Conversion
This GGUF was converted using a specialized llama.cpp fork that supports Kimi-K3's custom architecture.
Conversion Details
- Conversion script:
convert_hf_to_gguf.py - Output type: F16 (full 16-bit precision)
- Tokenizer: TikToken-based with custom vocabulary
Important Notes
- β οΈ This model requires the Kimi-K3-compatible llama.cpp fork β stock llama.cpp may not support this architecture
- β οΈ Standard Ollama and LM Studio may not load this model without the custom runtime
Usage
Installation
# Clone the Kimi-K3-compatible fork
git clone -b k3/out-of-core https://github.com/murillo128/llama.cpp.git
cd llama.cpp
# Build
cmake -B build
cmake --build build --config Release -j
Running Inference
# Linux/macOS
./build/bin/llama-cli \
-m ./Kimi-K3-0.40B-F16.gguf \
-p "According to all known laws" \
-n 20 \
--temp 0 \
--seed 1
# Windows
build/bin/Release/llama-cli.exe \
-m ./Kimi-K3-0.40B-F16.gguf \
-p "According to all known laws" \
-n 20 \
--temp 0 \
--seed 1
Expected Output
> According to all known laws
the start.
Technical Specifications
Model Architecture
KimiK3ForConditionalGeneration
βββ Vision Tower (2 layers, 256 hidden size)
βββ Language Model (8 layers)
β βββ Layer 0: KimiDeltaAttention + Dense MLP
β βββ Layer 1: KimiDeltaAttention + MoE
β βββ Layer 2: KimiDeltaAttention + MoE
β βββ Layer 3: KimiMLAAttention + MoE
β βββ Layer 4: KimiDeltaAttention + MoE
β βββ Layer 5: KimiDeltaAttention + MoE
β βββ Layer 6: KimiDeltaAttention + MoE
β βββ Layer 7: KimiMLAAttention + MoE
βββ LM Head
Tokenizer
- Type: TikToken-based custom tokenizer
- Vocabulary size: 163,840 tokens
- Special tokens: BOS, EOS, EOT, media tokens, chat markers
Comparison with Original Model
| Aspect | moonshotai/Kimi-K3 | Kimi-K3-0.40B |
|---|---|---|
| Total Parameters | ~32B | 0.40B |
| Hidden Size | 7168 | 1024 |
| Num Layers | 93 | 8 |
| Num Experts | 896 | 8 |
| Attention Type | KDA + MLA | KDA + MLA |
| KDA:MLA Ratio | 3:1 | 3:1 |
| MoE Experts/Token | 16 | 2 |
Limitations
- This is a tiny test model β not suitable for production use
- Vision tower is present but untrained for vision tasks
- Limited context length (4096 tokens)
- May not match the quality of larger Kimi-K3 variants
License
This model is released under the MIT License, consistent with the base model.
Acknowledgments
- Moonshot AI for the original Kimi-K3 architecture
- inference-optimization for creating the tiny test version
- murillo128 for the Kimi-K3-compatible llama.cpp fork
- llm-compressor for the tiny model creation tools
Citation
@article{kimi-k3,
title={Kimi-K3: A Hybrid Attention Architecture},
author={Moonshot AI},
year={2025}
}
Related Models
- moonshotai/Kimi-K3 - Original full-size model
- inference-optimization/Kimi-K3-0.40B - Base HF model for this GGUF
- Kimi-K3-0.40B-GGUF - Reference GGUF conversions
- Downloads last month
- 65
Hardware compatibility
Log In to add your hardware
16-bit
Inference Providers NEW
This model isn't deployed by any Inference Provider. π Ask for provider support
Model tree for stressthismess/Kimi-K3
Base model
moonshotai/Kimi-K3 Finetuned
inference-optimization/Kimi-K3-0.40B
Install (macOS, Linux)
# Start a local OpenAI-compatible server with a web UI: llama serve -hf stressthismess/Kimi-K3:F16# Run inference directly in the terminal: llama cli -hf stressthismess/Kimi-K3:F16