/ Модель

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

Контекст
514 токенов
Параметры
152 млн
Лицензия
Apache 2.0
Архитектура
roberta · dense
Базовая модель
roberta-base
Библиотека
transformers
Опубликована
29 июл 2025

gem-roberta

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

Модель RoBERTa для греческих юридических текстов заполняет пропуски и подходит как основа для специализированной настройки.

141скачиваний за 30 дней0лайковвеса обновлены21 окт 2025

Бенчмарки

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

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

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

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

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

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

GEM-RoBERTa HQ Legal — языковая модель архитектуры RoBERTa-base от novelcore, предварительно обученная с нуля на корпусе греческих юридических, парламентских и государственных текстов. В ходе обучения источники с более качественной юридической лексикой повторялись чаще, чтобы усилить представление терминологии и юридических понятий. Модель содержит 151,8 млн параметров, принимает последовательности длиной до 512 токенов (514 позиций с учётом конфигурации) и использует маскированное языковое моделирование; её основной сценарий в Transformers — заполнение пропусков в тексте.

Модель рассчитана на работу с греческими текстами и может служить основой для настройки задач распознавания именованных сущностей, классификации и ответов на вопросы в юридической сфере. README указывает на токенизатор ByteLevelBPE, обученный на греческом юридическом корпусе. Репозиторий опубликован в формате safetensors, лицензия — Apache-2.0.

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

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

Ограничения

Модель предобучена на греческом юридическом и государственном корпусе, поэтому её пригодность для других языков и общих текстов не подтверждена. NER, классификация и ответы на вопросы указаны как возможные downstream-задачи, но готовые специализированные результаты или оценки качества не приведены.

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

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

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

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

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

Открыть на Hugging Face

GEM-RoBERTa HQ Legal: A Greek Legal Language Model with Quality-Based Data Repetition

Model Description

GEM-RoBERTa HQ Legal is a RoBERTa-base model pre-trained from scratch on a strategically curated 21GB corpus of Greek legal, parliamentary, and governmental text. This model employs an innovative quality-based data repetition strategy, where higher-quality legal sources are repeated multiple times during training to enhance the model's understanding of premium legal terminology and concepts.

This model was trained as part of a research project and has been optimized for downstream tasks such as Named Entity Recognition (NER), Text Classification, and Question Answering within the legal field. The RoBERTa architecture provides enhanced performance through dynamic masking and removal of the Next Sentence Prediction (NSP) task, focusing entirely on Masked Language Modeling (MLM).

How to Get Started

You can use this model directly with the fill-mask pipeline:

from transformers import pipeline

# Load the model
fill_mask = pipeline(
    "fill-mask",
    model="novelcore/gem-roberta-hq-legal",
    tokenizer="novelcore/gem-roberta-hq-legal"
)

# Example from a legal context
text = "Ο κ. Μητσοτάκης <mask> ότι η κυβέρνηση σέβεται πλήρως τις αποφάσεις του Συμβουλίου της Επικρατείας."

# Get predictions
predictions = fill_mask(text)
print(predictions)

For downstream tasks:

from transformers import AutoTokenizer, AutoModelForSequenceClassification

# For legal document classification
tokenizer = AutoTokenizer.from_pretrained("novelcore/gem-roberta-hq-legal")
model = AutoModelForSequenceClassification.from_pretrained("novelcore/gem-roberta-hq-legal")

Training Data

The model was pre-trained on a comprehensive corpus of Greek text compiled from various legal and governmental sources, with a quality-based data repetition strategy that increases exposure to higher-quality legal content. The original 16.75GB corpus was expanded to 21.12GB through strategic repetition.

Quality-Based Data Repetition Strategy

DatasetOriginal Size (GB)Quality LevelRepetition FactorEffective Size (GB)
Raptarchis Legal Dictionary0.35Best4x1.40
Political Reports of the Supreme Court1.20Medium-Best3x3.60
Eur-Lex (Greek Content)0.92Medium2x1.84
FEK - Greek Government Gazette11.00Low1x11.00
Greek Parliament Proceedings2.90Low-Medium1x2.90
Europarl (Greek Content)0.38Low1x0.38
TOTAL16.75 GB--21.12 GB

Rationale for Data Repetition

The quality-based repetition strategy enhances the model's exposure to:

  • Premium legal terminology from the Raptarchis Legal Dictionary (4x repetition)
  • High-quality judicial reasoning from Supreme Court reports (3x repetition)
  • EU legal concepts from Eur-Lex content (2x repetition)

This approach ensures the model develops a stronger understanding of sophisticated legal language while maintaining exposure to the broader legal corpus.

Training Procedure

Model Architecture

The model uses the RoBERTa-base architecture with the following configuration:

  • Hidden Size: 768
  • Attention Heads: 12
  • Hidden Layers: 12
  • Parameters: ~125M
  • Max Position Embeddings: 514
  • Vocabulary Size: 50,264

Preprocessing

The text was tokenized using a custom ByteLevelBPE tokenizer trained from scratch on the Greek legal corpus. The tokenizer uses a vocabulary of 50,264 tokens optimized for Greek legal terminology.

The data was processed into fixed-size chunks of 512 tokens, respecting document boundaries to ensure contextual coherence. Higher-quality sources were strategically repeated during the data preparation phase.

Pre-training

The model was pre-trained from scratch for 150,000 steps on 8x NVIDIA A100 40GB GPUs, using BFloat16 (bf16) mixed-precision for stability and speed. The training took approximately 81 hours and 39 minutes to complete.

The key hyperparameters used were:

  • Learning Rate: 1.5e-4 (0.00015) with a linear warmup of 9,000 steps
  • Batch Size: Effective batch size of 2,688 (per_device_train_batch_size: 48, gradient_accumulation_steps: 7)
  • Optimizer: AdamW with standard parameters
  • Weight Decay: 0.01
  • Max Sequence Length: 512
  • Max Steps: 150,000
  • Warmup Steps: 9,000
  • MLM Probability: 0.15
  • Max Gradient Norm: 1.0

Training Results

The model achieved the following performance metrics:

  • Final Training Loss: 0.617
  • Final Evaluation Loss: 0.573035
  • Training Infrastructure: 8x NVIDIA A100 40GB GPUs
  • Total Training Steps: 150,000
  • Total Training Time: 66 hours 39 minutes
  • Train/Validation Split: 95%/5%
  • Effective Training Data: 21.12GB (with quality-based repetition)

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

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

GPU в ailist

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

Можно запустить

Подбираем GPU…

Класс архитектуры
RobertaForMaskedLM
Ревизия весов
377b9ba

0 моделей