/ Модель

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

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

NexteraBERT-Mezzoforte-220M-13B-en

Заполнение пропусковТекст → текст3 профессии

Англоязычный энкодер NexteraBERT для предсказания замаскированных токенов и тонкой настройки под классификацию текста.

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

Бенчмарки

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

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

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

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

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

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

NexteraBERT-Mezzoforte-220M-13B-en — англоязычный двунаправленный энкодер от независимого исследователя RikkaBotan, обученный предсказывать замаскированные токены. Это отдельный запуск семейства NexteraBERT на 13 млрд токенов; в README указано 212,6 млн параметров, а в метаданных — 353,6 млн. Архитектура включает 18 блоков со смешиванием токенов SnowLily, локальным вниманием NexteraSWA, полным вниманием и NexteraHRA.

Модель работает с текстом и предназначена для fill-mask и тонкой настройки под задачи классификации; для поиска и сходства предложений сначала требуется дообучение. В сравнении авторов модель набрала 85,45 на среднем GLUE и 51,92 на среднем MTEB v2 для английского языка. Она лицензирована по MIT.

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

  • Подстановка пропущенного слова в английском предложении
  • Создание признаков текста для последующей тонкой настройки
  • Классификация английских текстов после обучения классификационной головы
  • Адаптация энкодера к задачам GLUE или MTEB

Ограничения

Это предварительно обученный энкодер, а не готовая модель эмбеддингов; для поиска и оценки сходства требуется дообучение. Классификационная голова инициализирована заново и должна быть обучена для целевой задачи.

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

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

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

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

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

Открыть на Hugging Face

NexteraBERT Logo

NexteraBERT-Mezzoforte-220M-13B-en

NexteraBERT is a fast, long-context bidirectional encoder. This repository holds the 13B-token model of the NexteraBERT paper: the same 212.6M-parameter English model as NexteraBERT-Mezzoforte-220M-en, pretrained with masked language modeling (MLM) on 13B tokens instead of 130B.

The paper trains one architecture at three budgets, 1.3B, 13B, and 130B tokens, to show how quality scales with pretraining. Each budget is a separate run of the same recipe, not an intermediate checkpoint of the 130B run. At 13B tokens, NexteraBERT exceeds the best compute-optimal OptiBERT model on MTEB v2 at 5.27 times lower estimated compute. For downstream use, the 130B model NexteraBERT-Mezzoforte-220M-en scores higher on every GLUE task and every MTEB task type.

The encoder has 18 blocks. Each block has a token mixer and a squared-ReLU MLP, both with pre-normalization and a residual connection. The token mixers are:

  • SnowLily (8 blocks): an input-dependent gating liquid mixer derived from liquid time-constant networks. Its cost is linear in input length.
  • NexteraSWA (5 blocks): sliding-window attention with a 256-token window.
  • NexteraSelfAttention (3 blocks): full attention.
  • NexteraHRA (2 blocks): attention over bands of 4 tokens, a cheaper global path.

All attention blocks use grouped-query attention (16 query heads, 8 key/value heads). The full-attention and HRA blocks use SSSMax (Stable Scalable-Softmax), which scales the attention logits with the number of keys so that attention stays selective on long inputs.

NexteraBERT Layers

Results

Main results of NexteraBERT

(a, b) GLUE and MTEB v2 against pretraining tokens: NexteraBERT at 1.3B, 13B (this model), and 130B tokens, with ModernBERT-base (2T) and NeoBERT (2.1T) evaluated under the same protocol; OptiBERTneo values are published. (c) H200 NVL throughput with 65,536 tokens per batch. (d) Exponentiated masked-token loss; the dotted line marks 8,192 tokens, the longest training length, and the percentages give the increase from 8,192 to 65,536 tokens. Panels (c) and (d) show the 130B model. Throughput depends only on the architecture, which this model shares; length extrapolation was not measured at 13B tokens.

Comparison across pretraining budgets

All three budgets are fine-tuned and evaluated under the same protocol.

BenchmarkMetric1.3B13B (this model)130B
GLUEmean of 8 tasks77.5485.4587.90
MTEB v2 (English, 41 tasks)mean over task types47.8251.9254.70

Retrieval (BEIR, NanoBEIR, code, and MLDR) and length extrapolation were evaluated for the 130B model only; see NexteraBERT-Mezzoforte-220M-en.

Comparison with OptiBERTneo at 13B tokens

OptiBERTneo (Dervishi et al., 2025) is a standard Transformer encoder with the NeoBERT architecture (198M non-embedding parameters), trained on FineWeb-Edu with 1,024-token inputs at the same token budgets as NexteraBERT; 90.25% of NexteraBERT's data comes from the same corpus. Its scores are published values, not re-evaluated under our protocol: they come from another tokenizer and the fine-tuning runs of that study, so the comparison rules out the data as the explanation but is not fully controlled. The better score is in bold.

BenchmarkMetricNexteraBERTOptiBERTneo
GLUEmean of 8 tasks85.4584.6
MTEB v2 (English, 41 tasks)mean over task types51.9250.50
Estimated pretraining computeFLOPs (lower is better)1.33 × 10¹⁹1.9 × 10¹⁹

Compute is estimated with the OptiBERT convention (six FLOPs per non-embedding parameter per token, plus the pairwise attention terms at 1,024 tokens), not measured. The best compute-optimal OptiBERT model reaches 51.60 on MTEB v2 at 7.0 × 10¹⁹ FLOPs; this model exceeds it at 5.27 times lower estimated compute.

GLUE (validation sets)

