Text Generation
Transformers
Safetensors
English
k2_horizon
k2-horizon
3.7b
dense
open-weights
ifm
conversational
custom_code
Instructions to use IFM/K2-Horizon-3.7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IFM/K2-Horizon-3.7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IFM/K2-Horizon-3.7B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("IFM/K2-Horizon-3.7B", trust_remote_code=True, device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IFM/K2-Horizon-3.7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IFM/K2-Horizon-3.7B" # 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-Horizon-3.7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/IFM/K2-Horizon-3.7B
- SGLang
How to use IFM/K2-Horizon-3.7B 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-Horizon-3.7B" \ --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-Horizon-3.7B", "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-Horizon-3.7B" \ --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-Horizon-3.7B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use IFM/K2-Horizon-3.7B with Docker Model Runner:
docker model run hf.co/IFM/K2-Horizon-3.7B
Commit History
Today
-
Update README.md
Verified signatureea9a45d
7 days ago
-
Upload k2-horizon-3.7b-benchmarks.png
Verified signature4525090 -
Upload k2-horizon-3.7b-benchmarks.png
Verified signaturedc12ec6 -
Update README.md
Verified signaturef78231e
21 days ago
-
Support OpenAI-style text content lists (#7)
- Support OpenAI-style text content lists (f3f919efceb5a91e3ec20424ad93dde931199cea) Co-authored-by: Seungwook Han <hanseungwook@users.noreply.huggingface.co>9d280ff
-
Update README.md with information on FTPO
Verified signatured6e5432 -
Update README.md with information on FTPO.
Verified signature93c35f5
-
Fix the tag name of anti doom loop checkpoint in README.md
Verified signaturec7d0261 -
Update README.md to include anti doom loop checkpoint
Verified signature35ba769 -
Promote checkpoint anti_doom_loop_verified to main
HF release automationfe504ef -
Publish checkpoint anti_doom_loop_verified
HF release automationHF-Main-Only-Checkpoint: 10ec9899 -
Fix typo and wording.
Verified signature6e609f8 -
Add anti-doom-loop paragraph
Verified signature17701a5 -
Update README.md
Verified signature77cf611 -
Document tool_call_format API options (#2)
- Document tool_call_format API options (546d5de5e450bad240144d8614554cfe29c72e40) Co-authored-by: Seungwook Han <hanseungwook@users.noreply.huggingface.co>641ee63
-
Release artifacts updated.
Verified signature943ce4e
-
Delete files migration_manifest.json validation.json with huggingface_hub
Verified signature85f683b
-
Add a note on ckpt usage
Verified signature242d92f
-
Update model card
Verified signature6360f70
-
Preserve checkpoint history: rl_stemcode
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged.09568ba -
Publish checkpoint rl_stemcode
HF release automationHF-Main-Only-Checkpoint: 18fdfbf0 -
Preserve checkpoint history: rl_code
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged.747acd3 -
Publish checkpoint rl_code
HF release automationHF-Main-Only-Checkpoint: 179763ae -
Preserve checkpoint history: rl_math
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged.972a537 -
Publish checkpoint rl_math
HF release automationHF-Main-Only-Checkpoint: 1d3279cd
-
Fix typo
Verified signature7a7d2c1 -
Update ckpt progress
Verified signatured237986
-
Add details in RL stage in Training Overview.
Verified signature9395c67 -
Preserve checkpoint history: sft_2_500
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031f7c542d8 -
Preserve checkpoint history: sft_2_1000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031f3f9153f -
Preserve checkpoint history: sft_2_1500
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031f47bf9f4 -
Preserve checkpoint history: sft_2_2000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031ff705041 -
Preserve checkpoint history: sft_2_2500
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031f481170a -
Preserve checkpoint history: sft_1_2000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031f5fa6fe7 -
Preserve checkpoint history: sft_1_4000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031ff1df18d -
Preserve checkpoint history: sft_1_6000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031f8f96a3c -
Preserve checkpoint history: sft_1_8000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031fe1eb65d -
Preserve checkpoint history: sft_1_10000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031f76646c0 -
Preserve checkpoint history: mid_4_1000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031fd9cc0e9 -
Preserve checkpoint history: mid_4_2000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031faace30e -
Preserve checkpoint history: mid_4_3000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031f4e6ed10 -
Preserve checkpoint history: mid_4_4000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031f00b8afd -
Preserve checkpoint history: mid_4_5000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031ff748017 -
Preserve checkpoint history: mid_4_6000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031fa3bf52a -
Preserve checkpoint history: mid_4_7000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031f1bcd87f -
Preserve checkpoint history: mid_4_8000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031f9ed5257 -
Preserve checkpoint history: mid_4_9000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031fe53b5a5 -
Preserve checkpoint history: mid_4_10000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031fcc00ba7 -
Preserve checkpoint history: mid_3_500
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031fc096dab -
Preserve checkpoint history: mid_3_1000
HF release automationHF-Content-Preserving-Merge: 1 Main file tree intentionally unchanged. HF-Tag-Order-Attempt: 73a6433e0ddb8edb436f5186ade13520ca54bacece114402fafb8356d41f031f8601d96