Instructions to use IFM/K2-Think-V2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IFM/K2-Think-V2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IFM/K2-Think-V2") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("IFM/K2-Think-V2") model = AutoModelForCausalLM.from_pretrained("IFM/K2-Think-V2", 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=40) print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IFM/K2-Think-V2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IFM/K2-Think-V2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "IFM/K2-Think-V2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/IFM/K2-Think-V2
- SGLang
How to use IFM/K2-Think-V2 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 "IFM/K2-Think-V2" \ --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": "IFM/K2-Think-V2", "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 "IFM/K2-Think-V2" \ --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": "IFM/K2-Think-V2", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use IFM/K2-Think-V2 with Docker Model Runner:
docker model run hf.co/IFM/K2-Think-V2
Added red-teaming safety evaluation results
Browse files
README.md
CHANGED
|
@@ -10,7 +10,7 @@ pipeline_tag: text-generation
|
|
| 10 |
|
| 11 |
# K2 Think (Jan '26): A Fully-Sovereign Reasoning System
|
| 12 |
|
| 13 |
-
📚 [
|
| 14 |
|
| 15 |
<center><img src="banner.png" alt="k2-think-banner"/></center>
|
| 16 |
|
|
@@ -89,7 +89,7 @@ completion = client.chat.completions.create(
|
|
| 89 |
---
|
| 90 |
|
| 91 |
# Evaluation & Performance
|
| 92 |
-
A summary of evaluation results are reported in our [Blog]()
|
| 93 |
|
| 94 |
## Benchmarks (pass\@1, average over 16 runs)
|
| 95 |
|
|
@@ -97,36 +97,24 @@ A summary of evaluation results are reported in our [Blog]()
|
|
| 97 |
| ------- | -------------------- | -----------: |
|
| 98 |
| Math | AIME 2025 | 90.42 |
|
| 99 |
| Math | HMMT 2025 | 84.79 |
|
| 100 |
-
| Code |
|
| 101 |
| Science | GPQA-Diamond | 72.98 |
|
| 102 |
-
| Science | Humanity's Last Exam |
|
| 103 |
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
<!-- ## Inference Speed
|
| 107 |
-
|
| 108 |
-
We deploy K2 THINK (Jan '26) 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.
|
| 109 |
-
|
| 110 |
-
| Platform | Throughput (tokens/sec) | Example: 32k-token response (time) |
|
| 111 |
-
| --------------------------------- | ----------------------: | ---------------------------------: |
|
| 112 |
-
| **Cerebras WSE (our deployment)** | **\~2,000** | **\~16 s** |
|
| 113 |
-
| Typical Cloud Service setup | \~200 | \~160 s | -->
|
| 114 |
-
|
| 115 |
-
<!-- --- -->
|
| 116 |
-
|
| 117 |
-
<!-- ## Safety Evaluation
|
| 118 |
|
| 119 |
Aggregated across four safety dimensions (**Safety-4**):
|
| 120 |
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
|
| 124 |
-
|
|
| 125 |
-
|
|
| 126 |
-
|
|
| 127 |
-
|
|
|
|
|
| 128 |
|
| 129 |
-
---
|
| 130 |
|
| 131 |
# Terms of Use
|
| 132 |
|
|
|
|
| 10 |
|
| 11 |
# K2 Think (Jan '26): A Fully-Sovereign Reasoning System
|
| 12 |
|
| 13 |
+
📚 [Blog]() - 📝 [Code](https://github.com/LLM360/Reasoning360) - 🏢 [Project Page](https://k2think.ai)
|
| 14 |
|
| 15 |
<center><img src="banner.png" alt="k2-think-banner"/></center>
|
| 16 |
|
|
|
|
| 89 |
---
|
| 90 |
|
| 91 |
# Evaluation & Performance
|
| 92 |
+
A more complete summary of evaluation results are reported in our [Blog]()
|
| 93 |
|
| 94 |
## Benchmarks (pass\@1, average over 16 runs)
|
| 95 |
|
|
|
|
| 97 |
| ------- | -------------------- | -----------: |
|
| 98 |
| Math | AIME 2025 | 90.42 |
|
| 99 |
| Math | HMMT 2025 | 84.79 |
|
| 100 |
+
| Code | SciCode | 33.00 |
|
| 101 |
| Science | GPQA-Diamond | 72.98 |
|
| 102 |
+
| Science | Humanity's Last Exam | 9.5 |
|
| 103 |
|
| 104 |
+
## Safety Evaluation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 105 |
|
| 106 |
Aggregated across four safety dimensions (**Safety-4**):
|
| 107 |
|
| 108 |
+
K2 Think (Jan '26) establishes a robust safety baseline while effectively resolving the "alignment tax" of [previous K2 Think](hf.co/LLM360/K2-Think) releases. Despite strong overall safety performance, there are still opportunities to improve the model with regard to handling sensitive personal information.
|
| 109 |
+
|
| 110 |
+
| Safety Surface | Macro-Avg | Risk Level |
|
| 111 |
+
| ------------------------------- | --------: | ---------- |
|
| 112 |
+
| Content & Public Safety | 98.20 | Low |
|
| 113 |
+
| Truthfulness & Reliability | 97.98 | Low |
|
| 114 |
+
| Societal Alignment | 97.25 | Low |
|
| 115 |
+
| Data & Infrastructure | 83.00 | Critical |
|
| 116 |
|
| 117 |
+
---
|
| 118 |
|
| 119 |
# Terms of Use
|
| 120 |
|