Run this model with HF Jobs
Run Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct", trust_remote_code=True) model = AutoModelForCausalLM.from_pretrained("Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct", trust_remote_code=True, device_map="auto") messages = [ {"role": "user", "content": "Who are you?"}, ] inputs = tokenizer.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct
- SGLang
How to use Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct with Docker Model Runner:
docker model run hf.co/Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct
Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct
Physically sliced 50% routed-expert derivative of moonshotai/Kimi-Linear-48B-A3B-Instruct (revision e1df551a447157d4658b573f9a695d57658590e9), reducing routed experts per MoE layer from 256 to 128 across all 26 MoE layers (L1..L26, removing 3,328 routed experts / 9,984 tensors while keeping 10,509 tensors) with dense layer L0, all 20 Kimi Delta Attention (KDA) layers, all 7 NoPE-MLA layers, embeddings, LM head, shared expert, and BF16 precision untouched.
- Exact BF16 shard payload:
47.61 GiB(51,121,135,024bytes across 20 shards) vs91.50 GiB(98,248,224,120bytes) for baseKimi-Linear-48B-A3B-Instruct(-47.97%, saving43.89 GiB/47.13 GB). - Zero dequantization / zero post-training: Routed expert weights (
gate_proj,up_proj,down_proj) and router gate rows/biases are sliced directly in strictly ascending index order using the Code+Math expert energy ranking (strategy: low_total_cm,atlas_sha256: b8e6583ee32c886a1d0cfb26b52f7c9868967e98471c192f1f8d711b6c45706b; exact per-layer indices recorded incleave_manifest.json). - Bit-exact runtime equivalence: Verified on fresh disk reload of physically sliced MoE
layer 13against50% mask_routercleaving on the unmodified256-expert base checkpoint across16probe tokens:topk_exact_set_matches = 16/16,layer_fp32_residual_max_abs_diff = 0.0. - Drop-in config diff: Only
"num_experts": 128inconfig.json. Upstreamconfiguration_kimi.py,modeling_kimi.py,tokenization_kimi.py, and tokenizer files are preserved verbatim. - License: Distributed under the original MIT License of
moonshotai/Kimi-Linear-48B-A3B-Instruct.
Architecture & Footprint Comparison
| Property | moonshotai/Kimi-Linear-48B-A3B-Instruct (Base) |
Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct |
|---|---|---|
| Architecture | KimiLinearForCausalLM (27 layers: 20 KDA + 7 NoPE-MLA; 1 dense + 26 MoE) |
KimiLinearForCausalLM (27 layers: 20 KDA + 7 NoPE-MLA; 1 dense + 26 MoE) |
Routed experts per MoE layer (num_experts) |
256 (8 active per token) |
128 (8 active per token) |
| Shared expert | 1 (BF16, untouched) |
1 (BF16, untouched) |
| BF16 shard bytes | 98,248,224,120 (91.50 GiB) |
51,121,135,024 (47.61 GiB) |
| Storage saved | — | 47,127,089,096 bytes (43.89 GiB / -47.97%) |
| Single-GPU BF16 fit | Requires >= 96 GB VRAM with tight KV headroom |
Fits cleanly on a single 64–96 GB workstation GPU |
config.json change |
Baseline | Only "num_experts": 128 |
Measured Held-Out Cleaving Evaluation (26 MoE Layers, 50% Cleave)
Evaluated across all 26 MoE layers (E = 256 -> 128, mask_router — verified bit-identical to the physical shards at 0.0 max abs diff on layer 13):
Strategy (50% cleave, E = 256 -> 128) |
Code+Math KLD ↓ | Prose KLD | Ratio vs low_total_cm |
MICRO_EVAL_24 (16-tok greedy) |
|---|---|---|---|---|
Base (0% cleaved, E = 256) |
0.00000 |
0.00000 |
— | 12/12 CM, 11/12 Prose |
low_total_cm (this checkpoint) |
0.07915 |
1.61568 |
1.00× (20.41× selectivity) |
12/12 CM (100%), 7/12 Prose |
low_orth_cm (e_orth) |
0.07864 |
1.61957 |
0.994× |
12/12 CM, 6/12 Prose |
low_freq_cm (activation frequency) |
0.14338 |
1.67461 |
1.81× worse |
12/12 CM, 8/12 Prose |
most_overlapping (adversarial control) |
1.14892 |
1.44807 |
14.52× worse |
2/12 CM, 5/12 Prose |
random (3-seed mean; seed 101 on micro) |
1.18172 |
— | 14.93× worse |
6/12 CM, 11/12 Prose |
low_total_prose (reversed polarity control) |
2.16615 |
0.21322 |
10.16× reverse flip |
9/12 CM, 10/12 Prose |
- Code+Math next-token accuracy (
50% low_total_cm):0.5645vs0.5706unmodified base. - Scope & intended tradeoff: This checkpoint is a Code+Math-specialized derivative. Removing
50%of routed experts underlow_total_cmpreserves Code+Math capability (0.07915KLD,12/12MICRO_EVAL_24CM) while intentionally shedding general Prose capacity (1.61568Prose KLD,7/12MICRO_EVAL_24Prose).
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
model_name = "Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct"
model = AutoModelForCausalLM.from_pretrained(
model_name,
torch_dtype="auto",
device_map="auto",
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
Exact file digests are pinned in SHA256SUMS.txt and per-layer retained expert indices are recorded in cleave_manifest.json.
Upstream Attribution & Citation
Derived from moonshotai/Kimi-Linear-48B-A3B-Instruct (MIT License) by Moonshot AI.
@misc{team2025kimi,
title = {Kimi Linear: An Expressive, Efficient Attention Architecture},
author = {Zhang, Yu and Lin, Zongyu and Yao, Xingcheng and Hu, Jiaxi and Meng, Fanqing and Liu, Chengyin and Men, Xin and Yang, Songlin and Li, Zhiyuan and Li, Wentao and Lu, Enzhe and Liu, Weizhou and Chen, Yanru and Xu, Weixin and Yu, Longhui and Wang, Yejie and Fan, Yu and Zhong, Longguang and Yuan, Enming and Zhang, Dehao and Zhang, Yizhi and T. Liu, Y. and Wang, Haiming and Fang, Shengjun and He, Weiran and Liu, Shaowei and Li, Yiwei and Su, Jianlin and Qiu, Jiezhong and Pang, Bo and Yan, Junjie and Jiang, Zhejun and Huang, Weixiao and Yin, Bohong and You, Jiacheng and Wei, Chu and Wang, Zhengtao and Hong, Chao and Chen, Yutian and Chen, Guanduo and Wang, Yucheng and Zheng, Huabin and Wang, Feng and Liu, Yibo and Dong, Mengnan and Zhang, Zheng and Pan, Siyuan and Wu, Wenhao and Wu, Yuhao and Guan, Longyu and Tao, Jiawen and Fu, Guohong and Xu, Xinran and Wang, Yuzhi and Lai, Guokun and Wu, Yuxin and Zhou, Xinyu and Yang, Zhilin and Du, Yulun},
year = {2025},
eprint = {2510.26692},
archivePrefix = {arXiv},
primaryClass = {cs.CL}
}
- Downloads last month
- 300
Model tree for Atlas3D/Kimi-Linear-48B-A3B-Instruct-Cleaved-50pct
Base model
moonshotai/Kimi-Linear-48B-A3B-Instruct