/ Модель

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

Контекст
2 048 токенов
Параметры
107 млн
Лицензия
MIT
Архитектура
mybert · dense
Библиотека
transformers
Опубликована
16 июл 2026

RoPERT-base-cased

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

Англоязычный двунаправленный энкодер RoPERT для заполнения пропусков и дообучения на задачах понимания текста с контекстом до 2048 токенов.

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

Бенчмарки

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

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

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

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

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

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

RoPERT-base-cased — предварительно обученный англоязычный двунаправленный энкодер семейства MyBERT, разработанный авторами репозитория kd13/RoPERT-base-cased. Он использует цель masked language modeling (MLM): модель восстанавливает скрытые токены по контексту слева и справа. Архитектура включает 12 слоёв, скрытый размер 768 и 12 attention-голов; содержит около 107,2 млн параметров, использует WordPiece-токенизатор с регистрозависимым словарём google-bert/bert-base-cased и поддерживает контекст до 2048 токенов.

По сравнению с исходным BERT-base, RoPERT использует rotary position embeddings (RoPE), SwiGLU и pre-layer normalization. Модель предназначена для предсказания маскированных токенов и как энкодер для дообучения на классификации текста и токенов, извлечении ответов на вопросы и задачах выбора ответа. Она не предназначена для генерации текста. Для загрузки требуется Transformers с trust_remote_code=True и PyTorch. Опубликованные веса имеют формат float32, лицензия — MIT.

Модель обучалась на англоязычных данных из Wikipedia, веб-текстов и BookCorpus. Ограничения: она рассчитана только на английский язык, чувствительна к регистру и не принимает последовательности длиннее 2048 токенов без усечения или разбиения. В обучающих данных могут присутствовать общественные предубеждения и нежелательные закономерности.

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

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

Ограничения

Модель рассчитана только на английский язык, различает регистр и ограничена контекстом в 2048 токенов. Для загрузки требуется trust_remote_code=True; данные из веба и книг могут вносить предубеждения.

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

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

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

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

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

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

Открыть на Hugging Face

RoPERT base model (cased)

Pretrained model on English language using a masked language modeling (MLM) objective. This model is case-sensitive: it makes a difference between english and English.

RoPERT is a modernized BERT-style bidirectional encoder. It keeps the encoder-only, fill-in-the-blank pretraining recipe of the original BERT, but replaces several architectural components with designs from recent transformer research (rotary position embeddings, SwiGLU, pre-layer normalization), and extends the context window from 512 to 2048 tokens.

banchmarks

Model description

RoPERT is a transformer encoder pretrained on a large corpus of English text in a self-supervised fashion, with no human labelling. During pretraining, a fraction of the tokens in each input is masked and the model learns to predict the original tokens from both left and right context. This bidirectional objective makes the model well suited for producing representations of whole sentences and documents, which can then be fine-tuned for downstream tasks.

Compared to the original BERT-base architecture, RoPERT makes the following changes:

ComponentBERT baseRoPERT base
Position encodingLearned absolute embeddingsRotary position embeddings (RoPE), θ = 10,000
Context length5122048
Layer normalizationPost-LNPre-LN + final LayerNorm
Feed-forward networkGELU, 3072 intermediateSwiGLU, 2048 intermediate (parameter-neutral)
Linear biasesYesNo (bias-free encoder)
Segment (token type) embeddingsYes, with NSP objectiveNone (MLM only, no NSP)
AttentionEagerSDPA / FlashAttention-compatible

Other specifications:

  • Layers / hidden size / heads: 12 / 768 / 12
  • Parameters: 108M total (~22M embeddings), input and output embeddings tied
  • Tokenizer: WordPiece, google-bert/bert-base-cased vocabulary (28,996 tokens), cased
  • Precision: trained in bfloat16, weights published in float32 Because RoPERT uses rotary embeddings, there is no position embedding table: all 2048 positions are handled by rotating the query/key vectors, and every position within the context window was seen during pretraining.

How to use

The architecture is implemented as custom code shipped with this repository, so trust_remote_code=True is required. PyTorch only.

You can use this model directly with a pipeline for masked language modeling:

from transformers import pipeline
 
pipe = pipeline("fill-mask", model="kd13/RoPERT-base-cased", trust_remote_code=True)
pipe("I went to the [MASK] to buy some milk.")
[{'score': 0.137, 'token_str': 'market',      'sequence': 'I went to the market to buy some milk.'},
 {'score': 0.082, 'token_str': 'supermarket', 'sequence': 'I went to the supermarket to buy some milk.'},
 {'score': 0.070, 'token_str': 'shop',        'sequence': 'I went to the shop to buy some milk.'},
 ...]

And here is how to get the hidden states of a given text, e.g. for feature extraction or as the backbone for fine-tuning:

import torch
from transformers import AutoTokenizer, AutoModel
 
tokenizer = AutoTokenizer.from_pretrained("kd13/RoPERT-base-cased", trust_remote_code=True)
model = AutoModel.from_pretrained("kd13/RoPERT-base-cased", trust_remote_code=True)
 
inputs = tokenizer("Hello, world!", return_tensors="pt")
with torch.no_grad():
    outputs = model(input_ids=inputs["input_ids"], attention_mask=inputs["attention_mask"])
 
outputs.last_hidden_state  # [batch, seq_len, 768]

Note that the model has no segment embeddings, so token_type_ids are accepted but ignored. Sentence pairs can still be encoded in the standard [CLS] A [SEP] B [SEP] format.

Training data

RoPERT was pretrained on roughly 10B+ tokens of English text drawn from three sources:

  • English Wikipedia (WikiText-style encyclopedic text)
  • Web text (filtered general web documents)
  • BookCorpus (4,085 long-form book documents) Documents were tokenized with the bert-base-cased WordPiece tokenizer and packed into full 2048-token sequences, so the model was trained on long contexts throughout pretraining rather than being extended afterwards.

Intended uses & fine-tuning

The raw model can be used as-is for masked token prediction, but it is primarily intended to be fine-tuned on downstream tasks that use the whole sentence or document to make decisions, such as:

  • Text classification — sentiment analysis, topic classification, spam / toxicity detection, natural language inference
  • Token classification — named entity recognition (NER), part-of-speech (POS) tagging, chunking
  • Multiple choice — answering questions by selecting the correct option from a set of choices
  • Extractive question answering — SQuAD-style span prediction
  • Sentence and document embeddings — semantic similarity, clustering, dense retrieval
  • Reranking — scoring query–document pairs for search
  • Long-document tasks — the native 2048-token window covers most articles, reviews, and reports without truncation or sliding windows The repository ships the encoder (AutoModel) and the MLM head (AutoModelForMaskedLM). For other tasks, attach a task head on top of the encoder outputs (e.g. a linear classifier over the [CLS] position or over per-token hidden states) and fine-tune end-to-end.

This model is a bidirectional encoder and is not intended for text generation; for generative tasks, use a decoder model such as GPT or Llama.

Limitations and bias

  • English only, and case-sensitive by design.
  • Maximum input length is 2048 tokens; longer inputs must be truncated or chunked.
  • Loading requires trust_remote_code=True, since the architecture is not part of the core transformers library.
  • The training data includes unfiltered text from the web and books, so the model may reproduce societal biases present in those sources. Predictions and fine-tuned models built on top of it should be evaluated for bias before deployment in sensitive applications.

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

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

GPU в ailist

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

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

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

Класс архитектуры
MyBertForMaskedLM
Ревизия весов
6a3fba2

0 моделей