Upload CodeLLaMa7B-FineTuned-byMoomen fine-tuned model
Browse files- README.md +129 -0
- adapter_config.json +40 -0
- adapter_model.safetensors +3 -0
- chat_template.jinja +1 -0
- checkpoint-100/README.md +202 -0
- checkpoint-100/adapter_config.json +40 -0
- checkpoint-100/adapter_model.safetensors +3 -0
- checkpoint-100/chat_template.jinja +1 -0
- checkpoint-100/optimizer.pt +3 -0
- checkpoint-100/rng_state.pth +3 -0
- checkpoint-100/scaler.pt +3 -0
- checkpoint-100/scheduler.pt +3 -0
- checkpoint-100/special_tokens_map.json +29 -0
- checkpoint-100/tokenizer.json +0 -0
- checkpoint-100/tokenizer.model +3 -0
- checkpoint-100/tokenizer_config.json +84 -0
- checkpoint-100/trainer_state.json +124 -0
- checkpoint-100/training_args.bin +3 -0
- special_tokens_map.json +30 -0
- tokenizer.json +0 -0
- tokenizer.model +3 -0
- tokenizer_config.json +84 -0
- training_args.bin +3 -0
README.md
ADDED
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: llama2
|
3 |
+
base_model: codellama/CodeLlama-7b-Instruct-hf
|
4 |
+
tags:
|
5 |
+
- fine-tuned
|
6 |
+
- educational
|
7 |
+
- qa
|
8 |
+
- code
|
9 |
+
- llama
|
10 |
+
- peft
|
11 |
+
- lora
|
12 |
+
language:
|
13 |
+
- en
|
14 |
+
pipeline_tag: text-generation
|
15 |
+
library_name: peft
|
16 |
+
---
|
17 |
+
|
18 |
+
# CodeLLaMa7B-FineTuned-byMoomen
|
19 |
+
|
20 |
+
This model is a fine-tuned version of [codellama/CodeLlama-7b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-7b-Instruct-hf) using LoRA (Low-Rank Adaptation) for educational Q&A tasks.
|
21 |
+
|
22 |
+
## Model Details
|
23 |
+
|
24 |
+
- **Base Model**: codellama/CodeLlama-7b-Instruct-hf
|
25 |
+
- **Fine-tuning Method**: LoRA (Low-Rank Adaptation)
|
26 |
+
- **LoRA Rank**: 32
|
27 |
+
- **LoRA Alpha**: 64
|
28 |
+
- **Target Modules**: ['gate_proj', 'lm_head', 'k_proj', 'q_proj', 'up_proj', 'down_proj', 'v_proj', 'o_proj']
|
29 |
+
- **Training Focus**: Educational programming Q&A
|
30 |
+
- **Model Type**: Causal Language Model
|
31 |
+
|
32 |
+
## Usage
|
33 |
+
|
34 |
+
### Quick Start
|
35 |
+
|
36 |
+
```python
|
37 |
+
from peft import AutoPeftModelForCausalLM
|
38 |
+
from transformers import AutoTokenizer
|
39 |
+
|
40 |
+
# Load model and tokenizer
|
41 |
+
model = AutoPeftModelForCausalLM.from_pretrained("Moomen123Msaadi/CodeLLaMa7B-FineTuned-byMoomen")
|
42 |
+
tokenizer = AutoTokenizer.from_pretrained("codellama/CodeLlama-7b-Instruct-hf")
|
43 |
+
|
44 |
+
# Generate response
|
45 |
+
prompt = "Explain recursion in programming"
|
46 |
+
inputs = tokenizer(prompt, return_tensors="pt")
|
47 |
+
outputs = model.generate(**inputs, max_new_tokens=300, temperature=0.7)
|
48 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
49 |
+
print(response)
|
50 |
+
```
|
51 |
+
|
52 |
+
### Chat Format Usage
|
53 |
+
|
54 |
+
```python
|
55 |
+
# For educational Q&A conversations
|
56 |
+
messages = [
|
57 |
+
{"role": "system", "content": "You are a helpful educational assistant."},
|
58 |
+
{"role": "user", "content": "What is the difference between lists and tuples in Python?"}
|
59 |
+
]
|
60 |
+
|
61 |
+
formatted_prompt = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
|
62 |
+
inputs = tokenizer(formatted_prompt, return_tensors="pt")
|
63 |
+
outputs = model.generate(**inputs, max_new_tokens=300)
|
64 |
+
response = tokenizer.decode(outputs[0], skip_special_tokens=True)
|
65 |
+
```
|
66 |
+
|
67 |
+
### Memory-Efficient Loading
|
68 |
+
|
69 |
+
```python
|
70 |
+
# For systems with limited VRAM
|
71 |
+
from transformers import BitsAndBytesConfig
|
72 |
+
|
73 |
+
quantization_config = BitsAndBytesConfig(
|
74 |
+
load_in_4bit=True,
|
75 |
+
bnb_4bit_compute_dtype=torch.float16
|
76 |
+
)
|
77 |
+
|
78 |
+
model = AutoPeftModelForCausalLM.from_pretrained(
|
79 |
+
"Moomen123Msaadi/CodeLLaMa7B-FineTuned-byMoomen",
|
80 |
+
quantization_config=quantization_config,
|
81 |
+
device_map="auto"
|
82 |
+
)
|
83 |
+
```
|
84 |
+
|
85 |
+
## Training Details
|
86 |
+
|
87 |
+
This model was fine-tuned using:
|
88 |
+
- **Parameter-Efficient Fine-Tuning (PEFT)** with LoRA
|
89 |
+
- **Educational conversation dataset** focused on programming concepts
|
90 |
+
- **Optimized for Q&A format** with system/user/assistant roles
|
91 |
+
|
92 |
+
## Intended Use
|
93 |
+
|
94 |
+
This model is designed for:
|
95 |
+
- π Educational programming Q&A
|
96 |
+
- π‘ Concept explanations in computer science
|
97 |
+
- π§ Code debugging assistance
|
98 |
+
- π Technical tutoring and learning support
|
99 |
+
|
100 |
+
## Limitations
|
101 |
+
|
102 |
+
- Based on codellama/CodeLlama-7b-Instruct-hf, inherits its limitations
|
103 |
+
- Optimized for educational content, may not perform well on other tasks
|
104 |
+
- Requires base model for inference (LoRA adapters only)
|
105 |
+
- Performance depends on the quality of training data
|
106 |
+
|
107 |
+
## Model Architecture
|
108 |
+
|
109 |
+
This is a LoRA adapter that needs to be loaded with the base model. The adapter files are:
|
110 |
+
- `adapter_config.json`: LoRA configuration
|
111 |
+
- `adapter_model.safetensors`: Trained LoRA weights
|
112 |
+
|
113 |
+
## License
|
114 |
+
|
115 |
+
This model follows the same license as the base model: Llama 2 Custom License.
|
116 |
+
|
117 |
+
## Citation
|
118 |
+
|
119 |
+
If you use this model, please cite:
|
120 |
+
|
121 |
+
```bibtex
|
122 |
+
@misc{CodeLLaMa7B_FineTuned_byMoomen,
|
123 |
+
title={CodeLLaMa7B-FineTuned-byMoomen},
|
124 |
+
author={Moomen123Msaadi},
|
125 |
+
year={2024},
|
126 |
+
publisher={Hugging Face},
|
127 |
+
url={https://huggingface.co/Moomen123Msaadi/CodeLLaMa7B-FineTuned-byMoomen}
|
128 |
+
}
|
129 |
+
```
|
adapter_config.json
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"alpha_pattern": {},
|
3 |
+
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "codellama/CodeLlama-7b-Instruct-hf",
|
5 |
+
"bias": "none",
|
6 |
+
"corda_config": null,
|
7 |
+
"eva_config": null,
|
8 |
+
"exclude_modules": null,
|
9 |
+
"fan_in_fan_out": false,
|
10 |
+
"inference_mode": true,
|
11 |
+
"init_lora_weights": true,
|
12 |
+
"layer_replication": null,
|
13 |
+
"layers_pattern": null,
|
14 |
+
"layers_to_transform": null,
|
15 |
+
"loftq_config": {},
|
16 |
+
"lora_alpha": 64,
|
17 |
+
"lora_bias": false,
|
18 |
+
"lora_dropout": 0.1,
|
19 |
+
"megatron_config": null,
|
20 |
+
"megatron_core": "megatron.core",
|
21 |
+
"modules_to_save": null,
|
22 |
+
"peft_type": "LORA",
|
23 |
+
"r": 32,
|
24 |
+
"rank_pattern": {},
|
25 |
+
"revision": null,
|
26 |
+
"target_modules": [
|
27 |
+
"gate_proj",
|
28 |
+
"lm_head",
|
29 |
+
"k_proj",
|
30 |
+
"q_proj",
|
31 |
+
"up_proj",
|
32 |
+
"down_proj",
|
33 |
+
"v_proj",
|
34 |
+
"o_proj"
|
35 |
+
],
|
36 |
+
"task_type": "CAUSAL_LM",
|
37 |
+
"trainable_token_indices": null,
|
38 |
+
"use_dora": false,
|
39 |
+
"use_rslora": false
|
40 |
+
}
|
adapter_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3c09aba0334992bcee3d4604aa3ed2c17a537ee5e31bc8f12f95e3ad44ca599a
|
3 |
+
size 586773816
|
chat_template.jinja
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = false %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if loop.index0 == 0 and system_message != false %}{% set content = '<<SYS>>\n' + system_message + '\n<</SYS>>\n\n' + message['content'] %}{% else %}{% set content = message['content'] %}{% endif %}{% if message['role'] == 'user' %}{{ bos_token + '[INST] ' + content | trim + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ ' ' + content | trim + ' ' + eos_token }}{% endif %}{% endfor %}
|
checkpoint-100/README.md
ADDED
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: codellama/CodeLlama-7b-Instruct-hf
|
3 |
+
library_name: peft
|
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 |
+
### Framework versions
|
201 |
+
|
202 |
+
- PEFT 0.15.2
|
checkpoint-100/adapter_config.json
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"alpha_pattern": {},
|
3 |
+
"auto_mapping": null,
|
4 |
+
"base_model_name_or_path": "codellama/CodeLlama-7b-Instruct-hf",
|
5 |
+
"bias": "none",
|
6 |
+
"corda_config": null,
|
7 |
+
"eva_config": null,
|
8 |
+
"exclude_modules": null,
|
9 |
+
"fan_in_fan_out": false,
|
10 |
+
"inference_mode": true,
|
11 |
+
"init_lora_weights": true,
|
12 |
+
"layer_replication": null,
|
13 |
+
"layers_pattern": null,
|
14 |
+
"layers_to_transform": null,
|
15 |
+
"loftq_config": {},
|
16 |
+
"lora_alpha": 64,
|
17 |
+
"lora_bias": false,
|
18 |
+
"lora_dropout": 0.1,
|
19 |
+
"megatron_config": null,
|
20 |
+
"megatron_core": "megatron.core",
|
21 |
+
"modules_to_save": null,
|
22 |
+
"peft_type": "LORA",
|
23 |
+
"r": 32,
|
24 |
+
"rank_pattern": {},
|
25 |
+
"revision": null,
|
26 |
+
"target_modules": [
|
27 |
+
"gate_proj",
|
28 |
+
"lm_head",
|
29 |
+
"k_proj",
|
30 |
+
"q_proj",
|
31 |
+
"up_proj",
|
32 |
+
"down_proj",
|
33 |
+
"v_proj",
|
34 |
+
"o_proj"
|
35 |
+
],
|
36 |
+
"task_type": "CAUSAL_LM",
|
37 |
+
"trainable_token_indices": null,
|
38 |
+
"use_dora": false,
|
39 |
+
"use_rslora": false
|
40 |
+
}
|
checkpoint-100/adapter_model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3c09aba0334992bcee3d4604aa3ed2c17a537ee5e31bc8f12f95e3ad44ca599a
|
3 |
+
size 586773816
|
checkpoint-100/chat_template.jinja
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{% if messages[0]['role'] == 'system' %}{% set loop_messages = messages[1:] %}{% set system_message = messages[0]['content'] %}{% else %}{% set loop_messages = messages %}{% set system_message = false %}{% endif %}{% for message in loop_messages %}{% if (message['role'] == 'user') != (loop.index0 % 2 == 0) %}{{ raise_exception('Conversation roles must alternate user/assistant/user/assistant/...') }}{% endif %}{% if loop.index0 == 0 and system_message != false %}{% set content = '<<SYS>>\n' + system_message + '\n<</SYS>>\n\n' + message['content'] %}{% else %}{% set content = message['content'] %}{% endif %}{% if message['role'] == 'user' %}{{ bos_token + '[INST] ' + content | trim + ' [/INST]' }}{% elif message['role'] == 'assistant' %}{{ ' ' + content | trim + ' ' + eos_token }}{% endif %}{% endfor %}
|
checkpoint-100/optimizer.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:7b987e2fb754226d0fec6ba9e6292d1d6e64ba132acf83fa4ba4dc390f957185
|
3 |
+
size 9248668
|
checkpoint-100/rng_state.pth
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2d1da91c9e198fab091da263a8d803f7f68ef6f1c83062fc1a27842babcef42a
|
3 |
+
size 14244
|
checkpoint-100/scaler.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ac4a558c5b93581a5c41e2922404490319bcd15a10296c927a72a41012ff7f27
|
3 |
+
size 988
|
checkpoint-100/scheduler.pt
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1329fcdcae9cc57b3dfeb222ae5a3ccdcc91caca3e6f41508a76810014313920
|
3 |
+
size 1064
|
checkpoint-100/special_tokens_map.json
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"β<PRE>",
|
4 |
+
"β<MID>",
|
5 |
+
"β<SUF>",
|
6 |
+
"β<EOT>"
|
7 |
+
],
|
8 |
+
"bos_token": {
|
9 |
+
"content": "<s>",
|
10 |
+
"lstrip": false,
|
11 |
+
"normalized": false,
|
12 |
+
"rstrip": false,
|
13 |
+
"single_word": false
|
14 |
+
},
|
15 |
+
"eos_token": {
|
16 |
+
"content": "</s>",
|
17 |
+
"lstrip": false,
|
18 |
+
"normalized": false,
|
19 |
+
"rstrip": false,
|
20 |
+
"single_word": false
|
21 |
+
},
|
22 |
+
"unk_token": {
|
23 |
+
"content": "<unk>",
|
24 |
+
"lstrip": false,
|
25 |
+
"normalized": false,
|
26 |
+
"rstrip": false,
|
27 |
+
"single_word": false
|
28 |
+
}
|
29 |
+
}
|
checkpoint-100/tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
checkpoint-100/tokenizer.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:45ccb9c8b6b561889acea59191d66986d314e7cbd6a78abc6e49b139ca91c1e6
|
3 |
+
size 500058
|
checkpoint-100/tokenizer_config.json
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"added_tokens_decoder": {
|
5 |
+
"0": {
|
6 |
+
"content": "<unk>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false,
|
11 |
+
"special": true
|
12 |
+
},
|
13 |
+
"1": {
|
14 |
+
"content": "<s>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": false,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false,
|
19 |
+
"special": true
|
20 |
+
},
|
21 |
+
"2": {
|
22 |
+
"content": "</s>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": false,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false,
|
27 |
+
"special": true
|
28 |
+
},
|
29 |
+
"32007": {
|
30 |
+
"content": "β<PRE>",
|
31 |
+
"lstrip": false,
|
32 |
+
"normalized": false,
|
33 |
+
"rstrip": false,
|
34 |
+
"single_word": false,
|
35 |
+
"special": true
|
36 |
+
},
|
37 |
+
"32008": {
|
38 |
+
"content": "β<SUF>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false,
|
43 |
+
"special": true
|
44 |
+
},
|
45 |
+
"32009": {
|
46 |
+
"content": "β<MID>",
|
47 |
+
"lstrip": false,
|
48 |
+
"normalized": false,
|
49 |
+
"rstrip": false,
|
50 |
+
"single_word": false,
|
51 |
+
"special": true
|
52 |
+
},
|
53 |
+
"32010": {
|
54 |
+
"content": "β<EOT>",
|
55 |
+
"lstrip": false,
|
56 |
+
"normalized": false,
|
57 |
+
"rstrip": false,
|
58 |
+
"single_word": false,
|
59 |
+
"special": true
|
60 |
+
}
|
61 |
+
},
|
62 |
+
"additional_special_tokens": [
|
63 |
+
"β<PRE>",
|
64 |
+
"β<MID>",
|
65 |
+
"β<SUF>",
|
66 |
+
"β<EOT>"
|
67 |
+
],
|
68 |
+
"bos_token": "<s>",
|
69 |
+
"clean_up_tokenization_spaces": false,
|
70 |
+
"eos_token": "</s>",
|
71 |
+
"eot_token": "β<EOT>",
|
72 |
+
"extra_special_tokens": {},
|
73 |
+
"fill_token": "<FILL_ME>",
|
74 |
+
"legacy": null,
|
75 |
+
"middle_token": "β<MID>",
|
76 |
+
"model_max_length": 1000000000000000019884624838656,
|
77 |
+
"pad_token": null,
|
78 |
+
"prefix_token": "β<PRE>",
|
79 |
+
"sp_model_kwargs": {},
|
80 |
+
"suffix_token": "β<SUF>",
|
81 |
+
"tokenizer_class": "CodeLlamaTokenizer",
|
82 |
+
"unk_token": "<unk>",
|
83 |
+
"use_default_system_prompt": false
|
84 |
+
}
|
checkpoint-100/trainer_state.json
ADDED
@@ -0,0 +1,124 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"best_global_step": null,
|
3 |
+
"best_metric": null,
|
4 |
+
"best_model_checkpoint": null,
|
5 |
+
"epoch": 50.0,
|
6 |
+
"eval_steps": 100,
|
7 |
+
"global_step": 100,
|
8 |
+
"is_hyper_param_search": false,
|
9 |
+
"is_local_process_zero": true,
|
10 |
+
"is_world_process_zero": true,
|
11 |
+
"log_history": [
|
12 |
+
{
|
13 |
+
"epoch": 5.0,
|
14 |
+
"grad_norm": 0.40908142924308777,
|
15 |
+
"learning_rate": 0.00045000000000000004,
|
16 |
+
"loss": 1.4568,
|
17 |
+
"mean_token_accuracy": 0.6849659357752119,
|
18 |
+
"num_tokens": 535385.0,
|
19 |
+
"step": 10
|
20 |
+
},
|
21 |
+
{
|
22 |
+
"epoch": 10.0,
|
23 |
+
"grad_norm": 0.8686757683753967,
|
24 |
+
"learning_rate": 0.0004877641290737884,
|
25 |
+
"loss": 1.2429,
|
26 |
+
"mean_token_accuracy": 0.7096964614731925,
|
27 |
+
"num_tokens": 1070770.0,
|
28 |
+
"step": 20
|
29 |
+
},
|
30 |
+
{
|
31 |
+
"epoch": 15.0,
|
32 |
+
"grad_norm": 0.6107782125473022,
|
33 |
+
"learning_rate": 0.00044700268840168044,
|
34 |
+
"loss": 1.0227,
|
35 |
+
"mean_token_accuracy": 0.7352448889187404,
|
36 |
+
"num_tokens": 1606155.0,
|
37 |
+
"step": 30
|
38 |
+
},
|
39 |
+
{
|
40 |
+
"epoch": 20.0,
|
41 |
+
"grad_norm": 0.4725695550441742,
|
42 |
+
"learning_rate": 0.00038247981605830125,
|
43 |
+
"loss": 0.8815,
|
44 |
+
"mean_token_accuracy": 0.7646138310432434,
|
45 |
+
"num_tokens": 2141540.0,
|
46 |
+
"step": 40
|
47 |
+
},
|
48 |
+
{
|
49 |
+
"epoch": 25.0,
|
50 |
+
"grad_norm": 0.3993835747241974,
|
51 |
+
"learning_rate": 0.0003019779227044398,
|
52 |
+
"loss": 0.751,
|
53 |
+
"mean_token_accuracy": 0.7935232503073556,
|
54 |
+
"num_tokens": 2676925.0,
|
55 |
+
"step": 50
|
56 |
+
},
|
57 |
+
{
|
58 |
+
"epoch": 30.0,
|
59 |
+
"grad_norm": 0.3546556532382965,
|
60 |
+
"learning_rate": 0.0002152067247599837,
|
61 |
+
"loss": 0.6487,
|
62 |
+
"mean_token_accuracy": 0.8254428488867623,
|
63 |
+
"num_tokens": 3212310.0,
|
64 |
+
"step": 60
|
65 |
+
},
|
66 |
+
{
|
67 |
+
"epoch": 35.0,
|
68 |
+
"grad_norm": 0.3103465437889099,
|
69 |
+
"learning_rate": 0.00013263210930352737,
|
70 |
+
"loss": 0.5825,
|
71 |
+
"mean_token_accuracy": 0.843472867352622,
|
72 |
+
"num_tokens": 3747695.0,
|
73 |
+
"step": 70
|
74 |
+
},
|
75 |
+
{
|
76 |
+
"epoch": 40.0,
|
77 |
+
"grad_norm": 0.29546496272087097,
|
78 |
+
"learning_rate": 6.421379363065141e-05,
|
79 |
+
"loss": 0.5458,
|
80 |
+
"mean_token_accuracy": 0.8587624430656433,
|
81 |
+
"num_tokens": 4283080.0,
|
82 |
+
"step": 80
|
83 |
+
},
|
84 |
+
{
|
85 |
+
"epoch": 45.0,
|
86 |
+
"grad_norm": 0.2903711795806885,
|
87 |
+
"learning_rate": 1.8204036358303172e-05,
|
88 |
+
"loss": 0.5302,
|
89 |
+
"mean_token_accuracy": 0.862883916922978,
|
90 |
+
"num_tokens": 4818465.0,
|
91 |
+
"step": 90
|
92 |
+
},
|
93 |
+
{
|
94 |
+
"epoch": 50.0,
|
95 |
+
"grad_norm": 0.2829954922199249,
|
96 |
+
"learning_rate": 1.5229324522605948e-07,
|
97 |
+
"loss": 0.5272,
|
98 |
+
"mean_token_accuracy": 0.8638145021029882,
|
99 |
+
"num_tokens": 5353850.0,
|
100 |
+
"step": 100
|
101 |
+
}
|
102 |
+
],
|
103 |
+
"logging_steps": 10,
|
104 |
+
"max_steps": 100,
|
105 |
+
"num_input_tokens_seen": 0,
|
106 |
+
"num_train_epochs": 50,
|
107 |
+
"save_steps": 200,
|
108 |
+
"stateful_callbacks": {
|
109 |
+
"TrainerControl": {
|
110 |
+
"args": {
|
111 |
+
"should_epoch_stop": false,
|
112 |
+
"should_evaluate": false,
|
113 |
+
"should_log": false,
|
114 |
+
"should_save": true,
|
115 |
+
"should_training_stop": true
|
116 |
+
},
|
117 |
+
"attributes": {}
|
118 |
+
}
|
119 |
+
},
|
120 |
+
"total_flos": 2.15744857767936e+17,
|
121 |
+
"train_batch_size": 16,
|
122 |
+
"trial_name": null,
|
123 |
+
"trial_params": null
|
124 |
+
}
|
checkpoint-100/training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3d2bf50e1316366924c993ba7cac4f26324b581af0c10b6877eb00e84325cd1f
|
3 |
+
size 5624
|
special_tokens_map.json
ADDED
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"additional_special_tokens": [
|
3 |
+
"β<PRE>",
|
4 |
+
"β<MID>",
|
5 |
+
"β<SUF>",
|
6 |
+
"β<EOT>"
|
7 |
+
],
|
8 |
+
"bos_token": {
|
9 |
+
"content": "<s>",
|
10 |
+
"lstrip": false,
|
11 |
+
"normalized": false,
|
12 |
+
"rstrip": false,
|
13 |
+
"single_word": false
|
14 |
+
},
|
15 |
+
"eos_token": {
|
16 |
+
"content": "</s>",
|
17 |
+
"lstrip": false,
|
18 |
+
"normalized": false,
|
19 |
+
"rstrip": false,
|
20 |
+
"single_word": false
|
21 |
+
},
|
22 |
+
"pad_token": "</s>",
|
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:45ccb9c8b6b561889acea59191d66986d314e7cbd6a78abc6e49b139ca91c1e6
|
3 |
+
size 500058
|
tokenizer_config.json
ADDED
@@ -0,0 +1,84 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"add_bos_token": true,
|
3 |
+
"add_eos_token": false,
|
4 |
+
"added_tokens_decoder": {
|
5 |
+
"0": {
|
6 |
+
"content": "<unk>",
|
7 |
+
"lstrip": false,
|
8 |
+
"normalized": false,
|
9 |
+
"rstrip": false,
|
10 |
+
"single_word": false,
|
11 |
+
"special": true
|
12 |
+
},
|
13 |
+
"1": {
|
14 |
+
"content": "<s>",
|
15 |
+
"lstrip": false,
|
16 |
+
"normalized": false,
|
17 |
+
"rstrip": false,
|
18 |
+
"single_word": false,
|
19 |
+
"special": true
|
20 |
+
},
|
21 |
+
"2": {
|
22 |
+
"content": "</s>",
|
23 |
+
"lstrip": false,
|
24 |
+
"normalized": false,
|
25 |
+
"rstrip": false,
|
26 |
+
"single_word": false,
|
27 |
+
"special": true
|
28 |
+
},
|
29 |
+
"32007": {
|
30 |
+
"content": "β<PRE>",
|
31 |
+
"lstrip": false,
|
32 |
+
"normalized": false,
|
33 |
+
"rstrip": false,
|
34 |
+
"single_word": false,
|
35 |
+
"special": true
|
36 |
+
},
|
37 |
+
"32008": {
|
38 |
+
"content": "β<SUF>",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false,
|
43 |
+
"special": true
|
44 |
+
},
|
45 |
+
"32009": {
|
46 |
+
"content": "β<MID>",
|
47 |
+
"lstrip": false,
|
48 |
+
"normalized": false,
|
49 |
+
"rstrip": false,
|
50 |
+
"single_word": false,
|
51 |
+
"special": true
|
52 |
+
},
|
53 |
+
"32010": {
|
54 |
+
"content": "β<EOT>",
|
55 |
+
"lstrip": false,
|
56 |
+
"normalized": false,
|
57 |
+
"rstrip": false,
|
58 |
+
"single_word": false,
|
59 |
+
"special": true
|
60 |
+
}
|
61 |
+
},
|
62 |
+
"additional_special_tokens": [
|
63 |
+
"β<PRE>",
|
64 |
+
"β<MID>",
|
65 |
+
"β<SUF>",
|
66 |
+
"β<EOT>"
|
67 |
+
],
|
68 |
+
"bos_token": "<s>",
|
69 |
+
"clean_up_tokenization_spaces": false,
|
70 |
+
"eos_token": "</s>",
|
71 |
+
"eot_token": "β<EOT>",
|
72 |
+
"extra_special_tokens": {},
|
73 |
+
"fill_token": "<FILL_ME>",
|
74 |
+
"legacy": null,
|
75 |
+
"middle_token": "β<MID>",
|
76 |
+
"model_max_length": 1000000000000000019884624838656,
|
77 |
+
"pad_token": "</s>",
|
78 |
+
"prefix_token": "β<PRE>",
|
79 |
+
"sp_model_kwargs": {},
|
80 |
+
"suffix_token": "β<SUF>",
|
81 |
+
"tokenizer_class": "CodeLlamaTokenizer",
|
82 |
+
"unk_token": "<unk>",
|
83 |
+
"use_default_system_prompt": false
|
84 |
+
}
|
training_args.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3d2bf50e1316366924c993ba7cac4f26324b581af0c10b6877eb00e84325cd1f
|
3 |
+
size 5624
|