Text Generation
Transformers
Safetensors
English
k2_horizon
k2-horizon
32b
dense
open-weights
ifm
conversational
custom_code
Instructions to use IFM/K2-Horizon-32B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use IFM/K2-Horizon-32B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="IFM/K2-Horizon-32B", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("IFM/K2-Horizon-32B", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use IFM/K2-Horizon-32B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "IFM/K2-Horizon-32B" # 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-32B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/IFM/K2-Horizon-32B
- SGLang
How to use IFM/K2-Horizon-32B 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-32B" \ --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-32B", "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-32B" \ --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-32B", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use IFM/K2-Horizon-32B with Docker Model Runner:
docker model run hf.co/IFM/K2-Horizon-32B
| { | |
| "aurora_commit": "e47c5555caa987ded29dba0624d3de1b34cf6162", | |
| "aurora_repo": "/lustrefs/users/runner/workspace/code/eval360-v2/runtime/eval-runtime/releases/20260825T235203Z-e47c5555caa9-646960/repo/vendor/xllm-dataloader1", | |
| "completed_utc": "2026-09-02T18:12:39Z", | |
| "converter": "/lustrefs/users/runner/workspace/code/tools/conversion_aurora2horizon/convert_k2aurora_to_k2horizon.py", | |
| "horizon_commit": "42ae4f88016b083a8f514655d93521d6af006de9", | |
| "horizon_repo": "/lustrefs/users/runner/workspace/code/eval360-v2/runtime/eval-runtime/releases/20260825T235203Z-e47c5555caa9-646960/repo/vendor/xllm-dataloader1-horizon", | |
| "output_checkpoint": "/lustrefs/users/runner/workspace/checkpoints/k2horizon_bf16_safetensors/k2v3-32B_mid5_220B_jais250k_bsz20M_seq512k_lr1.5e-5_constant_wd0.06_rope128/checkpoints/checkpoint_0011000", | |
| "schema_version": 1, | |
| "source_checkpoint": "/lustrefs/users/runner/shicheng.wen/eval360-v2/checkpoints/k2aurora_bf16_safetensors/k2v3-32B_mid5_220B_jais250k_bsz20M_seq512k_lr1.5e-5_constant_wd0.06_rope128/checkpoints/checkpoint_0011000", | |
| "source_hashes": { | |
| "config.json": "59ecabd1fad81df0727bd88268e46f4acaaf20fbc66eb30e3cd1e5caa12393c0", | |
| "configuration_k2_aurora.py": "90efba266ef94d3959e7f490e56146da48225e4539cca87ed6fcfea77872ce6d", | |
| "model.safetensors.index.json": "82de1ea6513d0618e5d6a1b73397a0f2f69d5d31612b083cb998e73ae3386ddd", | |
| "modeling_k2_aurora.py": "aa6e3ea27c90eca3a88b7fcfaa0aa5235c6ac22e45e33ea4f0a613dc07821924" | |
| }, | |
| "source_model_type": "k2_aurora", | |
| "target_hashes": { | |
| "config.json": "40025dbc5b18f276956fba48f83953f7f5074f29eac12dba1ac767be980ec834", | |
| "configuration_k2_horizon.py": "5c2f993c1053d9462ebea6dea416c897fddfbb4a5edd904e486936b20d4badc5", | |
| "model.safetensors.index.json": "82de1ea6513d0618e5d6a1b73397a0f2f69d5d31612b083cb998e73ae3386ddd", | |
| "modeling_k2_horizon.py": "fb09e010956bd51cfa7d4055b4381cff34c9e06164066b49e3546f38b2e6242f" | |
| }, | |
| "target_model_type": "k2_horizon", | |
| "weight_mode": "hardlink", | |
| "weights": { | |
| "dtypes": [ | |
| "BF16" | |
| ], | |
| "filenames": [ | |
| "model-00001-of-00064.safetensors", | |
| "model-00002-of-00064.safetensors", | |
| "model-00003-of-00064.safetensors", | |
| "model-00004-of-00064.safetensors", | |
| "model-00005-of-00064.safetensors", | |
| "model-00006-of-00064.safetensors", | |
| "model-00007-of-00064.safetensors", | |
| "model-00008-of-00064.safetensors", | |
| "model-00009-of-00064.safetensors", | |
| "model-00010-of-00064.safetensors", | |
| "model-00011-of-00064.safetensors", | |
| "model-00012-of-00064.safetensors", | |
| "model-00013-of-00064.safetensors", | |
| "model-00014-of-00064.safetensors", | |
| "model-00015-of-00064.safetensors", | |
| "model-00016-of-00064.safetensors", | |
| "model-00017-of-00064.safetensors", | |
| "model-00018-of-00064.safetensors", | |
| "model-00019-of-00064.safetensors", | |
| "model-00020-of-00064.safetensors", | |
| "model-00021-of-00064.safetensors", | |
| "model-00022-of-00064.safetensors", | |
| "model-00023-of-00064.safetensors", | |
| "model-00024-of-00064.safetensors", | |
| "model-00025-of-00064.safetensors", | |
| "model-00026-of-00064.safetensors", | |
| "model-00027-of-00064.safetensors", | |
| "model-00028-of-00064.safetensors", | |
| "model-00029-of-00064.safetensors", | |
| "model-00030-of-00064.safetensors", | |
| "model-00031-of-00064.safetensors", | |
| "model-00032-of-00064.safetensors", | |
| "model-00033-of-00064.safetensors", | |
| "model-00034-of-00064.safetensors", | |
| "model-00035-of-00064.safetensors", | |
| "model-00036-of-00064.safetensors", | |
| "model-00037-of-00064.safetensors", | |
| "model-00038-of-00064.safetensors", | |
| "model-00039-of-00064.safetensors", | |
| "model-00040-of-00064.safetensors", | |
| "model-00041-of-00064.safetensors", | |
| "model-00042-of-00064.safetensors", | |
| "model-00043-of-00064.safetensors", | |
| "model-00044-of-00064.safetensors", | |
| "model-00045-of-00064.safetensors", | |
| "model-00046-of-00064.safetensors", | |
| "model-00047-of-00064.safetensors", | |
| "model-00048-of-00064.safetensors", | |
| "model-00049-of-00064.safetensors", | |
| "model-00050-of-00064.safetensors", | |
| "model-00051-of-00064.safetensors", | |
| "model-00052-of-00064.safetensors", | |
| "model-00053-of-00064.safetensors", | |
| "model-00054-of-00064.safetensors", | |
| "model-00055-of-00064.safetensors", | |
| "model-00056-of-00064.safetensors", | |
| "model-00057-of-00064.safetensors", | |
| "model-00058-of-00064.safetensors", | |
| "model-00059-of-00064.safetensors", | |
| "model-00060-of-00064.safetensors", | |
| "model-00061-of-00064.safetensors", | |
| "model-00062-of-00064.safetensors", | |
| "model-00063-of-00064.safetensors", | |
| "model-00064-of-00064.safetensors" | |
| ], | |
| "index_sha256": "82de1ea6513d0618e5d6a1b73397a0f2f69d5d31612b083cb998e73ae3386ddd", | |
| "logical_bytes": 69558609920, | |
| "physical_bytes": 69558691048, | |
| "shards": 64, | |
| "tensors": 579 | |
| }, | |
| "weights_reencoded": false | |
| } | |