/ Модель

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

Контекст
2 048 токенов
Параметры
3,5 млрд
Лицензия
MIT
Архитектура
gpt_neox · dense
Библиотека
transformers
Опубликована
2 мая 2023

databricks-dolly-v2-3b

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

Англоязычная модель GPT-NeoX на 3,5 млрд параметров, дообученная Databricks для выполнения инструкций, генерации и суммаризации текста.

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

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Модель verseAI/databricks-dolly-v2-3b — форк Dolly v2, разработанной Databricks. Это причинная языковая модель GPT-NeoX с 3,5 млрд параметров, дообученная на примерно 15 тысячах примеров инструкций и ответов из набора databricks-dolly-15k. Она принимает текст и генерирует текст; заявленный контекст — 2048 токенов.

Модель предназначена для выполнения инструкций на английском языке: генерации и преобразования текста, мозгового штурма, классификации, ответов на вопросы, извлечения информации и суммаризации. Может подойти для экспериментов и несложных прототипов, где важны следование инструкциям и локальный запуск через Transformers.

В README отмечены трудности со сложными запросами, программированием, математикой, точностью фактов и дат, открытыми вопросами и соблюдением заданного формата. Модель уступает более современным генеративным системам и может воспроизводить предвзятость и ошибки обучающих данных. В метаданных указана лицензия MIT; карточка описывает исходную Dolly как доступную для коммерческого использования.

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

  • мозговой штурм и генерация идей
  • классификация текста по инструкции
  • ответы на вопросы по предоставленному тексту
  • извлечение сведений из текста
  • суммаризация документов
  • генерация текста по заданию

Ограничения

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

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

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

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

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

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

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

Открыть на Hugging Face

dolly-v2-3b Model Card

Fork of databricks/dolly-v2-3b

Original README copied below:

Summary

Databricks’ dolly-v2-3b, an instruction-following large language model trained on the Databricks machine learning platform that is licensed for commercial use. Based on pythia-2.8b, Dolly is trained on ~15k instruction/response fine tuning records databricks-dolly-15k generated by Databricks employees in capability domains from the InstructGPT paper, including brainstorming, classification, closed QA, generation, information extraction, open QA and summarization. dolly-v2-3b is not a state-of-the-art model, but does exhibit surprisingly high quality instruction following behavior not characteristic of the foundation model on which it is based.

Dolly v2 is also available in these larger models sizes:

  • dolly-v2-12b, a 12 billion parameter based on pythia-12b
  • dolly-v2-7b, a 6.9 billion parameter based on pythia-6.9b

Please refer to the dolly GitHub repo for tips on running inference for various GPU configurations.

Owner: Databricks, Inc.

Model Overview

dolly-v2-3b is a 2.8 billion parameter causal language model created by Databricks that is derived from EleutherAI’s Pythia-2.8b and fine-tuned on a ~15K record instruction corpus generated by Databricks employees and released under a permissive license (CC-BY-SA)

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. In a Databricks notebook you could 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.

import torch
from transformers import pipeline

generate_text = pipeline(model="databricks/dolly-v2-3b", torch_dtype=torch.bfloat16, trust_remote_code=True, device_map="auto")

You can then use the pipeline to answer instructions:

res = generate_text("Explain to me the difference between nuclear fission and fusion.")
print(res[0]["generated_text"])

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:

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

tokenizer = AutoTokenizer.from_pretrained("databricks/dolly-v2-3b", padding_side="left")
model = AutoModelForCausalLM.from_pretrained("databricks/dolly-v2-3b", device_map="auto", torch_dtype=torch.bfloat16)

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

LangChain Usage

To use the pipeline with LangChain, you must set return_full_text=True, as LangChain expects the full text to be returned and the default for the pipeline is to only return the new text.

import torch
from transformers import pipeline

generate_text = pipeline(model="databricks/dolly-v2-3b", torch_dtype=torch.bfloat16,
                         trust_remote_code=True, device_map="auto", return_full_text=True)

You can create a prompt that either has only an instruction or has an instruction with context:

from langchain import PromptTemplate, LLMChain
from langchain.llms import HuggingFacePipeline

# template for an instrution with no input
prompt = PromptTemplate(
    input_variables=["instruction"],
    template="{instruction}")

