/ Модель

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

Контекст
16 384 токена
Параметры
291 млн
Лицензия
MIT
Архитектура
gdn2 · dense
Библиотека
transformers
Опубликована
8 сен 2026

hyb16-mix-s0

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

Небольшая базовая языковая модель Berlm для генерации текста и изучения смешанных механизмов внимания в длинном контексте.

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

Бенчмарки

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

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

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

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

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

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

hyb16-mix-s0 — небольшая исследовательская языковая модель Berlm для сравнения способов обработки длинного контекста. В метаданных указана архитектура GDN2ForCausalLM и 290,7 млн параметров; README описывает вариант на 365,8 млн параметров с 24 слоями, сочетающий GDN2, скользящее внимание с окном 2048 токенов и полное внимание. Модель обучена с нуля на 15 млрд токенов FineWeb-Edu, контекст при обучении составлял 16 384 токена; используется токенизатор Llama 2. Основной язык по карточке — английский.

Модель предназначена для генерации текста и экспериментов со смешанными механизмами внимания на длинных последовательностях. В тестах её короткоконтекстные результаты сопоставимы с родственными вариантами, однако точность извлечения фактов из длинного контекста резко падает за пределами окна 2048 токенов. Это базовая, не настроенная на инструкции и безопасность модель; она может выдавать ошибки или оскорбительный текст. Для запуска нужны CUDA GPU, зависимости из README и загрузка кода модели с trust_remote_code=True. Лицензия — MIT.

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

  • эксперименты с гибридным вниманием в языковых моделях
  • генерация продолжения англоязычного текста
  • сравнение механизмов обработки длинных последовательностей
  • оценка извлечения фактов из контекста

Ограничения

Модель не настроена на инструкции или безопасность; возможны фактические ошибки и оскорбительные ответы. Извлечение информации заметно ухудшается за пределами окна скользящего внимания 2048 токенов; результаты приведены для одного обучающего запуска.

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

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

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

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

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

Открыть на Hugging Face

hyb16-mix-s0: GDN2 / SWA-2K / full-attention mix

One of five 366M-parameter hybrid language models trained under an identical recipe (15B tokens at sequence length 16,384) to compare token mixers at long context. Only the 18 non-full-attention layers differ between the five; the six gated full-attention layers, the MLPs, the tokenizer, the data, the optimizer, and the schedule are shared. This card reports all five so the numbers can be read side by side.

Siblings: hyb16-gdn2-s0, hyb16-edm-s0, hyb16-swa1k-s0, hyb16-swa2k-s0.

Architecture

  • 9 GDN2 layers, 9 gated sliding-window attention layers (window 2048, RoPE theta 10000) at 1, 4, 6, 9, 12, 14, 17, 20, 22, and 6 gated full-attention layers (no RoPE) at 3, 7, 11, 15, 19, 23 (pattern GSGF SGSF x3).
  • 24 layers, hidden size 1024, 6 heads of dimension 128 in the linear/EDM layers (8 heads of 128 in attention layers), SwiGLU MLP with intermediate size 2816, RMSNorm, tied input/output embeddings.
  • Parameters: 365,773,494 total, 333,005,494 non-embedding (embedding 32,768,000).
  • Vocabulary: Llama-2 tokenizer (32,000), EOS id 2.
  • Full-attention layers use no positional encoding (NoPE); sliding-window layers use RoPE with theta 10,000; every attention layer has a sigmoid output gate.

Training

  • Data: FineWeb-Edu, Llama-2 tokens, documents packed to 16,384 without document masking. Median document 686 tokens; half of all tokens sit in documents longer than 2K.
  • 15,000,000,000 tokens (9,536 optimizer steps), global batch 1,572,864 tokens (96 sequences of 16,384).
  • AdamW, peak LR 8e-4, warmup 1.5B tokens, warmup-stable-decay schedule with the decay starting at 13.5B tokens. Seed 0. bf16.
  • Precision note: the linear layers run flash-linear-attention's GDN2 chunk kernels; attention layers run flash-attn 2 (fa2) with the window as a left-only sliding window.

Evaluation

Zero-shot suite (lm-eval-harness 0.4.12, batch 8 for the LM suite, batch 16 for the recall trio), accuracy unless noted. The "this model" column repeats the model's own values in bold.

