Upload folder using huggingface_hub
Browse files- README.md +40 -0
- adapter_config.json +32 -0
- adapter_model.safetensors +3 -0
- added_tokens.json +4 -0
- checkpoint-500/README.md +204 -0
- checkpoint-500/adapter_config.json +32 -0
- checkpoint-500/adapter_model.safetensors +3 -0
- checkpoint-500/added_tokens.json +4 -0
- checkpoint-500/optimizer.pt +3 -0
- checkpoint-500/rng_state.pth +3 -0
- checkpoint-500/scheduler.pt +3 -0
- checkpoint-500/special_tokens_map.json +30 -0
- checkpoint-500/tokenizer.json +0 -0
- checkpoint-500/tokenizer.model +3 -0
- checkpoint-500/tokenizer_config.json +62 -0
- checkpoint-500/trainer_state.json +406 -0
- checkpoint-500/training_args.bin +3 -0
- handler.py +32 -0
- requirements.txt +2 -0
- runs/Feb25_12-28-14_r-codesagar-prompt-guard-bw3akjco-f5b5d-3guve/events.out.tfevents.1708864095.r-codesagar-prompt-guard-bw3akjco-f5b5d-3guve.97.0 +3 -0
- special_tokens_map.json +30 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +62 -0
- training_args.bin +3 -0
- training_params.json +47 -0
README.md
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
tags:
|
3 |
+
- autotrain
|
4 |
+
- text-generation
|
5 |
+
widget:
|
6 |
+
- text: "I love AutoTrain because "
|
7 |
+
license: other
|
8 |
+
---
|
9 |
+
|
10 |
+
# Model Trained Using AutoTrain
|
11 |
+
|
12 |
+
This model was trained using AutoTrain. For more information, please visit [AutoTrain](https://hf.co/docs/autotrain).
|
13 |
+
|
14 |
+
# Usage
|
15 |
+
|
16 |
+
```python
|
17 |
+
|
18 |
+
from transformers import AutoModelForCausalLM, AutoTokenizer
|
19 |
+
|
20 |
+
model_path = "PATH_TO_THIS_REPO"
|
21 |
+
|
22 |
+
tokenizer = AutoTokenizer.from_pretrained(model_path)
|
23 |
+
model = AutoModelForCausalLM.from_pretrained(
|
24 |
+
model_path,
|
25 |
+
device_map="auto",
|
26 |
+
torch_dtype='auto'
|
27 |
+
).eval()
|
28 |
+
|
29 |
+
# Prompt content: "hi"
|
30 |
+
messages = [
|
31 |
+
{"role": "user", "content": "hi"}
|
32 |
+
]
|
33 |
+
|
34 |
+
input_ids = tokenizer.apply_chat_template(conversation=messages, tokenize=True, add_generation_prompt=True, return_tensors='pt')
|
35 |
+
output_ids = model.generate(input_ids.to('cuda'))
|
36 |
+
response = tokenizer.decode(output_ids[0][input_ids.shape[1]:], skip_special_tokens=True)
|
37 |
+
|
38 |
+
# Model response: "Hello! How can I assist you today?"
|
39 |
+
print(response)
|
40 |
+
```
|
adapter_config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"alpha_pattern": {},
|
3 |
+
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "cognitivecomputations/dolphin-2.2.1-mistral-7b",
|
5 |
+
"bias": "none",
|
6 |
+
"fan_in_fan_out": false,
|
7 |
+
"inference_mode": true,
|
8 |
+
"init_lora_weights": true,
|
9 |
+
"layers_pattern": null,
|
10 |
+
"layers_to_transform": null,
|
11 |
+
"loftq_config": {},
|
12 |
+
"lora_alpha": 32,
|
13 |
+
"lora_dropout": 0.05,
|
14 |
+
"megatron_config": null,
|
15 |
+
"megatron_core": "megatron.core",
|
16 |
+
"modules_to_save": null,
|
17 |
+
"peft_type": "LORA",
|
18 |
+
"r": 16,
|
19 |
+
"rank_pattern": {},
|
20 |
+
"revision": null,
|
21 |
+
"target_modules": [
|
22 |
+
"gate_proj",
|
23 |
+
"down_proj",
|
24 |
+
"o_proj",
|
25 |
+
"q_proj",
|
26 |
+
"up_proj",
|
27 |
+
"k_proj",
|
28 |
+
"v_proj"
|
29 |
+
],
|
30 |
+
"task_type": "CAUSAL_LM",
|
31 |
+
"use_rslora": false
|
32 |
+
}
|
adapter_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b6862dc5a93fdc6ea05550dd6e472a5bf43bc6f83a650d029e31a148fa9480b9
|
3 |
+
size 167832240
|
added_tokens.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"<|im_end|>": 32000,
|
3 |
+
"<|im_start|>": 32001
|
4 |
+
}
|
checkpoint-500/README.md
ADDED
@@ -0,0 +1,204 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
library_name: peft
|
3 |
+
base_model: cognitivecomputations/dolphin-2.2.1-mistral-7b
|
4 |
+
---
|
5 |
+
|
6 |
+
# Model Card for Model ID
|
7 |
+
|
8 |
+
<!-- Provide a quick summary of what the model is/does. -->
|
9 |
+
|
10 |
+
|
11 |
+
|
12 |
+
## Model Details
|
13 |
+
|
14 |
+
### Model Description
|
15 |
+
|
16 |
+
<!-- Provide a longer summary of what this model is. -->
|
17 |
+
|
18 |
+
|
19 |
+
|
20 |
+
- **Developed by:** [More Information Needed]
|
21 |
+
- **Funded by [optional]:** [More Information Needed]
|
22 |
+
- **Shared by [optional]:** [More Information Needed]
|
23 |
+
- **Model type:** [More Information Needed]
|
24 |
+
- **Language(s) (NLP):** [More Information Needed]
|
25 |
+
- **License:** [More Information Needed]
|
26 |
+
- **Finetuned from model [optional]:** [More Information Needed]
|
27 |
+
|
28 |
+
### Model Sources [optional]
|
29 |
+
|
30 |
+
<!-- Provide the basic links for the model. -->
|
31 |
+
|
32 |
+
- **Repository:** [More Information Needed]
|
33 |
+
- **Paper [optional]:** [More Information Needed]
|
34 |
+
- **Demo [optional]:** [More Information Needed]
|
35 |
+
|
36 |
+
## Uses
|
37 |
+
|
38 |
+
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
|
39 |
+
|
40 |
+
### Direct Use
|
41 |
+
|
42 |
+
<!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
|
43 |
+
|
44 |
+
[More Information Needed]
|
45 |
+
|
46 |
+
### Downstream Use [optional]
|
47 |
+
|
48 |
+
<!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
|
49 |
+
|
50 |
+
[More Information Needed]
|
51 |
+
|
52 |
+
### Out-of-Scope Use
|
53 |
+
|
54 |
+
<!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
|
55 |
+
|
56 |
+
[More Information Needed]
|
57 |
+
|
58 |
+
## Bias, Risks, and Limitations
|
59 |
+
|
60 |
+
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
61 |
+
|
62 |
+
[More Information Needed]
|
63 |
+
|
64 |
+
### Recommendations
|
65 |
+
|
66 |
+
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
67 |
+
|
68 |
+
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
69 |
+
|
70 |
+
## How to Get Started with the Model
|
71 |
+
|
72 |
+
Use the code below to get started with the model.
|
73 |
+
|
74 |
+
[More Information Needed]
|
75 |
+
|
76 |
+
## Training Details
|
77 |
+
|
78 |
+
### Training Data
|
79 |
+
|
80 |
+
<!-- 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. -->
|
81 |
+
|
82 |
+
[More Information Needed]
|
83 |
+
|
84 |
+
### Training Procedure
|
85 |
+
|
86 |
+
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
87 |
+
|
88 |
+
#### Preprocessing [optional]
|
89 |
+
|
90 |
+
[More Information Needed]
|
91 |
+
|
92 |
+
|
93 |
+
#### Training Hyperparameters
|
94 |
+
|
95 |
+
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
96 |
+
|
97 |
+
#### Speeds, Sizes, Times [optional]
|
98 |
+
|
99 |
+
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
100 |
+
|
101 |
+
[More Information Needed]
|
102 |
+
|
103 |
+
## Evaluation
|
104 |
+
|
105 |
+
<!-- This section describes the evaluation protocols and provides the results. -->
|
106 |
+
|
107 |
+
### Testing Data, Factors & Metrics
|
108 |
+
|
109 |
+
#### Testing Data
|
110 |
+
|
111 |
+
<!-- This should link to a Dataset Card if possible. -->
|
112 |
+
|
113 |
+
[More Information Needed]
|
114 |
+
|
115 |
+
#### Factors
|
116 |
+
|
117 |
+
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
118 |
+
|
119 |
+
[More Information Needed]
|
120 |
+
|
121 |
+
#### Metrics
|
122 |
+
|
123 |
+
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
124 |
+
|
125 |
+
[More Information Needed]
|
126 |
+
|
127 |
+
### Results
|
128 |
+
|
129 |
+
[More Information Needed]
|
130 |
+
|
131 |
+
#### Summary
|
132 |
+
|
133 |
+
|
134 |
+
|
135 |
+
## Model Examination [optional]
|
136 |
+
|
137 |
+
<!-- Relevant interpretability work for the model goes here -->
|
138 |
+
|
139 |
+
[More Information Needed]
|
140 |
+
|
141 |
+
## Environmental Impact
|
142 |
+
|
143 |
+
<!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
|
144 |
+
|
145 |
+
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).
|
146 |
+
|
147 |
+
- **Hardware Type:** [More Information Needed]
|
148 |
+
- **Hours used:** [More Information Needed]
|
149 |
+
- **Cloud Provider:** [More Information Needed]
|
150 |
+
- **Compute Region:** [More Information Needed]
|
151 |
+
- **Carbon Emitted:** [More Information Needed]
|
152 |
+
|
153 |
+
## Technical Specifications [optional]
|
154 |
+
|
155 |
+
### Model Architecture and Objective
|
156 |
+
|
157 |
+
[More Information Needed]
|
158 |
+
|
159 |
+
### Compute Infrastructure
|
160 |
+
|
161 |
+
[More Information Needed]
|
162 |
+
|
163 |
+
#### Hardware
|
164 |
+
|
165 |
+
[More Information Needed]
|
166 |
+
|
167 |
+
#### Software
|
168 |
+
|
169 |
+
[More Information Needed]
|
170 |
+
|
171 |
+
## Citation [optional]
|
172 |
+
|
173 |
+
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
174 |
+
|
175 |
+
**BibTeX:**
|
176 |
+
|
177 |
+
[More Information Needed]
|
178 |
+
|
179 |
+
**APA:**
|
180 |
+
|
181 |
+
[More Information Needed]
|
182 |
+
|
183 |
+
## Glossary [optional]
|
184 |
+
|
185 |
+
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
186 |
+
|
187 |
+
[More Information Needed]
|
188 |
+
|
189 |
+
## More Information [optional]
|
190 |
+
|
191 |
+
[More Information Needed]
|
192 |
+
|
193 |
+
## Model Card Authors [optional]
|
194 |
+
|
195 |
+
[More Information Needed]
|
196 |
+
|
197 |
+
## Model Card Contact
|
198 |
+
|
199 |
+
[More Information Needed]
|
200 |
+
|
201 |
+
|
202 |
+
### Framework versions
|
203 |
+
|
204 |
+
- PEFT 0.8.2
|
checkpoint-500/adapter_config.json
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"alpha_pattern": {},
|
3 |
+
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "cognitivecomputations/dolphin-2.2.1-mistral-7b",
|
5 |
+
"bias": "none",
|
6 |
+
"fan_in_fan_out": false,
|
7 |
+
"inference_mode": true,
|
8 |
+
"init_lora_weights": true,
|
9 |
+
"layers_pattern": null,
|
10 |
+
"layers_to_transform": null,
|
11 |
+
"loftq_config": {},
|
12 |
+
"lora_alpha": 32,
|
13 |
+
"lora_dropout": 0.05,
|
14 |
+
"megatron_config": null,
|
15 |
+
"megatron_core": "megatron.core",
|
16 |
+
"modules_to_save": null,
|
17 |
+
"peft_type": "LORA",
|
18 |
+
"r": 16,
|
19 |
+
"rank_pattern": {},
|
20 |
+
"revision": null,
|
21 |
+
"target_modules": [
|
22 |
+
"gate_proj",
|
23 |
+
"down_proj",
|
24 |
+
"o_proj",
|
25 |
+
"q_proj",
|
26 |
+
"up_proj",
|
27 |
+
"k_proj",
|
28 |
+
"v_proj"
|
29 |
+
],
|
30 |
+
"task_type": "CAUSAL_LM",
|
31 |
+
"use_rslora": false
|
32 |
+
}
|
checkpoint-500/adapter_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b6862dc5a93fdc6ea05550dd6e472a5bf43bc6f83a650d029e31a148fa9480b9
|
3 |
+
size 167832240
|
checkpoint-500/added_tokens.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"<|im_end|>": 32000,
|
3 |
+
"<|im_start|>": 32001
|
4 |
+
}
|
checkpoint-500/optimizer.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:597ba2e5971b143dbf61112508296f7bc199f04fc1ad6310b7986b6c40b24eb0
|
3 |
+
size 335922386
|
checkpoint-500/rng_state.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b6b55a2b068303a7e41a49339999351c52e3e90488edc2f0a4cca65fa9e1368e
|
3 |
+
size 14244
|
checkpoint-500/scheduler.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:38232a22bfcd3f3c254ba824b2144254da8ba209642f840adbaf0b8a0079b16d
|
3 |
+
size 1064
|
checkpoint-500/special_tokens_map.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "<|im_end|>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"unk_token": {
|
24 |
+
"content": "<unk>",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
}
|
30 |
+
}
|
checkpoint-500/tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
checkpoint-500/tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
|
3 |
+
size 493443
|
checkpoint-500/tokenizer_config.json
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"add_prefix_space": true,
|
5 |
+
"added_tokens_decoder": {
|
6 |
+
"0": {
|
7 |
+
"content": "<unk>",
|
8 |
+
"lstrip": false,
|
9 |
+
"normalized": false,
|
10 |
+
"rstrip": false,
|
11 |
+
"single_word": false,
|
12 |
+
"special": true
|
13 |
+
},
|
14 |
+
"1": {
|
15 |
+
"content": "<s>",
|
16 |
+
"lstrip": false,
|
17 |
+
"normalized": false,
|
18 |
+
"rstrip": false,
|
19 |
+
"single_word": false,
|
20 |
+
"special": true
|
21 |
+
},
|
22 |
+
"2": {
|
23 |
+
"content": "</s>",
|
24 |
+
"lstrip": false,
|
25 |
+
"normalized": false,
|
26 |
+
"rstrip": false,
|
27 |
+
"single_word": false,
|
28 |
+
"special": true
|
29 |
+
},
|
30 |
+
"32000": {
|
31 |
+
"content": "<|im_end|>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false,
|
36 |
+
"special": true
|
37 |
+
},
|
38 |
+
"32001": {
|
39 |
+
"content": "<|im_start|>",
|
40 |
+
"lstrip": false,
|
41 |
+
"normalized": false,
|
42 |
+
"rstrip": false,
|
43 |
+
"single_word": false,
|
44 |
+
"special": false
|
45 |
+
}
|
46 |
+
},
|
47 |
+
"additional_special_tokens": [],
|
48 |
+
"bos_token": "<s>",
|
49 |
+
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
50 |
+
"clean_up_tokenization_spaces": false,
|
51 |
+
"eos_token": "<|im_end|>",
|
52 |
+
"legacy": true,
|
53 |
+
"model_max_length": 2048,
|
54 |
+
"pad_token": "</s>",
|
55 |
+
"sp_model_kwargs": {},
|
56 |
+
"spaces_between_special_tokens": false,
|
57 |
+
"tokenizer_class": "LlamaTokenizer",
|
58 |
+
"trust_remote_code": false,
|
59 |
+
"unk_token": "<unk>",
|
60 |
+
"use_default_system_prompt": true,
|
61 |
+
"use_fast": true
|
62 |
+
}
|
checkpoint-500/trainer_state.json
ADDED
@@ -0,0 +1,406 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_metric": null,
|
3 |
+
"best_model_checkpoint": null,
|
4 |
+
"epoch": 100.0,
|
5 |
+
"eval_steps": 500,
|
6 |
+
"global_step": 500,
|
7 |
+
"is_hyper_param_search": false,
|
8 |
+
"is_local_process_zero": true,
|
9 |
+
"is_world_process_zero": true,
|
10 |
+
"log_history": [
|
11 |
+
{
|
12 |
+
"epoch": 1.8,
|
13 |
+
"grad_norm": 2.1598100662231445,
|
14 |
+
"learning_rate": 5.399999999999999e-05,
|
15 |
+
"loss": 1.2357,
|
16 |
+
"step": 9
|
17 |
+
},
|
18 |
+
{
|
19 |
+
"epoch": 3.6,
|
20 |
+
"grad_norm": 1.948647379875183,
|
21 |
+
"learning_rate": 0.00010799999999999998,
|
22 |
+
"loss": 0.6636,
|
23 |
+
"step": 18
|
24 |
+
},
|
25 |
+
{
|
26 |
+
"epoch": 5.4,
|
27 |
+
"grad_norm": 1.9161983728408813,
|
28 |
+
"learning_rate": 0.000162,
|
29 |
+
"loss": 0.2845,
|
30 |
+
"step": 27
|
31 |
+
},
|
32 |
+
{
|
33 |
+
"epoch": 7.2,
|
34 |
+
"grad_norm": 0.49437546730041504,
|
35 |
+
"learning_rate": 0.00021599999999999996,
|
36 |
+
"loss": 0.0769,
|
37 |
+
"step": 36
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"epoch": 9.0,
|
41 |
+
"grad_norm": 1.0303442478179932,
|
42 |
+
"learning_rate": 0.000258,
|
43 |
+
"loss": 0.0496,
|
44 |
+
"step": 45
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"epoch": 10.8,
|
48 |
+
"grad_norm": 0.9161431193351746,
|
49 |
+
"learning_rate": 0.00029866666666666664,
|
50 |
+
"loss": 0.0414,
|
51 |
+
"step": 54
|
52 |
+
},
|
53 |
+
{
|
54 |
+
"epoch": 12.6,
|
55 |
+
"grad_norm": 1.0928488969802856,
|
56 |
+
"learning_rate": 0.0002926666666666666,
|
57 |
+
"loss": 0.032,
|
58 |
+
"step": 63
|
59 |
+
},
|
60 |
+
{
|
61 |
+
"epoch": 14.4,
|
62 |
+
"grad_norm": 0.9965436458587646,
|
63 |
+
"learning_rate": 0.0002866666666666667,
|
64 |
+
"loss": 0.0214,
|
65 |
+
"step": 72
|
66 |
+
},
|
67 |
+
{
|
68 |
+
"epoch": 16.2,
|
69 |
+
"grad_norm": 0.3007476329803467,
|
70 |
+
"learning_rate": 0.00028066666666666664,
|
71 |
+
"loss": 0.0322,
|
72 |
+
"step": 81
|
73 |
+
},
|
74 |
+
{
|
75 |
+
"epoch": 18.0,
|
76 |
+
"grad_norm": NaN,
|
77 |
+
"learning_rate": 0.000276,
|
78 |
+
"loss": 0.098,
|
79 |
+
"step": 90
|
80 |
+
},
|
81 |
+
{
|
82 |
+
"epoch": 19.8,
|
83 |
+
"grad_norm": 0.671339750289917,
|
84 |
+
"learning_rate": 0.00027133333333333333,
|
85 |
+
"loss": 0.1021,
|
86 |
+
"step": 99
|
87 |
+
},
|
88 |
+
{
|
89 |
+
"epoch": 21.6,
|
90 |
+
"grad_norm": 0.4084804952144623,
|
91 |
+
"learning_rate": 0.0002653333333333333,
|
92 |
+
"loss": 0.0119,
|
93 |
+
"step": 108
|
94 |
+
},
|
95 |
+
{
|
96 |
+
"epoch": 23.4,
|
97 |
+
"grad_norm": 0.37794339656829834,
|
98 |
+
"learning_rate": 0.0002593333333333333,
|
99 |
+
"loss": 0.0127,
|
100 |
+
"step": 117
|
101 |
+
},
|
102 |
+
{
|
103 |
+
"epoch": 25.2,
|
104 |
+
"grad_norm": 0.38235852122306824,
|
105 |
+
"learning_rate": 0.00025333333333333333,
|
106 |
+
"loss": 0.0123,
|
107 |
+
"step": 126
|
108 |
+
},
|
109 |
+
{
|
110 |
+
"epoch": 27.0,
|
111 |
+
"grad_norm": 0.390073299407959,
|
112 |
+
"learning_rate": 0.0002473333333333333,
|
113 |
+
"loss": 0.0045,
|
114 |
+
"step": 135
|
115 |
+
},
|
116 |
+
{
|
117 |
+
"epoch": 28.8,
|
118 |
+
"grad_norm": 0.4367002844810486,
|
119 |
+
"learning_rate": 0.0002413333333333333,
|
120 |
+
"loss": 0.0063,
|
121 |
+
"step": 144
|
122 |
+
},
|
123 |
+
{
|
124 |
+
"epoch": 30.6,
|
125 |
+
"grad_norm": 0.42980659008026123,
|
126 |
+
"learning_rate": 0.00023533333333333333,
|
127 |
+
"loss": 0.0049,
|
128 |
+
"step": 153
|
129 |
+
},
|
130 |
+
{
|
131 |
+
"epoch": 32.4,
|
132 |
+
"grad_norm": 0.20197640359401703,
|
133 |
+
"learning_rate": 0.00022933333333333332,
|
134 |
+
"loss": 0.0068,
|
135 |
+
"step": 162
|
136 |
+
},
|
137 |
+
{
|
138 |
+
"epoch": 34.2,
|
139 |
+
"grad_norm": 0.07533933967351913,
|
140 |
+
"learning_rate": 0.00022333333333333333,
|
141 |
+
"loss": 0.004,
|
142 |
+
"step": 171
|
143 |
+
},
|
144 |
+
{
|
145 |
+
"epoch": 36.0,
|
146 |
+
"grad_norm": 0.0386396124958992,
|
147 |
+
"learning_rate": 0.00021733333333333332,
|
148 |
+
"loss": 0.0037,
|
149 |
+
"step": 180
|
150 |
+
},
|
151 |
+
{
|
152 |
+
"epoch": 37.8,
|
153 |
+
"grad_norm": 0.0207373034209013,
|
154 |
+
"learning_rate": 0.0002113333333333333,
|
155 |
+
"loss": 0.0018,
|
156 |
+
"step": 189
|
157 |
+
},
|
158 |
+
{
|
159 |
+
"epoch": 39.6,
|
160 |
+
"grad_norm": 0.06749772280454636,
|
161 |
+
"learning_rate": 0.0002053333333333333,
|
162 |
+
"loss": 0.0006,
|
163 |
+
"step": 198
|
164 |
+
},
|
165 |
+
{
|
166 |
+
"epoch": 41.4,
|
167 |
+
"grad_norm": 0.010618847794830799,
|
168 |
+
"learning_rate": 0.0001993333333333333,
|
169 |
+
"loss": 0.0003,
|
170 |
+
"step": 207
|
171 |
+
},
|
172 |
+
{
|
173 |
+
"epoch": 43.2,
|
174 |
+
"grad_norm": 0.0014326042728498578,
|
175 |
+
"learning_rate": 0.00019333333333333333,
|
176 |
+
"loss": 0.0003,
|
177 |
+
"step": 216
|
178 |
+
},
|
179 |
+
{
|
180 |
+
"epoch": 45.0,
|
181 |
+
"grad_norm": 0.06165959686040878,
|
182 |
+
"learning_rate": 0.00018733333333333332,
|
183 |
+
"loss": 0.0003,
|
184 |
+
"step": 225
|
185 |
+
},
|
186 |
+
{
|
187 |
+
"epoch": 46.8,
|
188 |
+
"grad_norm": 0.0007684020092710853,
|
189 |
+
"learning_rate": 0.00018133333333333331,
|
190 |
+
"loss": 0.0002,
|
191 |
+
"step": 234
|
192 |
+
},
|
193 |
+
{
|
194 |
+
"epoch": 48.6,
|
195 |
+
"grad_norm": 0.0010787370847538114,
|
196 |
+
"learning_rate": 0.0001753333333333333,
|
197 |
+
"loss": 0.0002,
|
198 |
+
"step": 243
|
199 |
+
},
|
200 |
+
{
|
201 |
+
"epoch": 50.4,
|
202 |
+
"grad_norm": 0.0032115266658365726,
|
203 |
+
"learning_rate": 0.00016933333333333332,
|
204 |
+
"loss": 0.0003,
|
205 |
+
"step": 252
|
206 |
+
},
|
207 |
+
{
|
208 |
+
"epoch": 52.2,
|
209 |
+
"grad_norm": 0.0009848058689385653,
|
210 |
+
"learning_rate": 0.0001633333333333333,
|
211 |
+
"loss": 0.0002,
|
212 |
+
"step": 261
|
213 |
+
},
|
214 |
+
{
|
215 |
+
"epoch": 54.0,
|
216 |
+
"grad_norm": 0.000787117169238627,
|
217 |
+
"learning_rate": 0.00015733333333333333,
|
218 |
+
"loss": 0.0007,
|
219 |
+
"step": 270
|
220 |
+
},
|
221 |
+
{
|
222 |
+
"epoch": 55.8,
|
223 |
+
"grad_norm": 0.0012765954015776515,
|
224 |
+
"learning_rate": 0.00015133333333333332,
|
225 |
+
"loss": 0.0002,
|
226 |
+
"step": 279
|
227 |
+
},
|
228 |
+
{
|
229 |
+
"epoch": 57.6,
|
230 |
+
"grad_norm": 0.05409696698188782,
|
231 |
+
"learning_rate": 0.00014533333333333333,
|
232 |
+
"loss": 0.0002,
|
233 |
+
"step": 288
|
234 |
+
},
|
235 |
+
{
|
236 |
+
"epoch": 59.4,
|
237 |
+
"grad_norm": 0.04873191937804222,
|
238 |
+
"learning_rate": 0.00013933333333333332,
|
239 |
+
"loss": 0.0003,
|
240 |
+
"step": 297
|
241 |
+
},
|
242 |
+
{
|
243 |
+
"epoch": 61.2,
|
244 |
+
"grad_norm": 0.0004421588673721999,
|
245 |
+
"learning_rate": 0.0001333333333333333,
|
246 |
+
"loss": 0.0006,
|
247 |
+
"step": 306
|
248 |
+
},
|
249 |
+
{
|
250 |
+
"epoch": 63.0,
|
251 |
+
"grad_norm": 0.0011476241052150726,
|
252 |
+
"learning_rate": 0.00012733333333333333,
|
253 |
+
"loss": 0.0003,
|
254 |
+
"step": 315
|
255 |
+
},
|
256 |
+
{
|
257 |
+
"epoch": 64.8,
|
258 |
+
"grad_norm": 0.0005729855038225651,
|
259 |
+
"learning_rate": 0.00012133333333333332,
|
260 |
+
"loss": 0.0002,
|
261 |
+
"step": 324
|
262 |
+
},
|
263 |
+
{
|
264 |
+
"epoch": 66.6,
|
265 |
+
"grad_norm": 0.0586007684469223,
|
266 |
+
"learning_rate": 0.00011533333333333332,
|
267 |
+
"loss": 0.0006,
|
268 |
+
"step": 333
|
269 |
+
},
|
270 |
+
{
|
271 |
+
"epoch": 68.4,
|
272 |
+
"grad_norm": 0.0006001991569064558,
|
273 |
+
"learning_rate": 0.00010933333333333333,
|
274 |
+
"loss": 0.0002,
|
275 |
+
"step": 342
|
276 |
+
},
|
277 |
+
{
|
278 |
+
"epoch": 70.2,
|
279 |
+
"grad_norm": 0.03952179476618767,
|
280 |
+
"learning_rate": 0.00010333333333333333,
|
281 |
+
"loss": 0.0002,
|
282 |
+
"step": 351
|
283 |
+
},
|
284 |
+
{
|
285 |
+
"epoch": 72.0,
|
286 |
+
"grad_norm": 0.06108314171433449,
|
287 |
+
"learning_rate": 9.733333333333332e-05,
|
288 |
+
"loss": 0.0002,
|
289 |
+
"step": 360
|
290 |
+
},
|
291 |
+
{
|
292 |
+
"epoch": 73.8,
|
293 |
+
"grad_norm": 0.00037649282603524625,
|
294 |
+
"learning_rate": 9.133333333333334e-05,
|
295 |
+
"loss": 0.0002,
|
296 |
+
"step": 369
|
297 |
+
},
|
298 |
+
{
|
299 |
+
"epoch": 75.6,
|
300 |
+
"grad_norm": 0.001120861852541566,
|
301 |
+
"learning_rate": 8.533333333333332e-05,
|
302 |
+
"loss": 0.0001,
|
303 |
+
"step": 378
|
304 |
+
},
|
305 |
+
{
|
306 |
+
"epoch": 77.4,
|
307 |
+
"grad_norm": 0.004925732500851154,
|
308 |
+
"learning_rate": 7.933333333333331e-05,
|
309 |
+
"loss": 0.0003,
|
310 |
+
"step": 387
|
311 |
+
},
|
312 |
+
{
|
313 |
+
"epoch": 79.2,
|
314 |
+
"grad_norm": 0.0009467621566727757,
|
315 |
+
"learning_rate": 7.333333333333332e-05,
|
316 |
+
"loss": 0.0001,
|
317 |
+
"step": 396
|
318 |
+
},
|
319 |
+
{
|
320 |
+
"epoch": 81.0,
|
321 |
+
"grad_norm": 0.0015193276340141892,
|
322 |
+
"learning_rate": 6.733333333333333e-05,
|
323 |
+
"loss": 0.0002,
|
324 |
+
"step": 405
|
325 |
+
},
|
326 |
+
{
|
327 |
+
"epoch": 82.8,
|
328 |
+
"grad_norm": 0.00035535290953703225,
|
329 |
+
"learning_rate": 6.133333333333334e-05,
|
330 |
+
"loss": 0.0002,
|
331 |
+
"step": 414
|
332 |
+
},
|
333 |
+
{
|
334 |
+
"epoch": 84.6,
|
335 |
+
"grad_norm": 0.041585084050893784,
|
336 |
+
"learning_rate": 5.533333333333333e-05,
|
337 |
+
"loss": 0.0002,
|
338 |
+
"step": 423
|
339 |
+
},
|
340 |
+
{
|
341 |
+
"epoch": 86.4,
|
342 |
+
"grad_norm": 0.0007830450776964426,
|
343 |
+
"learning_rate": 4.933333333333333e-05,
|
344 |
+
"loss": 0.0001,
|
345 |
+
"step": 432
|
346 |
+
},
|
347 |
+
{
|
348 |
+
"epoch": 88.2,
|
349 |
+
"grad_norm": 0.024977711960673332,
|
350 |
+
"learning_rate": 4.333333333333333e-05,
|
351 |
+
"loss": 0.0002,
|
352 |
+
"step": 441
|
353 |
+
},
|
354 |
+
{
|
355 |
+
"epoch": 90.0,
|
356 |
+
"grad_norm": 0.00046858747373335063,
|
357 |
+
"learning_rate": 3.733333333333333e-05,
|
358 |
+
"loss": 0.0002,
|
359 |
+
"step": 450
|
360 |
+
},
|
361 |
+
{
|
362 |
+
"epoch": 91.8,
|
363 |
+
"grad_norm": 0.04403144493699074,
|
364 |
+
"learning_rate": 3.1333333333333334e-05,
|
365 |
+
"loss": 0.0002,
|
366 |
+
"step": 459
|
367 |
+
},
|
368 |
+
{
|
369 |
+
"epoch": 93.6,
|
370 |
+
"grad_norm": 0.037283509969711304,
|
371 |
+
"learning_rate": 2.533333333333333e-05,
|
372 |
+
"loss": 0.0002,
|
373 |
+
"step": 468
|
374 |
+
},
|
375 |
+
{
|
376 |
+
"epoch": 95.4,
|
377 |
+
"grad_norm": 0.0004454792069736868,
|
378 |
+
"learning_rate": 1.933333333333333e-05,
|
379 |
+
"loss": 0.0002,
|
380 |
+
"step": 477
|
381 |
+
},
|
382 |
+
{
|
383 |
+
"epoch": 97.2,
|
384 |
+
"grad_norm": 0.03768078610301018,
|
385 |
+
"learning_rate": 1.3333333333333333e-05,
|
386 |
+
"loss": 0.0001,
|
387 |
+
"step": 486
|
388 |
+
},
|
389 |
+
{
|
390 |
+
"epoch": 99.0,
|
391 |
+
"grad_norm": 0.035461634397506714,
|
392 |
+
"learning_rate": 7.333333333333333e-06,
|
393 |
+
"loss": 0.0001,
|
394 |
+
"step": 495
|
395 |
+
}
|
396 |
+
],
|
397 |
+
"logging_steps": 9,
|
398 |
+
"max_steps": 500,
|
399 |
+
"num_input_tokens_seen": 0,
|
400 |
+
"num_train_epochs": 100,
|
401 |
+
"save_steps": 500,
|
402 |
+
"total_flos": 4.3945643999232e+16,
|
403 |
+
"train_batch_size": 2,
|
404 |
+
"trial_name": null,
|
405 |
+
"trial_params": null
|
406 |
+
}
|
checkpoint-500/training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f6ef03a53fdd28af57b9913c809990cb4103103c81c4f6a299091b217944061f
|
3 |
+
size 4920
|
handler.py
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from typing import Dict, List, Any
|
2 |
+
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
|
3 |
+
import torch
|
4 |
+
from peft import PeftModel
|
5 |
+
import json
|
6 |
+
import os
|
7 |
+
|
8 |
+
|
9 |
+
class EndpointHandler():
|
10 |
+
def __init__(self, path=""):
|
11 |
+
base_model_path = json.load(open(os.path.join(path, "training_params.json")))["model"]
|
12 |
+
model = AutoModelForCausalLM.from_pretrained(
|
13 |
+
base_model_path,
|
14 |
+
torch_dtype=torch.float16,
|
15 |
+
low_cpu_mem_usage=True,
|
16 |
+
trust_remote_code=True,
|
17 |
+
device_map="auto",
|
18 |
+
)
|
19 |
+
tokenizer = AutoTokenizer.from_pretrained(path, trust_remote_code=True)
|
20 |
+
model.resize_token_embeddings(len(tokenizer))
|
21 |
+
model = PeftModel.from_pretrained(model, path)
|
22 |
+
model = model.merge_and_unload()
|
23 |
+
self.pipeline = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
24 |
+
|
25 |
+
def __call__(self, data: Any) -> List[List[Dict[str, float]]]:
|
26 |
+
inputs = data.pop("inputs", data)
|
27 |
+
parameters = data.pop("parameters", None)
|
28 |
+
if parameters is not None:
|
29 |
+
prediction = self.pipeline(inputs, **parameters)
|
30 |
+
else:
|
31 |
+
prediction = self.pipeline(inputs)
|
32 |
+
return prediction
|
requirements.txt
ADDED
@@ -0,0 +1,2 @@
|
|
|
|
|
|
|
1 |
+
peft==0.8.2
|
2 |
+
transformers==4.37.0
|
runs/Feb25_12-28-14_r-codesagar-prompt-guard-bw3akjco-f5b5d-3guve/events.out.tfevents.1708864095.r-codesagar-prompt-guard-bw3akjco-f5b5d-3guve.97.0
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:5f4651429b8e0c5f5969b6bf460f503e84cedd33d0e5e7e7dcf13bd312a2de9b
|
3 |
+
size 16974
|
special_tokens_map.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "<s>",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"eos_token": {
|
10 |
+
"content": "<|im_end|>",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"pad_token": {
|
17 |
+
"content": "</s>",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"unk_token": {
|
24 |
+
"content": "<unk>",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
}
|
30 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:dadfd56d766715c61d2ef780a525ab43b8e6da4de6865bda3d95fdef5e134055
|
3 |
+
size 493443
|
tokenizer_config.json
ADDED
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"add_prefix_space": true,
|
5 |
+
"added_tokens_decoder": {
|
6 |
+
"0": {
|
7 |
+
"content": "<unk>",
|
8 |
+
"lstrip": false,
|
9 |
+
"normalized": false,
|
10 |
+
"rstrip": false,
|
11 |
+
"single_word": false,
|
12 |
+
"special": true
|
13 |
+
},
|
14 |
+
"1": {
|
15 |
+
"content": "<s>",
|
16 |
+
"lstrip": false,
|
17 |
+
"normalized": false,
|
18 |
+
"rstrip": false,
|
19 |
+
"single_word": false,
|
20 |
+
"special": true
|
21 |
+
},
|
22 |
+
"2": {
|
23 |
+
"content": "</s>",
|
24 |
+
"lstrip": false,
|
25 |
+
"normalized": false,
|
26 |
+
"rstrip": false,
|
27 |
+
"single_word": false,
|
28 |
+
"special": true
|
29 |
+
},
|
30 |
+
"32000": {
|
31 |
+
"content": "<|im_end|>",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false,
|
36 |
+
"special": true
|
37 |
+
},
|
38 |
+
"32001": {
|
39 |
+
"content": "<|im_start|>",
|
40 |
+
"lstrip": false,
|
41 |
+
"normalized": false,
|
42 |
+
"rstrip": false,
|
43 |
+
"single_word": false,
|
44 |
+
"special": false
|
45 |
+
}
|
46 |
+
},
|
47 |
+
"additional_special_tokens": [],
|
48 |
+
"bos_token": "<s>",
|
49 |
+
"chat_template": "{% if not add_generation_prompt is defined %}{% set add_generation_prompt = false %}{% endif %}{% for message in messages %}{{'<|im_start|>' + message['role'] + '\n' + message['content'] + '<|im_end|>' + '\n'}}{% endfor %}{% if add_generation_prompt %}{{ '<|im_start|>assistant\n' }}{% endif %}",
|
50 |
+
"clean_up_tokenization_spaces": false,
|
51 |
+
"eos_token": "<|im_end|>",
|
52 |
+
"legacy": true,
|
53 |
+
"model_max_length": 2048,
|
54 |
+
"pad_token": "</s>",
|
55 |
+
"sp_model_kwargs": {},
|
56 |
+
"spaces_between_special_tokens": false,
|
57 |
+
"tokenizer_class": "LlamaTokenizer",
|
58 |
+
"trust_remote_code": false,
|
59 |
+
"unk_token": "<unk>",
|
60 |
+
"use_default_system_prompt": true,
|
61 |
+
"use_fast": true
|
62 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f6ef03a53fdd28af57b9913c809990cb4103103c81c4f6a299091b217944061f
|
3 |
+
size 4920
|
training_params.json
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"model": "cognitivecomputations/dolphin-2.2.1-mistral-7b",
|
3 |
+
"project_name": "autotrain-ugs12-98r1b",
|
4 |
+
"data_path": "autotrain-ugs12-98r1b/autotrain-data",
|
5 |
+
"train_split": "train",
|
6 |
+
"valid_split": null,
|
7 |
+
"add_eos_token": true,
|
8 |
+
"block_size": 1024,
|
9 |
+
"model_max_length": 2048,
|
10 |
+
"padding": "right",
|
11 |
+
"trainer": "sft",
|
12 |
+
"use_flash_attention_2": false,
|
13 |
+
"log": "tensorboard",
|
14 |
+
"disable_gradient_checkpointing": false,
|
15 |
+
"logging_steps": -1,
|
16 |
+
"evaluation_strategy": "epoch",
|
17 |
+
"save_total_limit": 1,
|
18 |
+
"save_strategy": "epoch",
|
19 |
+
"auto_find_batch_size": false,
|
20 |
+
"mixed_precision": "fp16",
|
21 |
+
"lr": 0.0003,
|
22 |
+
"epochs": 100,
|
23 |
+
"batch_size": 2,
|
24 |
+
"warmup_ratio": 0.1,
|
25 |
+
"gradient_accumulation": 1,
|
26 |
+
"optimizer": "adamw_torch",
|
27 |
+
"scheduler": "linear",
|
28 |
+
"weight_decay": 0.0,
|
29 |
+
"max_grad_norm": 1.0,
|
30 |
+
"seed": 42,
|
31 |
+
"chat_template": "none",
|
32 |
+
"quantization": "int4",
|
33 |
+
"target_modules": "all-linear",
|
34 |
+
"merge_adapter": false,
|
35 |
+
"peft": true,
|
36 |
+
"lora_r": 16,
|
37 |
+
"lora_alpha": 32,
|
38 |
+
"lora_dropout": 0.05,
|
39 |
+
"model_ref": null,
|
40 |
+
"dpo_beta": 0.1,
|
41 |
+
"prompt_text_column": "autotrain_prompt",
|
42 |
+
"text_column": "autotrain_text",
|
43 |
+
"rejected_text_column": "autotrain_rejected_text",
|
44 |
+
"push_to_hub": true,
|
45 |
+
"repo_id": "codesagar/autotrain-ugs12-98r1b",
|
46 |
+
"username": "codesagar"
|
47 |
+
}
|