/ Модель

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

Контекст
32 768 токенов
Параметры
1,5 млрд
Архитектура
qwen2 · dense
Опубликована
14 окт 2024

DistilQwen2-1.5B-Instruct

Генерация текстаТекст → текст

Дистиллированная модель Qwen2 на 1,5 млрд параметров для диалогов и выполнения текстовых инструкций на китайском и английском языках.

14скачиваний за 30 дней2лайкавеса обновлены4 ноя 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

DistilQwen2-1.5B-Instruct — дистиллированная языковая модель Alibaba PAI, созданная на основе Qwen2-1.5B-Instruct. Это плотная модель семейства Qwen2 с 1,5 млрд параметров, предназначенная для диалогов и выполнения инструкций. Контекстное окно составляет 32 768 токенов.

Модель обучали на инструкционных данных на китайском и английском языках, включая наборы Magpie, OpenHermes и Mammoth 2, а также синтетические данные. Для отбора примеров использовали оценку сложности с помощью модели-судьи. В README приведены результаты оценки на AlpacaEval, MT-Bench и IFEval; по указанным метрикам модель превосходит Qwen2-1.5B-Instruct, но уступает Qwen2-7B-Instruct.

Модель принимает текст и генерирует текст. Она подходит для диалоговых приложений и выполнения текстовых инструкций. Файлы модели представлены в формате safetensors. Сведения о лицензии в предоставленных данных отсутствуют.

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

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

Ограничения

Основные языки обучающих инструкций — китайский и английский; качество для других языков не подтверждено предоставленными данными. По приведённым в README оценкам модель уступает Qwen2-7B-Instruct.

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

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

Открыть на Hugging Face

📖 Introduction

DistilQwen2-1.5B is a distilled version of Qwen2-1.5B-Instruct, designed to distill the capabilities of stronger LLMs into smaller ones. To achieve this, we utilized a diverse range of datasets for the distillation process, including well-known open-source collections such as Magpie, Openhermes, and Mammoth 2, as well as proprietary synthetic datasets.

The training data primarily consists of instructions in Chinese and English. To enhance the quality and diversity of the instruction data, we implemented a difficulty scoring system and task-related resampling techniques.

For difficulty scoring, we employed the LLM-as-a-Judge paradigm, using the teacher model to evaluate responses based on accuracy, relevance, helpfulness, and level of detail. We then calculated the Model Fitting Difficulty (MFD) Score by subtracting the teacher model's score from the student model's score. A higher MFD Score indicates that the instruction is more valuable for distillation training. This approach allowed us to remove low-difficulty instructions from the training set, focusing on more challenging and informative examples.

This careful curation and scoring process ensures that DistilQwen2-1.5B achieves high performance after the distillation process.

🚀 Quick Start

Here provides a code snippet with apply_chat_template to show you how to load the tokenizer and model and how to generate contents.

from transformers import AutoModelForCausalLM, AutoTokenizer
device = "cuda" # the device to load the model onto

model = AutoModelForCausalLM.from_pretrained(
    "alibaba-pai/DistilQwen2-1.5B-Instruct",
    torch_dtype="auto",
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("alibaba-pai/DistilQwen2-1.5B-Instruct")

prompt = "Give me a short introduction to large language model."
messages = [
    {"role": "user", "content": prompt}
]
text = tokenizer.apply_chat_template(
    messages,
    tokenize=False,
    add_generation_prompt=True
)
model_inputs = tokenizer([text], return_tensors="pt").to(device)

generated_ids = model.generate(
    model_inputs.input_ids,
    max_new_tokens=2048,
)
generated_ids = [
    output_ids[len(input_ids):] for input_ids, output_ids in zip(model_inputs.input_ids, generated_ids)
]

response = tokenizer.batch_decode(generated_ids, skip_special_tokens=True)[0]

🔍 Evaluation

We evaluated our model on instruction-following leaderboards such as AlpacaEval, MT-Bench and IFEval.

ModelAlpacaEval 2.0 (length-controlled)MT-BenchMT-Bench (single)IFEval (instruction-loose)IFEval (strict-prompt)
Qwen2-1.5B-Instruct5.225.856.4541.3728.10
DistilQwen2-1.5B-Instruct8.286.427.1249.7636.04
Qwen2-7B-Instruct24.338.278.6866.6752.31
DistilQwen2-7B-Instruct25.358.409.0371.4660.26

📜 Citation

If you find our work helpful, please cite it!

@misc{TAPIR,
      title={Distilling Instruction-following Abilities of Large Language Models with Task-aware Curriculum Planning}, 
      author={Yuanhao Yue and Chengyu Wang and Jun Huang and Peng Wang},
      year={2024},
      eprint={2405.13448},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2405.13448}, 
}

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

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

GPU в ailist

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

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

Подбираем GPU…

Класс архитектуры
Qwen2ForCausalLM
Ревизия весов
7190fc5

0 моделей