/ Модель

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

Контекст
4 096 токенов
Параметры
4,3 млрд
Лицензия
Своя лицензия
Архитектура
nemotron · dense
Библиотека
transformers
Опубликована
19 июл 2024

Minitron-4B-Base

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

Базовая языковая модель NVIDIA на 4,3 млрд параметров для генерации текста, ответов на вопросы и исследовательских задач.

4 799скачиваний за 30 дней140лайковвеса обновлены14 фев 2025

Бенчмарки

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

Тесты пользователейпока нет

Никто ещё не опубликовал тест этой модели. Соберите бенчмарк из своих задач — результат появится здесь.

  1. Добавьте модель в бенчмарк

    Вместе с другими моделями категории «Текст» — сравнение идёт внутри одной категории.

  2. Опишите свои задачи

    Напишите запросы, при необходимости приложите файлы и эталонные ответы.

  3. Запустите и опубликуйте

    Модели ответят на каждую задачу, судья оценит ответы. Опубликованный результат появится на этой странице.

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

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

  • MMLU-PRO

    MMLU-PRO Raw · выше — лучше

    Результат

    0,262

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

  • MATH Lvl 5

    MATH Lvl 5 Raw · выше — лучше

    Результат

    0,0196

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

  • GPQA

    GPQA Raw · выше — лучше

    Результат

    0,2693

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

  • BBH

    BBH Raw · выше — лучше

    Результат

    0,4084

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

  • MUSR

    MUSR Raw · выше — лучше

    Результат

    0,4134

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

  • IFEval

    IFEval Raw · выше — лучше

    Результат

    0,2218

    Open LLM v2 · архив

    Публичная таблицадругая ревизия

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

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

Minitron-4B-Base — базовая большая языковая модель NVIDIA для генерации текста. Она создана из Nemotron-4 15B: разработчики сократили размер эмбеддингов, число голов внимания и промежуточный размер MLP, а затем продолжили обучение с дистилляцией на 94 млрд токенов. Модель насчитывает 4,3 млрд параметров; её архитектура — авторегрессионный Transformer-декодер Nemotron с Grouped-Query Attention и Rotary Position Embeddings. Контекст составляет 4096 токенов.

Модель принимает текст и генерирует текст. Она предназначена для исследований и разработки, включая генерацию и продолжение текста, ответы на вопросы, математические задачи и генерацию кода. В обучающих данных были английский и мультиязычный текст, а также код; корпус включал материалы из разных областей, в том числе право, математику, науку и финансы. Карточка приводит результаты оценок на MMLU, HellaSwag, Winogrande, GSM8K, ARC-C, XLSum и HumanEval.

Модель может выдавать неточные, неполные или избыточные ответы, а также воспроизводить токсичный язык и предубеждения из обучающих данных. Данные предварительного обучения имеют срез по июнь 2023 года. Лицензия указана как other; перед использованием следует ознакомиться с условиями NVIDIA. Модель отмечена разработчиком как предназначенная для исследований и разработки.

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

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

Ограничения

Модель может выдавать неточные, неполные или избыточные ответы, а также воспроизводить токсичный язык и общественные предубеждения из обучающих данных. Данные предварительного обучения ограничены срезом по июнь 2023 года.

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

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

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

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

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

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

Открыть на Hugging Face

Model Overview

Minitron-4B-Base is a large language model (LLM) obtained by pruning Nemotron-4 15B; specifically, we prune model embedding size, number of attention heads, and MLP intermediate dimension. Following pruning, we perform continued training with distillation using 94 billion tokens to arrive at the final model; we use the continuous pre-training data corpus used in Nemotron-4 15B for this purpose.

Deriving the Minitron 8B and 4B models from the base 15B model using our approach requires up to 40x fewer training tokens per model compared to training from scratch; this results in compute cost savings of 1.8x for training the full model family (15B, 8B, and 4B). Minitron models exhibit up to a 16% improvement in MMLU scores compared to training from scratch, perform comparably to other community models such as Mistral 7B, Gemma 7B and Llama-3 8B, and outperform state-of-the-art compression techniques from the literature. Please refer to our arXiv paper for more details.

