rpasunuru commited on
Commit
b11ee20
1 Parent(s): 16502d9

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +73 -0
README.md ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ inference: false
3
+ tags:
4
+ - text-generation
5
+ - opt
6
+
7
+ license: other
8
+ commercial: false
9
+ ---
10
+ # OPT-IML
11
+
12
+ ## Model Description
13
+
14
+ [OPT-IML (OPT + Instruction Meta-Learning)](https://arxiv.org/abs/2212.12017) is a set of instruction-tuned versions of OPT, on a collection of ~2000 NLP tasks gathered from 8 NLP benchmarks, called OPT-IML Bench.
15
+
16
+ We provide two model versions:
17
+ * OPT-IML trained on 1500 tasks with several tasks held-out for purposes of downstream evaluation, and
18
+ * OPT-IML-Max trained on all ~2000 tasks
19
+
20
+ ### How to use
21
+ For large OPT models, such as this one, it is not recommend to make use of the `text-generation` pipeline because
22
+ one should load the model in half-precision to accelerate generation and optimize memory consumption on GPU.
23
+ It is recommended to directly call the [`generate`](https://huggingface.co/docs/transformers/main/en/main_classes/text_generation#transformers.generation_utils.GenerationMixin.generate)
24
+ method as follows:
25
+
26
+ ```python
27
+ >>> from transformers import AutoModelForCausalLM, AutoTokenizer
28
+ >>> import torch
29
+
30
+ >>> model = AutoModelForCausalLM.from_pretrained("facebook/opt-iml-max-30b", torch_dtype=torch.float16).cuda()
31
+
32
+ >>> # the fast tokenizer currently does not work correctly
33
+ >>> tokenizer = AutoTokenizer.from_pretrained("facebook/opt-iml-max-30b", use_fast=False)
34
+
35
+ >>> prompt = "What is the color of a carrot?\nA:"
36
+
37
+ >>> input_ids = tokenizer(prompt, return_tensors="pt").input_ids.cuda()
38
+
39
+ >>> generated_ids = model.generate(input_ids)
40
+
41
+ >>> tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
42
+ ```
43
+
44
+ ### Limitations and bias
45
+
46
+ While OPT-IML models outperform baseline OPT on an extensive set of evaluations,
47
+ nevertheless, they are susceptible to the various risks associated with using large language models
48
+ relating to factual correctness, generation of toxic language and enforcing stereotypes. While we release our
49
+ OPT-IML models to proliferate future work on instruction-tuning and to improve the availability
50
+ of large instruction-tuned causal LMs, the use of these models should be
51
+ accompanied with responsible best practices.
52
+
53
+ ## Training data
54
+ OPT-IML models are trained on OPT-IML Bench, a large benchmark for Instruction MetaLearning (IML) of 2000 NLP tasks consolidated into task categories from 8 existing benchmarks include Super-NaturalInstructions, FLAN, PromptSource, etc.
55
+
56
+ ## Training procedure
57
+ The texts are tokenized using the GPT2 byte-level version of Byte Pair Encoding (BPE) (for unicode characters) and a vocabulary size of 50272. The inputs are sequences of 2048 consecutive tokens.
58
+
59
+ The 30B model was fine-tuned on 64 40GB A100 GPUs. During fine-tuning, models saw approximately 2 billion tokens, which is only 0.6% of the pre-training
60
+ budget of OPT.
61
+
62
+
63
+ ### BibTeX entry and citation info
64
+ ```bibtex
65
+ @misc{iyer2022opt,
66
+ title={OPT-IML: Scaling Language Model Instruction Meta Learning through the Lens of Generalization},
67
+ author={Iyer, Srinivasan and Lin, Xi Victoria and Pasunuru, Ramakanth and Mihaylov, Todor and Simig, D{\'a}niel and Yu, Ping and Shuster, Kurt and Wang, Tianlu and Liu, Qing and Koura, Punit Singh and others},
68
+ year={2022},
69
+ eprint={2212.12017},
70
+ archivePrefix={arXiv},
71
+ primaryClass={cs.CL}
72
+ }
73
+ ```