/ Модель

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

Контекст
32 768 токенов
Параметры
1,5 млрд
Лицензия
Apache 2.0
Архитектура
qwen2 · dense
Базовая модель
Qwen2-1.5B-Instruct
Опубликована
6 июн 2024

Qwen2-1.5B-Instruct-GPTQ-Int4

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

Qwen2-1.5B-Instruct-GPTQ-Int4 — инструкционно дообученная языковая модель из семейства Qwen2, разработанная командой Qwen.

3 050скачиваний за 30 дней8лайковвеса обновлены21 авг 2024

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Она предназначена для диалоговых сценариев и генерации текста: ответов на вопросы, кратких объяснений, работы с естественным языком и кодом. Модель относится к классу decoder-only Transformer и содержит 1,5 млрд параметров; версия GPTQ-Int4 использует 4-битное квантование для снижения требований к памяти при инференсе. Поддерживаются текстовые входы и выходы, а контекстное окно в README не указано.

В архитектуре заявлены активация SwiGLU, bias в QKV-проекциях и group query attention. Токенизатор адаптирован для нескольких естественных языков и языков программирования, однако в метаданных README явно указан английский язык. Модель предварительно обучалась на большом объёме данных, а затем дообучалась с помощью supervised fine-tuning и direct preference optimization; заявлены возможности в понимании и генерации текста, многоязычности, программировании, математике и рассуждениях. README не приводит точных результатов тестов и не описывает специфические ограничения качества квантированной версии; для запуска рекомендуются актуальные версии transformers, autogptq или vLLM. Лицензия — Apache 2.0.

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

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

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

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

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

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

Открыть на Hugging Face

Qwen2-1.5B-Instruct-GPTQ-Int4

Introduction

Qwen2 is the new series of Qwen large language models. For Qwen2, we release a number of base language models and instruction-tuned language models ranging from 0.5 to 72 billion parameters, including a Mixture-of-Experts model. This repo contains the instruction-tuned 1.5B Qwen2 model.

Compared with the state-of-the-art opensource language models, including the previous released Qwen1.5, Qwen2 has generally surpassed most opensource models and demonstrated competitiveness against proprietary models across a series of benchmarks targeting for language understanding, language generation, multilingual capability, coding, mathematics, reasoning, etc.

For more details, please refer to our blog, GitHub, and Documentation.

Note: If you encounter RuntimeError: probability tensor contains either `inf`, `nan` or element < 0 during inference with transformers, we recommand installing autogpq>=0.7.1 or deploying this model with vLLM.

Model Details

Qwen2 is a language model series including decoder language models of different model sizes. For each size, we release the base language model and the aligned chat model. It is based on the Transformer architecture with SwiGLU activation, attention QKV bias, group query attention, etc. Additionally, we have an improved tokenizer adaptive to multiple natural languages and codes.

Training details

We pretrained the models with a large amount of data, and we post-trained the models with both supervised finetuning and direct preference optimization.

Requirements

The code of Qwen2 has been in the latest Hugging face transformers and we advise you to install transformers>=4.37.0, or you might encounter the following error:

KeyError: 'qwen2'

Quickstart

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(
    "Qwen/Qwen2-1.5B-Instruct-GPTQ-Int4",
    torch_dtype="auto",
    device_map="auto"
)
tokenizer = AutoTokenizer.from_pretrained("Qwen/Qwen2-1.5B-Instruct-GPTQ-Int4")

prompt = "Give me a short introduction to large language model."
messages = [
    {"role": "system", "content": "You are a helpful assistant."},
    {"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=512
)
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]

Benchmark and Speed

To compare the generation performance between bfloat16 (bf16) and quantized models such as GPTQ-Int8, GPTQ-Int4, and AWQ, please consult our Benchmark of Quantized Models. This benchmark provides insights into how different quantization techniques affect model performance.

For those interested in understanding the inference speed and memory consumption when deploying these models with either transformer or vLLM, we have compiled an extensive Speed Benchmark.

Citation

If you find our work helpful, feel free to give us a cite.

@article{qwen2,
  title={Qwen2 Technical Report},
  year={2024}
}

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

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

GPU в ailist

vLLM

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

Подбираем GPU…

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

0 моделей