Danny Liu commited on
Commit
4b4ef5e
·
1 Parent(s): 2bb9ab9

add k2-Think checkpoint and cvdp_accept data samples

Browse files
Files changed (35) hide show
  1. hf_models/K2-Think/.gitattributes +37 -0
  2. hf_models/K2-Think/README.md +119 -0
  3. hf_models/K2-Think/VerilogEval_Human_0.2_results.txt +10 -0
  4. hf_models/K2-Think/added_tokens.json +3 -0
  5. hf_models/K2-Think/banner.png +3 -0
  6. hf_models/K2-Think/chat_template.jinja +7 -0
  7. hf_models/K2-Think/config.json +3 -0
  8. hf_models/K2-Think/generation_config.json +3 -0
  9. hf_models/K2-Think/merges.txt +0 -0
  10. hf_models/K2-Think/model-00001-of-00014.safetensors +3 -0
  11. hf_models/K2-Think/model-00002-of-00014.safetensors +3 -0
  12. hf_models/K2-Think/model-00003-of-00014.safetensors +3 -0
  13. hf_models/K2-Think/model-00004-of-00014.safetensors +3 -0
  14. hf_models/K2-Think/model-00005-of-00014.safetensors +3 -0
  15. hf_models/K2-Think/model-00006-of-00014.safetensors +3 -0
  16. hf_models/K2-Think/model-00007-of-00014.safetensors +3 -0
  17. hf_models/K2-Think/model-00008-of-00014.safetensors +3 -0
  18. hf_models/K2-Think/model-00009-of-00014.safetensors +3 -0
  19. hf_models/K2-Think/model-00010-of-00014.safetensors +3 -0
  20. hf_models/K2-Think/model-00011-of-00014.safetensors +3 -0
  21. hf_models/K2-Think/model-00012-of-00014.safetensors +3 -0
  22. hf_models/K2-Think/model-00013-of-00014.safetensors +3 -0
  23. hf_models/K2-Think/model-00014-of-00014.safetensors +3 -0
  24. hf_models/K2-Think/model.safetensors.index.json +3 -0
  25. hf_models/K2-Think/special_tokens_map.json +3 -0
  26. hf_models/K2-Think/tokenizer.json +3 -0
  27. hf_models/K2-Think/tokenizer_config.json +3 -0
  28. hf_models/K2-Think/vllm_output/VerilogEval_Human_0.2_0_1.jsonl +3 -0
  29. hf_models/K2-Think/vllm_output/VerilogEval_Human_0.2_0_1.jsonl_results.jsonl +3 -0
  30. hf_models/K2-Think/vllm_output/cid002_0.2_16384_0_1.jsonl +3 -0
  31. hf_models/K2-Think/vllm_output/cid003_0.2_16384_0_1.jsonl +3 -0
  32. hf_models/K2-Think/vllm_output/cid004_0.2_16384_0_1.jsonl +3 -0
  33. hf_models/K2-Think/vllm_output/cid016_0.2_16384_0_1.jsonl +3 -0
  34. hf_models/K2-Think/vocab.json +3 -0
  35. nemo_data/cvdp_accept.jsonl +3 -0
