Teja-Gollapudi commited on
Commit
936181c
1 Parent(s): 8c8f617

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +94 -0
README.md CHANGED
@@ -1,3 +1,97 @@
1
  ---
 
 
 
 
 
 
2
  license: other
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ datasets:
3
+ - tatsu-lab/alpaca
4
+ language:
5
+ - en
6
+ pipeline_tag: text2text-generation
7
+ library_name: transformers
8
  license: other
9
  ---
10
+
11
+
12
+ # Model Details
13
+
14
+ - **Model name:** Flan-UL2-Alpaca-LORA
15
+ - **Model type:** - Text2Text Generation
16
+ - **Parent Model:** [google/flan-ul2](https://huggingface.co/google/flan-ul2)
17
+ - **Training dataset:** [Alpaca](https://huggingface.co/datasets/tatsu-lab/alpaca)
18
+ - **Language:** English
19
+ - **Framework:** PyTorch
20
+ - **Model version:** 1.0
21
+
22
+
23
+ We take the instruction-tuned Flan models (trained on Academic datasets) and perform style transfer using the Alpaca dataset.
24
+
25
+ We fine-tuned the google/flan-ul2 model on the Alpaca datset using [PEFT-LORA](https://huggingface.co/docs/diffusers/main/en/training/lora).
26
+
27
+ # License
28
+ - Parent model ([google/flan-ul2](https://huggingface.co/google/flan-ul2)): Apache 2.0
29
+ - Dataset ([Alpaca](https://huggingface.co/datasets/tatsu-lab/alpaca)) : cc-by-4.0
30
+ - Text-Davinci-3 (Used to generate Alpaca): [OpenAI License](https://openai.com/policies/terms-of-use)
31
+
32
+
33
+
34
+ # How to Use
35
+
36
+ ```
37
+ import torch
38
+ from transformers import pipeline
39
+
40
+ # Chose the model inference precision
41
+ dtype = torch.float16 # options are torch.bfloat16, torch.float32
42
+
43
+ model = pipeline(model="VMware/flan-ul2-alpaca-lora",device_map = 'auto',torch_dtype=dtype )
44
+
45
+ prompt = "YOUR PROMPT HERE"
46
+
47
+ output = model(prompt_template.format(instruction= prompt), max_length=2048, do_sample=True)
48
+
49
+
50
+ ```
51
+
52
+
53
+ Using Alpaca prompt template might generate better outputs for certain prompts as the model was trained using the template.
54
+
55
+ ```
56
+ # Chose the model inference precision
57
+ import torch
58
+ from transformers import pipeline
59
+
60
+ dtype = torch.float16 # options are torch.bfloat16, torch.float32
61
+ model = pipeline(model="VMware/flan-ul2-alpaca-lora",device_map = 'auto',torch_dtype=dtype )
62
+
63
+ prompt_template = "Below is an instruction that describes a task. Write a response that appropriately completes the request.\n\n### Instruction:\n{instruction}\n\n### Response:"
64
+
65
+ prompt = "YOUR PROMPT HERE"
66
+
67
+ output = model(prompt_template.format(instruction= prompt), max_length=2048, do_sample=True)
68
+
69
+
70
+
71
+ ```
72
+
73
+ # Training Details
74
+
75
+ The model was trained on 3xV100 GPUs using PEFT-LORA and Deepspeed
76
+
77
+ * Hyperparameters:
78
+ * learning_rate = 3e-4
79
+ * per_device_batch_size = 2
80
+ * gradient_accumulation_steps = 21
81
+ * epochs = 3
82
+
83
+
84
+ ```
85
+
86
+
87
+
88
+ # Limitations and Bias
89
+
90
+ The model is based on a large and diverse dataset, but it may still have limitations and biases in certain areas. Some limitations include:
91
+
92
+ - Language: The model is designed to work with English text only and may not perform as well in other languages.
93
+
94
+
95
+ In addition, the model may have some bias in terms of the data it was trained on. The dataset includes questions from a variety of sources, but it may not be representative of all populations or perspectives. As a result, the model may perform better or worse for certain types of questions or on certain types of texts.
96
+
97
+ # Contribution