/ Модель

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

Контекст
2 048 токенов
Параметры
50,9 млн
Лицензия
Apache 2.0
Архитектура
gpt_neox · dense
Опубликована
2 мая 2023

distilpythia

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

Компактная англоязычная GPT-NeoX-модель, дистиллированная для генерации текста и экспериментов с небольшими языковыми моделями.

105скачиваний за 30 дней6лайковвеса обновлены20 июл 2023

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

crumb/distilpythia — компактная авторегрессионная языковая модель семейства GPT-NeoX, разработанная GPT-4 и Crumb как студенческая версия Pythia-70M. Модель обучали методом дистилляции знаний от Pythia-160M и на текстах The Pile; в целевую функцию вошли дистилляционный и обычный языковой компоненты с равными весами. Чекпойнт содержит 50,9 млн параметров, поддерживает контекст до 2048 токенов и распространяется в форматах PyTorch и safetensors.

Модель предназначена для генерации продолжения текста на английском языке и экспериментов с дистилляцией небольших языковых моделей. В README приведены результаты на нескольких бенчмарках, но авторы отмечают сомнительные показатели perplexity на LAMBADA и неуверенность в эффективности обучения. Лицензия — Apache-2.0.

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

  • генерация продолжения англоязычного текста
  • эксперименты с дистилляцией языковых моделей
  • исследование переноса знаний от Pythia-160M к компактной модели
  • оценка небольших языковых моделей на бенчмарках

Ограничения

Авторы сообщают о сомнительных результатах perplexity на LAMBADA и не уверены, что обучение дало ожидаемый эффект. Модель небольшая и рассчитана прежде всего на эксперименты, поэтому её качество может уступать более крупным языковым моделям.

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

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

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

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

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

Открыть на Hugging Face

Warm-Starting Knowledge Distillation for Transformer-based Language Models

by GPT-4 & Crumb

Introduction

Transformer models have become a popular choice for natural language processing (NLP) tasks due to their ability to handle long-range dependencies and their superior performance on various NLP benchmarks. The transformer model architecture was introduced in 2017 by Vaswani et al. and has since been used in many state-of-the-art models such as BERT and GPT. The decoder-only transformer model is a variant of the transformer model that has is commonly used for generative tasks in NLP. It uses masked self-attention to predict the next token in a sequence and has been shown to be powerful at predicting sequences of text.

Distillation [Bucila et al., 2006, Hinton et al., 2015] is a technique used in machine learning to compress a large model into a smaller one that can be used on devices with limited computational resources. In this technique, a smaller model is trained to mimic the behavior of a larger model by learning from its predictions. The smaller model is trained on a smaller dataset than the larger model, which makes it faster and more efficient. This technique has been used to compress models like BERT and GPT-2 into smaller models like DistilBERT and DistilGPT-2, respectively. In this project we apply the technique of knowledge distillation to the second smallest Pythia model on the Pile dataset.

Method

We follow the work of Sanh et al. (2019) and Hinton et al. (2015) for a distillation loss over the soft target probabilities L_ce. We utilize the distillation loss in our loss function as a linear combination of the distillation loss L_ce with the supervised training loss L_clm. Our combined loss function is L_ce*(1-a) + L_clm*a where a is set to 0.5 and the Temperature parameter for the distillation loss is set to 2.

In an effort to maximize VRAM utilization, to reach a combined batch size of 4096 samples we use a device batch size of 2 with 2048 gradient accumulation steps and a context length of 2048 tokens with both the teacher and student model in bf16 precision. This allowed us to utilize around 98.94% of the 12 gigabytes of VRAM that the RTX3060 card has during training. It also means our training set totals to approximately 537 million training tokens, as our model trained for 64 steps. All training samples were taken from The Pile.

A learning rate of 1e-4 was used in this study, with no learning rate schedule.

Evaluation

Sanh et al. (2019) suggests a student around 40% of the size of it's teacher can achieve similar performance in encoder models when training from scratch with suprivision. We warm-start our model from a smaller checkpoint than the teacher that maintains a similar ratio with a student that is 43.75% the size of it's teacher.

modelpiqa accwinogrande acclambada ppllambada accarc accsciq accwsc accnotes
pythia-70m (student base)59.8551.22140.8121.4017.1565.0036.53
pythia-160m (teacher)62.6851.0730.0336.7619.6276.2036.58
---------------------------
distilpythia (student)59.7451.62420.7015.8217.1561.3036.54trained on padded/truncated examples
distilpythia-cl (student)59.3050.75403.7815.1616.9859.2036.54trained on a constant-length dataset

The table provides a comparison of performance between the base student model (pythia-70m), the teacher model (pythia-160m), and the finetuned student model (distilpythia) across various benchmarks. The goal is to assess whether the distilpythia model can achieve similar or better performance than its base while being smaller in size.

From the table, we can observe the following:

  1. The pythia-160m (teacher) model outperforms pythia-70m (student base) in most benchmarks, except for Winogrande accuracy, where the student base has a slightly better performance (51.22% vs. 51.07%).

  2. The distilpythia (student) model, after finetuning, outperforms the pythia-70m (student base) on two benchmarks: Winogrande accuracy (51.62% vs. 51.22%) and WSC accuracy (36.54% vs. 36.53%). The improvements in these metrics indicate that the finetuning process may be effective in transferring knowledge from the teacher model to the student model.

Conclusion

it might have worked idk, maybe training from scratch or for longer would give more performance gains, also look at the lambada perplexity what happened there even

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
GPTNeoXForCausalLM
Ревизия весов
7795b40

0 моделей