Downloads · 30 days
9
13% of all-time downloads
HarmenWessels/K2-Horizon-0.9B-int4-symg128-ov
K2-Horizon-0.9B-int4-symg128-ov is a text generation model from HarmenWessels. Use it when you need the model to write or continue text. The card lists the license as apache-2.0.
IFM/K2-Horizon-0.9B — a dense reasoning model from the Institute of Foundation Models (released 2026-09) with graded thinking and native tool calling — converted to the OpenVINO™ IR format with weights compressed to I…
Downloads · 30 days
9
13% of all-time downloads
All-time downloads
70
Public
Repo size
658 MB
Likes
0
Public
Click a slice to open those files.
.bin656 MB · 99%
From the Hugging Face model README
IFM/K2-Horizon-0.9B — a dense reasoning model from the Institute of Foundation Models (released 2026-09) with graded thinking and native tool calling — converted to the OpenVINO™ IR format with weights compressed to INT4 by NNCF. 0.6 GB on disk.
In the shipped 0.9B config every K2-specific switch is off: no MoVA attention, no MoE (all 28
layers are plain MLP), no q/k-norm, rope_head_dim == head_dim, no sliding window, and
layernorm_num_groups = 1 — which makes K2HorizonRMSNorm identical to Llama's RMSNorm.
The weights already use Llama's key layout, the MLP is SiLU-gated and RoPE is rotate_half
with YaRN. So a LlamaForCausalLM config carrying the same YaRN parameters reproduces the
model bit-for-bit, and the standard export applies:
python k2_llamafy.py <IFM/K2-Horizon-0.9B snapshot> K2-Horizon-0.9B-llamafied # rewrites config.json only
optimum-cli export openvino --model K2-Horizon-0.9B-llamafied --task text-generation-with-past \
--weight-format int4 --sym --group-size 128 --ratio 1.0 \
--awq --scale-estimation --dataset wikitext2 K2-Horizon-0.9B-int4-symg128-ov
(k2_llamafy.py asserts every one of those conditions before it rewrites anything; it is not
valid for the 3.7B/7B, which ship grouped RMSNorm.) config.json here is therefore a Llama
config with rope_parameters = YaRN factor 16 over 8192.
Runs on OpenVINO GenAI 2026.3 or newer.
Two things about K2 that a plain LLMPipeline cannot do for you:
is sameas, HF {% generation %} masks).
If it sits in chat_template.jinja, GenAI refuses to construct the pipeline, so it ships
here as chat_template.vendor.jinja. Render it yourself with Jinja2 (strip the
generation tags, they are training-mask no-ops) and generate with
apply_chat_template=False.reasoning_effort picks the opener —
high -> <ifm|think>, medium -> <ifm|think_fast>, low -> <ifm|think_faster> — and the
closing tag mirrors it. The tags are added-but-not-special tokens, so the default decode keeps
them; split the answer on the closer.import re, jinja2, openvino_genai as ov_genai
d = "K2-Horizon-0.9B-int4-symg128-ov"
src = re.sub(r"\{%-?\s*(end)?generation\s*-?%\}", "",
open(f"{d}/chat_template.vendor.jinja", encoding="utf-8").read())
env = jinja2.Environment()
env.globals["raise_exception"] = lambda m: (_ for _ in ()).throw(ValueError(m))
prompt = env.from_string(src).render(
messages=[{"role": "user", "content": "Write a Python function that reverses a string."}],
add_generation_prompt=True, reasoning_effort="low")
pipe = ov_genai.LLMPipeline(d, "GPU")
cfg = ov_genai.GenerationConfig()
cfg.max_new_tokens = 1024
cfg.do_sample = True
cfg.temperature = 1.0 # vendor-recommended
cfg.top_p = 0.95
cfg.apply_chat_template = False
out = pipe.generate(prompt, generation_config=cfg)
reasoning, _, answer = out.partition("</ifm|think_faster>")
print(answer.strip())
Tool calls come back as
<ifm|tool_calls><ifm|tool_call>read_file\n<ifm|arg_key>path</ifm|arg_key>\n<ifm|arg_value>config.yaml</ifm|arg_value>\n</ifm|tool_call></ifm|tool_calls>
— string arguments unquoted, others as JSON, so type them by your tool's own schema. When you
feed tool history back, the template wants arguments as a dict (not OpenAI's JSON string) and
— on the 3.7B/7B — a thinking field (think / think_fast / think_faster /
reasoning_content, empty is fine) on every prior assistant turn, or it raises.
IFM recommends temperature 1.0, top_p 0.95 and at least 32,768 output tokens of reasoning. That last one is ~25 minutes per answer on an iGPU, so the leaderboard measures it at the lowest effort grade for non-reasoning tasks and an 8192-token think budget for analysis: K2 under a laptop budget, not K2 as intended.
The original upload's openvino_tokenizer.xml was built by openvino_tokenizers 2026.3, whose regex handling drops the \s+(?!\S) whitespace rule when the pre-tokenizer pattern contains \uXXXX escapes (K2's does): every Python indent tokenized as an N-space token plus a bare word instead of N−1 spaces + " word", on every prompt. The tokenizer IRs here are rebuilt with the escapes rewritten to PCRE2's \x{XXXX} and match the reference tokenizers library exactly. If you downloaded this model before 2026-09-18, re-download the two tokenizer files.
This model is measured in core-ultra-llm-server — per-task pass/fail (code generation, editing, agentic tool use, analysis, autocomplete) on an Intel Core Ultra 155H iGPU, re-run whenever the engine or server changes. The leaderboard there is authoritative; this card carries no numbers so it cannot go stale. Its benchmark card (decoding, think budget) is cards/HarmenWessels__K2-Horizon-0.9B-int4-symg128-ov.yaml.