Views
No views yet
KimiK25ForConditionalGeneration)1from compressed_tensors.entrypoints.convert import CompressedTensorsDequantizer
2from llmcompressor import model_free_ptq
3
4MODEL_ID = "moonshotai/Kimi-K2.6"
5SAVE_DIR = "Kimi-K2.6-FP8-BLOCK"
6
7ignore = [
8 "re:.*mlp.gate$",
9 "re:.*lm_head",
10 "re:.*kv_a_proj_with_mqa$",
11 "re:.*q_a_proj$",
12 "re:.*vision_tower.*",
13 "re:.*embed_tokens$",
14 "re:.*norm$",
15 "re:.*mm_projector.*",
16 "re:.*vision.*",
17]
18
19model_free_ptq(
20 model_stub=MODEL_ID,
21 save_directory=SAVE_DIR,
22 scheme="FP8_BLOCK",
23 ignore=ignore,
24 converter=CompressedTensorsDequantizer(
25 MODEL_ID,
26 quant_config_key="text_config.quantization_config",
27 ignore=ignore,
28 ),
29 max_workers=2,
30 device="cuda:0",
31)1vllm serve RedHatAI/Kimi-K2.6-FP8-BLOCK \
2 --trust-remote-code \
3 --mm-encoder-tp-mode data \
4 --tool-call-parser kimi_k2 \
5 --reasoning-parser kimi_k2 \
6 --enable-auto-tool-choice1from openai import OpenAI
2
3client = OpenAI(base_url="http://127.0.0.1:8000/v1", api_key="EMPTY")
4
5resp = client.chat.completions.create(
6 model="RedHatAI/Kimi-K2.6-FP8-BLOCK",
7 messages=[{"role": "user", "content": "Explain how transformers use attention."}],
8)
9
10print(resp.choices[0].message.content)0.22.1) OpenAI-compatible endpoint.| Category | Benchmark | Score |
|---|---|---|
| Reasoning and instruction following | AIME25 (pass@1, avg@8) | 96.25% |
| Reasoning and instruction following | GPQA Diamond (pass@1, avg@3) | 89.39% |
| Reasoning and instruction following | MATH-500 (pass@1, avg@3) | 94.27% |
| Reasoning and instruction following | MMLU-Pro Chat (custom-extract, avg@3) | 86.55% |
| Reasoning and instruction following | GSM8K Platinum CoT (strict-match, avg@3) | 93.13% |
| Reasoning and instruction following | GSM8K Platinum CoT (flexible-extract, avg@3) | 96.31% |
| Reasoning and instruction following | IFEval (prompt-level strict, avg@3) | 95.63% |
| Reasoning and instruction following | IFEval (instruction-level strict, avg@3) | 96.92% |
| Agentic function calling (accuracy) | BFCL v4 non_live | 86.58% |
| Agentic function calling (accuracy) | BFCL v4 live | 77.79% |
| Agentic function calling (accuracy) | BFCL v4 multi_turn | 61.62% |
| Agentic function calling (accuracy) | BFCL v4 memory | 61.72% |
| Agentic function calling (accuracy) | BFCL v4 web_search | 14.00% |
| Agentic coding | SWE-Bench Lite (dev) | 34.78% |
moonshotai/Kimi-K2.6)| Benchmark | Base model (moonshotai/Kimi-K2.6) | This model | Recovery |
|---|---|---|---|
| AIME25 (pass@1, avg@8) | 90.00% | 96.25% | 106.94% |
| GPQA Diamond (pass@1, avg@3) | 84.51% | 89.39% | 105.77% |
| MATH-500 (pass@1, avg@3) | 93.53% | 94.27% | 100.79% |
| MMLU-Pro Chat (custom-extract, avg@3) | 86.70% | 86.55% | 99.83% |
| GSM8K Platinum CoT (strict-match, avg@3) | 93.80% | 93.13% | 99.29% |
| GSM8K Platinum CoT (flexible-extract, avg@3) | 96.33% | 96.31% | 99.98% |
| IFEval (prompt-level strict, avg@3) | 94.82% | 95.63% | 100.85% |
| IFEval (instruction-level strict, avg@3) | 96.52% | 96.92% | 100.41% |
1lm_eval --model local-chat-completions \
2 --tasks gsm8k_platinum_cot_llama \
3 --model_args "model=RedHatAI/Kimi-K2.6-FP8-BLOCK,max_length=40960,base_url=http://127.0.0.1:8000/v1/chat/completions,num_concurrent=32,max_retries=3,tokenized_requests=False,tokenizer_backend=None,timeout=3600" \
4 --num_fewshot 0 \
5 --apply_chat_template \
6 --output_path results_gsm8k_platinum.json \
7 --seed 1234 \
8 --gen_kwargs "do_sample=True,temperature=1.0,top_p=0.95,top_k=20,min_p=0.0,max_gen_toks=64000,presence_penalty=1.5,repetition_penalty=1.0,seed=1234"1model_parameters:
2 provider: "hosted_vllm"
3 model_name: "hosted_vllm/RedHatAI/Kimi-K2.6-FP8-BLOCK"
4 base_url: "http://127.0.0.1:8000/v1"
5 api_key: "EMPTY"
6 timeout: 3600
7 max_model_length: 40960
8 concurrent_requests: 8
9 generation_parameters:
10 temperature: 1.0
11 max_new_tokens: 65536
12 top_p: 0.95
13 seed: 1234
14 top_k: 20
15 presence_penalty: 1.51lighteval endpoint litellm litellm_config.yaml \
2 "aime25@1@8|0,math_500@1@3|0,gpqa:diamond@1@3|0" \
3 --output-dir results_lighteval \
4 --save-details1# BFCL categories: non_live, live, multi_turn, memory, web_search
2./scripts/bfcl/run_bfcl_local.sh kimi_fp8 non_live
3./scripts/bfcl/run_bfcl_local.sh kimi_fp8 live
4./scripts/bfcl/run_bfcl_local.sh kimi_fp8 multi_turn
5./scripts/bfcl/run_bfcl_local.sh kimi_fp8 memory
6./scripts/bfcl/run_bfcl_local.sh kimi_fp8 web_search1# SWE-Bench Lite dev (full split)
2SWEBENCH_SUBSET=lite SWEBENCH_SPLIT=dev SWEBENCH_SLICE= \
3 ./scripts/swebench/run_swebench_lite_local.sh kimi_fp8
4
5# Official SWE-bench resolved-rate evaluation
6/home/shubhra/environments/mini-swe-agent/bin/python -m swebench.harness.run_evaluation \
7 --dataset_name princeton-nlp/SWE-Bench_Lite \
8 --split dev \
9 --predictions_path /home/shubhra/kimik2.6_evals/results/swebench_resolved_eval/kimi_fp8_lite_dev_preds_merged.json \
10 --max_workers 4 \
11 --run_id kimi_fp8_lite_dev_20260701_resolvedevery_eval_ever/aime25.jsonevery_eval_ever/gpqa_diamond.jsonevery_eval_ever/gsm8k_platinum_cot_llama.jsonevery_eval_ever/ifeval.jsonevery_eval_ever/math_500.jsonevery_eval_ever/mmlu_pro_chat.jsonevery_eval_ever/bfcl_v4.jsonevery_eval_ever/swebench_lite_dev.json