/ Модель

Характеристики

Контекст
8 192 токена
Параметры
924 млн
Размер весов
2,2 ГБ
Лицензия
Apache 2.0
Архитектура
k2_horizon · dense
Базовая модель
K2-Horizon-0.9B
Библиотека
mlx
Опубликована
29 сен 2026

K2-Horizon-0.9B-bf16

Генерация текстаТекст → текст11 профессий

MLX-конверсия компактной диалоговой модели K2-Horizon-0.9B для генерации текста на устройствах Apple silicon.

479скачиваний за 30 дней0лайковвеса обновлены30 сен 2026

Бенчмарки

Как модель справилась с задачами пользователей ailist и что о ней публикуют открытые лидерборды

Публичные оценки

Из открытых лидербордов. Сравнивайте результаты одного теста при одинаковых условиях — отсутствие оценки не значит, что модель хуже.

В подключённых источниках результатов для этой модели пока нет.

Что умеет модель

Описание составлено по карточке модели и метаданным Hugging Face

MLX-версия K2-Horizon-0.9B от сообщества mlx-community, преобразованная из IFM/K2-Horizon-0.9B в формат bf16 без квантизации. Это плотная авторегрессионная модель-декодер с 924,5 млн параметров, предназначенная для генерации текста в диалоговом режиме. Метаданные каталога относят базовую модель к компактным моделям для рассуждений, математики, программирования и STEM; карточка описывает преобразование весов в MLX для запуска на Apple silicon.

Метаданные указывают контекст 8192 токена, тогда как README базовой модели сообщает о контексте до 131 072 токенов с YaRN RoPE scaling. README сообщает о проверке соответствия реализации PyTorch на реальных весах и о тестовом запуске на MLX. Для работы требуется mlx-lm и код архитектуры из репозитория; в некоторых версиях mlx-lm нужен флаг trust_remote_code. Лицензия — Apache-2.0.

Сценарии применения

  • ведение диалога и генерация ответов
  • решение простых математических задач
  • генерация и объяснение кода
  • ответы на вопросы по STEM-темам

Ограничения

Требуется Apple silicon и совместимая версия mlx-lm с загрузкой кода архитектуры из репозитория; для некоторых версий нужен trust_remote_code. Длинный контекст увеличивает расход памяти, а указанные в метаданных 8192 токена расходятся с заявленными в README базовой модели 131 072 токенами.

Для каких профессий подходит11

Разделы каталога профессий, в задачах которых используется эта модель

Все профессии

Также подходит для

Карточка модели

README от автора на Hugging Face, как он его опубликовал

Открыть на Hugging Face

K2-Horizon-0.9B (MLX, bf16)

Unquantized bf16 MLX conversion of IFM/K2-Horizon-0.9B, converted from revision fa7f5de. 2.2 GB on disk. For Apple silicon.

K2-Horizon-0.9B is IFM's compact dense K2-Horizon model: a 0.9B-class decoder-only model distilled from domain teachers, with a 128K (131,072-token) context window through YaRN RoPE scaling.

Requirements

mlx-lm doesn't support the k2_horizon architecture yet. There's an open request: mlx-lm#1876. Until support lands, this repo ships the MLX model code (k2_horizon.py), which mlx-lm loads through the model_file entry in config.json. So the released mlx-lm works as-is:

pip install -U mlx-lm

Pass --trust-remote-code (or trust_remote_code=True). mlx-lm 0.31.3 loads the file without it, but newer versions require it. The file runs on your machine, so read it first if you like; its comments describe how it differs from IFM's PyTorch code.

Once K2-Horizon support lands in a released mlx-lm, this repo will be updated to use it. If something breaks after that, open a discussion here asking for a re-upload.

How it was converted

mlx_lm.convert --dtype bfloat16 with the K2-Horizon model code described below. No quantization; the weights are the original bf16 values.

Memory

Peak 2.2 GB for a short prompt; fits a 8 GB Mac. The KV cache adds about 56 KB per token in bf16 (7.0 GB at 128K tokens), so long contexts need more memory; --max-kv-size and KV-cache quantization (--kv-bits 8, where available) reduce it.

