/ Модель

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

Контекст
1 024 токена
Лицензия
Apache 2.0
Архитектура
gpt2 · dense
Библиотека
transformers
Опубликована
16 апр 2023

dlite-v2-355m

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

Компактная англоязычная модель GPT-2, дообученная для диалоговой генерации ответов.

106скачиваний за 30 дней7лайковвеса обновлены28 мар 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

dlite-v2-355m — языковая модель AI Squared на архитектуре GPT-2, дообученная на 15 тысячах примеров из набора Databricks Dolly 15k для диалогового взаимодействия. Она предназначена для генерации ответов и демонстрации чат-поведения в компактной модели; поддерживаемый язык — английский, контекст — 1024 токена.

Модель основана на GPT-2 medium и доступна в формате PyTorch для библиотеки Transformers. Разработчик характеризует её как экспериментальную и не относящуюся к передовым моделям; лицензия Apache 2.0 допускает исследовательское и коммерческое использование.

Ответы могут содержать фактические ошибки, предвзятость, оскорбительные или токсичные высказывания и галлюцинации. Перед применением модель следует тщательно проверить.

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

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

Ограничения

Модель уступает современным передовым языковым моделям и может выдавать фактические ошибки, предвзятые, оскорбительные или токсичные ответы и галлюцинации. Разработчик рекомендует тщательно оценивать её перед применением.

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

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

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

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

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

Открыть на Hugging Face

Model Card for dlite-v2-355m

AI Squared's dlite-v2-355m is a large language model which is derived from OpenAI's medium GPT-2 model and fine-tuned on a single GPU on a corpus of 15k records (Databricks' "Dolly 15k" Dataset) to help it exhibit chat-based capabilities.

Just like Databricks' Dolly V2 models, dlite-v2-355m (and all other members of the dlite-v2 family) is licensed for both research and commercial use. We are extremely grateful for the work that Databricks has done to create the databricks-dolly-15k dataset, for without it we would not be able to create and release this model under such an open and permissive license.

While dlite-v2-355m is not a state-of-the-art model, we believe that the level of interactivity that can be achieved on such a small model that is trained so cheaply is important to showcase, as it continues to demonstrate that creating powerful AI capabilities may be much more accessible than previously thought.

Model Description

  • Developed by: AI Squared, Inc.
  • Shared by: AI Squared, Inc.
  • Model type: Large Language Model
  • Language(s) (NLP): EN
  • License: Apache v2.0
  • Finetuned from model: GPT-2

Bias, Risks, and Limitations

dlite-v2-355m is not a state-of-the-art language model. dlite-v2-355m is an experimental technology, and as with any experimental technology, AI Squared urges potential users of this technology to test its capabilities thoroughly before usage. Furthermore, the model can sometimes exhibit undesired behaviors. Some of these behaviors include, but are not limited to: factual inaccuracies, biases, offensive responses, toxicity, and hallucinations. Just as with any other LLM, we advise users of this technology to exercise good judgment when applying this technology.

Usage

To use the model with the transformers library on a machine with GPUs, first make sure you have the transformers and accelerate libraries installed. From your terminal, run:

pip install "accelerate>=0.16.0,<1" "transformers[torch]>=4.28.1,<5" "torch>=1.13.1,<2"

The instruction following pipeline can be loaded using the pipeline function as shown below. This loads a custom InstructionTextGenerationPipeline found in the model repo here, which is why trust_remote_code=True is required. Including torch_dtype=torch.bfloat16 is generally recommended if this type is supported in order to reduce memory usage. It does not appear to impact output quality. It is also fine to remove it if there is sufficient memory.

from transformers import pipeline
import torch

generate_text = pipeline(model="aisquared/dlite-v2-355m", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")

You can then use the pipeline to answer instructions:

res = generate_text("Who was George Washington?")
print(res)

Alternatively, if you prefer to not use trust_remote_code=True you can download instruct_pipeline.py, store it alongside your notebook, and construct the pipeline yourself from the loaded model and tokenizer:

from instruct_pipeline import InstructionTextGenerationPipeline
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

tokenizer = AutoTokenizer.from_pretrained("aisquared/dlite-v2-355m", padding_side="left")
model = AutoModelForCausalLM.from_pretrained("aisquared/dlite-v2-355m", device_map="auto", torch_dtype=torch.bfloat16)

generate_text = InstructionTextGenerationPipeline(model=model, tokenizer=tokenizer)

Model Performance Metrics

We present the results from various model benchmarks on the EleutherAI LLM Evaluation Harness for all models in the DLite family. Model results are sorted by mean score, ascending, to provide an ordering. These metrics serve to further show that none of the DLite models are state of the art, but rather further show that chat-like behaviors in LLMs can be trained almost independent of model size.

Modelarc_challengearc_easyboolqhellaswagopenbookqapiqawinogrande
dlite-v2-124m0.1996590.4478110.4948010.2916750.1560.6202390.487766
gpt20.1902730.4381310.4871560.2891850.1640.6289450.51618
dlite-v1-124m0.2235490.4625420.5024460.2932680.170.6224160.494081
gpt2-medium0.2150170.4907410.5859330.3331010.1860.6762790.531176
dlite-v2-355m0.2517060.4861110.5474010.3443540.2160.6719260.52723
dlite-v1-355m0.2346420.5075760.6003060.3384780.2160.6643090.496448
gpt2-large0.2167240.5315660.6048930.3639710.1940.7034820.553275
dlite-v1-774m0.2508530.5458750.6149850.3751240.2180.6980410.562747
dlite-v2-774m0.2696250.529040.6137610.3959370.2560.6915130.566693
gpt2-xl0.250.5829120.6177370.4004180.2240.7083790.583268
dlite-v1-1_5b0.2687710.5883840.6241590.4014140.2260.7083790.584846
dlite-v2-1_5b0.2892490.5656570.6012230.4340770.2720.7034820.588003

Limitations

DLite is an experimental technology and is not designed for use in any environment without significant testing and safety consideration. Furthermore, the model can sometimes exhibit undesired behaviors. Some of these behaviors include, but are not limited to: factual inaccuracies, biases, offensive responses, toxicity, and hallucinations. Just as with any other LLM, we advise users of this technology to exercise good judgment when applying this technology.

Open LLM Leaderboard Evaluation Results

Detailed results can be found here

MetricValue
Avg.27.53
ARC (25-shot)28.33
HellaSwag (10-shot)40.54
MMLU (5-shot)26.77
TruthfulQA (0-shot)38.76
Winogrande (5-shot)52.8
GSM8K (5-shot)0.0
DROP (3-shot)5.53

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей