Text2Text Generation
60 languages
ybelkada commited on
Commit
0d5c580
1 Parent(s): 585e4e8

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +133 -0
README.md ADDED
@@ -0,0 +1,133 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - sp
5
+ - ja
6
+ - pe
7
+ - hi
8
+ - fr
9
+ - ch
10
+ - be
11
+ - gu
12
+ - ge
13
+ - te
14
+ - it
15
+ - ar
16
+ - po
17
+ - ta
18
+ - ma
19
+ - ma
20
+ - or
21
+ - pa
22
+ - po
23
+ - ur
24
+ - ga
25
+ - he
26
+ - ko
27
+ - ca
28
+ - th
29
+ - du
30
+ - in
31
+ - vi
32
+ - bu
33
+ - fi
34
+ - ce
35
+ - la
36
+ - tu
37
+ - ru
38
+ - cr
39
+ - sw
40
+ - yo
41
+ - ku
42
+ - bu
43
+ - ma
44
+ - cz
45
+ - fi
46
+ - so
47
+ - ta
48
+ - sw
49
+ - si
50
+ - ka
51
+ - zh
52
+ - ig
53
+ - xh
54
+ - ro
55
+ - ha
56
+ - es
57
+ - sl
58
+ - li
59
+ - gr
60
+ - ne
61
+ - as
62
+ - no
63
+
64
+ widget:
65
+ - text: "Translate to German: My name is Arthur"
66
+ example_title: "Translation"
67
+ - text: "Please answer to the following question. Who is going to be the next Ballon d'or?"
68
+ example_title: "Question Answering"
69
+ - text: "Q: Can Geoffrey Hinton have a conversation with George Washington? Give the rationale before answering."
70
+ example_title: "Logical reasoning"
71
+ - text: "Please answer the following question. What is the boiling point of Nitrogen?"
72
+ example_title: "Scientific knowledge"
73
+ - text: "Answer the following yes/no question. Can you write a whole Haiku in a single tweet?"
74
+ example_title: "Yes/no question"
75
+ - text: "Answer the following yes/no question by reasoning step-by-step. Can you write a whole Haiku in a single tweet?"
76
+ example_title: "Reasoning task"
77
+ - text: "Q: ( False or not False or False ) is? A: Let's think step by step"
78
+ example_title: "Boolean Expressions"
79
+ - text: "The square root of x is the cube root of y. What is y to the power of 2, if x = 4?"
80
+ example_title: "Math reasoning"
81
+ - text: "Premise: At my age you will probably have learnt one lesson. Hypothesis: It's not certain how many lessons you'll learn by your thirties. Does the premise entail the hypothesis?"
82
+ example_title: "Premise and hypothesis"
83
+
84
+ tags:
85
+ - text2text-generation
86
+
87
+ datasets:
88
+ - svakulenk0/qrecc
89
+ - taskmaster2
90
+ - djaym7/wiki_dialog
91
+ - deepmind/code_contests
92
+ - lambada
93
+ - gsm8k
94
+ - aqua_rat
95
+ - esnli
96
+ - quasc
97
+ - qed
98
+
99
+
100
+ license: apache-2.0
101
+ ---
102
+
103
+ # Model Card for LoRA-FLAN-T5 large
104
+
105
+ ![model image](https://s3.amazonaws.com/moonup/production/uploads/1666363435475-62441d1d9fdefb55a0b7d12c.png)
106
+
107
+ This repository contains the LoRA (Low Rank Adapters) of `flan-t5-large` that has been fine-tuned on [`financial_phrasebank`](https://huggingface.co/datasets/financial_phrasebank) dataset.
108
+
109
+ ## Usage
110
+
111
+ Use this adapter with `peft` library
112
+
113
+ ```python
114
+ # pip install peft transformers
115
+ import torch
116
+ from peft import PeftModel, PeftConfig
117
+ from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
118
+
119
+ peft_model_id = "ybelkada/flan-t5-large-financial-phrasebank-lora"
120
+ config = PeftConfig.from_pretrained(peft_model_id)
121
+
122
+ model = AutoModelForSeq2SeqLM.from_pretrained(
123
+ config.base_model_name_or_path,
124
+ torch_dtype='auto',
125
+ device_map='auto'
126
+ )
127
+ tokenizer = AutoTokenizer.from_pretrained(config.base_model_name_or_path)
128
+
129
+ # Load the Lora model
130
+ model = PeftModel.from_pretrained(model, peft_model_id)
131
+ ```
132
+
133
+ Enjoy!