Text Generation
GGUF
Mixture of Experts
apex
quantized
kimi-linear
linear-attention
llama.cpp
conversational
Instructions to use Myric/Kimi-Linear-48B-A3B-Instruct-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/Kimi-Linear-48B-A3B-Instruct-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/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF # Run inference directly in the terminal: llama cli -hf Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF # Run inference directly in the terminal: llama cli -hf Myric/Kimi-Linear-48B-A3B-Instruct-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/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF # Run inference directly in the terminal: ./llama-cli -hf Myric/Kimi-Linear-48B-A3B-Instruct-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/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF # Run inference directly in the terminal: ./build/bin/llama-cli -hf Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF
Use Docker
docker model run hf.co/Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF
- LM Studio
- Jan
- vLLM
How to use Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Myric/Kimi-Linear-48B-A3B-Instruct-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/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF
- Ollama
How to use Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF with Ollama:
ollama run hf.co/Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF
- Unsloth Desktop
- Pi
How to use Myric/Kimi-Linear-48B-A3B-Instruct-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/Kimi-Linear-48B-A3B-Instruct-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/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF with Docker Model Runner:
docker model run hf.co/Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF
- Lemonade
How to use Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF
Run and chat with the model
lemonade run user.Kimi-Linear-48B-A3B-Instruct-APEX-GGUF-{{QUANT_TAG}}List all available models
lemonade list
- Hermes Agent
How to use Myric/Kimi-Linear-48B-A3B-Instruct-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/Kimi-Linear-48B-A3B-Instruct-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/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use Myric/Kimi-Linear-48B-A3B-Instruct-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/Kimi-Linear-48B-A3B-Instruct-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/Kimi-Linear-48B-A3B-Instruct-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"
|
Download REPRODUCE.md from Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF: direct link, hf CLI and curl.
- Browser
- Download file 1.78 kB
-
https://huggingface.co/Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF/resolve/main/REPRODUCE.md
- Command line
-
hf download hf://Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF/REPRODUCE.md
-
curl -L -o REPRODUCE.md https://huggingface.co/Myric/Kimi-Linear-48B-A3B-Instruct-APEX-GGUF/resolve/main/REPRODUCE.md
1.78 kB
| # Reproducing these APEX quants | |
| No-imatrix, CPU-only path. All MIT (see NOTICE). | |
| ## Pinned | |
| - **llama.cpp** — a build supporting `kimi_linear` + `kimi-k2` pre-tokenizer + | |
| `--tensor-type-file` (e.g. commit `bbf4a8a`/b8833 or newer). | |
| - **apex-quant** — commit `a445a12` (https://github.com/localai-org/apex-quant), | |
| for `generate_config.sh` (bundled here). | |
| ## Baseline | |
| ```bash | |
| hf download bartowski/moonshotai_Kimi-Linear-48B-A3B-Instruct-GGUF \ | |
| --include "moonshotai_Kimi-Linear-48B-A3B-Instruct-bf16/*" --local-dir . | |
| ``` | |
| (A correctly-converted bf16 GGUF: kimi-k2 tokenizer with BPE merges present.) | |
| ## Config (imatrix-free "balanced") | |
| The final configs are included (`configs/kimi_balanced.txt`, `configs/kimi_handroll.txt`). | |
| To regenerate: | |
| ```bash | |
| # 43 layers, layer 0 dense | |
| bash generate_config.sh --profile balanced --layers 43 --dense-layers 1 -o kimi_bal.base.txt | |
| # add the MLA + KDA(ssm) tensors the stock generator misses | |
| python patch_kimi_config.py kimi_bal.base.txt configs/kimi_balanced.txt | |
| # hand-roll variant: KDA recurrence pinned to Q8_0 (found to make no PPL difference) | |
| python patch_kimi_config.py kimi_bal.base.txt configs/kimi_handroll.txt --ssm-type Q8_0 | |
| ``` | |
| ## Quantize (base type Q6_K; NO imatrix) | |
| ```bash | |
| SHARD=moonshotai_Kimi-Linear-48B-A3B-Instruct-bf16/moonshotai_Kimi-Linear-48B-A3B-Instruct-bf16-00001-of-00003.gguf | |
| llama-quantize --tensor-type-file configs/kimi_balanced.txt \ | |
| "$SHARD" Kimi-Linear-48B-A3B-Instruct-APEX-balanced.gguf Q6_K | |
| ``` | |
| ## Evaluate | |
| ```bash | |
| # NOTE: PPL prints to STDERR — capture 2>&1. | |
| llama-perplexity -m Kimi-Linear-48B-A3B-Instruct-APEX-balanced.gguf \ | |
| -f wiki.test.raw -ngl 999 --chunks 200 2>&1 | grep -oP 'Final estimate: PPL = \K[0-9.]+' | |
| ``` | |
| Expected: ~7.38 (wikitext-2, 200×512). bf16 reference pending. | |