/ Модель

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

Лицензия
Apache 2.0
Опубликована
19 апр 2024

Minerva-1B-base-v1.0

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

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

174скачиваний за 30 дней30лайковвеса обновлены5 дек 2024

Бенчмарки

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

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

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

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

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

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

Minerva-1B-base-v1.0 — базовая языковая модель с 1 млрд параметров, разработанная Sapienza NLP совместно с Future Artificial Intelligence Research (FAIR) и CINECA. Это одна из моделей семейства Minerva, предварительно обученных с нуля для итальянского и английского языков; примерно половина обучающих данных приходится на итальянский текст.

Модель построена на архитектуре Transformer на основе Mistral с изменёнными размерами слоёв, числа голов внимания и скрытых состояний. Она обучена на 200 млрд токенов из CulturaX: по 100 млрд на итальянском и английском. Максимальная длина контекста, указанная для семейства Minerva, — 16 384 токена. Модель предназначена для генерации текста и может служить основой для дальнейшей адаптации под конкретные задачи.

Это базовая модель без механизмов выравнивания и модерации. Она может выдавать фактические ошибки, повторы, предвзятый, оскорбительный или неподходящий контент, а также отражать предубеждения обучающих данных. Распространяется по лицензии Apache-2.0.

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

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

Ограничения

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

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

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

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

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

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

Открыть на Hugging Face

Model Card for Minerva-1B-base-v1.0

Minerva is the first family of LLMs pretrained from scratch on Italian developed by Sapienza NLP in collaboration with Future Artificial Intelligence Research (FAIR) and CINECA. Notably, the Minerva models are truly-open (data and model) Italian-English LLMs, with approximately half of the pretraining data including Italian text.

Description

This is the model card for Minerva-1B-base-v1.0, a 1 billion parameter model trained on 200 billion tokens (100 billion in Italian, 100 billion in English).

This model is part of the Minerva LLM family:

🚨⚠️🚨 Bias, Risks, and Limitations 🚨⚠️🚨

This section identifies foreseeable harms and misunderstandings.

This is a foundation model, not subject to alignment. Model may:

  • Overrepresent some viewpoints and underrepresent others
  • Contain stereotypes
  • Contain personal information
  • Generate:
    • Hateful, abusive, or violent language
    • Discriminatory or prejudicial language
    • Content that may not be appropriate for all settings, including sexual content
  • Make errors, including producing incorrect information as if it were factual
  • Generate irrelevant or repetitive outputs

We are aware of the biases that current pretrained large language models exhibit: more specifically, as probabilistic models of (Italian and English) languages, they reflect and amplify the biases of their training data. For more information about this issue, please refer to our survey:

How to use Minerva with Hugging Face transformers

import transformers
import torch

model_id = "sapienzanlp/Minerva-1B-base-v1.0"

# Initialize the pipeline.
pipeline = transformers.pipeline(
    "text-generation",
    model=model_id,
    model_kwargs={"torch_dtype": torch.bfloat16},
    device_map="auto",
)

# Input text for the model.
input_text = "La capitale dell'Italia è"

# Compute the outputs.
output = pipeline(
  input_text,
  max_new_tokens=128,
)

# Output:
# [{'generated_text': "La capitale dell'Italia è la città di Roma, che si trova a [...]"}]

Model Architecture

Minerva-1B-base-v1.0 is a Transformer model based on the Mistral architecture, where the number of layers, number of heads, and the hidden states dimension are modified to reach 1B parameters. Please, take a look at the configuration file for a detailed breakdown of the hyperparameters we chose for this model.

The Minerva LLM family is composed of:

Model NameTokensLayersHidden SizeAttention HeadsKV HeadsSliding WindowMax Context Length
Minerva-350M-base-v1.070B (35B it + 35B en)161152164204816384
Minerva-1B-base-v1.0200B (100B it + 100B en)162048164204816384
Minerva-3B-base-v1.0660B (330B it + 330B en)322560328204816384

