/ Модель

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

Размер весов
27,6 ГБ
Лицензия
Apache 2.0
Архитектура
hf_olmo · dense
Опубликована
23 фев 2024

OLMo-7B-Instruct

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

Англоязычная диалоговая модель AllenAI на 7 млрд параметров для генерации текста и ответов на вопросы по инструкциям.

558скачиваний за 30 дней54лайкавеса обновлены15 окт 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

OLMo 7B Instruct — языковая модель Allen Institute for AI (Ai2), созданная на базе OLMo для диалогов и следования инструкциям. Это плотная авторегрессионная модель семейства OLMo с 7 млрд параметров; базовое обучение проводилось на Dolma, затем модель дообучили на смеси Tulu SFT и очищенной версии UltraFeedback.

Модель предназначена для генерации ответов на вопросы, диалогов и других текстовых запросов на английском языке. Авторы представляют её как пример улучшения базовых моделей OLMo с помощью существующих методов дообучения; код и контрольные точки выпускаются для изучения и воспроизводимости. Доступны веса в форматах PyTorch и Safetensors, для работы рекомендованы Transformers версии 4.40.0 или новее.

Модель распространяется по лицензии Apache 2.0. Карточка отмечает, что более новые версии Transformers предпочтительны для работы с моделью; заявленные возможности и языковая поддержка ограничены текстовым диалогом на английском языке.

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

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

Ограничения

Модель предназначена для английского текста и не заявлена как мультимодальная. Для работы с Transformers авторы рекомендуют версию 4.40.0 или новее.

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

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

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

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

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

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

Открыть на Hugging Face

Model Card for OLMo 7B Instruct

For transformers versions v4.40.0 or newer, we suggest using OLMo 7B Instruct HF instead.

OLMo is a series of Open Language Models designed to enable the science of language models. The OLMo base models are trained on the Dolma dataset. The adapted versions are trained on the Tulu SFT mixture and, for the Instruct version, a cleaned version of the UltraFeedback dataset. We release all code, checkpoints, logs (coming soon), and details involved in training these models.

OLMo 7B Instruct and OLMo SFT are two adapted versions of these models trained for better question answering. They show the performance gain that OLMo base models can achieve with existing fine-tuning techniques.

Note: This model requires installing ai2-olmo with pip and using ai2-olmo>=0.3.0 or HuggingFace Transformers<=4.39. New versions of the model will be released soon with compatibility improvements.

Note that this is the instruct variant of the original OLMo release - there are newer (better) versions of OLMo out now! Check here for newer releases.

Model Details

We release two adapted model versions: The base models related to this adapted model are the following:

ModelTraining Method(s)DatasetsContext Length
OLMo 7B SFTSFTTulu 2 SFT Mix2048
OLMo 7B InstructSFT + DPOTulu 2 SFT Mix + Ultrafeedback Cleaned2048

The base models related to this adapted model are the following:

SizeTraining TokensLayersHidden SizeAttention HeadsContext Length
OLMo 1B3 Trillion162048162048
OLMo 7B2.5 Trillion324096322048
OLMo 7B Twin 2T2 Trillion324096322048

Model Description

  • Developed by: Allen Institute for AI (AI2)
  • Supported by: Databricks, Kempner Institute for the Study of Natural and Artificial Intelligence at Harvard University, AMD, CSC (Lumi Supercomputer), UW
  • Model type: a Transformer style autoregressive language model.
  • Language(s) (NLP): English
  • License: The code and model are released under Apache 2.0.
  • Contact: Technical inquiries: olmo at allenai dot org. Press: press at allenai dot org
  • Date cutoff: Feb./March 2023 based on Dolma dataset version.

Model Sources

Uses

Inference

Quickly get inference running with the following required installation:

pip install ai2-olmo

Now, proceed as usual with HuggingFace:

from hf_olmo import OLMoForCausalLM, OLMoTokenizerFast
olmo = OLMoForCausalLM.from_pretrained("allenai/OLMo-7B-Instruct")
tokenizer = OLMoTokenizerFast.from_pretrained("allenai/OLMo-7B-Instruct")
chat = [
    { "role": "user", "content": "What is language modeling?" },
]
prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
inputs = tokenizer.encode(prompt, add_special_tokens=False, return_tensors="pt")
# optional verifying cuda
# inputs = {k: v.to('cuda') for k,v in inputs.items()}
# olmo = olmo.to('cuda')
response = olmo.generate(input_ids=inputs.to(olmo.device), max_new_tokens=100, do_sample=True, top_k=50, top_p=0.95)
print(tokenizer.batch_decode(response, skip_special_tokens=True)[0])
>> '<|user|>\nWhat is language modeling?\n<|assistant|>\nLanguage modeling is a type of natural language processing (NLP) task or machine learning task that...'

