/ Модель

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

Контекст
1 024 токена
Архитектура
gpt2 · dense
Опубликована
29 ноя 2022

olm-gpt2-oct-2022

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

Авторегрессионная модель GPT-2, обученная на данных до октября 2022 года для генерации актуализированного текста.

35скачиваний за 30 дней9лайковвеса обновлены20 янв 2023

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

OLM GPT-2 October 2022 — языковая модель авторегрессионной архитектуры GPT-2, созданная в рамках проекта OLM. Она обучена на очищенных снимках Common Crawl и Wikipedia за октябрь 2022 года, чтобы обновлять знания GPT-2 о событиях по мере их появления. Модель предназначена для генерации текста напрямую или для последующего дообучения под прикладные задачи.

Модель доступна в форматах PyTorch и TensorFlow, принимает текст и генерирует текст. Длина контекста — 1024 токена. В README приведены результаты нулевого дообучения на отдельных бенчмарках, включая PIQA, где модель превзошла исходный GPT-2; результаты не гарантируют качества на других задачах. Карточка не сообщает размер модели и лицензию, поэтому эти сведения здесь не приводятся.

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

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

Ограничения

Контекст ограничен 1024 токенами; результаты на отдельных бенчмарках не гарантируют качества для других задач. Лицензия в предоставленных данных не указана.

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

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

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

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

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

Открыть на Hugging Face

OLM GPT-2 October 2022

This is a more up-to-date version of the original GPT-2. In addition to being more up-to-date, it also tends to perform better than the original GPT2 on standard benchmarks. It was trained on a cleaned October 2022 snapshot of Common Crawl and Wikipedia.

This model was created as part of the OLM project, which has the goal of continuously training and releasing models that are up-to-date and comparable in standard language model performance to their static counterparts. This is important because we want our models to know about events like COVID or a presidential election right after they happen.

Intended uses

You can use the raw model for text generation or fine-tune it to a downstream task.

How to use

You can use this model directly with a pipeline for text generation. Since the generation relies on some randomness, we set a seed for reproducibility:

>>> from transformers import pipeline, set_seed
>>> # It is important to include the bad_words_ids=[[0,2]] if you want this model to stay on topic.
>>> # Otherwise, the model may generate start and end tokens followed by text that is not relevant to
>>> # the previous text.
>>> generator = pipeline('text-generation', model='olm/olm-gpt2-oct-2022', bad_words_ids=[[0,2]])
>>> set_seed(42)
>>> # This example also illustrates that sometimes our model generates
>>> # bloggy/spammy/webb-y things, even though it gets higher evaluation results
>>> # than the original GPT-2 accross a variety of benchmarks. See the first output.
>>> generator("Hello, I'm a language model,", max_length=30, num_return_sequences=5)
Setting `pad_token_id` to `eos_token_id`:50256 for open-end generation.
[
{'generated_text': "Hello, I'm a language model, but you can take me if I want.\nReplyDelete\nReplies\nReply\nAnonymous October 17, 2011"},
{'generated_text': "Hello, I'm a language model, and here's some useful news for you all: The release date for the new release of"},
{'generated_text': "Hello, I'm a language model, I'm not a developer or anybody who's working on those. I'm a freelancer... I"},
{'generated_text': "Hello, I'm a language model, a language analyst, and a language system designer. I'm just curious about the"},
{'generated_text': "Hello, I'm a language model, I'm passionate about languages, but I don't understand how my system works, the interaction"}
]

Here is how to use this model to get the features of a given text in PyTorch:

from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained('olm/olm-gpt2-oct-2022')
model = AutoModelForCausalLM.from_pretrained('olm/olm-gpt2-oct-2022')
text = "Replace me by any text you'd like."
encoded_input = tokenizer(text, return_tensors='pt')
output = model(**encoded_input)

Dataset

The model and tokenizer were trained with this October 2022 cleaned Common Crawl dataset plus this October 2022 cleaned Wikipedia dataset.
The tokenized version of these concatenated datasets is here.
The datasets were created with this repo.

Training

The model was trained according to the OLM GPT2 instructions at this repo.

Evaluation results

The model achieves the following results without any fine-tuning (zero-shot):

TaskMetricOriginal GPT2OLM GPT2 Oct 2022 (Ours)Significance of Difference (two-tailed p-value)
rteacc0.53070.54150.7188
piqaacc/acc_norm0.6289/0.62510.6638/0.66700.0020/0.0002
copaacc0.64000.69000.3000
recordf1/em0.7094/0.70260.6874/0.68100.0000/0.0000
boolqacc0.48720.56060.0000
cbacc/f10.4101/0.26190.3571/0.17540.4193/NA
hellaswagacc/acc_norm0.2892/0.31140.3076/0.34910.0000/0.0000
mrpcacc/f10.5662/0.69110.6495/0.77410.0007/0.0002
multircacc0.01890.01150.0959
lambadappl/acc40.0554/0.325628.6733/0.36250.0000/0.0000
wscacc0.43270.36540.1679
wicacc0.49220.50.6924
mnliacc0.33720.34710.0384
qnliacc0.50170.49810.5884
colamcc0.01260.01810.8614
triviaqaacc0.01510.01820.0048
winograndeacc0.51620.51140.7360
webqsacc0.00300.01080.0000
arc_easyacc/acc_norm0.4381/0.39480.4651/0.42470.0082/0.0029
arc_challengeacc/acc_norm0.1903/0.22700.1997/0.23290.4132/0.6256

To get these results, we used commit 4f0410a4be0049729078376ce36a42dc308b6e38 of the Eleuther AI evaluation harness here, which can produce results different than those reported in the GPT2 paper. We added a change here to enable evaluation of the OLM GPT2, which has a very slightly different vocab size. The p-values come from the stderr from the evaluation harness, plus a normal distribution assumption.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
GPT2LMHeadModel
Ревизия весов
86a11c6

0 моделей