/ Модель

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

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

MDCure-Qwen2-7B-Instruct

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

Инструктивно дообученная Qwen2 на 7,1 млрд параметров для ответов и генерации текста по нескольким документам в длинном контексте.

142скачиваний за 30 дней1лайквеса обновлены25 июн 2025

Бенчмарки

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

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

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

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

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

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

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

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

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

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

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

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

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

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

MDCure-Qwen2-7B-Instruct — языковая модель Yale NLP, дообученная на Qwen/Qwen2-7B-Instruct с использованием набора MDCure-72k. Она предназначена для генерации ответов на инструкции и вопросы по нескольким документам, а также для задач с длинным контекстом. MDCure — процедура создания и фильтрации обучающих данных для улучшения способностей LLM работать с несколькими документами; авторы сообщают об улучшении результатов на ряде много-документных и длинноконтекстных тестов относительно базовых моделей.

Модель имеет плотную архитектуру Qwen2, около 7,1 млрд параметров и контекст до 32 768 токенов. Она принимает текст и генерирует текст; в метаданных указан английский язык. Для использования рекомендуется Transformers версии 4.45.0 или новее. Модель распространяется по лицензии Apache-2.0.

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

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

Ограничения

Модель рассчитана на текстовый ввод и ограничена контекстом до 32 768 токенов. Рекомендуется использовать Transformers версии 4.45.0 или новее.

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

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

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

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

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

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

Открыть на Hugging Face

MDCure-Qwen2-7B-Instruct

📄 Paper | 🤗 HF Collection | ⚙️ GitHub Repo

Introduction

MDCure is an effective and scalable procedure for generating high-quality multi-document (MD) instruction tuning data to improve MD capabilities of LLMs. Using MDCure, we construct a suite of MD instruction datasets complementary to collections such as FLAN and fine-tune a variety of already instruction-tuned LLMs from the FlanT5, Qwen2, and LLAMA3.1 model families, up to 70B parameters in size. We additionally introduce MDCureRM, an evaluator model specifically designed for the MD setting to filter and select high-quality MD instruction data in a cost-effective, RM-as-a-judge fashion. Extensive evaluations on a wide range of MD and long-context benchmarks spanning various tasks show MDCure consistently improves performance over pre-trained baselines and over corresponding base models by up to 75.5%.

We release MDCure datasets of size 12k, 36k, and 72k. We also release MDCureRM and the best MDCure'd model for each architecture/size combination. To access all our models and datasets, please visit our HF Collection. For further details regarding dataset construction, please see our paper and Github repo. For additional details regarding how to use yale-nlp/MDCure-Qwen2-7B-Instruct, please see below.

Model Details

yale-nlp/MDCure-Qwen2-7B-Instruct is initialized from Qwen/Qwen2-7B-Instruct and fine-tuned on the MDCure-72k dataset.

Requirements

We recommend using the latest version of HF Transformers, or any transformers>=4.45.0, to avoid any potential errors when using this model.

Quickstart

Below we provide a code snippet demonstrating how to load the tokenizer and model and generate content in response to an input context concerning multiple source documents and a related question or instruction. We strongly recommend to separate the texts and/or instruction using `

or` to maintain consistency with the format of the data used during training.

model = AutoModelForCausalLM.from_pretrained("yale-nlp/MDCure-Qwen2-7B-Instruct", device_map='auto',torch_dtype="auto")
tokenizer = AutoTokenizer.from_pretrained("yale-nlp/MDCure-Qwen2-7B-Instruct")

source_text_1 = ...
source_text_2 = ...
source_text_3 = ...
prompt = f"{source_text_1}

{source_text_2}

{source_text_3}

What happened in CHAMPAIGN regarding Lovie Smith and the 2019 defense improvements? Respond with 1-2 sentences."

messages = [
      {"role": "system", "content": "You are an assistant with strong multi-document processing skills."},
      {"role": "user", "content": prompt},
      ]

text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
model_inputs = tokenizer([text], return_tensors="pt").to(model.device) 

generated_ids = model.generate(**model_inputs, 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]
print(response)

All MDCure Models

We open-source our custom multi-document instruction scoring model, MDCureRM, as well as our best MDCure'd models at the following links:

ModelHuggingface RepoDescription
MDCureRM🤗 HF RepoMulti-objective reward model to score and filter MD instruction data more cheaply and effectively than GPT-3.5-Turbo
MDCure-FlanT5-Base🤗 HF RepoFlanT5-Base fine-tuned with MDCure-72k
MDCure-FlanT5-Large🤗 HF RepoFlanT5-Large fine-tuned with MDCure-72k
MDCure-Qwen2-1.5B-Instruct🤗 HF RepoQwen2-1.5B-Instruct fine-tuned with MDCure-72k
MDCure-Qwen2-7B-Instruct🤗 HF RepoQwen2-7B-Instruct fine-tuned with MDCure-72k
MDCure-LLAMA3.1-8B-Instruct🤗 HF RepoLLAMA3.1-8B-Instruct fine-tuned with MDCure-72k
MDCure-LLAMA3.1-70B-Instruct🤗 HF RepoLLAMA3.1-70B-Instruct fine-tuned with MDCure-72k

Citation

If you find our work useful, please cite our paper as:

@article{liu2024mdcure,
    title={MDCure: A Scalable Pipeline for Multi-Document Instruction-Following},
    author={Gabrielle Kaili-May Liu and Bowen Shi and Avi Caciularu and Idan Szpektor and Arman Cohan},
    journal={arXiv preprint arXiv:2410.23463},
    year={2024},
    url={https://arxiv.org/abs/2410.23463}
}

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

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

GPU в ailist

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

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

Подбираем GPU…

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

0 моделей