K2 Horizon 7B
K2-Horizon 7B is a 7B-core dense, decoder-only text-generation model from the K2-Horizon family, available under the apache-2.0 license with safetensors format and transformers library support. It has a 512K (524,288-token) native context window from midtraining onward, supports English, and was trained on IFM/K2-Horizon-Pretrain-Data and IFM/K2-Horizon-Midtrain-Data. The model card highlights strong dense-baseline performance across agentic, coding, long-context, and reasoning benchmarks according to the supplied chart/table, diffusion adapters referenced on Hugging Face for faster inference, released intermediate checkpoints, and public training data, recipe, code, and evaluation resources.
At a glance
- Parameters
- 9.00B
- Architecture
- k2_horizon
- Context length
- 524,288
- License
- apache-2.0
- Disk space
- 16.8 GB
- Software
- SGLang, vLLM, Transformers
Will it run on your machine?
Save your machine to see a personalized rating and its reasoning.
Add my hardwareBest for
- Text generation in English with the transformers library.
- Long-context tasks up to the stated 512K context window.
- Agentic benchmark-style tasks as evaluated in the supplied model card.
- Coding benchmark-style tasks as evaluated in the supplied model card.
- Reasoning benchmark-style tasks as evaluated in the supplied model card.
Tradeoffs
- Only English language support is listed.
- Context length is limited to the stated 512K-token window.
- Benchmark results are reported only for the specific chart and table shown; no independent testing is claimed.
- Diffusion adapters are referenced externally and are not part of this model's provided files.
- No detailed hardware, quantization, or deployment compatibility requirements are provided in the source data.
Ways to run it
SGLang · Linux
Repository-specific command in publisher documentation; confirm dependencies and hardware in the source.
sglang serve --model-path IFM/K2-Horizon-7B --revision 30d38fecf8a609873ae73a617f5c714286e1f565 --tp 1 --dtype bfloat16 --attention-backend fa3 --reasoning-parser k2_horizon --host 0.0.0.0 --port 30000vLLM · Linux
Repository-specific command in publisher documentation; confirm dependencies and hardware in the source.
vllm serve IFM/K2-Horizon-7B --trust-remote-code --dtype bfloat16 --tensor-parallel-size 1 --reasoning-parser k2_horizon --enable-auto-tool-choice --tool-call-parser k2_horizonTransformers · See official guide
Repository-specific command in publisher documentation; confirm dependencies and hardware in the source.
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "IFM/K2-Horizon-7B"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id, device_map="auto", dtype="bfloat16", low_cpu_mem_usage=True, trust_remote_code=True
)
inputs = tokenizer("Explain why long-context evaluation is difficult.", return_tensors="pt").to(model.device)
inputs.pop("token_type_ids", None)
outputs = model.generate(**inputs, max_new_tokens=32768, temperature=1.0, top_p=0.95, do_sample=True)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))Explore its uses
Keep exploring
Bonsai 2 · 27B
A compressed 27B-class reasoning model with publisher-provided GGUF packs and a dedicated llama.cpp fork for CUDA, Metal, and CPU.
DeepSeek V4.1 Flash
A multimodal reasoning model with a compressed key-value cache, published as open weights.
Qwen3.8
Explore 4 versions of Qwen3.8. Compare model sizes, packages, hardware requirements, and available setups.