/ Модель

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

Контекст
8 192 токена
Параметры
69,5 млрд
Размер весов
141 ГБ
Лицензия
Своя лицензия
Архитектура
llama · dense
Базовая модель
Meta-Llama-3-70B
Опубликована
25 апр 2024

Llama-3-70B-Special-Tokens-Adjusted

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

Базовая Llama 3 на 70 млрд параметров с исправленными эмбеддингами некоторых специальных токенов для более стабильного дообучения.

19скачиваний за 30 дней4лайкавеса обновлены2 мая 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Llama-3-70B-Special-Tokens-Adjusted — модель Astronomer, созданная Дэвидом Сю на основе Meta Llama 3. Это 69,5-миллиардная плотная авторегрессионная языковая модель с архитектурой LlamaForCausalLM и контекстом 8192 токена. Она сохраняет веса исходной meta-llama/Meta-Llama-3-70B, но значения строк эмбеддингов некоторых недостаточно обученных специальных токенов заменены средними значениями обученных токенов.

Модель предназначена прежде всего для дальнейшего дообучения: корректировка призвана снизить риск нестабильности обучения, например взрывных градиентов и NaN, при добавлении или использовании специальных токенов. Это базовая модель, а не готовый диалоговый помощник; README отмечает, что для версии 70B проблема могла быть менее существенной, чем для версии 8B. Формат весов — safetensors. Использование должно соответствовать лицензии Llama 3 Community License; метаданные каталога указывают лицензию как other.

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

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

Ограничения

Это базовая модель для дообучения, а не готовая instruct-модель. Автор отмечает, что для версии 70B исходная проблема специальных токенов могла быть менее выраженной; для использования требуется соблюдать Llama 3 Community License.

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

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

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

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

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

Открыть на Hugging Face

Llama-3-70B-Special-Tokens-Adjusted

Description

This is the exact same model (meta-llama/Meta-Llama-3-70B) with the weights for the input and output embeddings from lm head and embedding matrix adjusted using the mean of the trained tokens for certain tokens that were untrained, which caused widespread issues for people attempting to fine-tune this base model with either adding their own tokens or using existing special tokens.

Why We Made This Model

The Llama 3 base (non-instruct) model, while powerful, came with a significant oversight that some special tokens for instruction following within its architecture were left untrained, potentially derailing further fine-tuning processes. This was first noted by Daniel Han on X, highlighting a critical but fixable flaw in a widely used model.

The primary goal of releasing a patched version of this model was to address this issue so that the community can utilize the Llama 3 model without facing training instabilities, such as sudden gradient explosions or NaN gradients, or having to go through complicated processes to fix the model themselves before fine-tuning.

Note: specifically for the 70B model, the untrained special tokens did not have all zero values for the embedding weights. So the significance of this problem may not be as severe as it is on the base 8B model. This model was made anyway by the request of the community, though in theory directly fine-tuning should be ok.

Details of the Adjustment

The meta-llama/Meta-Llama-3-70B model was pulled directly from HuggingFace and loaded using transformers. Then, the input embedding and output embedding values are retrieved using model.get_input_embeddings().weight.data and model.get_output_embeddings().weight.data. These 2 matrics are identical in shape, with each row representing a token id, and each column representing an embedding feature.

The special (untrained & problematic) tokens can be found by locating the rows where the entire row of the embedding values are ~~~all zeros~~~ less than 9e-7 (for the 70B model, no row had all zeros, so thresholding using 9e-7 was done to fine under-trained tokens), which imply they were not trained during the pretraining phase of the model from Meta. Such untrained tokens could lead to heavy computational issues, like gradient explosions or NaN gradients, during downstream fine-tuning on specific tasks.

Once these untrained tokens are identified, the average of trained tokens can be calculated by using the sums of embedding values of trained tokens for each feature/column and divided by the number of trained. This is done for both input and output matrices.

Lastly, the problematic token's rows in the 2 embedding matrics are set to the computed mean, thus completing the adjustment.

Contributors

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

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

GPU в ailist

vLLM

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

Подбираем GPU…

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

0 моделей