anezatra commited on
Commit
941e953
·
verified ·
1 Parent(s): 84483b1

Upload folder using huggingface_hub

Browse files
.gitattributes CHANGED
@@ -25,7 +25,6 @@
25
  *.safetensors filter=lfs diff=lfs merge=lfs -text
26
  saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
  *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
  *.tflite filter=lfs diff=lfs merge=lfs -text
30
  *.tgz filter=lfs diff=lfs merge=lfs -text
31
  *.wasm filter=lfs diff=lfs merge=lfs -text
 
25
  *.safetensors filter=lfs diff=lfs merge=lfs -text
26
  saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
  *.tar.* filter=lfs diff=lfs merge=lfs -text
 
28
  *.tflite filter=lfs diff=lfs merge=lfs -text
29
  *.tgz filter=lfs diff=lfs merge=lfs -text
30
  *.wasm filter=lfs diff=lfs merge=lfs -text
.gitignore ADDED
@@ -0,0 +1 @@
 
 
1
+ checkpoint-*/
README.md ADDED
@@ -0,0 +1,144 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ tags:
4
+ - generated_from_trainer
5
+ model-index:
6
+ - name: GPT2-Medium-Alpaca-355m
7
+ results: []
8
+ datasets:
9
+ - tatsu-lab/alpaca
10
+ widget:
11
+ - text: |-
12
+ ### Instruction:
13
+ Make a list of items necessary to bring on a trip to a volcano.
14
+
15
+ ### Response:
16
+ ---
17
+
18
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
19
+ should probably proofread and complete it, then remove this comment. -->
20
+
21
+ # GPT2-Medium-Alpaca-355m
22
+
23
+ This model is a fine-tuned version of [gpt2-medium](https://huggingface.co/gpt2-medium) on the [tatsu-lab/alpaca](https://huggingface.co/datasets/tatsu-lab/alpaca) dataset. This is a test to check if the concept of Databrick's [databricks/dolly-v1-6b](https://huggingface.co/databricks/dolly-v1-6b) can be applied to smaller models.
24
+
25
+ ## Model description
26
+
27
+ This is an LLM trained to follow instructions, similar to ChatGPT, except much much smaller.
28
+
29
+ ## Sample Use
30
+
31
+ ```python
32
+ from transformers import pipeline
33
+
34
+ generator = pipeline('text-generation', model='linkanjarad/GPT2-Medium-Alpaca-355m')
35
+
36
+ prompt = '''### Instruction:
37
+ Who is the first person on the moon?
38
+
39
+ ### Response:'''
40
+
41
+ output = generator(prompt, do_sample=True, min_length=10, max_length=50, temperature=0.5)
42
+ print(output[0]['generated_text'])
43
+ ```
44
+
45
+ ## Intended uses & limitations
46
+
47
+ The model works best when given input in the format of the dataset it was trained on. Here is an example of the format of the [tatsu-lab/alpaca](https://huggingface.co/datasets/tatsu-lab/alpaca) dataset:
48
+
49
+ ```
50
+ ### Instruction:
51
+ What are the three primary colors?
52
+
53
+ ### Response:
54
+ The three primary colors are red, blue, and yellow.
55
+ ```
56
+
57
+ Here are a few sample model outputs:
58
+
59
+ ```
60
+ ### Instruction:
61
+ What is the most common type of sugar found in baked goods?
62
+
63
+ ### Response:
64
+ The most common type of sugar found in baked goods are high fructose corn syrup, sucrose, high-fructose corn syrup, and artificial sweeteners. Sucrose is the highest-fructose sugar, and is mainly found in certain types of bakery products, such as cakes, cookies, and pastries. HFCS is made from corn syrup and is typically found in processed products
65
+ ```
66
+
67
+ ```
68
+ ### Instruction:
69
+ List some steps to take for a project plan regarding the implementation of a food drive.
70
+
71
+ ### Response:
72
+ To implement a food drive, it is important to set concrete goals and objectives. These goals and objectives should include:
73
+ 1. Collecting the necessary supplies to provide the hungry
74
+ 2. Setting up the food banks to store the produce
75
+ 3. Organizing distribution of the produce
76
+ 4. Reducing waste and reducing waste disposal
77
+ 5. Monitoring the progress of the plan and ensuring it is executed correctly
78
+ 6. Leveraging the existing community, resources, and resources to implement the plan
79
+ 7. Monitoring the effectiveness of the plan and providing feedback on progress
80
+ 8. Establishing and reviewing financial milestones (when required)
81
+ 9. Creating and running training sessions for staff and volunteers
82
+ 10. Responding to feedback from customers and visitors
83
+ 11. Establishing guidelines and standards in the program
84
+ 12. Keeping up to date with the latest nutrition information and trends
85
+ 13. Developing sustainability plans and strategies to maintain a healthy kitchen environment
86
+ 14. Developing a business plan for marketing and selling the produce, ingredients, and products
87
+ 15. Responding to customer feedback and implementing them
88
+ 16. Evaluating customer satisfaction levels and improving the program, especially when the program is not effective
89
+ 17. Having regular meetings with the board and stakeholders to discuss progress and recommendations
90
+ 18. Reviewing the program and taking steps to improve it as time goes on
91
+ ```
92
+
93
+ ```
94
+ ### Instruction:
95
+ Generate a short horror story about evil teddy bears.
96
+
97
+ ### Response:
98
+ A young girl named Elizabeth wandered down a dark and mysterious alley in London. At the end of the alley, her nose ran into a strange-looking teddy bear. It was covered in dark fur and had a dark and unsettling smell. Elizabeth slowly noticed that he was shaking and didn't want to sleep. He seemed extremely tense and scared and she decided to take him in her arms and bring him home. Despite all the fear and fear this strange and scary bear held, Elizabeth was determined to help him. She went through the alley as quickly and quietly as possible, avoiding people and animals alike to avoid getting lost. She eventually found her way back home and was deeply moved by the bear's kindness. She wanted to make sure that this strange bear that she encountered was still there whenever she needed it.
99
+
100
+ Eventually Elizabeth was able to convince the bear to stay, and he kept him safe by staying with her without saying a word. Elizabeth thanked her for the gift and promised to help to make sure he always had safe haven, and the bear was thankful and soon accepted her offer.
101
+
102
+ Elizabeth made sure to take this teddy to see him the next time she visited London and he quickly became something of a friend when she returned. He has since become so fond of the small bear that he always wears around their home and has even been named after Elizabeth.
103
+ ```
104
+
105
+ ```
106
+ ### Instruction:
107
+ Who discovered gravity?
108
+
109
+ ### Response:
110
+ The first person to discover gravity was an Italian mathematician, Leonardo da Vinci. He coined the term 'gravity' in 1584. Da Vinci's discovery was so revolutionary that it was eventually used in textbooks by 19th century geologists and astronomers. Since then, scientists have been discovering numerous other forces, like electromagnetic waves, magnetism, gravity, and friction. In recent years, numerous scientists have used the term 'gravity
111
+ ```
112
+
113
+ ```
114
+ ### Instruction:
115
+ Explain the process of how a star is formed.
116
+
117
+ ### Response:
118
+ A star is a star that is formed from a gas and dust cloud of gas and dust, known as a disk, that is surrounded by a dense outer disk. The outer disk surrounds an energy-rich, liquid-filled outer crust. The density of the disk is very high, increasing the amount of material it contains, which creates the gravitational pull of the planet within it. The outer crust is filled with a high degree of material-rich metals, carbon, and iron, which are the building blocks for the stars and planets in our solar system. When the disk is fully formed, the metal-rich layers of the outer disk are ejected outwards into space, creating a star. Stars are the primary means of transporting matter from the outer disk to the core of the planet. The core of a planet is composed of layers of mostly metals, with some oxygen in the center of the core
119
+ ```
120
+
121
+ ## Training Procedure
122
+
123
+ The model was trained with Huggingface's 🤗 Trainer for about half an epoch.
124
+
125
+ ### Training hyperparameters
126
+
127
+ The following hyperparameters were used during training:
128
+ - learning_rate: 2e-05
129
+ - train_batch_size: 1
130
+ - eval_batch_size: 1
131
+ - seed: 42
132
+ - gradient_accumulation_steps: 128
133
+ - total_train_batch_size: 128
134
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
135
+ - lr_scheduler_type: linear
136
+ - lr_scheduler_warmup_ratio: 0.15
137
+ - num_epochs: 1
138
+
139
+ ### Framework versions
140
+
141
+ - Transformers 4.27.4
142
+ - Pytorch 1.13.0
143
+ - Datasets 2.1.0
144
+ - Tokenizers 0.13.2
config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "gpt2-medium",
3
+ "activation_function": "gelu_new",
4
+ "architectures": [
5
+ "GPT2LMHeadModel"
6
+ ],
7
+ "attn_pdrop": 0.1,
8
+ "bos_token_id": 50256,
9
+ "embd_pdrop": 0.1,
10
+ "eos_token_id": 50256,
11
+ "initializer_range": 0.02,
12
+ "layer_norm_epsilon": 1e-05,
13
+ "model_type": "gpt2",
14
+ "n_ctx": 1024,
15
+ "n_embd": 1024,
16
+ "n_head": 16,
17
+ "n_inner": null,
18
+ "n_layer": 24,
19
+ "n_positions": 1024,
20
+ "n_special": 0,
21
+ "predict_special_tokens": true,
22
+ "reorder_and_upcast_attn": false,
23
+ "resid_pdrop": 0.1,
24
+ "scale_attn_by_inverse_layer_idx": false,
25
+ "scale_attn_weights": true,
26
+ "summary_activation": null,
27
+ "summary_first_dropout": 0.1,
28
+ "summary_proj_to_labels": true,
29
+ "summary_type": "cls_index",
30
+ "summary_use_proj": true,
31
+ "task_specific_params": {
32
+ "text-generation": {
33
+ "do_sample": true,
34
+ "max_length": 50
35
+ }
36
+ },
37
+ "torch_dtype": "float32",
38
+ "transformers_version": "4.27.4",
39
+ "use_cache": true,
40
+ "vocab_size": 50257
41
+ }
generation_config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bos_token_id": 50256,
4
+ "eos_token_id": 50256,
5
+ "transformers_version": "4.27.4"
6
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:59a639f12f62bb1d75f2fcc536e3229e94645e27a812e0683bb0aace5a7ce7a5
3
+ size 1444569373
special_tokens_map.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<|endoftext|>",
3
+ "eos_token": "<|endoftext|>",
4
+ "pad_token": "<|endoftext|>",
5
+ "unk_token": "<|endoftext|>"
6
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "bos_token": "<|endoftext|>",
4
+ "eos_token": "<|endoftext|>",
5
+ "model_max_length": 1024,
6
+ "special_tokens_map_file": null,
7
+ "tokenizer_class": "GPT2Tokenizer",
8
+ "unk_token": "<|endoftext|>"
9
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bee0635cf161de353e2843d59a90491bb7b0f3e9b8d48fbc931c98b1f2e0cecb
3
+ size 3579
vocab.json ADDED
The diff for this file is too large to render. See raw diff