/ Модель

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

Лицензия
Своя лицензия
Базовая модель
Llama-3_1-Nemotron-51B-Instruct-GGUF
Библиотека
transformers
Опубликована
3 дек 2024

Llama-3_1-Nemotron-51B-Instruct-GGUF

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

Llama-3_1-Nemotron-51B-Instruct-GGUF — GGUF-квантизированная версия инструкционной языковой модели Llama-3.1 Nemotron 51B-Instruct от NVIDIA, подготовленная пользователем ymcki.

1 299скачиваний за 30 дней14лайковвеса обновлены4 мая 2025

Бенчмарки

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

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

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

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

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

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

Модель предназначена для генерации текста и диалоговых сценариев; в метаданных указан английский язык. Для общения используется шаблон с ролями System, User и Assistant.

Модель содержит около 51 млрд параметров и поддерживает запуск через llama.cpp. Доступны варианты квантизации Q6_K, Q5_K_M, Q4_K_M, IQ4_NL, IQ4_XS, Q4_0, IQ3_M, IQ3_S, IQ3_XXS и Q3_K_S с размером файлов примерно от 20,19 до 42,26 ГБ. Более точные варианты обеспечивают качество, близкое к исходной модели, но требуют больше памяти; менее точные подходят для оборудования с ограниченным объёмом памяти, однако сильнее уступают по показателям perplexity и могут работать медленнее на CPU и Apple Silicon.

Для полноценной работы требуется версия llama.cpp начиная с b4380 с поддержкой переменного Grouped Query Attention для DeciLMForCausalLM. При самостоятельной конвертации следует учитывать проблему старого конвертера с параметром rope_theta: без исправления модель может некорректно работать с запросами длиннее 4 тысяч токенов. Модель распространяется по лицензии NVIDIA Open Model License Agreement; точные условия определяются текстом этой лицензии.

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

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

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

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

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

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

Открыть на Hugging Face

Original model: https://huggingface.co/nvidia/Llama-3_1-Nemotron-51B-Instruct-GGUF

Prompt Template

### System:
{system_prompt}
### User:
{user_prompt}
### Assistant:

Important for people who wants to do their own quantitization. The convert_hf_to_gguf.py in b4380 of llama.cpp doesn't read rope_theta parameter such that it can't generate gguf that can work with prompts longer than 4k tokens. There is currently a PR in llama.cpp to update convert_hf_to_gguf.py. If you can't wait for the PR to get thru, you can download a working convert_hf_to_gguf.py from here in this repository before you do the gguf conversion yourself.

Starting from b4380 of llama.cpp, DeciLMForCausalLM's variable Grouped Query Attention is now supported. Please download it and compile it to run the GGUFs in this repository.

This modification should support Llama-3_1-Nemotron 51B-Instruct fully. However, it may not support future DeciLMForCausalLM models that has no_op or linear ffn layers. Well, I suppose these support can be added when there are actually models using that types of layers.

Since I am a free user, so for the time being, I only upload models that might be of interest for most people.

Download a file (not the whole branch) from below:

Perplexity for f16 gguf is 6.646565 ± 0.040986.

Quant TypeimatrixFile SizeDelta PerplexityKL DivergenceDescription
Q6_Kcalibration_datav342.26GB-0.002436 ± 0.0015650.003332 ± 0.000014Good for Nvidia cards or Apple Silicon with 48GB RAM. Should perform very close to the original
Q5_K_Mcalibration_datav336.47GB0.020310 ± 0.0020520.005642 ± 0.000024Good for A100 40GB or dual 3090. Better than Q4_K_M but larger and slower.
Q4_K_Mcalibration_datav331.04GB0.055444 ± 0.0029820.012021 ± 0.000052Good for A100 40GB or dual 3090. Higher cost performance ratio than Q5_K_M.
IQ4_NLcalibration_datav329.30GB0.088279 ± 0.0039440.020314 ± 0.000093For 32GB cards, e.g. 5090. Minor performance gain doesn't justify its use over IQ4_XS
IQ4_XScalibration_datav327.74GB0.095486 ± 0.0040390.020962 ± 0.000097For 32GB cards, e.g. 5090. Too slow for CPU and Apple. Recommended.
Q4_0calibration_datav329.34GB0.543042 ± 0.0092900.077602 ± 0.000389For 32GB cards, e.g. 5090. Too slow for CPU and Apple.
IQ3_Mcalibration_datav323.49GB0.313812 ± 0.0062990.054266 ± 0.000205Largest model that can fit a single 3090 at 5k context. Not recommeneded for CPU or Apple Silicon due to high computational cost.
IQ3_Scalibration_datav322.65GB0.434774 ± 0.0071620.069264 ± 0.000242Largest model that can fit a single 3090 at 7k context. Not recommended for CPU or Apple Silicon due to high computational cost.
IQ3_XXScalibration_datav320.19GB0.638630 ± 0.0096930.092827 ± 0.000367Largest model that can fit a single 3090 at 13k context. Not recommended for CPU or Apple Silicon due to high computational cost.
Q3_K_Scalibration_datav322.65GB0.698971 ± 0.0103870.089605 ± 0.000443Largest model that can fit a single 3090 that performs well in all platforms
Q3_K_Snone22.65GB2.224537 ± 0.0248680.283028 ± 0.001220Largest model that can fit a single 3090 without imatrix

