abideen commited on
Commit
8798db2
1 Parent(s): 41d702a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +160 -148
README.md CHANGED
@@ -1,178 +1,190 @@
1
  ---
2
- license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
4
 
5
- # Model Card for Model ID
6
 
7
- <!-- Provide a quick summary of what the model is/does. -->
8
 
9
 
 
10
 
11
- ## Model Details
 
12
 
13
- ### Model Description
14
 
15
- <!-- Provide a longer summary of what this model is. -->
 
16
 
17
- This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
18
 
19
- - **Developed by:** [More Information Needed]
20
- - **Funded by [optional]:** [More Information Needed]
21
- - **Shared by [optional]:** [More Information Needed]
22
- - **Model type:** [More Information Needed]
23
- - **Language(s) (NLP):** [More Information Needed]
24
- - **License:** [More Information Needed]
25
- - **Finetuned from model [optional]:** [More Information Needed]
26
 
27
- ### Model Sources [optional]
28
 
29
- <!-- Provide the basic links for the model. -->
 
30
 
31
- - **Repository:** [More Information Needed]
32
- - **Paper [optional]:** [More Information Needed]
33
- - **Demo [optional]:** [More Information Needed]
34
 
35
- ## Uses
 
 
 
36
 
37
- <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
 
38
 
39
- ### Direct Use
 
 
 
 
 
40
 
41
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
 
 
42
 
43
- [More Information Needed]
44
 
45
- ### Downstream Use [optional]
 
 
 
 
 
 
 
 
 
 
 
46
 
47
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
48
 
49
- [More Information Needed]
 
 
50
 
51
- ### Out-of-Scope Use
 
 
 
 
 
 
 
 
 
 
52
 
53
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
54
 
55
- [More Information Needed]
56
 
57
- ## Bias, Risks, and Limitations
 
 
 
 
58
 
59
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
 
 
60
 
61
- [More Information Needed]
 
 
 
 
 
 
 
 
62
 
63
- ### Recommendations
 
64
 
65
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
66
-
67
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
68
-
69
- ## How to Get Started with the Model
70
-
71
- Use the code below to get started with the model.
72
-
73
- [More Information Needed]
74
-
75
- ## Training Details
76
-
77
- ### Training Data
78
-
79
- <!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
80
-
81
- [More Information Needed]
82
-
83
- ### Training Procedure
84
-
85
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
86
-
87
- #### Preprocessing [optional]
88
-
89
- [More Information Needed]
90
-
91
-
92
- #### Training Hyperparameters
93
-
94
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
95
-
96
- #### Speeds, Sizes, Times [optional]
97
-
98
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
99
-
100
- [More Information Needed]
101
-
102
- ## Evaluation
103
-
104
- <!-- This section describes the evaluation protocols and provides the results. -->
105
-
106
- ### Testing Data, Factors & Metrics
107
-
108
- #### Testing Data
109
-
110
- <!-- This should link to a Dataset Card if possible. -->
111
-
112
- [More Information Needed]
113
-
114
- #### Factors
115
-
116
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
117
-
118
- [More Information Needed]
119
-
120
- #### Metrics
121
-
122
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
123
-
124
- [More Information Needed]
125
-
126
- ### Results
127
-
128
- [More Information Needed]
129
-
130
- #### Summary
131
-
132
-
133
-
134
- ## Model Examination [optional]
135
-
136
- <!-- Relevant interpretability work for the model goes here -->
137
-
138
- [More Information Needed]
139
-
140
- ## Environmental Impact
141
-
142
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
143
-
144
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
145
-
146
- - **Hardware Type:** [More Information Needed]
147
- - **Hours used:** [More Information Needed]
148
- - **Cloud Provider:** [More Information Needed]
149
- - **Compute Region:** [More Information Needed]
150
- - **Carbon Emitted:** [More Information Needed]
151
-
152
- ## Technical Specifications [optional]
153
-
154
- ### Model Architecture and Objective
155
-
156
- [More Information Needed]
157
-
158
- ### Compute Infrastructure
159
-
160
- [More Information Needed]
161
-
162
- #### Hardware
163
-
164
- [More Information Needed]
165
-
166
- #### Software
167
-
168
- [More Information Needed]
169
-
170
- ## Citation [optional]
171
-
172
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
173
-
174
- **BibTeX:**
175
-
176
- [More Information Needed]
177
-
178
- **APA:**
 
1
  ---
2
+ license: cc-by-nc-4.0
3
+ base_model: google/gemma-7b-it
4
+ tags:
5
+ - generated_from_trainer
6
+ - axolotl
7
+ - gemma
8
+ - instruct
9
+ - finetune
10
+ - chatml
11
+ - gpt4
12
+ - synthetic data
13
+ - distillation
14
+ model-index:
15
+ - name: gemma-7b-openhermes
16
+ results: []
17
+ datasets:
18
+ - mlabonne/chatml-OpenHermes2.5-dpo-binarized-alpha
19
+ language:
20
+ - en
21
+ library_name: transformers
22
+ pipeline_tag: text-generation
23
  ---
24
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
25
+ should probably proofread and complete it, then remove this comment. -->
26
 
27
+ # gemma-7b-openhermes
28
 
 
29
 
30
 
