Text Generation
Transformers
PyTorch
English
mistral
text-generation-inference
Inference Endpoints
instruction-pretrain commited on
Commit
52481bb
1 Parent(s): 0af297c

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -8
README.md CHANGED
@@ -7,30 +7,42 @@ language:
7
  - en
8
  ---
9
  # Instruction Pre-Training: Language Models are Supervised Multitask Learners
10
- This repo contains the **instruction-pretrained base model** in our paper **Instruction Pre-Training: Language Models are Supervised Multitask Learners**.
11
 
12
- We explore supervised multitask pre-training by proposing ***Instruction Pre-Training***, a framework that scalably augments massive raw corpora with instruction-response pairs to pre-train language models. The instruction-response pairs are generated by an efficient instruction synthesizer built on open-source models. In our experiments, we synthesize 200M instruction-response pairs covering 40+ task categories to verify the effectiveness of *Instruction Pre-Training*. Instruction Pre-Training* outperforms *Vanilla Pre-training* in both general pre-training from scratch and domain-adaptive continued pre-training. **In pre-training from scratch, *Instruction Pre-Training* not only improves pre-trained base models but also benefits more from further instruction tuning.** In continual pre-training, *Instruction Pre-Training* enables Llama3-8B to be comparable to or even outperform Llama3-70B.
13
 
14
  <p align='center'>
15
- <img src="https://cdn-uploads.huggingface.co/production/uploads/66711d2ee12fa6cc5f5dfc89/j1hlqGreoZrBsK7sz3oG9.png" width="500">
16
  </p>
17
 
 
 
 
 
 
 
 
 
 
 
 
 
18
  ## General Pre-Training From Scratch
19
- We augment the RefinedWeb corproa with instruction-response pairs generated by our [context-based instruction synthesizer](https://huggingface.co/instruction-pretrain/instruction-synthesizer) to pre-train a general langauge model from scratch.
20
 
21
  To evaluate our general base model using the [lm-evaluation-harness framework](https://github.com/EleutherAI/lm-evaluation-harness)
22
 
23
- 1. Setup dependencies
24
  ```bash
25
  git clone https://github.com/EleutherAI/lm-evaluation-harness
26
  cd lm-evaluation-harness
27
  pip install -e .
28
  ```
29
 
30
- 2. Evalaute
31
  ```bash
32
  MODEL=instruction-pretrain/InstructLM-500M
33
- add_bos_token=True # this flag is needed because lm-eval-harness set add_bos_token to False by default, but ours requires add_bos_token to be True
34
 
35
  accelerate launch -m lm_eval --model hf \
36
  --model_args pretrained=${MODEL},add_bos_token=${add_bos_token},dtype=float16 \
@@ -50,7 +62,7 @@ accelerate launch -m lm_eval --model hf \
50
  ## Citation
51
  If you find our work helpful, please cite us:
52
 
53
- [AdaptLLM](https://huggingface.co/papers/2309.09530):
54
  ```bibtex
55
  @inproceedings{
56
  cheng2024adapting,
 
7
  - en
8
  ---
9
  # Instruction Pre-Training: Language Models are Supervised Multitask Learners
10
+ This repo contains the **general models pre-trained from scratch** in our paper **Instruction Pre-Training: Language Models are Supervised Multitask Learners**.
11
 
12
+ We explore supervised multitask pre-training by proposing ***Instruction Pre-Training***, a framework that scalably augments massive raw corpora with instruction-response pairs to pre-train language models. The instruction-response pairs are generated by an efficient instruction synthesizer built on open-source models. In our experiments, we synthesize 200M instruction-response pairs covering 40+ task categories to verify the effectiveness of *Instruction Pre-Training*. Instruction Pre-Training* outperforms *Vanilla Pre-training* in both general pre-training from scratch and domain-adaptive continual pre-training. **In pre-training from scratch, *Instruction Pre-Training* not only improves pre-trained base models but also benefits more from further instruction tuning.** In continual pre-training, *Instruction Pre-Training* enables Llama3-8B to be comparable to or even outperform Llama3-70B.
13
 
14
  <p align='center'>
15
+ <img src="https://cdn-uploads.huggingface.co/production/uploads/66711d2ee12fa6cc5f5dfc89/vRdsFIVQptbNaGiZ18Lih.png" width="400">
16
  </p>
17
 
18
+ ## Resources
19
+ **🤗 We share our data and models with example usages, feel free to open any issues or discussions! 🤗**
20
+
21
+ - Context-Based Instruction Synthesizer: [instruction-synthesizer](https://huggingface.co/instruction-pretrain/instruction-synthesizer)
22
+ - Fine-Tuning Data for the Synthesizer: [ft-instruction-synthesizer-collection](https://huggingface.co/datasets/instruction-pretrain/ft-instruction-synthesizer-collection)
23
+ - General Models Pre-Trained from Scratch:
24
+ - [InstructLM-500M](https://huggingface.co/instruction-pretrain/InstructLM-500M)
25
+ - [InstructLLM-1.3B](https://huggingface.co/instruction-pretrain/InstructLLM-1.3B)
26
+ - Domain-Specific Models Pre-Trained from Llama3-8B:
27
+ - [Finance-Llama3-8B](https://huggingface.co/instruction-pretrain/finance-Llama3-8B)
28
+ - [Biomedicine-Llama3-8B](https://huggingface.co/instruction-pretrain/medicine-Llama3-8B)
29
+
30
  ## General Pre-Training From Scratch
31
+ We augment the [RefinedWeb corproa](https://huggingface.co/datasets/tiiuae/falcon-refinedweb) with instruction-response pairs generated by our [context-based instruction synthesizer](https://huggingface.co/instruction-pretrain/instruction-synthesizer) to pre-train general langauge models from scratch.
32
 
33
  To evaluate our general base model using the [lm-evaluation-harness framework](https://github.com/EleutherAI/lm-evaluation-harness)
34
 
35
+ 1. Setup dependencies:
36
  ```bash
37
  git clone https://github.com/EleutherAI/lm-evaluation-harness
38
  cd lm-evaluation-harness
39
  pip install -e .
40
  ```
41
 
42
+ 2. Evalaute:
43
  ```bash
44
  MODEL=instruction-pretrain/InstructLM-500M
45
+ add_bos_token=True # this flag is needed because lm-eval-harness set add_bos_token to False by default, but ours require add_bos_token to be True
46
 
47
  accelerate launch -m lm_eval --model hf \
48
  --model_args pretrained=${MODEL},add_bos_token=${add_bos_token},dtype=float16 \
 
62
  ## Citation
63
  If you find our work helpful, please cite us:
64
 
65
+ [AdaptLLM](https://huggingface.co/papers/2309.09530)
66
  ```bibtex
67
  @inproceedings{
68
  cheng2024adapting,