Run this model with HF Jobs

Run IFM/K2-Horizon-0.9B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/IFM/K2-Horizon-0.9B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/IFM/K2-Horizon-0.9B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/IFM/K2-Horizon-0.9B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/IFM/K2-Horizon-0.9B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

Fix `output_hidden_states` / `attentions` returning None (missing `@capture_outputs`)

#8

Follow-up to #6 (full write-up, evidence and repro there).

  • Commit 1: K2HorizonModel.forward declares the hidden_states / attentions entries in _can_record_outputs, but never had the @capture_outputs decorator that reads the output_* flags and installs the capture hooks — so output_hidden_states=True returned None. Adds the import + decorator, mirroring stock Qwen3MoeModel.forward.
  • Commit 2: the attentions entry names K2HorizonAttention, but these checkpoints instantiate K2HorizonMoVAAttention, so output_attentions=True returned an empty tuple. Lists both classes (weights are produced under eager attention, as with stock models).

Verified on K2-Horizon-0.9B, transformers 5.17.0: as shipped → hidden_states=None; with this branch → 29 states for 28 layers ([0] == embeddings, [-1] == last_hidden_state), flag-off → None, greedy generation unchanged; attentions → 28 tensors with eager attention. The modeling file is byte-identical across all 12 full-model K2-Horizon repos, so the fix applies family-wide (tested here on the 0.9B).

Avicennasis changed pull request status to open
Institute of Foundation Models org

It is kind of the same fix we have merged for 7b so it's safe

zhou94539 changed pull request status to merged

Sign up or log in to comment