31
+ ![image/jpeg](https://cdn-uploads.huggingface.co/production/uploads/64e380b2e12618b261fa6ba0/mh-NUO_aNbQpD_NAuFv7g.jpeg)
32
 
33
+ gemma-7b-openhermes is a variant of the Gemma 7B language model, which has been further fine-tuned on the OpenHermes-2.5 preference dataset
34
+ using QLoRA.
35
 
 
36
 
37
+ * [google/gemma-7b-it](https://huggingface.co/google/gemma-7b-it)
38
+ * [mlabonne/chatml-OpenHermes2.5-dpo-binarized-alpha](https://huggingface.co/datasets/mlabonne/chatml-OpenHermes2.5-dpo-binarized-alpha)
39
 
40
+ </details><br>
41
 
42
+ ## Usage
 
 
 
 
 
 
43
 
44
+ ### Chat Template
45
 
46
+ The instruction-tuned models use a chat template that must be adhered to for conversational use.
47
+ The easiest way to apply it is using the tokenizer's built-in chat template, as shown in the following snippet.
48
 
49
+ Let's load the model and apply the chat template to a conversation. In this example, we'll start with a single user interaction:
 
 
50
 
51
+ ```py
52
+ from transformers import AutoTokenizer, AutoModelForCausalLM
53
+ import transformers
54
+ import torch
55
 
56
+ model_id = "abideen/gemma-7b-openhermes"
57
+ dtype = torch.bfloat16
58
 
59
+ tokenizer = AutoTokenizer.from_pretrained(model_id)
60
+ model = AutoModelForCausalLM.from_pretrained(
61
+ model_id,
62
+ device_map="cuda",
63
+ torch_dtype=dtype,
64
+ )
65
 
66
+ chat = [{ "role": "user", "content": "What is a Language Model?" }]
67
+ prompt = tokenizer.apply_chat_template(chat, tokenize=False, add_generation_prompt=True)
68
+ ```
69
 
70
+ After the prompt is ready, generation can be performed like this:
71
 
72
+ ```py
73
+ inputs = tokenizer.encode(prompt, add_special_tokens=True, return_tensors="pt")
74
+ outputs = model.generate(input_ids=inputs.to(model.device), max_new_tokens=250)
75
+ print(tokenizer.decode(outputs[0]))
76
+ ```
77
+
78
+ ### Inputs and outputs
79
+
80
+ * **Input:** Text string, such as a question, a prompt, or a document to be
81
+ summarized.
82
+ * **Output:** Generated English-language text in response to the input, such
83
+ as an answer to a question, or a summary of a document.
84
 
85
+ ## Evaluation data
86
 
87
+ 🏆 Evals coming soon.
88
+
89
+ ### Training hyperparameters
90
 
91
+ The following hyperparameters were used during training:
92
+ - learning_rate: 5e-07
93
+ - train_batch_size: 1
94
+ - eval_batch_size: 8
95
+ - seed: 42
96
+ - gradient_accumulation_steps: 8
97
+ - total_train_batch_size: 8
98
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
99
+ - lr_scheduler_type: cosine
100
+ - lr_scheduler_warmup_steps: 100
101
+ - training_steps: 1000
102
 
 
103
 
104
+ ### 📝 Axolotl Configuration
105
 
106
+ ```yaml
107
+ base_model: google/gemma-7b-it
108
+ model_type: GemmaForCausalLM
109
+ tokenizer_type: GemmaTokenizer
110
+ trust_remote_code: true
111
 
112
+ load_in_8bit: false
113
+ load_in_4bit: true
114
+ strict: false
115
 
116
+ rl: dpo
117
+ chat_template: chatml
118
+ datasets:
119
+ - path: mlabonne/chatml-OpenHermes2.5-dpo-binarized-alpha
120
+ split: train
121
+ type: chatml.intel
122
+ dataset_prepared_path:
123
+ val_set_size: 0.01
124
+ output_dir: ./out
125
 
126
+ adapter: qlora
127
+ lora_model_dir:
128
 
129
+ sequence_len: 1800
130
+ sample_packing: false
131
+ pad_to_sequence_len: false
132
+
133
+ lora_r: 16
134
+ lora_alpha: 16
135
+ lora_dropout: 0.05
136
+ lora_target_linear: true
137
+ lora_fan_in_fan_out:
138
+ lora_target_modules:
139
+
140
+ wandb_project: gemma
141
+ wandb_entity:
142
+ wandb_watch:
143
+ wandb_name:
144
+ wandb_log_model:
145
+
146
+ gradient_accumulation_steps: 8
147
+ micro_batch_size: 1
148
+ num_epochs: 1
149
+ optimizer: paged_adamw_32bit
150
+ lr_scheduler: cosine
151
+ learning_rate: 5e-7
152
+
153
+ train_on_inputs: false
154
+ group_by_length: false
155
+ bf16: true
156
+ fp16: false
157
+ tf32: true
158
+
159
+ gradient_checkpointing: true
160
+ early_stopping_patience:
161
+ resume_from_checkpoint:
162
+ local_rank:
163
+ logging_steps: 1
164
+ xformers_attention:
165
+ flash_attention: false
166
+
167
+ warmup_steps: 100
168
+ evals_per_epoch: 1
169
+ eval_table_size:
170
+ eval_table_max_new_tokens: 128
171
+ save_steps: 1000
172
+ max_steps: 1000
173
+ debug:
174
+ deepspeed:
175
+ weight_decay: 0.0
176
+ fsdp:
177
+ fsdp_config:
178
+ special_tokens:
179
+ ```
180
+
181
+
182
+ ### Framework versions
183
+
184
+ - Transformers 4.39.0.dev0
185
+ - Pytorch 2.1.2+cu118
186
+ - Datasets 2.17.0
187
+ - Tokenizers 0.15.0
188
+ - axolotl: 0.4.0
189
+
190
+ [<img src="https://raw.githubusercontent.com/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)