hf_models/K2-Think/.gitattributes ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
37
+ banner.png filter=lfs diff=lfs merge=lfs -text
hf_models/K2-Think/README.md ADDED
@@ -0,0 +1,119 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: Qwen/Qwen2.5-32B
3
+ language:
4
+ - en
5
+ library_name: transformers
6
+ license: apache-2.0
7
+ pipeline_tag: text-generation
8
+ ---
9
+
10
+ # K2-Think: A Parameter-Efficient Reasoning System
11
+
12
+ 📚 [Paper](https://huggingface.co/papers/2509.07604) - 📝 [Code](https://github.com/MBZUAI-IFM/K2-Think-SFT) - 🏢 [Project Page](https://k2think.ai)
13
+
14
+ <center><img src="banner.png" alt="k2-think-banner"/></center>
15
+
16
+ <br>
17
+
18
+ K2-Think is a 32 billion parameter open-weights general reasoning model with strong performance in competitive mathematical problem solving.
19
+
20
+ # Quickstart
21
+
22
+ ### Transformers
23
+ You can use `K2-Think` with Transformers. If you use `transformers.pipeline`, it will apply the chat template automatically. If you use `model.generate` directly, you need to apply the chat template mannually.
24
+
25
+ ```python
26
+ from transformers import pipeline
27
+ import torch
28
+
29
+ model_id = "LLM360/K2-Think"
30
+
31
+ pipe = pipeline(
32
+ "text-generation",
33
+ model=model_id,
34
+ torch_dtype="auto",
35
+ device_map="auto",
36
+ )
37
+
38
+ messages = [
39
+ {"role": "user", "content": "what is the next prime number after 2600?"},
40
+ ]
41
+
42
+ outputs = pipe(
43
+ messages,
44
+ max_new_tokens=32768,
45
+ )
46
+ print(outputs[0]["generated_text"][-1])
47
+ ```
48
+
49
+ ---
50
+
51
+ # Evaluation & Performance
52
+ Detailed evaluation results are reported in out [Tech Report](https://arxiv.org/abs/2509.07604)
53
+
54
+ ## Benchmarks (pass\@1, average over 16 runs)
55
+
56
+ | Domain | Benchmark | K2-Think |
57
+ | ------- | ---------------- | -----------: |
58
+ | Math | AIME 2024 | 90.83 |
59
+ | Math | AIME 2025 | 81.24 |
60
+ | Math | HMMT 2025 | 73.75 |
61
+ | Math | OMNI-Math-HARD | 60.73 |
62
+ | Code | LiveCodeBench v5 | 63.97 |
63
+ | Science | GPQA-Diamond | 71.08 |
64
+
65
+ ---
66
+
67
+ ## Inference Speed
68
+
69
+ We deploy K2-THINK on Cerebras Wafer-Scale Engine (WSE) systems, leveraging the world’s largest processor and speculative decoding to achieve unprecedented inference speeds for our 32B reasoning system.
70
+
71
+ | Platform | Throughput (tokens/sec) | Example: 32k-token response (time) |
72
+ | --------------------------------- | ----------------------: | ---------------------------------: |
73
+ | **Cerebras WSE (our deployment)** | **\~2,000** | **\~16 s** |
74
+ | Typical Cloud Service setup | \~200 | \~160 s |
75
+
76
+ ---
77
+
78
+ ## Safety Evaluation
79
+
80
+ Aggregated across four safety dimensions (**Safety-4**):
81
+
82
+ | Aspect | Macro-Avg |
83
+ | ------------------------------- | --------: |
84
+ | High-Risk Content Refusal | 0.83 |
85
+ | Conversational Robustness | 0.89 |
86
+ | Cybersecurity & Data Protection | 0.56 |
87
+ | Jailbreak Resistance | 0.72 |
88
+ | **Safety-4 Macro (avg)** | **0.75** |
89
+
90
+ ---
91
+
92
+ # Terms of Use
93
+
94
+ We have employed various techniques to reduce bias, harmful outputs, and other risks in the model. While these efforts help improve safety and reliability, the model, like all Large Language Models, may still generate inaccurate, misleading, biased, or otherwise undesirable content. By downloading, using, or interacting with this model, you acknowledge these limitations and agree to the following:
95
+
96
+ 1. **Prohibited Uses**
97
+ - You may **not** use this model for any **illegal, unlawful, or harmful activities**, including but not limited to fraud, abuse, harassment, privacy violations, or the creation/dissemination of malicious content.
98
+
99
+ 2. **User Responsibility**
100
+ - You are solely responsible for how you use the model and for any outcomes that result from its use.
101
+ - The authors and institutions involved in releasing this model do **not** accept liability for any consequences arising from its use.
102
+
103
+ 3. **No Warranty**
104
+ - The model is provided **“as is” without any warranties or guarantees**.
105
+ ---
106
+
107
+ # Citation
108
+
109
+ ```bibtex
110
+ @misc{cheng2025k2thinkparameterefficientreasoning,
111
+ title={K2-Think: A Parameter-Efficient Reasoning System},
112
+ author={Zhoujun Cheng and Richard Fan and Shibo Hao and Taylor W. Killian and Haonan Li and Suqi Sun and Hector Ren and Alexander Moreno and Daqian Zhang and Tianjun Zhong and Yuxin Xiong and Yuanzhe Hu and Yutao Xie and Xudong Han and Yuqi Wang and Varad Pimpalkhute and Yonghao Zhuang and Aaryamonvikram Singh and Xuezhi Liang and Anze Xie and Jianshu She and Desai Fan and Chengqian Gao and Liqun Ma and Mikhail Yurochkin and John Maggs and Xuezhe Ma and Guowei He and Zhiting Hu and Zhengzhong Liu and Eric P. Xing},
113
+ year={2025},
114
+ eprint={2509.07604},
115
+ archivePrefix={arXiv},
116
+ primaryClass={cs.LG},
117
+ url={https://arxiv.org/abs/2509.07604},
118
+ }
119
+ ```
hf_models/K2-Think/VerilogEval_Human_0.2_results.txt ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ post_process: True
2
+ Reading samples...
3
+ Post process 1560/1560 samples.
4
+ Running test suites...
5
+ Killing all hanging simulation process.
6
+ {'pass@1': np.float64(0.7685897435897436), 'pass@5': np.float64(0.9265364265364264), 'pass@10': np.float64(0.9615384615384616)}
7
+ {'pass@1': np.float64(0.6461538461538462), 'pass@5': np.float64(0.7618030118030118), 'pass@10': np.float64(0.7948717948717948)}
8
+ Writing results to VerilogEval_Human_0.2_0_1.jsonl_results.jsonl...
9
+ {'pass@1': np.float64(0.7685897435897436), 'pass@5': np.float64(0.9265364265364264), 'pass@10': np.float64(0.9615384615384616)}
10
+ {'pass@1': np.float64(0.6461538461538462), 'pass@5': np.float64(0.7618030118030118), 'pass@10': np.float64(0.7948717948717948)}
hf_models/K2-Think/added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:58b54bbe36fc752f79a24a271ef66a0a0830054b4dfad94bde757d851968060b
3
+ size 605
hf_models/K2-Think/banner.png ADDED

Git LFS Details

  • SHA256: 269ffc9f5886efcaddfb0bc693831f5ddc8b4adcd2872ad5b118c2b6f090d083
  • Pointer size: 131 Bytes
  • Size of remote file: 507 kB
hf_models/K2-Think/chat_template.jinja ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {% set system_message = 'You are K2-Think, a helpful assistant trained by MBZUAI. To answer the user\'s question, you first think about the reasoning process and then provide the user with the answer. The reasoning process and answer are enclosed within <think> </think> and <answer> </answer> tags, respectively, i.e., <think> reasoning process here </think> <answer> answer here </answer>.' %}{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% endif %}{% if system_message is defined %}{{ '<|im_start|>system
2
+ ' + system_message + '<|im_end|>
3
+ ' }}{% endif %}{% for message in loop_messages %}{% set content = message['content'] %}{% if message['role'] == 'user' %}{{ '<|im_start|>user
4
+ ' + content + '<|im_end|>
5
+ <|im_start|>assistant
6
+ ' }}{% elif message['role'] == 'assistant' %}{{ content + '<|im_end|>
7
+ ' }}{% endif %}{% endfor %}
hf_models/K2-Think/config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e09625e5edba8f6d849dcd923f48b12dd9a7510aea35e6001c54991651712880
3
+ size 732
hf_models/K2-Think/generation_config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e42ecf2c2707a2c4c64d3a1dd42025bde7f3875aec75fc92602f05d4134453e2
3
+ size 117
hf_models/K2-Think/merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
hf_models/K2-Think/model-00001-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8cd0439369632a2c92b3b7f3cfae79ca8b760ffad9f508e9b016d339adc2107c
3
+ size 4891730992
hf_models/K2-Think/model-00002-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ce46388f6107e0357ff9b618c6bfcc7b9338e913d4c1a8519501c4e1fff19208
3
+ size 4876059352
hf_models/K2-Think/model-00003-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ec2cabf324a494e05f9ba87ead1431f57feed45a250d430f23fdda3591e2f058
3
+ size 4876059384
hf_models/K2-Think/model-00004-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6c241dfe31735e5879384da5fab0bd1bc9d4e8a4a96252bf4f6f1bbf92ac3e4c
3
+ size 4876059416
hf_models/K2-Think/model-00005-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a4c480c26e536e351167261e47e8ed29c24888f7062fa96627f65b149cf29efa
3
+ size 4876059416
hf_models/K2-Think/model-00006-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:368279564eb6e544ffa929dfa5bf50c8ee466cd5e20f274071db77d1d46d71a4
3
+ size 4876059416
hf_models/K2-Think/model-00007-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4766656b68d420263399fc91663d7fd60dda98320027610c019b88b06cfec718
3
+ size 4876059416
hf_models/K2-Think/model-00008-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8051b1626587e14270cfd87fba578f31602f720b725aeaee7955243ae4b951bc
3
+ size 4876059416
hf_models/K2-Think/model-00009-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:10eff24c46057a894b496ac5018f90e58274efe6bb93f464790544d631cd4b30
3
+ size 4876059416
hf_models/K2-Think/model-00010-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:053320b95c39b070bade2980d05b607c4fa8b71640f951e743a709de29d48654
3
+ size 4876059416
hf_models/K2-Think/model-00011-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:610a481f638438d1922c78253ef36544790cb61a209f24bc963986e14c167b8f
3
+ size 4876059416
hf_models/K2-Think/model-00012-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c4847205963d256a9f052fe6d226f5e1c863e7874d23e6f3cbebc79c6c3fd9b7
3
+ size 4876059416
hf_models/K2-Think/model-00013-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e9cc07c34ff82c99142c5163e27bc39aee3b887e0401837f1b0144962da7a5a4
3
+ size 4876059416
hf_models/K2-Think/model-00014-of-00014.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b44bcb2021bdbf1e35b15660d42879beb1c381791123ed8bb76a034cc120a910
3
+ size 2123397800
hf_models/K2-Think/model.safetensors.index.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e6548816f7ae8cd9fc353a20737f640ad32db6eff13a8c097246084c3207300f
3
+ size 63248
hf_models/K2-Think/special_tokens_map.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:76862e765266b85aa9459767e33cbaf13970f327a0e88d1c65846c2ddd3a1ecd
3
+ size 613
hf_models/K2-Think/tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9c5ae00e602b8860cbd784ba82a8aa14e8feecec692e7076590d014d7b7fdafa
3
+ size 11421896
hf_models/K2-Think/tokenizer_config.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:11d20a741a0eda1e7482d29b5d17553328922ed9e7391ec6f44d390215390f3d
3
+ size 4713
hf_models/K2-Think/vllm_output/VerilogEval_Human_0.2_0_1.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3852a0c1cd6fea01cabee009519ce87d4c17487f8c21000b6525748d6aea6f7b
3
+ size 32435208
hf_models/K2-Think/vllm_output/VerilogEval_Human_0.2_0_1.jsonl_results.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc431d5e320512dc29466b5b5c0ba3be117597dd9c0582fe50c352d12f326da4
3
+ size 39964678
hf_models/K2-Think/vllm_output/cid002_0.2_16384_0_1.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:867eebd0439dd4c28588f38dee1774ce5cea85d2446234f17e1cb2ce1b8fa91f
3
+ size 21842137
hf_models/K2-Think/vllm_output/cid003_0.2_16384_0_1.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:18f15be3e63ba4f72cfea5ec60028146de6488587fa8ee1edd0e09052d6c0532
3
+ size 20071808
hf_models/K2-Think/vllm_output/cid004_0.2_16384_0_1.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:53e4e53776980c77fbff537919c96de6f226f64df2bb0abf1725ce023d1a4ed9
3
+ size 15037893
hf_models/K2-Think/vllm_output/cid016_0.2_16384_0_1.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e522e454d0f1df03c330c87b149e33abbf46887631ace9e7fa3e6b592ba38b90
3
+ size 8116700
hf_models/K2-Think/vocab.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910
3
+ size 2776833
nemo_data/cvdp_accept.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:17cdd8efaf7016ef2bb76913329007d166cd79b6ebc6208ddd27c2a646f99960
3
+ size 917084841