Text2Text Generation
Transformers
PyTorch
t5
text-generation-inference
Inference Endpoints
chiayewken commited on
Commit
03a3a1c
1 Parent(s): f7366ca

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +50 -0
README.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - tatsu-lab/alpaca
5
+ ---
6
+
7
+ ## 🍮 🦙 Flan-Alpaca: Instruction Tuning from Humans and Machines
8
+
9
+ Our [repository](https://github.com/declare-lab/flan-alpaca) contains code for extending the [Stanford Alpaca](https://github.com/tatsu-lab/stanford_alpaca)
10
+ synthetic instruction tuning to existing instruction-tuned models such as [Flan-T5](https://arxiv.org/abs/2210.11416).
11
+ The pretrained models and demos are available on HuggingFace 🤗 :
12
+
13
+ | Model | Parameters | Instruction Data | Training GPUs |
14
+ |---------------------------------------------------------------------------|------------|----------------------------------------------------------------------------------------------------------------------------------------------------|-----------------|
15
+ | [Flan-Alpaca-Base](https://huggingface.co/declare-lab/flan-alpaca-base) | 220M | [Flan](https://github.com/google-research/FLAN), [Alpaca](https://github.com/tatsu-lab/stanford_alpaca) | 1x A6000 |
16
+ | [Flan-Alpaca-Large](https://huggingface.co/declare-lab/flan-alpaca-large) | 770M | [Flan](https://github.com/google-research/FLAN), [Alpaca](https://github.com/tatsu-lab/stanford_alpaca) | 1x A6000 |
17
+ | [Flan-Alpaca-XL](https://huggingface.co/declare-lab/flan-alpaca-xl) | 3B | [Flan](https://github.com/google-research/FLAN), [Alpaca](https://github.com/tatsu-lab/stanford_alpaca) | 1x A6000 |
18
+ | [Flan-Alpaca-XXL](https://huggingface.co/declare-lab/flan-alpaca-xxl) | 11B | [Flan](https://github.com/google-research/FLAN), [Alpaca](https://github.com/tatsu-lab/stanford_alpaca) | 4x A6000 (FSDP) |
19
+ | [Flan-GPT4All-XL](https://huggingface.co/declare-lab/flan-gpt4all-xl) | 3B | [Flan](https://github.com/google-research/FLAN), [GPT4All](https://github.com/nomic-ai/gpt4all) | 1x A6000 |
20
+ | [Flan-ShareGPT-XL](https://huggingface.co/declare-lab/flan-sharegpt-xl) | 3B | [Flan](https://github.com/google-research/FLAN), [ShareGPT](https://github.com/domeccleston/sharegpt)/[Vicuna](https://github.com/lm-sys/FastChat) | 1x A6000 |
21
+
22
+ ### Why?
23
+
24
+ [Alpaca](https://crfm.stanford.edu/2023/03/13/alpaca.html) represents an exciting new direction
25
+ to approximate the performance of large language models (LLMs) like ChatGPT cheaply and easily.
26
+ Concretely, they leverage an LLM such as GPT-3 to generate instructions as synthetic training data.
27
+ The synthetic data which covers more than 50k tasks can then be used to finetune a smaller model.
28
+ However, the original implementation is less accessible due to licensing constraints of the
29
+ underlying [LLaMA](https://ai.facebook.com/blog/large-language-model-llama-meta-ai/) model.
30
+ Furthermore, users have noted [potential noise](https://github.com/tloen/alpaca-lora/issues/65) in the synthetic
31
+ dataset. Hence, it may be better to explore a fully accessible model that is already trained on high-quality (but
32
+ less diverse) instructions such as [Flan-T5](https://arxiv.org/abs/2210.11416).
33
+
34
+ ### Usage
35
+
36
+ ```
37
+ from transformers import pipeline
38
+
39
+ prompt = "Write an email about an alpaca that likes flan"
40
+ model = pipeline(model="declare-lab/flan-alpaca-xl")
41
+ model(prompt, max_length=128, do_sample=True)
42
+
43
+ # Dear AlpacaFriend,
44
+ # My name is Alpaca and I'm 10 years old.
45
+ # I'm excited to announce that I'm a big fan of flan!
46
+ # We like to eat it as a snack and I believe that it can help with our overall growth.
47
+ # I'd love to hear your feedback on this idea.
48
+ # Have a great day!
49
+ # Best, AL Paca
50
+ ```