# template for an instruction with input
prompt_with_context = PromptTemplate(
    input_variables=["instruction", "context"],
    template="{instruction}\n\nInput:\n{context}")

hf_pipeline = HuggingFacePipeline(pipeline=generate_text)

llm_chain = LLMChain(llm=hf_pipeline, prompt=prompt)
llm_context_chain = LLMChain(llm=hf_pipeline, prompt=prompt_with_context)

Example predicting using a simple instruction:

print(llm_chain.predict(instruction="Explain to me the difference between nuclear fission and fusion.").lstrip())

Example predicting using an instruction with context:

context = """George Washington (February 22, 1732[b] – December 14, 1799) was an American military officer, statesman,
and Founding Father who served as the first president of the United States from 1789 to 1797."""

print(llm_context_chain.predict(instruction="When was George Washington president?", context=context).lstrip())

Known Limitations

Performance Limitations

dolly-v2-3b is not a state-of-the-art generative language model and, though quantitative benchmarking is ongoing, is not designed to perform competitively with more modern model architectures or models subject to larger pretraining corpuses.

The Dolly model family is under active development, and so any list of shortcomings is unlikely to be exhaustive, but we include known limitations and misfires here as a means to document and share our preliminary findings with the community.
In particular, dolly-v2-3b struggles with: syntactically complex prompts, programming problems, mathematical operations, factual errors, dates and times, open-ended question answering, hallucination, enumerating lists of specific length, stylistic mimicry, having a sense of humor, etc. Moreover, we find that dolly-v2-3b does not have some capabilities, such as well-formatted letter writing, present in the original model.

Dataset Limitations

Like all language models, dolly-v2-3b reflects the content and limitations of its training corpuses.

  • The Pile: GPT-J’s pre-training corpus contains content mostly collected from the public internet, and like most web-scale datasets, it contains content many users would find objectionable. As such, the model is likely to reflect these shortcomings, potentially overtly in the case it is explicitly asked to produce objectionable content, and sometimes subtly, as in the case of biased or harmful implicit associations.

  • databricks-dolly-15k: The training data on which dolly-v2-3b is instruction tuned represents natural language instructions generated by Databricks employees during a period spanning March and April 2023 and includes passages from Wikipedia as references passages for instruction categories like closed QA and summarization. To our knowledge it does not contain obscenity, intellectual property or personally identifying information about non-public figures, but it may contain typos and factual errors. The dataset may also reflect biases found in Wikipedia. Finally, the dataset likely reflects the interests and semantic choices of Databricks employees, a demographic which is not representative of the global population at large.

Databricks is committed to ongoing research and development efforts to develop helpful, honest and harmless AI technologies that maximize the potential of all individuals and organizations.

Benchmark Metrics

Below you'll find various models benchmark performance on the EleutherAI LLM Evaluation Harness; model results are sorted by geometric mean to produce an intelligible ordering. As outlined above, these results demonstrate that dolly-v2-3b is not state of the art. It underperforms dolly-v1-6b in the evaluation benchmarks, which is not surprising considering it has half the number of parameters.

modelopenbookqaarc_easywinograndehellaswagarc_challengepiqaboolqgmean
EleutherAI/pythia-2.8b0.3480.5858590.5895820.5912170.3233790.733950.6382260.523431
EleutherAI/pythia-6.9b0.3680.6047980.6085240.6315480.3438570.7611530.62630.543567
databricks/dolly-v2-3b0.3840.6115320.5895820.6507670.3703070.7426550.5755350.544886
EleutherAI/pythia-12b0.3640.6271040.6361480.6680940.3464160.7600650.6733940.559676
EleutherAI/gpt-j-6B0.3820.6216330.6511440.6626170.3634810.7611530.6559630.565936
databricks/dolly-v2-12b0.4080.639310.6164170.7079270.3882250.7578890.5681960.56781
databricks/dolly-v2-7b0.3920.6338380.6077350.6865170.4069970.7508160.6440370.573487
databricks/dolly-v1-6b0.410.629630.6432520.6767580.3848120.7736670.6877680.583431
EleutherAI/gpt-neox-20b0.4020.6839230.6566690.71420.4087030.7840040.6954130.602236

Happy Hacking!

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей