Shubham Singh Tomar commited on
Commit
79abb16
β€’
1 Parent(s): f659ee0

Initial commit

Browse files
README.md ADDED
@@ -0,0 +1,154 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: llama2
3
+ library_name: peft
4
+ tags:
5
+ - generated_from_trainer
6
+ base_model: codellama/CodeLlama-7b-hf
7
+ model-index:
8
+ - name: outputs/lora-out
9
+ results: []
10
+ ---
11
+
12
+ <!-- This model card has been generated automatically according to the information the Trainer had access to. You
13
+ should probably proofread and complete it, then remove this comment. -->
14
+
15
+ [<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)
16
+ <details><summary>See axolotl config</summary>
17
+
18
+ axolotl version: `0.4.0`
19
+ ```yaml
20
+ base_model: codellama/CodeLlama-7b-hf
21
+ model_type: LlamaForCausalLM
22
+ tokenizer_type: CodeLlamaTokenizer
23
+
24
+ load_in_8bit: true
25
+ load_in_4bit: false
26
+ strict: false
27
+
28
+ datasets:
29
+ - path: AayushMathur/manim_python_alpaca
30
+ type: alpaca
31
+ dataset_prepared_path:
32
+ val_set_size: 0.05
33
+ output_dir: ./outputs/lora-out
34
+
35
+ sequence_len: 4096
36
+ sample_packing: false
37
+ pad_to_sequence_len: true
38
+
39
+ adapter: lora
40
+ lora_model_dir:
41
+ lora_r: 32
42
+ lora_alpha: 16
43
+ lora_dropout: 0.05
44
+ lora_target_linear: true
45
+ lora_fan_in_fan_out:
46
+
47
+ wandb_project:
48
+ wandb_entity:
49
+ wandb_watch:
50
+ wandb_name:
51
+ wandb_log_model:
52
+
53
+ gradient_accumulation_steps: 4
54
+ micro_batch_size: 2
55
+ num_epochs: 4
56
+ optimizer: adamw_bnb_8bit
57
+ lr_scheduler: cosine
58
+ learning_rate: 0.0002
59
+
60
+ train_on_inputs: false
61
+ group_by_length: false
62
+ bf16: auto
63
+ fp16:
64
+ tf32: false
65
+
66
+ gradient_checkpointing: true
67
+ early_stopping_patience:
68
+ resume_from_checkpoint:
69
+ local_rank:
70
+ logging_steps: 1
71
+ xformers_attention:
72
+ flash_attention: true
73
+ s2_attention:
74
+
75
+ warmup_steps: 10
76
+ evals_per_epoch: 4
77
+ saves_per_epoch: 1
78
+ debug:
79
+ deepspeed:
80
+ weight_decay: 0.0
81
+ fsdp:
82
+ fsdp_config:
83
+ special_tokens:
84
+ bos_token: "<s>"
85
+ eos_token: "</s>"
86
+ unk_token: "<unk>"
87
+
88
+ ```
89
+
90
+ </details><br>
91
+
92
+ # outputs/lora-out
93
+
94
+ This model is a fine-tuned version of [codellama/CodeLlama-7b-hf](https://huggingface.co/codellama/CodeLlama-7b-hf) on the None dataset.
95
+ It achieves the following results on the evaluation set:
96
+ - Loss: 0.0039
97
+
98
+ ## Model description
99
+
100
+ More information needed
101
+
102
+ ## Intended uses & limitations
103
+
104
+ More information needed
105
+
106
+ ## Training and evaluation data
107
+
108
+ More information needed
109
+
110
+ ## Training procedure
111
+
112
+ ### Training hyperparameters
113
+
114
+ The following hyperparameters were used during training:
115
+ - learning_rate: 0.0002
116
+ - train_batch_size: 2
117
+ - eval_batch_size: 2
118
+ - seed: 42
119
+ - gradient_accumulation_steps: 4
120
+ - total_train_batch_size: 8
121
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
122
+ - lr_scheduler_type: cosine
123
+ - lr_scheduler_warmup_steps: 10
124
+ - num_epochs: 4
125
+
126
+ ### Training results
127
+
128
+ | Training Loss | Epoch | Step | Validation Loss |
129
+ |:-------------:|:------:|:----:|:---------------:|
130
+ | 0.7377 | 0.0140 | 1 | 0.7414 |
131
+ | 0.1444 | 0.2526 | 18 | 0.0560 |
132
+ | 0.0349 | 0.5053 | 36 | 0.0280 |
133
+ | 0.0429 | 0.7579 | 54 | 0.0206 |
134
+ | 0.0625 | 1.0105 | 72 | 0.0251 |
135
+ | 0.0496 | 1.2632 | 90 | 0.0157 |
136
+ | 0.032 | 1.5158 | 108 | 0.0126 |
137
+ | 0.0094 | 1.7684 | 126 | 0.0104 |
138
+ | 0.0453 | 2.0211 | 144 | 0.0087 |
139
+ | 0.0005 | 2.2737 | 162 | 0.0104 |
140
+ | 0.0373 | 2.5263 | 180 | 0.0069 |
141
+ | 0.0262 | 2.7789 | 198 | 0.0056 |
142
+ | 0.0088 | 3.0316 | 216 | 0.0048 |
143
+ | 0.0266 | 3.2842 | 234 | 0.0045 |
144
+ | 0.013 | 3.5368 | 252 | 0.0041 |
145
+ | 0.0141 | 3.7895 | 270 | 0.0039 |
146
+
147
+
148
+ ### Framework versions
149
+
150
+ - PEFT 0.10.0
151
+ - Transformers 4.40.2
152
+ - Pytorch 2.1.2+cu118
153
+ - Datasets 2.19.1
154
+ - Tokenizers 0.19.1
adapter_config.json ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "alpha_pattern": {},
3
+ "auto_mapping": null,
4
+ "base_model_name_or_path": "codellama/CodeLlama-7b-hf",
5
+ "bias": "none",
6
+ "fan_in_fan_out": null,
7
+ "inference_mode": true,
8
+ "init_lora_weights": true,
9
+ "layer_replication": null,
10
+ "layers_pattern": null,
11
+ "layers_to_transform": null,
12
+ "loftq_config": {},
13
+ "lora_alpha": 16,
14
+ "lora_dropout": 0.05,
15
+ "megatron_config": null,
16
+ "megatron_core": "megatron.core",
17
+ "modules_to_save": null,
18
+ "peft_type": "LORA",
19
+ "r": 32,
20
+ "rank_pattern": {},
21
+ "revision": null,
22
+ "target_modules": [
23
+ "v_proj",
24
+ "down_proj",
25
+ "gate_proj",
26
+ "k_proj",
27
+ "up_proj",
28
+ "q_proj",
29
+ "o_proj"
30
+ ],
31
+ "task_type": "CAUSAL_LM",
32
+ "use_dora": false,
33
+ "use_rslora": false
34
+ }
adapter_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e9909a0e28a742f0a779ef76521b14d9ffc6eab3253d35e7522675b205f2e058
3
+ size 319977674
config.json ADDED
@@ -0,0 +1,43 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "codellama/CodeLlama-7b-hf",
3
+ "architectures": [
4
+ "LlamaForCausalLM"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "bos_token_id": 1,
9
+ "eos_token_id": 2,
10
+ "hidden_act": "silu",
11
+ "hidden_size": 4096,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 11008,
14
+ "max_position_embeddings": 16384,
15
+ "model_type": "llama",
16
+ "num_attention_heads": 32,
17
+ "num_hidden_layers": 32,
18
+ "num_key_value_heads": 32,
19
+ "pretraining_tp": 1,
20
+ "quantization_config": {
21
+ "_load_in_4bit": false,
22
+ "_load_in_8bit": true,
23
+ "bnb_4bit_compute_dtype": "float32",
24
+ "bnb_4bit_quant_storage": "uint8",
25
+ "bnb_4bit_quant_type": "fp4",
26
+ "bnb_4bit_use_double_quant": false,
27
+ "llm_int8_enable_fp32_cpu_offload": false,
28
+ "llm_int8_has_fp16_weight": false,
29
+ "llm_int8_skip_modules": null,
30
+ "llm_int8_threshold": 6.0,
31
+ "load_in_4bit": false,
32
+ "load_in_8bit": true,
33
+ "quant_method": "bitsandbytes"
34
+ },
35
+ "rms_norm_eps": 1e-05,
36
+ "rope_scaling": null,
37
+ "rope_theta": 1000000,
38
+ "tie_word_embeddings": false,
39
+ "torch_dtype": "bfloat16",
40
+ "transformers_version": "4.40.2",
41
+ "use_cache": false,
42
+ "vocab_size": 32016
43
+ }
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.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,85 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "fill_token": "<FILL_ME>",
73
+ "legacy": null,
74
+ "middle_token": "▁<MID>",
75
+ "model_max_length": 1000000000000000019884624838656,
76
+ "pad_token": "</s>",
77
+ "prefix_token": "▁<PRE>",
78
+ "sp_model_kwargs": {},
79
+ "suffix_first": false,
80
+ "suffix_token": "▁<SUF>",
81
+ "tokenizer_class": "CodeLlamaTokenizer",
82
+ "unk_token": "<unk>",
83
+ "use_default_system_prompt": false,
84
+ "use_fast": true
85
+ }