Conversion check

The MLX implementation was checked against IFM's PyTorch code (modeling_k2_horizon.py) in fp32 on the real weights of this model:

  • Layer by layer, all 28 layers match to a relative error of 4e-6 or better, and the next-token predictions agree at every position.
  • Token by token: the full model in fp32 greedily generated with the KV cache, and the PyTorch model picked the same token at every step (320/320 tokens across English, code, math and Chinese prompts). Cached and uncached outputs also agree at every step.

Smoke-tested after conversion with released mlx-lm 0.31.3: 17 * 23 → 391 and "capital of Australia" → Canberra, both ending normally. On a Mac Studio M4 Max 128GB: 195.7 tok/s generation, peak 2.2 GB (short prompt).

Benchmarks (all K2-Horizon-0.9B MLX variants)

WikiText-2 test perplexity (128 × 512 tokens, lower is better) and generation speed on an M4 Max 128GB, all measured the same way:

bf168-bit4-bit
Bits/weight168.56.4
Disk2.2 GB1.2 GB0.9 GB
Peak memory2.2 GB1.3 GB1.0 GB
WikiText-2 perplexity18.65418.713 (+0.3%)19.703 (+5.6%)
Generation195.7 tok/s306.9 tok/s379.8 tok/s

Perplexity is a coarse signal. Test the versions on your own workload before picking one. Other K2-Horizon sizes: the K2-Horizon collection.

Usage

mlx_lm.generate --model mlx-community/K2-Horizon-0.9B-bf16 --trust-remote-code --prompt "Explain mixture-of-experts in two sentences." --max-tokens 2048
from mlx_lm import load, generate

# Newer mlx-lm versions need trust_remote_code=True; on mlx-lm 0.31.3 use load("mlx-community/K2-Horizon-0.9B-bf16").
model, tokenizer = load("mlx-community/K2-Horizon-0.9B-bf16", trust_remote_code=True)
messages = [{"role": "user", "content": "Explain mixture-of-experts in two sentences."}]
prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True)
print(generate(model, tokenizer, prompt, max_tokens=2048))

mlx_lm.chat and mlx_lm.server take the same --trust-remote-code flag.

The model thinks before it answers, inside <ifm|think> … </ifm|think>. Leave room for that in max_tokens. The effort level is set with reasoning_effort in the chat template: "high" (default), "medium" or "low", e.g. apply_chat_template(messages, add_generation_prompt=True, reasoning_effort="low").

Notes:

  • Server output: mlx-lm doesn't recognize the <ifm|think> tags yet, so mlx_lm.server returns the thinking text inside content, before </ifm|think>, rather than in a separate reasoning field. K2-Horizon's tool-call format isn't parsed yet either.
  • End-of-turn token: the original generation_config.json lists only <|endoftext|> (id 1) as EOS, but the chat template ends each turn with <|ifm|im_end|> (id 64019). This repo adds 64019 to eos_token_id, like the other K2-Horizon models, so generation stops at the end of the answer and <|ifm|im_end|> does not appear in the output.
  • dtype: the original config says float32, but the checkpoint weights are bf16. The config here says bfloat16, so no tool upcasts the weights.
  • YaRN: RoPE uses YaRN (factor 16, original 8K context). The MLX code checks that the YaRN settings match the reference and raises an error for settings it does not support.
  • Recommended sampling (from IFM's model card): temperature=0.6, top_p=0.95, and a large output budget for thinking.

License

Apache-2.0, inherited from the base model. Refer to the original model card for architecture, benchmarks and intended use. All credit for the model belongs to IFM.

Как запустить

На своей GPU в ailist. Цена — по текущим предложениям провайдеров

GPU в ailist

Универсальный рантайм · mlx

Нельзя запустить

MLX-модели работают только на Apple Silicon.

Класс архитектуры
K2HorizonForCausalLM
Ревизия весов
003caf4

0 моделей