TaskMetric1.3B13B (this model)130B
CoLAMCC39.5961.3364.64
SST-2accuracy86.7792.5894.07
MRPCF188.4291.1592.81
STS-BSpearman85.1690.3091.93
QQPaccuracy89.2291.1291.58
MNLI-maccuracy76.7984.9588.33
QNLIaccuracy84.9991.3693.50
RTEaccuracy69.3980.7986.35
Mean77.5485.4587.90

Scores are means over 5 seeds (MRPC, STS-B, RTE), 4 (CoLA), 3 (SST-2), or 1 (QQP, MNLI, QNLI). MRPC, STS-B, RTE, and QNLI start from the MNLI-tuned encoder.

MTEB v2 (English)

Task type1.3B13B (this model)130B
Classification64.6671.3974.57
Clustering39.6442.3143.07
Pair classification67.3674.9280.30
Reranking40.0641.2641.81
Retrieval22.0723.2229.51
STS73.1378.9681.65
Summarization27.8131.3732.00
Mean (types)47.8251.9254.70
Mean (tasks)49.3553.4456.77

Each model is fine-tuned with supervised SimCSE on 312,663 NLI triplets (contrastive loss, maximum length 64) and evaluated at maximum length 512.

Usage

The model code is included in this repository, so pass trust_remote_code=True. Tested with transformers 5.12 and PyTorch 2.12.

Masked-token prediction

from transformers import AutoModelForMaskedLM, AutoTokenizer, pipeline

repo = "RikkaBotan/NexteraBERT-Mezzoforte-220M-13B-en"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModelForMaskedLM.from_pretrained(repo, trust_remote_code=True)

fill = pipeline("fill-mask", model=model, tokenizer=tokenizer)
print(fill("The capital of France is [MASK]."))

Hidden states

import torch
from transformers import AutoModel, AutoTokenizer

repo = "RikkaBotan/NexteraBERT-Mezzoforte-220M-13B-en"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModel.from_pretrained(repo, trust_remote_code=True).eval()

batch = tokenizer(["hello world", "a second sentence"], padding=True, return_tensors="pt")
with torch.no_grad():
    hidden = model(**batch).last_hidden_state          # (batch, length, 1024)

mask = batch["attention_mask"].unsqueeze(-1).to(hidden.dtype)
embedding = (hidden * mask).sum(1) / mask.sum(1)       # mean pooling

This is a pretrained encoder, not a sentence-embedding model. Fine-tune it (for example with contrastive learning) before using it for retrieval or similarity.

Unpadded inference

import torch
from transformers import AutoModel, AutoTokenizer

repo = "RikkaBotan/NexteraBERT-Mezzoforte-220M-13B-en"
tokenizer = AutoTokenizer.from_pretrained(repo)
model = AutoModel.from_pretrained(repo, trust_remote_code=True, unpadding=True).cuda().eval()

texts = ["a short query", "a much longer passage about something else entirely"]
batch = tokenizer(texts, padding=True, return_tensors="pt").to("cuda")
with torch.no_grad(), torch.autocast("cuda", dtype=torch.bfloat16):
    hidden = model(**batch).last_hidden_state          # (batch, length, 1024)

Fine-tuning for classification

from transformers import AutoModelForSequenceClassification

model = AutoModelForSequenceClassification.from_pretrained(
    "RikkaBotan/NexteraBERT-Mezzoforte-220M-13B-en",
    trust_remote_code=True,
    num_labels=3,
)

The classification head is newly initialized and must be trained.

Training

ObjectiveMLM, 80/10/10 replacement
DataFineWeb-Edu 90.25%, DCLM 4.75%, StarCoderData 5%
TokenizerModernBERT tokenizer (vocabulary 50,368)
Phase 112B tokens, inputs up to 1,024 tokens, masking rate 40% → 20% (linear)
Phase 21B tokens, inputs up to 8,192 tokens, masking rate 20%, short-context batches on 40% of steps
OptimizerAdamW, β = (0.9, 0.95), weight decay 0.1, gradient clipping 1.0
Peak learning rate8e-4 (phase 1), 8e-5 (phase 2)
Precisionbf16
MLM training loss1.31 (end of phase 1), 1.28 (end of phase 2)

The recipe is the same at every budget. The masking-rate and learning-rate schedules (linear warm-up, cosine decay) span each phase of this run, so they are shorter than in the 130B run.

Architecture

Blocks / width / MLP width18 / 1,024 / 2,304
Query heads / key-value heads16 / 8 (head width 64)
Token mixers8 SnowLily, 5 window attention, 3 full attention, 2 HRA
Window attentionwindow 256
HRAband size 4
RoPE base100,000 (full attention, HRA); 10,000 (window attention)
Parameters212.6M (161.1M non-embedding)

Files

  • config.json: model configuration, including the auto_map for trust_remote_code
  • model.safetensors / pytorch_model.bin: encoder weights
  • mlm_head.safetensors: masked-LM prediction head, loaded by AutoModelForMaskedLM
  • tokenizer.json, tokenizer_config.json: tokenizer
  • modeling_nexterabert_hf.py: transformers model classes
  • modeling_nexterabert.py, configuration_nexterabert.py: model and configuration code
  • loading.py, export.py, __init__.py: loading and export helpers

🩵 About me 🩵

Japanese independent researcher having shy and pampered personality. Twin-tail hair is a charm point. Interested in nlp. Usually using python and C.

X(Twitter): https://twitter.com/peony__snow

RikkaBotan Logo

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

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

GPU в ailist

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

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

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

Ревизия весов
46f68c6

0 моделей