Model Training

Minerva-1B-base-v1.0 was trained using llm-foundry 0.6.0 from MosaicML. The hyperparameters used are the following:

Model NameOptimizerlrbetasepsweight decaySchedulerWarmup StepsBatch Size (Tokens)Total Steps
Minerva-350M-base-v1.0Decoupled AdamW2e-4(0.9, 0.95)1e-80.0Cosine2%4M16,690
Minerva-1B-base-v1.0Decoupled AdamW2e-4(0.9, 0.95)1e-80.0Cosine2%4M47,684
Minerva-3B-base-v1.0Decoupled AdamW2e-4(0.9, 0.95)1e-80.0Cosine2%4M157,357

Model Evaluation

We assessed our model using the LM-Evaluation-Harness library, which serves as a comprehensive framework for testing generative language models across a wide range of evaluation tasks.

All the reported benchmark data was already present in the LM-Evaluation-Harness suite.

Italian Data:

TaskAccuracy
xcopa (0-shot)0.602
Hellaswag (5-shot)0.3847
Belebele (5-shot)0.25
TruthfulQA MC 1 (0-shot)0.2375
TruthfulQA MC 2 (0-shot)0.3996
M MMLU (5-shot)0.2546
arc challenge (5-shot)0.2549

English Data:

TaskAccuracy
Hellaswag (5-shot)0.43
Belebele (5-shot)0.26
TruthfulQA MC 1 (0-shot)0.21
TruthfulQA MC 2 (0-shot)0.38
M MMLU (5-shot)0.26
arc challenge (5-shot)0.26
arc easy (5-shot)0.4966
piqa (5-shot)0.6975
sciq (5-shot)0.830

Training Data

Minerva-1B-base-v1.0 was trained on 100B Italian tokens and 100B English tokens sampled from CulturaX. The data was selected from the following sources:

  • OSCAR-2201
  • OSCAR-2301
  • mC4

We have extracted some statistics on Italian (115B tokens) and English (210B tokens) documents from CulturaX on the selected sources:

Proportion of number of tokens per domain (Italian)

Proportion of number of tokens per domain (English)

Tokenizer Fertility

The tokenizer fertility measures the average amount of tokens produced per tokenized word. A tokenizer displaying high fertility values in a particular language typically indicates that it segments words in that language extensively. The tokenizer fertility is strictly correlated with the inference speed of the model with respect to a specific language, as higher values mean longer sequences of tokens to generate and thus lower inference speed.

Fertility computed over a sample of Cultura X (CX) data and Wikipedia (Wp):

ModelVoc. SizeFertility IT (CX)Fertility EN (CX)Fertility IT (Wp)Fertility EN (Wp)
Mistral-7B-v0.1320001.871.322.051.57
gemma-7b2560001.421.181.561.34
Minerva-1B-base-v1.0327681.391.321.661.59

Notice

Minerva-350M-base-v1.0 is a pretrained base model and, therefore, has no moderation mechanisms.

The Sapienza NLP Team

  • Riccardo Orlando: data preprocessing, model training
  • Pere-Lluis Huguet Cabot: data preprocessing, vocabulary, evaluation
  • Luca Moroni: data curation, data analysis, downstream tasks, evaluation
  • Simone Conia: data curation, evaluation, project supervision
  • Edoardo Barba: data preprocessing, downstream tasks, project supervision
  • Roberto Navigli: project lead and coordination

Special thanks for their support

  • Giuseppe Fiameni, Nvidia
  • Sergio Orlandini, CINECA

Acknowledgments

This work was funded by the PNRR MUR project PE0000013-FAIR. We acknowledge the CINECA award "IscB_medit" under the ISCRA initiative, for the availability of high performance computing resources and support.

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

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

GPU в ailist

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

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

Доступ к модели ограничен автором; у платформы нет доступа к весам.

Ревизия весов
9c5b43b

0 моделей