BetterWright-K2-Horizon-7B-Uno

A full-parameter fine-tune of IFM/K2-Horizon-7B for driving a real browser inside the BetterWright harness, shipped together with the Uno diffusion draft adapter from IFM/K2-Horizon-7B-Uno so it keeps Uno's lossless multi-token decoding speedup.

  • AR weights (this repo's root): K2-Horizon-7B after one epoch of SFT on 3,840 accepted BetterWright agent trajectories (ProCreations/betterwright-agent-traces): system prompt, tool schemas, interleaved reasoning, XML tool calls and real tool results, all in K2's native chat format.
  • Diffusion adapter (adapter/): the released K2-Horizon-7B-Uno conditional LoRA, unchanged. Uno's Ψ-Spec sampler verifies every drafted block against the AR weights, so generation quality is exactly that of the fine-tuned AR model; the adapter only changes speed. Measured after fine-tuning: 1.85 accepted tokens per sequence forward on BetterWright prompts (base K2 + same adapter: 2.03), throughput within 4% of the base pairing.

Reasoning effort

K2's template supports three thinking modes; this fine-tune adds a fourth so the model can act with no reasoning at all:

reasoning_effort generation prefix trained from
high <ifm|think> Qwen3.8-Flash-Next xhigh and DeepSeek-V4.1-Flash high traces
medium <ifm|think_fast> medium traces of both models
low <ifm|think_faster> low traces of both models
none <ifm|think>\n</ifm|think> (pre-filled empty block) thinking-disabled traces of both models

The bundled chat_template.jinja (also applied by the tokenizer) differs from the base template in two ways: reasoning_effort: "none" is accepted, and assistant history messages without any thinking field render an empty think block instead of raising (BetterWright's generic OpenAI adapter does not echo reasoning back). Everything else, including XML tool calls, is K2's own format.

Training

data 3,840 traces, 88.0M tokens rendered (34.1M supervised assistant tokens); traces longer than 65,536 tokens cut at the last assistant turn that fits (303 traces, mostly very-long tier)
objective next-token CE on assistant turns only (reasoning + content + tool calls), token-mean per optimizer step
schedule 1 epoch = 159 steps of ~524k tokens; AdamW (β 0.9/0.95), lr 1e-5, 8 warmup steps, cosine to 1e-6, no weight decay, grad-clip 1.0
precision fp32 master weights, bf16 compute (FSDP2 mixed precision), FlashAttention-2, activation checkpointing, chunked LM-head loss (vocab 250,624)
hardware 4× H200 (vast.ai), 2 h 15 min, ~12k tokens/s
held-out loss (80 traces) 0.764 (base) → 0.675 (step 40) → 0.662 (80) → 0.656 (120) → 0.654 (final)

Training code, the data-rendering script and the Uno benchmark script are in train/; per-step history in train/history.json; benchmark outputs in train/bench_*.json.

Use

Plain AR (transformers / vLLM / SGLang): load like K2-Horizon-7B (trust_remote_code=True). Pass reasoning_effort (none|low|medium|high) to the chat template.

Uno (fast, lossless):

git clone https://github.com/ifm-ai/uno && cd uno   # follow its install steps
python inference.py --model ProCreations/BetterWright-K2-Horizon-7B-Uno --gated-lora-subfolder adapter \
  --mask-token-id 250624 --stop-token-ids 250019,1 --attention-backend fa2 \
  --prompt "Open https://books.toscrape.com and report the three cheapest books on page 1."

BetterWright: serve the AR weights (or the Uno engine) on an OpenAI-compatible endpoint and run betterwright exec --model <endpoint-model> --base-url http://127.0.0.1:PORT/v1 .... The model expects BetterWright's own system prompt and browser/done/ask tools; that is what it was trained on.

Limitations

  • Trained on synthetic, judge-filtered traces from two teacher models on ~190 real websites; no reinforcement learning and no benchmark score is claimed. Expect it to be much better inside BetterWright than as a general assistant.
  • Text-only: screenshots were omitted during data generation; the model works from DOM/text observations.
  • Context was capped at 64k tokens during training; the base supports longer contexts but long-horizon behaviour beyond that is untested.
  • The adapter was not re-fitted to the new AR weights; the measured ~9% drop in tokens-per-forward is the cost of that.
Downloads last month
168
Safetensors
Model size
9B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for ProCreations/BetterWright-K2-Horizon-7B-Uno

Finetuned
(3)
this model

Dataset used to train ProCreations/BetterWright-K2-Horizon-7B-Uno