/ Модель

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

Контекст
4 096 токенов
Параметры
4,3 млрд
Лицензия
Своя лицензия
Архитектура
nemotron · dense
Базовая модель
Nemotron-4-Mini-Hindi-4B-Base
Библиотека
nemo
Опубликована
22 окт 2024

Nemotron-4-Mini-Hindi-4B-Instruct

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

Компактная языковая модель NVIDIA для диалоговых ответов на хинди, английском и Hinglish, особенно на темы, связанные с индийским контекстом.

1 318скачиваний за 30 дней23лайкавеса обновлены20 авг 2025

Бенчмарки

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

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

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

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

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

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

Nemotron-4-Mini-Hindi-4B-Instruct — языковая модель NVIDIA для генерации ответов на вопросы с учётом индийского контекста. Она принимает запросы на хинди, английском и Hinglish и подходит для диалоговых сценариев, включая ответы на вопросы и интерфейсы с вызовом инструментов.

Модель представляет собой авторегрессионный декодер Transformer семейства Nemotron с плотной архитектурой и 4,3 млрд параметров. Она дообучена и выровнена на основе nvidia/Nemotron-4-Mini-Hindi-4B-Base с использованием реальных и синтетических данных для выравнивания. Контекст составляет 4096 токенов; архитектура использует Grouped-Query Attention и RoPE. Для лучшего качества рекомендуется формат промпта из карточки модели.

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

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

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

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

Nemotron-4-Mini-Hindi-4B-Instruct

Model Overview

Nemotron-4-Mini-Hindi-4B-Instruct is a model for generating responses to questions grounded in the Indian context. It supports queries in Hindi, English, and Hinglish. It is a small language model (SLM) which is fine-tuned/aligned version of nvidia/Nemotron-4-Mini-Hindi-4B-Base, which was continuously pre-trained on top of Nemotron-Mini-4B-Base (Minitron-4B-Base). The alignment stage uses a mix of real and synthetically generated alignment corpus. It supports a context length of 4,096 tokens. This model is ready for commercial use. Please refer to our arXiv paper for more details.

Try this model on build.nvidia.com.

Model Developer: NVIDIA

Model Dates: Nemotron-4-Mini-Hindi-4B-Instruct was trained between June 2024 and Oct 2024.

License

Nemotron-4-Mini-Hindi-4B-Instruct is released under the NVIDIA Open Model License Agreement.

Model Architecture

Nemotron-4-Mini-Hindi-4B-Instruct 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

Prompt Format:

We recommend using the following prompt template, which was used to fine-tune the model. The model may not perform optimally without it.

Single Turn

<extra_id_0>System
{system prompt}

<extra_id_1>User
{prompt}
<extra_id_1>Assistant\n

Multi Turn

<extra_id_0>System
{system prompt}

<extra_id_1>User
{prompt 1}
<extra_id_1>Assistant
{response 1}
<extra_id_1>User
{prompt 2}
<extra_id_1>Assistant
{response 2}
...
<extra_id_1>User
{prompt N}
<extra_id_1>Assistant\n

Note that a newline character \n should be added at the end of the prompt. We recommend using <extra_id_1> as a stop token.

Usage

from transformers import AutoTokenizer, AutoModelForCausalLM

# Load the tokenizer and model
tokenizer  = AutoTokenizer.from_pretrained("nvidia/Nemotron-4-Mini-Hindi-4B-Instruct")
model = AutoModelForCausalLM.from_pretrained("nvidia/Nemotron-4-Mini-Hindi-4B-Instruct")

# Use the prompt template
messages = [

    {"role": "user", "content": "भारत की संस्कृति के बारे में बताएं।"},
 ]
tokenized_chat = tokenizer.apply_chat_template(messages, tokenize=True, add_generation_prompt=True, return_tensors="pt")

outputs = model.generate(tokenized_chat, max_new_tokens=128) 
print(tokenizer.decode(outputs[0]))

You can also use pipeline but you need to create a tokenizer object and assign it to the pipeline manually.

from transformers import AutoTokenizer
from transformers import pipeline

tokenizer  = AutoTokenizer.from_pretrained("nvidia/Nemotron-4-Mini-Hindi-4B-Instruct")

messages = [
    {"role": "user", "content": "भारत की संस्कृति के बारे में बताएं।"},
]
pipe = pipeline("text-generation", model="nvidia/Nemotron-4-Mini-Hindi-4B-Instruct", max_new_tokens=128)
pipe.tokenizer = tokenizer  # You need to assign tokenizer manually
pipe(messages)

Evaluation Results

Zero-shot performance. Evaluated using select Hindi datasets from the Airavata Evaluation Framework with additions:

MMLUARC-CARC-EHellaSwagBoolQIndicQuest (GPT4-Turbo)
50.565.5379.9739.967.864.15

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

Inference

Engine: TensorRT-LLM

Test Hardware: NVIDIA A100

DType: Float16/BFloat16

AI Safety Efforts

The Nemotron-4-Mini-Hindi-4B-Instruct model underwent AI safety evaluation including adversarial testing via three distinct methods:

  • Garak, is an automated LLM vulnerability scanner that probes for common weaknesses, including prompt injection and data leakage.
  • AEGIS, is a content safety evaluation dataset and LLM based content safety classifier model, that adheres to a broad taxonomy of 13 categories of critical risks in human-LLM interactions.
  • Human Content Red Teaming leveraging human interaction and evaluation of the models' responses.

Limitations

The model was trained on data that contains toxic language 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. The model may answer with I statements, exhibiting some anthropomorphizing. This issue could be exacerbated without the use of the recommended prompt template.

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. For more detailed information on ethical considerations for this model, please see the Model Card++. Please report security vulnerabilities or NVIDIA AI Concerns here.

Citation

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

@article{hindinemotron2024,
  title={Adapting Multilingual LLMs to Low-Resource Languages using Continued Pre-training and Synthetic Corpus},
  author={Joshi, Raviraj and Singla, Kanishk and Kamath, Anusha and Kalani, Raunak and Paul, Rakesh and Vaidya, Utkarsh and Chauhan, Sanjay Singh and Wartikar, Niranjan and Long, Eileen},
  journal={arXiv preprint arXiv:2410.14815},
  year={2024}
}

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

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

GPU в ailist

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

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

Модели NVIDIA NeMo требуют отдельного рантайма.

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

0 моделей