Convert safetensors to f16 gguf

Make sure you have llama.cpp git cloned:

python3 convert_hf_to_gguf.py Llama-3_1-Nemotron 51B-Instruct/ --outfile Llama-3_1-Nemotron 51B-Instruct.f16.gguf --outtype f16

Convert f16 gguf to Q4_0 gguf without imatrix

Make sure you have llama.cpp compiled:

./llama-quantize Llama-3_1-Nemotron 51B-Instruct.f16.gguf Llama-3_1-Nemotron 51B-Instruct.Q4_0.gguf q4_0

Convert f16 gguf to Q4_0 gguf with imatrix

Make sure you have llama.cpp compiled. Then create an imatrix with a dataset.

./llama-imatrix -m Llama-3_1-Nemotron-51B-Instruct.f16.gguf -f calibration_datav3.txt -o Llama-3_1-Nemotron-51B-Instruct.imatrix --chunks 32

Then convert with the created imatrix.

./llama-quantize Llama-3_1-Nemotron-51B-Instruct.f16.gguf --imatrix Llama-3_1-Nemotron-51B-Instruct.imatrix Llama-3_1-Nemotron-51B-Instruct.imatrix.Q4_0.gguf q4_0

Calculate perplexity and KL divergence

First, download wikitext.

bash ./scripts/get-wikitext-2.sh

Second, find the base values of F16 gguf. Please be warned that the generated base value file is about 10GB. Adjust GPU layers depending on your VRAM.

./llama-perplexity --kl-divergence-base Llama-3_1-Nemotron-51B-Instruct.f16.kld -m Llama-3_1-Nemotron-51B-Instruct.f16.gguf  -f wikitext-2-raw/wiki.test.raw -ngl 100

Finally, calculate the perplexity and KL divergence of Q4_0 gguf. Adjust GPU layers depending on your VRAM.

./llama-perplexity --kl-divergence-base Llama-3_1-Nemotron-51B-Instruct.f16.kld --kl_divergence -m Llama-3_1-Nemotron-51B-Instruct.Q4_0.gguf -ngl 100 >& Llama-3_1-Nemotron-51B-Instruct.Q4_0.kld

Downloading using huggingface-cli

First, make sure you have hugginface-cli installed:

pip install -U "huggingface_hub[cli]"

Then, you can target the specific file you want:

huggingface-cli download ymcki/Llama-3_1-Nemotron 51B-Instruct-GGUF --include "Llama-3_1-Nemotron 51B-Instruct.Q4_0.gguf" --local-dir ./

Running the model using llama-cli

First, go to llama.cpp release page and download the appropriate pre-compiled release starting from b4380. If that doesn't work, then download any version of llama.cpp starting from b4380. Compile it, then run

./llama-cli -m ~/Llama-3_1-Nemotron-51B-Instruct.Q3_K_S.gguf -p 'You are a European History Professor named Professor Whitman.'  -cnv -ngl 100

Credits

Thank you bartowski for providing a README.md to get me started.

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

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

GPU в ailist

llama.cpp

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

GGUF-модель ждёт проверки: нужно выбрать файл кванта под доступные GPU.

Ревизия весов
673eaf4

0 моделей