This model is for research and development only.

Model Developer: NVIDIA

Model Dates: Minitron-4B-Base was trained between February 2024 and June 2024.

License

Minitron-4B-Base is released under the NVIDIA Open Model License Agreement.

Model Architecture

Minitron-4B-Base uses a model embedding size of 3072, 32 attention heads, and an MLP intermediate dimension of 9216. It also uses Grouped-Query Attention (GQA) and Rotary Position Embeddings (RoPE).

Architecture Type: Transformer Decoder (auto-regressive language model)

Network Architecture: Nemotron-4

Input Type: Text

Input Format: String

Input Parameters: None

Other Properties Related to Input: None

Output Type: Text

Output Format: String

Output Parameters: None

Other Properties Related to Output: None

Usage

Support for Nemotron models will be added in the upcoming transformers library release. In the meantime, please install the library from source:

pip install git+https://github.com/huggingface/transformers

The following code provides an example of how to load the Minitron-4B-Base model and use it to perform text generation.

import torch
from transformers import AutoTokenizer, AutoModelForCausalLM

# Load the tokenizer and model
model_path = 'nvidia/Minitron-4B-Base'
tokenizer  = AutoTokenizer.from_pretrained(model_path)

device = 'cuda'
dtype  = torch.bfloat16
model  = AutoModelForCausalLM.from_pretrained(model_path, torch_dtype=dtype, device_map=device)

# Prepare the input text
prompt = 'Complete the paragraph: our solar system is'
inputs = tokenizer.encode(prompt, return_tensors='pt').to(model.device)

# Generate the output
outputs = model.generate(inputs, max_length=20)

# Decode and print the output
output_text = tokenizer.decode(outputs[0])
print(output_text)

Dataset & Training

Data Collection Method: Hybrid

Labeling Method: Not Applicable

Properties: The training corpus for Minitron-4B-Base consists of English and multilingual text, as well as code. Our sources cover a variety of document types such as: webpages, dialogue, articles, and other written materials. The corpus spans domains including legal, math, science, finance, and more. In our continued training set, we introduce a small portion of question-answering, and alignment style data to improve model performance.

Data Freshness: The pretraining data has a cutoff of June 2023.

Evaluation Results

5-shot performance. Language Understanding evaluated using Massive Multitask Language Understanding:

Average
58.6

Zero-shot performance. Evaluated using select datasets from the LM Evaluation Harness with additions:

HellaSwagWinograndeGSM8KARC-CXLSum
75.074.024.150.929.5

Code generation performance. Evaluated using HumanEval:

p@1, 0-Shot
23.3

Please refer to our paper for the full set of results.

Inference

Engine: TensorRT-LLM

Test Hardware: NVIDIA A100

DType: Float16/BFloat16

Limitations

The model was trained on data that contains toxic language, unsafe content, and societal biases originally crawled from the internet. Therefore, the model may amplify those biases and return toxic responses especially when prompted with toxic prompts. The model may generate answers that may be inaccurate, omit key information, or include irrelevant or redundant text producing socially unacceptable or undesirable text, even if the prompt itself does not include anything explicitly offensive.

Ethical Considerations

NVIDIA believes Trustworthy AI is a shared responsibility and we have established policies and practices to enable development for a wide array of AI applications. When downloaded or used in accordance with our terms of service, developers should work with their internal model team to ensure this model meets requirements for the relevant industry and use case and addresses unforeseen product misuse. Please report security vulnerabilities or NVIDIA AI Concerns here.

Citation

If you find our work helpful, please consider citing our paper:

@article{minitron2024,
      title={Compact Language Models via Pruning and Knowledge Distillation}, 
      author={Saurav Muralidharan and Sharath Turuvekere Sreenivas and Raviraj Joshi and Marcin Chochowski and Mostofa Patwary and Mohammad Shoeybi and Bryan Catanzaro and Jan Kautz and Pavlo Molchanov},
      journal={arXiv preprint arXiv:2407.14679},
      year={2024},
      url={https://arxiv.org/abs/2407.14679}, 
}

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
NemotronForCausalLM
Ревизия весов
3478fb8

0 моделей