metricthis modelgdn2edmswa1kswa2kmix
final val loss (nats)2.31562.30552.29772.32452.32892.3156
arc_easy / arc_challenge57.1 / 25.159.4 / 26.159.7 / 25.257.0 / 25.055.0 / 25.057.1 / 25.1
hellaswag (acc_norm)41.541.542.040.740.841.5
piqa / winogrande / boolq67.1 / 53.0 / 58.866.5 / 52.5 / 56.567.3 / 52.2 / 59.566.5 / 50.4 / 61.064.7 / 52.5 / 58.767.1 / 53.0 / 58.8
openbookqa (acc_norm)31.633.431.832.031.231.6
lambada acc / ppl34.6 / 31.535.5 / 29.935.9 / 28.233.4 / 37.437.4 / 29.334.6 / 31.5
wikitext word ppl25.124.824.325.125.325.1
swde / fda / squad_completion53.8 / 13.6 / 35.456.0 / 66.2 / 36.755.5 / 62.1 / 38.447.9 / 51.5 / 21.850.9 / 13.2 / 21.553.8 / 13.6 / 35.4
social_iqa (prompt-qualified)37.938.839.037.837.537.9

Single-needle retrieval (S-NIAH, RULER-style, 500 samples per cell, fraction correct):

metricthis modelgdn2edmswa1kswa2kmix
needle-1 @1K/2K/4K/8K1.00/1.00/0.53/0.281.00/1.00/1.00/1.001.00/1.00/1.00/1.001.00/0.98/0.96/0.941.00/1.00/0.52/0.281.00/1.00/0.53/0.28
needle-1 @16K/32K0.15/0.051.00/1.001.00/1.000.95/0.940.15/0.050.15/0.05
needle-2 @1K/2K/4K/8K1.00/1.00/0.48/0.201.00/1.00/1.00/1.001.00/1.00/1.00/0.971.00/0.99/0.98/0.810.94/0.71/0.42/0.251.00/1.00/0.48/0.20
needle-2 @16K/32K0.13/0.080.93/0.370.94/0.650.88/0.630.15/0.080.13/0.08
needle-3 @1K/2K/4K/8K0.98/0.98/0.30/0.010.98/0.98/0.91/0.630.96/0.95/0.84/0.540.99/0.94/0.76/0.370.18/0.30/0.29/0.250.98/0.98/0.30/0.01
needle-3 @16K/32K0.00/0.000.17/0.040.45/0.200.16/0.090.16/0.060.00/0.00

Reading for this model: Short-context scores match the GDN2 arm, but the SWA-2K retrieval collapse reappears exactly (FDA 13.6; needle-1 0.53/0.28/0.15/0.05 at 4K/8K/16K/32K equals the SWA-2K arm, i.e. the fraction of needles inside the last 2K tokens). Nine GDN2 layers and six full-attention layers did not prevent it. Single seed; cause open.

All numbers are one seed. Generation-task scores move by a few tenths of a point between hardware and batch sizes; treat differences under about half a point as noise.

Usage

The model class is not in transformers; the modeling code ships with the repo and is loaded with trust_remote_code=True. It needs a CUDA GPU and these packages, which are not bundled:

torch==2.10.*            # what the release was verified with
transformers==5.14.1
flash-linear-attention==0.5.2
flash-attn==2.8.3        # prebuilt wheel; the fa2 attention backend is the default
triton>=3.6
einops
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer

repo = "Berlm/hyb16-mix-s0"
tok = AutoTokenizer.from_pretrained(repo, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(repo, dtype=torch.bfloat16, trust_remote_code=True).cuda().eval()

ids = tok("The capital of France is", return_tensors="pt").to("cuda")
out = model.generate(**ids, max_new_tokens=16, do_sample=False)
print(tok.decode(out[0]))

Set HYBRIDLM_ATTN_BACKEND=flex to use a PyTorch flex-attention backend instead of flash-attn (slower, bitwise-reproducible), or fla for flash-linear-attention's parallel attention kernel.

The weights in model.safetensors are the bf16 export of the final training checkpoint (step 9,536); train_state.json records the step, token count, and the tokenizer fingerprint the evaluations used.

Limitations

These are small research models trained on 15B tokens of web text. They are not instruction-tuned, not safety-tuned, and will produce incorrect or offensive text. They are released to support research on long-context token mixers.

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

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

GPU в ailist

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

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

Модели нужен код из репозитория; автор пока не в списке доверенных организаций.

Класс архитектуры
GDN2ForCausalLM
Ревизия весов
c3a23ea

0 моделей