pybeebee commited on
Commit
de13d33
β€’
1 Parent(s): fc4849c

Update model card

Browse files
Files changed (1) hide show
  1. README.md +86 -3
README.md CHANGED
@@ -1,3 +1,86 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ datasets:
4
+ - yale-nlp/MDCure-72k
5
+ language:
6
+ - en
7
+ base_model:
8
+ - google/flan-t5-base
9
+ tags:
10
+ - multi-document
11
+ - long-context
12
+ - Long Context
13
+ ---
14
+
15
+ # MDCure-FlanT5-Base
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%.
24
+
25
+ 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](https://huggingface.co/collections/yale-nlp/mdcure-6724914875e87f41e5445395). For further details regarding dataset construction, please see our [paper](https://arxiv.org/pdf/2410.23463) and [Github repo](https://github.com/yale-nlp/MDCure). For additional details regarding how to use **yale-nlp/MDCure-FlanT5-Base**, please see below.
26
+
27
+ <p align="center">
28
+ <img src="fig1.png" width="75%">
29
+ </p>
30
+ <p align="center" style="margin-top: 0; padding-top: 0;">
31
+ <em>The MDCure pipeline generates diverse multi-document instructions, filters them via fine-grained scoring by MDCureRM, and tunes a base LLM to enhance its multi-document capabilities.</em>
32
+ </p>
33
+
34
+ ## Model Details
35
+
36
+ **yale-nlp/MDCure-FlanT5-Base** is initialized from [google/flan-t5-base](https://huggingface.co/google/flan-t5-base) and fine-tuned on the [MDCure-72k](https://huggingface.co/datasets/yale-nlp/MDCure-72k) dataset.
37
+
38
+ ## Requirements
39
+
40
+ We recommend using the latest version of HF Transformers, or any `transformers>4.35.0`, to avoid any potential versioning errors when using this model.
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 instructions using `\n\n` or `<doc-sep>` to maintain consistency with the format of the data used during training.
45
+
46
+ ```python
47
+ model = AutoModelForSeq2SeqLM.from_pretrained("yale-nlp/MDCure-FlanT5-Base", device_map='auto',torch_dtype="auto",)
48
+ tokenizer = AutoTokenizer.from_pretrained("yale-nlp/MDCure-FlanT5-Base")
49
+
50
+ source_text_1 = ...
51
+ source_text_2 = ...
52
+ source_text_3 = ...
53
+ input_text = f"{source_text_1}\n\n{source_text_2}\n\n{source_text_3}\n\nWhat happened in CHAMPAIGN regarding Lovie Smith and the 2019 defense improvements? Respond with 1-2 sentences."
54
+
55
+ input_ids = tokenizer(input_text, return_tensors="pt").input_ids.to(model.device)
56
+ outputs = model.generate(input_ids)
57
+
58
+ print(tokenizer.decode(outputs[0], skip_special_tokens=True))
59
+ ```
60
+
61
+ ## All MDCure Models
62
+ We open-source our custom multi-document instruction scoring model, MDCureRM, as well as our best MDCure'd models at the following links:
63
+
64
+ | Model | Huggingface Repo | Description |
65
+ |---------------------------|---------------------|------------------------------|
66
+ | **MDCureRM** | [πŸ€— HF Repo](https://huggingface.co/yale-nlp/MDCureRM) | Multi-objective reward model to score and filter MD instruction data more cheaply and effectively than GPT-3.5-Turbo. |
67
+ | **MDCure-FlanT5-Base** | [πŸ€— HF Repo](https://huggingface.co/yale-nlp/MDCure-FlanT5-Base) | **FlanT5-Base** fine-tuned with MDCure-72k |
68
+ | **MDCure-FlanT5-Large** | [πŸ€— HF Repo](https://huggingface.co/yale-nlp/MDCure-FlanT5-Large) | **FlanT5-Large** fine-tuned with MDCure-72k |
69
+ | **MDCure-Qwen2-1.5B-Instruct** | [πŸ€— HF Repo](https://huggingface.co/yale-nlp/MDCure-Qwen2-1.5B-Instruct) | **Qwen2-1.5B-Instruct** fine-tuned with MDCure-72k |
70
+ | **MDCure-Qwen2-7B-Instruct** | [πŸ€— HF Repo](https://huggingface.co/yale-nlp/MDCure-Qwen2-7B-Instruct) | **Qwen2-7B-Instruct** fine-tuned with MDCure-72k |
71
+ | **MDCure-LLAMA3.1-8B-Instruct** | [πŸ€— HF Repo](https://huggingface.co/yale-nlp/MDCure-LLAMA3.1-8B-Instruct) | **LLAMA3.1-8B-Instruct** fine-tuned with MDCure-72k |
72
+ | **MDCure-LLAMA3.1-70B-Instruct** | [πŸ€— HF Repo](https://huggingface.co/yale-nlp/MDCure-LLAMA3.1-70B-Instruct) | **LLAMA3.1-70B-Instruct** fine-tuned with MDCure-72 |
73
+
74
+ ## Citation
75
+
76
+ If you find our work useful, please cite our paper as:
77
+
78
+ ```bibtex
79
+ @article{liu2023mdcure,
80
+ title={MDCure: A Scalable Pipeline for Multi-Document Instruction-Following},
81
+ author={Gabrielle Kaili-May Liu and Bowen Shi and Avi Caciularu and Idan Szpektor and Arman Cohan},
82
+ journal={arXiv preprint arXiv:2410.23463},
83
+ year={2024},
84
+ url={https://arxiv.org/abs/2410.23463}
85
+ }
86
+ ```