Add library_name and pipeline tag (#1)
Browse files- Add library_name and pipeline tag (212efe5db33162d342619c2ffaf3faa082c1aaa2)
Co-authored-by: Niels Rogge <[email protected]>
README.md
CHANGED
@@ -1,23 +1,23 @@
|
|
1 |
---
|
2 |
-
|
|
|
3 |
datasets:
|
4 |
- yale-nlp/MDCure-72k
|
5 |
language:
|
6 |
- en
|
7 |
-
|
8 |
-
- google/flan-t5-base
|
9 |
tags:
|
10 |
- multi-document
|
11 |
- long-context
|
12 |
- Long Context
|
|
|
|
|
13 |
---
|
14 |
|
15 |
# MDCure-FlanT5-Large
|
16 |
|
17 |
-
|
18 |
[📄 Paper](https://arxiv.org/pdf/2410.23463) | [🤗 HF Collection](https://huggingface.co/collections/yale-nlp/mdcure-6724914875e87f41e5445395) | [⚙️ GitHub Repo](https://github.com/yale-nlp/MDCure)
|
19 |
|
20 |
-
|
21 |
## Introduction
|
22 |
|
23 |
**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](https://github.com/google-research/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%.
|
@@ -41,7 +41,9 @@ We recommend using the latest version of HF Transformers, or any `transformers>4
|
|
41 |
|
42 |
## Quickstart
|
43 |
|
44 |
-
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
|
|
|
|
|
45 |
|
46 |
```python
|
47 |
model = AutoModelForSeq2SeqLM.from_pretrained("yale-nlp/MDCure-FlanT5-Large", device_map='auto',torch_dtype="auto",)
|
@@ -50,7 +52,13 @@ tokenizer = AutoTokenizer.from_pretrained("yale-nlp/MDCure-FlanT5-Large")
|
|
50 |
source_text_1 = ...
|
51 |
source_text_2 = ...
|
52 |
source_text_3 = ...
|
53 |
-
input_text = f"{source_text_1}
|
|
|
|
|
|
|
|
|
|
|
|
|
54 |
|
55 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to(model.device)
|
56 |
outputs = model.generate(input_ids)
|
|
|
1 |
---
|
2 |
+
base_model:
|
3 |
+
- google/flan-t5-base
|
4 |
datasets:
|
5 |
- yale-nlp/MDCure-72k
|
6 |
language:
|
7 |
- en
|
8 |
+
license: apache-2.0
|
|
|
9 |
tags:
|
10 |
- multi-document
|
11 |
- long-context
|
12 |
- Long Context
|
13 |
+
library_name: transformers
|
14 |
+
pipeline_tag: summarization
|
15 |
---
|
16 |
|
17 |
# MDCure-FlanT5-Large
|
18 |
|
|
|
19 |
[📄 Paper](https://arxiv.org/pdf/2410.23463) | [🤗 HF Collection](https://huggingface.co/collections/yale-nlp/mdcure-6724914875e87f41e5445395) | [⚙️ GitHub Repo](https://github.com/yale-nlp/MDCure)
|
20 |
|
|
|
21 |
## Introduction
|
22 |
|
23 |
**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](https://github.com/google-research/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%.
|
|
|
41 |
|
42 |
## Quickstart
|
43 |
|
44 |
+
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 `
|
45 |
+
|
46 |
+
` or `<doc-sep>` to maintain consistency with the format of the data used during training.
|
47 |
|
48 |
```python
|
49 |
model = AutoModelForSeq2SeqLM.from_pretrained("yale-nlp/MDCure-FlanT5-Large", device_map='auto',torch_dtype="auto",)
|
|
|
52 |
source_text_1 = ...
|
53 |
source_text_2 = ...
|
54 |
source_text_3 = ...
|
55 |
+
input_text = f"{source_text_1}
|
56 |
+
|
57 |
+
{source_text_2}
|
58 |
+
|
59 |
+
{source_text_3}
|
60 |
+
|
61 |
+
What happened in CHAMPAIGN regarding Lovie Smith and the 2019 defense improvements? Respond with 1-2 sentences."
|
62 |
|
63 |
input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to(model.device)
|
64 |
outputs = model.generate(input_ids)
|