JiyangZhang commited on
Commit
6c4f5b2
β€’
1 Parent(s): 8b28b96

exLong-with-name: Lora finetuned CodeLlama-7b model

Browse files
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-Instruct-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
+ "down_proj",
24
+ "k_proj",
25
+ "o_proj",
26
+ "v_proj",
27
+ "gate_proj",
28
+ "q_proj",
29
+ "up_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:b36a6bbf3e5cc8083c7f27bb292a084cf36135f6c40b268a40a0d4d5818fde3c
3
+ size 319977674
added_tokens.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "▁<EOT>": 32003,
3
+ "▁<MID>": 32001,
4
+ "▁<PRE>": 32000,
5
+ "▁<SUF>": 32002
6
+ }
config.json ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "codellama/CodeLlama-7b-Instruct-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_type": "fp4",
25
+ "bnb_4bit_use_double_quant": false,
26
+ "llm_int8_enable_fp32_cpu_offload": false,
27
+ "llm_int8_has_fp16_weight": false,
28
+ "llm_int8_skip_modules": null,
29
+ "llm_int8_threshold": 6.0,
30
+ "load_in_4bit": false,
31
+ "load_in_8bit": true,
32
+ "quant_method": "bitsandbytes"
33
+ },
34
+ "rms_norm_eps": 1e-05,
35
+ "rope_scaling": null,
36
+ "rope_theta": 1000000,
37
+ "tie_word_embeddings": false,
38
+ "torch_dtype": "bfloat16",
39
+ "transformers_version": "4.39.0.dev0",
40
+ "use_cache": false,
41
+ "vocab_size": 32016
42
+ }
logs.txt ADDED
@@ -0,0 +1,161 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: llama2
3
+ base_model: codellama/CodeLlama-7b-Instruct-hf
4
+ tags:
5
+ - generated_from_trainer
6
+ library_name: peft
7
+ model-index:
8
+ - name: work/10283/sarella/ls6/exlong-internal/_work/exp/conditionnestack2e-with-name-ft/lora-codellama-7b-123
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
+ adapter: lora
21
+ base_model: codellama/CodeLlama-7b-Instruct-hf
22
+ base_model_config: codellama/CodeLlama-7b-Instruct-hf
23
+ bf16: true
24
+ dataset_prepared_path: null
25
+ datasets:
26
+ - path: /work/10283/sarella/ls6/exlong-internal/_work/setup/conditionnestack2e-with-name-ft/train/train/train-conditionnestack2e-with-name-ft.jsonl
27
+ type:
28
+ field_input: input
29
+ field_instruction: instruction
30
+ field_output: output
31
+ field_system: system
32
+ format: '{instruction}'
33
+ no_input_format: '{instruction}'
34
+ system_format: '{system}'
35
+ system_prompt: You are a helpful programming assistant and an expert Java programmer.
36
+ You are helping a user writing exceptional-behavior tests for their Java code.
37
+ debug: null
38
+ deepspeed: null
39
+ early_stopping_patience: null
40
+ eval_sample_packing: false
41
+ eval_steps: 20
42
+ flash_attention: true
43
+ fp16: false
44
+ fsdp: null
45
+ fsdp_config: null
46
+ gradient_accumulation_steps: 8
47
+ gradient_checkpointing: true
48
+ group_by_length: false
49
+ is_llama_derived_model: true
50
+ learning_rate: 0.0002
51
+ load_in_4bit: false
52
+ load_in_8bit: true
53
+ local_rank: null
54
+ logging_steps: 1
55
+ lora_alpha: 16
56
+ lora_dropout: 0.05
57
+ lora_fan_in_fan_out: null
58
+ lora_model_dir: null
59
+ lora_r: 32
60
+ lora_target_linear: true
61
+ lr_scheduler: cosine
62
+ micro_batch_size: 4
63
+ model_type: LlamaForCausalLM
64
+ num_epochs: 3
65
+ optimizer: adamw_bnb_8bit
66
+ output_dir: /work/10283/sarella/ls6/exlong-internal/_work/exp/conditionnestack2e-with-name-ft/lora-codellama-7b-123
67
+ pad_to_sequence_len: true
68
+ resume_from_checkpoint: null
69
+ sample_packing: true
70
+ save_steps: null
71
+ seed: 123
72
+ sequence_len: 4096
73
+ special_tokens:
74
+ bos_token: <s>
75
+ eos_token: </s>
76
+ unk_token: <unk>
77
+ strict: false
78
+ tf32: false
79
+ tokenizer_type: CodeLlamaTokenizer
80
+ train_on_inputs: false
81
+ val_set_size: 0.01
82
+ wandb_entity: null
83
+ wandb_log_model: null
84
+ wandb_project: null
85
+ wandb_run_id: null
86
+ wandb_watch: null
87
+ warmup_steps: 10
88
+ weight_decay: 0.0
89
+ xformers_attention: null
90
+
91
+ ```
92
+
93
+ </details><br>
94
+
95
+ # work/10283/sarella/ls6/exlong-internal/_work/exp/conditionnestack2e-with-name-ft/lora-codellama-7b-123
96
+
97
+ This model is a fine-tuned version of [codellama/CodeLlama-7b-Instruct-hf](https://huggingface.co/codellama/CodeLlama-7b-Instruct-hf) on the None dataset.
98
+ It achieves the following results on the evaluation set:
99
+ - Loss: 0.2909
100
+
101
+ ## Model description
102
+
103
+ More information needed
104
+
105
+ ## Intended uses & limitations
106
+
107
+ More information needed
108
+
109
+ ## Training and evaluation data
110
+
111
+ More information needed
112
+
113
+ ## Training procedure
114
+
115
+ ### Training hyperparameters
116
+
117
+ The following hyperparameters were used during training:
118
+ - learning_rate: 0.0002
119
+ - train_batch_size: 4
120
+ - eval_batch_size: 4
121
+ - seed: 123
122
+ - gradient_accumulation_steps: 8
123
+ - total_train_batch_size: 32
124
+ - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
125
+ - lr_scheduler_type: cosine
126
+ - lr_scheduler_warmup_steps: 10
127
+ - num_epochs: 3
128
+
129
+ ### Training results
130
+
131
+ | Training Loss | Epoch | Step | Validation Loss |
132
+ |:-------------:|:-----:|:----:|:---------------:|
133
+ | 0.631 | 0.01 | 1 | 0.7976 |
134
+ | 0.2584 | 0.16 | 20 | 0.3000 |
135
+ | 0.2045 | 0.31 | 40 | 0.2802 |
136
+ | 0.1596 | 0.47 | 60 | 0.2725 |
137
+ | 0.2024 | 0.62 | 80 | 0.2715 |
138
+ | 0.1613 | 0.78 | 100 | 0.2638 |
139
+ | 0.1341 | 0.93 | 120 | 0.2638 |
140
+ | 0.1295 | 1.07 | 140 | 0.2672 |
141
+ | 0.122 | 1.22 | 160 | 0.2694 |
142
+ | 0.1247 | 1.38 | 180 | 0.2711 |
143
+ | 0.1344 | 1.53 | 200 | 0.2733 |
144
+ | 0.1329 | 1.69 | 220 | 0.2796 |
145
+ | 0.1095 | 1.85 | 240 | 0.2731 |
146
+ | 0.1167 | 2.0 | 260 | 0.2751 |
147
+ | 0.0929 | 2.14 | 280 | 0.2849 |
148
+ | 0.1112 | 2.3 | 300 | 0.2927 |
149
+ | 0.1132 | 2.45 | 320 | 0.2856 |
150
+ | 0.0876 | 2.61 | 340 | 0.2915 |
151
+ | 0.0982 | 2.76 | 360 | 0.2894 |
152
+ | 0.1042 | 2.92 | 380 | 0.2909 |
153
+
154
+
155
+ ### Framework versions
156
+
157
+ - PEFT 0.10.0
158
+ - Transformers 4.39.0.dev0
159
+ - Pytorch 2.1.2
160
+ - Datasets 2.18.0
161
+ - Tokenizers 0.15.0
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,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "chat_template": "{% 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 %}",
70
+ "clean_up_tokenization_spaces": false,
71
+ "eos_token": "</s>",
72
+ "eot_token": "▁<EOT>",
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_first": false,
81
+ "suffix_token": "▁<SUF>",
82
+ "tokenizer_class": "CodeLlamaTokenizer",
83
+ "unk_token": "<unk>",
84
+ "use_default_system_prompt": false,
85
+ "use_fast": true
86
+ }