You can make this slightly faster by quantizing the model, e.g. OLMoForCausalLM.from_pretrained("allenai/OLMo-7B-Instruct", torch_dtype=torch.float16, load_in_8bit=True) (requires bitsandbytes). The quantized model is more sensitive to typing / cuda, so it is recommended to pass the inputs as inputs.input_ids.to('cuda') to avoid potential issues.

Note, you may see the following error if ai2-olmo is not installed correctly, which is caused by internal Python check naming. We'll update the code soon to make this error clearer.

    raise ImportError(
ImportError: This modeling file requires the following packages that were not found in your environment: hf_olmo. Run `pip install hf_olmo`

Evaluation

Core model results for the 7B adapted models are found below.

ModelMMLU 0-shot ↑AlpacaEval %win ↑ToxiGen % Toxic ↓TruthfulQA %Info+True ↑
OLMo (base)28.3-81.431.6
MPT Chat33.846.80.142.7
Falcon Instruct25.214.070.727.2
RPJ-INCITE Chat27.038.046.453.0
Llama-2-Chat 7B46.887.30.026.3
AI2 Tulu 2 7B50.473.97.051.7
AI2 Tulu 2 7B DPO50.785.10.5- *
OLMo 7B SFT47.357.014.441.2
OLMo 7B Instruct46.269.31.752.0

*Following Ivison et al. 2023, we do not report Tulu 2 TruthfulQA scores due to test set contamination.

Model Details

Data

For training data details, please see the Dolma, Tulu 2, and UltraFeedback documentation.

Architecture

Hyperparameters

The hyperparameters for the two phases of training are below:

Learning RateBetaEpochsWarmupWeight DecayGradient ClippingMaximum Sequence Length
SFT2 × 10^-6N/A3Linear warmup for the first 3% of total training time, then cooldown to 0002048
DPO5 × 10^-70.13Linear warmup for the first 10% of total training time, then cooldown to 0002048

Compared to Tulu 2, DPO hyperparameters are the same. SFT is lower LR and 3 epochs instead of 2 (and 2k length instead of 8k).

Bias, Risks, and Limitations

This adapted OLMo model is a research artifact. It is intended to benefit the research community interested in understanding the safety properties of LLMs and developers building safety tools for LLMs. For this reason, the model does not include a specific safety filter or safety training data. While our model scores well relative to its peers on ToxiGen, it is possible for the model to generate harmful and sensitive content from some user prompts. We recommend developers exercise caution and consider the risks of the applications of this technology. Furthermore, developers should consider implementing safeguards for biases, privacy, and other potential harms when appropriate. Finally, as with every LLM, OLMo may produce factual-sounding outputs that may not be true, so developers and users are encouraged to confirm such outputs before relying on them. All users of this model are responsible for how they use the model.

Citation

BibTeX:

@article{Groeneveld2023OLMo,
  title={OLMo: Accelerating the Science of Language Models},
  author={Groeneveld, Dirk and Beltagy, Iz and Walsh, Pete and Bhagia, Akshita and Kinney, Rodney and Tafjord, Oyvind and Jha, Ananya Harsh and Ivison, Hamish and Magnusson, Ian and Wang, Yizhong and Arora, Shane and Atkinson, David and Authur, Russell and Chandu, Khyathi and Cohan, Arman and Dumas, Jennifer and Elazar, Yanai and Gu, Yuling and Hessel, Jack and Khot, Tushar and Merrill, William and Morrison, Jacob and Muennighoff, Niklas and Naik, Aakanksha and Nam, Crystal and Peters, Matthew E. and Pyatkin, Valentina and Ravichander, Abhilasha and Schwenk, Dustin and Shah, Saurabh and Smith, Will and Subramani, Nishant and Wortsman, Mitchell and Dasigi, Pradeep and Lambert, Nathan and Richardson, Kyle and Dodge, Jesse and Lo, Kyle and Soldaini, Luca and Smith, Noah A. and Hajishirzi, Hannaneh},
  journal={Preprint},
  year={2024}
}

APA:

Groeneveld, D., Beltagy, I., Walsh, P., Bhagia, A., Kinney, R., Tafjord, O., Jha, A., Ivison, H., Magnusson, I., Wang, Y., Arora, S., Atkinson, D., Authur, R., Chandu, K., Cohan, A., Dumas, J., Elazar, Y., Gu, Y., Hessel, J., Khot, T., Merrill, W., Morrison, J., Muennighoff, N., Naik, A., Nam, C., Peters, M., Pyatkin, V., Ravichander, A., Schwenk, D., Shah, S., Smith, W., Subramani, N., Wortsman, M., Dasigi, P., Lambert, N., Richardson, K., Dodge, J., Lo, K., Soldaini, L., Smith, N., & Hajishirzi, H. (2024). OLMo: Accelerating the Science of Language Models. Preprint.

Model Card Contact

For errors in this model card, contact Nathan or Jacob, {nathanl, jacobm} at allenai dot org.

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
OLMoForCausalLM
Ревизия весов
5e3ff29

0 моделей