/ Модель

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

Контекст
131 072 токена
Параметры
3,9 млрд
Размер весов
9 ГБ
Лицензия
Своя лицензия
Архитектура
llama · dense
Библиотека
transformers
Опубликована
13 авг 2024

Llama-3.1-Minitron-4B-Width-Base

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

Базовая языковая модель NVIDIA семейства Llama 3.1 для генерации текста и адаптации под задачи обработки естественного языка.

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

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Llama-3.1-Minitron-4B-Width-Base — базовая текстовая языковая модель NVIDIA для генерации текста и последующей адаптации под задачи обработки естественного языка. Это авторегрессионный трансформер-декодер семейства Llama 3.1 с 3,9 млрд параметров, 32 слоями, Grouped-Query Attention и RoPE. Модель получена сокращением размерностей Llama-3.1-8B с последующим продолженным обучением и дистилляцией на 94 млрд токенов.

Модель принимает текст и генерирует текст. Обучающий корпус включал английские и многоязычные тексты, а также код; среди тематик данных были право, математика, наука и финансы. Контекст модели — до 131 072 токенов по метаданным, хотя в README отмечено, что она хорошо работает с входами длиной до 8 000 символов. Модель предназначена для коммерческого использования; лицензия указана как other, поэтому перед внедрением следует проверить применимые условия NVIDIA.

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

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

Llama-3.1-Minitron-4B-Width-Base

Model Overview

Llama-3.1-Minitron-4B-Width-Base is a base text-to-text model that can be adopted for a variety of natural language generation tasks. It is obtained by pruning Llama-3.1-8B; specifically, we prune model embedding size 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. Please refer to our technical report for more details.

This model is ready for commercial use.

Model Developer: NVIDIA

Model Dates: Llama-3.1-Minitron-4B-Width-Base was trained between July 29, 2024 and Aug 3, 2024.

License

This model is released under the NVIDIA Open Model License Agreement.

Model Architecture

Llama-3.1-Minitron-4B-Width-Base uses a model embedding size of 3072, 32 attention heads, MLP intermediate dimension of 9216, with 32 layers in total. Additionally, it uses Grouped-Query Attention (GQA) and Rotary Position Embeddings (RoPE).

Architecture Type: Transformer Decoder (Auto-Regressive Language Model)

Network Architecture: Llama-3.1

Input Type(s): Text

Input Format(s): String

Input Parameters: None

Other Properties Related to Input: Works well within 8k characters or less.

Output Type(s): Text

Output Format: String

Output Parameters: 1D

Other Properties Related to Output: None

Usage

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

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

We can now run inference on this model:

import torch
from transformers import AutoTokenizer, LlamaForCausalLM

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

device = 'cuda'
dtype = torch.bfloat16
model = LlamaForCausalLM.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)

Software Integration

Runtime Engine(s):

  • NeMo 24.05

Supported Hardware Microarchitecture Compatibility:

  • NVIDIA Ampere
  • NVIDIA Blackwell
  • NVIDIA Hopper
  • NVIDIA Lovelace

[Preferred/Supported] Operating System(s):

  • Linux

Dataset & Training

Data Collection Method by Dataset: Automated

Labeling Method by Dataset: Not Applicable

Properties: The training corpus for Llama-3.1-Minitron-4B-Width-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

Overview

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

Average
60.5

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

HellaSwagWinograndeGSM8KARC-ChallengeXLSum
76.173.541.255.628.7

Code generation performance. Evaluated using MBPP:

Score
32.0

Inference

Engine: TensorRT-LLM

Test Hardware: NVIDIA A100

DType: 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.

References

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
LlamaForCausalLM
Ревизия весов
5205ef7

0 моделей