diff --git a/lora_adapter/README.md b/lora_adapter/README.md new file mode 100644 index 0000000000000000000000000000000000000000..cfde516956bd8bd81a8adcba692a87cdf9f5f1a1 --- /dev/null +++ b/lora_adapter/README.md @@ -0,0 +1,62 @@ +--- +base_model: unsloth/Llama-3.2-1B-Instruct +library_name: peft +model_name: remasterphantom-v3-lora +tags: +- base_model:adapter:unsloth/Llama-3.2-1B-Instruct +- lora +- sft +- transformers +- trl +licence: license +pipeline_tag: text-generation +--- + +# Model Card for remasterphantom-v3-lora + +This model is a fine-tuned version of [unsloth/Llama-3.2-1B-Instruct](https://huggingface.co/unsloth/Llama-3.2-1B-Instruct). +It has been trained using [TRL](https://github.com/huggingface/trl). + +## Quick start + +```python +from transformers import pipeline + +question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?" +generator = pipeline("text-generation", model="None", device="cuda") +output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0] +print(output["generated_text"]) +``` + +## Training procedure + + + + + +This model was trained with SFT. + +### Framework versions + +- PEFT 0.21.0 +- TRL: 1.13.0 +- Transformers: 5.17.0 +- Pytorch: 2.14.0 +- Datasets: 5.0.1 +- Tokenizers: 0.23.2 + +## Citations + + + +Cite TRL as: + +```bibtex +@software{vonwerra2020trl, + title = {{TRL: Transformers Reinforcement Learning}}, + author = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin}, + license = {Apache-2.0}, + url = {https://github.com/huggingface/trl}, + year = {2020} +} +``` \ No newline at end of file diff --git a/lora_adapter/adapter_config.json b/lora_adapter/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9fc6d48d117b17f3327161e9f5b1303db2b64ee1 --- /dev/null +++ b/lora_adapter/adapter_config.json @@ -0,0 +1,51 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "unsloth/Llama-3.2-1B-Instruct", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "kasa_config": null, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 32, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "monteclora_config": null, + "peft_type": "LORA", + "peft_version": "0.21.0", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "up_proj", + "v_proj", + "q_proj", + "down_proj", + "gate_proj", + "o_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false, + "velora_config": null +} \ No newline at end of file diff --git a/lora_adapter/adapter_model.safetensors b/lora_adapter/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..a948167a01fd82ee1ac1a45ffa33252d6403cab7 --- /dev/null +++ b/lora_adapter/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31d1ddd1ca763194d58b9e5cf9e6f532bd715ad8726df701929745cb6a4311f5 +size 45118424 diff --git a/lora_adapter/chat_template.jinja b/lora_adapter/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..1bad6a0f648dccdbec523ca79ba90fbcfc806af0 --- /dev/null +++ b/lora_adapter/chat_template.jinja @@ -0,0 +1,93 @@ +{{- bos_token }} +{%- if custom_tools is defined %} + {%- set tools = custom_tools %} +{%- endif %} +{%- if not tools_in_user_message is defined %} + {%- set tools_in_user_message = true %} +{%- endif %} +{%- if not date_string is defined %} + {%- if strftime_now is defined %} + {%- set date_string = strftime_now("%d %b %Y") %} + {%- else %} + {%- set date_string = "26 Jul 2024" %} + {%- endif %} +{%- endif %} +{%- if not tools is defined %} + {%- set tools = none %} +{%- endif %} + +{#- This block extracts the system message, so we can slot it into the right place. #} +{%- if messages[0]['role'] == 'system' %} + {%- set system_message = messages[0]['content']|trim %} + {%- set messages = messages[1:] %} +{%- else %} + {%- set system_message = "" %} +{%- endif %} + +{#- System message #} +{{- "<|start_header_id|>system<|end_header_id|>\n\n" }} +{%- if tools is not none %} + {{- "Environment: ipython\n" }} +{%- endif %} +{{- "Cutting Knowledge Date: December 2023\n" }} +{{- "Today Date: " + date_string + "\n\n" }} +{%- if tools is not none and not tools_in_user_message %} + {{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }} + {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }} + {{- "Do not use variables.\n\n" }} + {%- for t in tools %} + {{- t | tojson(indent=4) }} + {{- "\n\n" }} + {%- endfor %} +{%- endif %} +{{- system_message }} +{{- "<|eot_id|>" }} + +{#- Custom tools are passed in a user message with some extra guidance #} +{%- if tools_in_user_message and not tools is none %} + {#- Extract the first user message so we can plug it in here #} + {%- if messages | length != 0 %} + {%- set first_user_message = messages[0]['content']|trim %} + {%- set messages = messages[1:] %} + {%- else %} + {{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }} +{%- endif %} + {{- '<|start_header_id|>user<|end_header_id|>\n\n' -}} + {{- "Given the following functions, please respond with a JSON for a function call " }} + {{- "with its proper arguments that best answers the given prompt.\n\n" }} + {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }} + {{- "Do not use variables.\n\n" }} + {%- for t in tools %} + {{- t | tojson(indent=4) }} + {{- "\n\n" }} + {%- endfor %} + {{- first_user_message + "<|eot_id|>"}} +{%- endif %} + +{%- for message in messages %} + {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %} + {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' }} + {%- elif 'tool_calls' in message %} + {%- if not message.tool_calls|length == 1 %} + {{- raise_exception("This model only supports single tool-calls at once!") }} + {%- endif %} + {%- set tool_call = message.tool_calls[0].function %} + {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}} + {{- '{"name": "' + tool_call.name + '", ' }} + {{- '"parameters": ' }} + {{- tool_call.arguments | tojson }} + {{- "}" }} + {{- "<|eot_id|>" }} + {%- elif message.role == "tool" or message.role == "ipython" %} + {{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }} + {%- if message.content is mapping or message.content is iterable %} + {{- message.content | tojson }} + {%- else %} + {{- message.content }} + {%- endif %} + {{- "<|eot_id|>" }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }} +{%- endif %} diff --git a/lora_adapter/checkpoint-150/README.md b/lora_adapter/checkpoint-150/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d3dc0eb5ed577a95106ea65ebc59964ca88d0260 --- /dev/null +++ b/lora_adapter/checkpoint-150/README.md @@ -0,0 +1,209 @@ +--- +base_model: unsloth/Llama-3.2-1B-Instruct +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/Llama-3.2-1B-Instruct +- lora +- sft +- transformers +- trl +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +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). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.21.0 \ No newline at end of file diff --git a/lora_adapter/checkpoint-150/adapter_config.json b/lora_adapter/checkpoint-150/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9fc6d48d117b17f3327161e9f5b1303db2b64ee1 --- /dev/null +++ b/lora_adapter/checkpoint-150/adapter_config.json @@ -0,0 +1,51 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "unsloth/Llama-3.2-1B-Instruct", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "kasa_config": null, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 32, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "monteclora_config": null, + "peft_type": "LORA", + "peft_version": "0.21.0", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "up_proj", + "v_proj", + "q_proj", + "down_proj", + "gate_proj", + "o_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false, + "velora_config": null +} \ No newline at end of file diff --git a/lora_adapter/checkpoint-150/adapter_model.safetensors b/lora_adapter/checkpoint-150/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..8f64497dee00761176f73a6cb1e66673e5717191 --- /dev/null +++ b/lora_adapter/checkpoint-150/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:071c83a50e0222dc3957633847e8133b8c0a407aa8d2a6e63bd941086afd2d53 +size 45118424 diff --git a/lora_adapter/checkpoint-150/chat_template.jinja b/lora_adapter/checkpoint-150/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..1bad6a0f648dccdbec523ca79ba90fbcfc806af0 --- /dev/null +++ b/lora_adapter/checkpoint-150/chat_template.jinja @@ -0,0 +1,93 @@ +{{- bos_token }} +{%- if custom_tools is defined %} + {%- set tools = custom_tools %} +{%- endif %} +{%- if not tools_in_user_message is defined %} + {%- set tools_in_user_message = true %} +{%- endif %} +{%- if not date_string is defined %} + {%- if strftime_now is defined %} + {%- set date_string = strftime_now("%d %b %Y") %} + {%- else %} + {%- set date_string = "26 Jul 2024" %} + {%- endif %} +{%- endif %} +{%- if not tools is defined %} + {%- set tools = none %} +{%- endif %} + +{#- This block extracts the system message, so we can slot it into the right place. #} +{%- if messages[0]['role'] == 'system' %} + {%- set system_message = messages[0]['content']|trim %} + {%- set messages = messages[1:] %} +{%- else %} + {%- set system_message = "" %} +{%- endif %} + +{#- System message #} +{{- "<|start_header_id|>system<|end_header_id|>\n\n" }} +{%- if tools is not none %} + {{- "Environment: ipython\n" }} +{%- endif %} +{{- "Cutting Knowledge Date: December 2023\n" }} +{{- "Today Date: " + date_string + "\n\n" }} +{%- if tools is not none and not tools_in_user_message %} + {{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }} + {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }} + {{- "Do not use variables.\n\n" }} + {%- for t in tools %} + {{- t | tojson(indent=4) }} + {{- "\n\n" }} + {%- endfor %} +{%- endif %} +{{- system_message }} +{{- "<|eot_id|>" }} + +{#- Custom tools are passed in a user message with some extra guidance #} +{%- if tools_in_user_message and not tools is none %} + {#- Extract the first user message so we can plug it in here #} + {%- if messages | length != 0 %} + {%- set first_user_message = messages[0]['content']|trim %} + {%- set messages = messages[1:] %} + {%- else %} + {{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }} +{%- endif %} + {{- '<|start_header_id|>user<|end_header_id|>\n\n' -}} + {{- "Given the following functions, please respond with a JSON for a function call " }} + {{- "with its proper arguments that best answers the given prompt.\n\n" }} + {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }} + {{- "Do not use variables.\n\n" }} + {%- for t in tools %} + {{- t | tojson(indent=4) }} + {{- "\n\n" }} + {%- endfor %} + {{- first_user_message + "<|eot_id|>"}} +{%- endif %} + +{%- for message in messages %} + {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %} + {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' }} + {%- elif 'tool_calls' in message %} + {%- if not message.tool_calls|length == 1 %} + {{- raise_exception("This model only supports single tool-calls at once!") }} + {%- endif %} + {%- set tool_call = message.tool_calls[0].function %} + {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}} + {{- '{"name": "' + tool_call.name + '", ' }} + {{- '"parameters": ' }} + {{- tool_call.arguments | tojson }} + {{- "}" }} + {{- "<|eot_id|>" }} + {%- elif message.role == "tool" or message.role == "ipython" %} + {{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }} + {%- if message.content is mapping or message.content is iterable %} + {{- message.content | tojson }} + {%- else %} + {{- message.content }} + {%- endif %} + {{- "<|eot_id|>" }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }} +{%- endif %} diff --git a/lora_adapter/checkpoint-150/optimizer.pt b/lora_adapter/checkpoint-150/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..f627aaffdfdb91dd2b2ba26f21c9e6d16d1edd4c --- /dev/null +++ b/lora_adapter/checkpoint-150/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e8bc3f5bbd4a3bb400b79c762ec5c07ee8e7482c5ced7070badadea5546b82b6 +size 90359883 diff --git a/lora_adapter/checkpoint-150/rng_state.pth b/lora_adapter/checkpoint-150/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..3f5c250a692e034a27fb06d7008612b2de078116 --- /dev/null +++ b/lora_adapter/checkpoint-150/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cddf27219365242ec1046a3532a63a24c3f350c77f100e4f973369db2cc849d +size 14455 diff --git a/lora_adapter/checkpoint-150/scheduler.pt b/lora_adapter/checkpoint-150/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..9a5ce39be9ee103189bdcb209a1fb1008f196a3e --- /dev/null +++ b/lora_adapter/checkpoint-150/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60dc73bf06f1c582f0b5527719877be2fa3bfa198848a85bce18940b7bd712cf +size 1465 diff --git a/lora_adapter/checkpoint-150/tokenizer.json b/lora_adapter/checkpoint-150/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/lora_adapter/checkpoint-150/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/lora_adapter/checkpoint-150/tokenizer_config.json b/lora_adapter/checkpoint-150/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..e96dccba83271308819f796d3b00a0aa21dfef00 --- /dev/null +++ b/lora_adapter/checkpoint-150/tokenizer_config.json @@ -0,0 +1,17 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|eot_id|>", + "is_local": false, + "local_files_only": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "left", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/lora_adapter/checkpoint-150/trainer_state.json b/lora_adapter/checkpoint-150/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..aea0e1b5c73a44e3d255773962aafebfddbb32d3 --- /dev/null +++ b/lora_adapter/checkpoint-150/trainer_state.json @@ -0,0 +1,184 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 0.6511123168746609, + "eval_steps": 500, + "global_step": 150, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 3.268431743979454, + "epoch": 0.04340748779164406, + "grad_norm": 5.425721168518066, + "learning_rate": 3e-05, + "loss": 4.763444137573242, + "mean_token_accuracy": 0.37437669970095155, + "num_tokens": 15851.0, + "step": 10 + }, + { + "entropy": 3.6355564504861833, + "epoch": 0.08681497558328811, + "grad_norm": 2.6653194427490234, + "learning_rate": 6.333333333333333e-05, + "loss": 3.661287307739258, + "mean_token_accuracy": 0.4522986955940723, + "num_tokens": 31565.0, + "step": 20 + }, + { + "entropy": 3.110316979885101, + "epoch": 0.13022246337493218, + "grad_norm": 1.8292694091796875, + "learning_rate": 9.666666666666667e-05, + "loss": 2.4040077209472654, + "mean_token_accuracy": 0.6126278236508369, + "num_tokens": 47681.0, + "step": 30 + }, + { + "entropy": 1.947795458137989, + "epoch": 0.17362995116657623, + "grad_norm": 1.7558073997497559, + "learning_rate": 0.00013000000000000002, + "loss": 1.4649612426757812, + "mean_token_accuracy": 0.7671711064875126, + "num_tokens": 63639.0, + "step": 40 + }, + { + "entropy": 1.2642615631222724, + "epoch": 0.21703743895822028, + "grad_norm": 1.8000116348266602, + "learning_rate": 0.00016333333333333334, + "loss": 0.9385161399841309, + "mean_token_accuracy": 0.8446647509932518, + "num_tokens": 79224.0, + "step": 50 + }, + { + "entropy": 0.9772241789847612, + "epoch": 0.26044492674986436, + "grad_norm": 1.5789580345153809, + "learning_rate": 0.00019666666666666666, + "loss": 0.6508745193481446, + "mean_token_accuracy": 0.8930118441581726, + "num_tokens": 94825.0, + "step": 60 + }, + { + "entropy": 0.7386516474187375, + "epoch": 0.3038524145415084, + "grad_norm": 1.118341088294983, + "learning_rate": 0.0001999002586734068, + "loss": 0.5544538021087646, + "mean_token_accuracy": 0.9125440023839474, + "num_tokens": 110902.0, + "step": 70 + }, + { + "entropy": 0.4801172070205212, + "epoch": 0.34725990233315246, + "grad_norm": 1.0871493816375732, + "learning_rate": 0.00019955572927610798, + "loss": 0.32133638858795166, + "mean_token_accuracy": 0.9453130982816219, + "num_tokens": 126758.0, + "step": 80 + }, + { + "entropy": 0.4470752142369747, + "epoch": 0.3906673901247965, + "grad_norm": 0.9949904084205627, + "learning_rate": 0.00019896602868774615, + "loss": 0.33235070705413816, + "mean_token_accuracy": 0.9432531543076038, + "num_tokens": 142247.0, + "step": 90 + }, + { + "entropy": 0.43914212100207806, + "epoch": 0.43407487791644056, + "grad_norm": 1.2417030334472656, + "learning_rate": 0.00019813260913610048, + "loss": 0.32300994396209715, + "mean_token_accuracy": 0.9425150409340859, + "num_tokens": 158033.0, + "step": 100 + }, + { + "entropy": 0.38672009818255904, + "epoch": 0.47748236570808467, + "grad_norm": 1.4303337335586548, + "learning_rate": 0.00019705752304412648, + "loss": 0.3090308904647827, + "mean_token_accuracy": 0.9426406390964985, + "num_tokens": 173972.0, + "step": 110 + }, + { + "entropy": 0.2582590217702091, + "epoch": 0.5208898534997287, + "grad_norm": 0.7586016654968262, + "learning_rate": 0.00019574341797555143, + "loss": 0.16584413051605223, + "mean_token_accuracy": 0.9635460428893566, + "num_tokens": 189557.0, + "step": 120 + }, + { + "entropy": 0.29735598172992467, + "epoch": 0.5642973412913728, + "grad_norm": 1.3573423624038696, + "learning_rate": 0.00019419353011484387, + "loss": 0.23453230857849122, + "mean_token_accuracy": 0.9539774417877197, + "num_tokens": 205568.0, + "step": 130 + }, + { + "entropy": 0.3157164487987757, + "epoch": 0.6077048290830168, + "grad_norm": 0.7886211276054382, + "learning_rate": 0.00019241167629761527, + "loss": 0.24561758041381837, + "mean_token_accuracy": 0.951296404749155, + "num_tokens": 221240.0, + "step": 140 + }, + { + "entropy": 0.41249370062723756, + "epoch": 0.6511123168746609, + "grad_norm": 0.6835598945617676, + "learning_rate": 0.00019040224461107917, + "loss": 0.3280463695526123, + "mean_token_accuracy": 0.9425421200692654, + "num_tokens": 236889.0, + "step": 150 + } + ], + "logging_steps": 10, + "max_steps": 693, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 150, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1399187205697536.0, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/lora_adapter/checkpoint-150/training_args.bin b/lora_adapter/checkpoint-150/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..b9f6c3f9cbf215fdd6c495aa3f4bd03b36976a6a --- /dev/null +++ b/lora_adapter/checkpoint-150/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f02029ae097ac6a5686a868c70c7fb13e1a18c4978ab722ce3a1759ddbc101a +size 5713 diff --git a/lora_adapter/checkpoint-300/README.md b/lora_adapter/checkpoint-300/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d3dc0eb5ed577a95106ea65ebc59964ca88d0260 --- /dev/null +++ b/lora_adapter/checkpoint-300/README.md @@ -0,0 +1,209 @@ +--- +base_model: unsloth/Llama-3.2-1B-Instruct +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/Llama-3.2-1B-Instruct +- lora +- sft +- transformers +- trl +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +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). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.21.0 \ No newline at end of file diff --git a/lora_adapter/checkpoint-300/adapter_config.json b/lora_adapter/checkpoint-300/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9fc6d48d117b17f3327161e9f5b1303db2b64ee1 --- /dev/null +++ b/lora_adapter/checkpoint-300/adapter_config.json @@ -0,0 +1,51 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "unsloth/Llama-3.2-1B-Instruct", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "kasa_config": null, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 32, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "monteclora_config": null, + "peft_type": "LORA", + "peft_version": "0.21.0", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "up_proj", + "v_proj", + "q_proj", + "down_proj", + "gate_proj", + "o_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false, + "velora_config": null +} \ No newline at end of file diff --git a/lora_adapter/checkpoint-300/adapter_model.safetensors b/lora_adapter/checkpoint-300/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..c54b4fd6854d58560f5c94630bc3b58cde0beb9d --- /dev/null +++ b/lora_adapter/checkpoint-300/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb6259c71820f0a9cf28059bd0a7f50ba4c7d775c5508099710f54c95a16f99f +size 45118424 diff --git a/lora_adapter/checkpoint-300/chat_template.jinja b/lora_adapter/checkpoint-300/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..1bad6a0f648dccdbec523ca79ba90fbcfc806af0 --- /dev/null +++ b/lora_adapter/checkpoint-300/chat_template.jinja @@ -0,0 +1,93 @@ +{{- bos_token }} +{%- if custom_tools is defined %} + {%- set tools = custom_tools %} +{%- endif %} +{%- if not tools_in_user_message is defined %} + {%- set tools_in_user_message = true %} +{%- endif %} +{%- if not date_string is defined %} + {%- if strftime_now is defined %} + {%- set date_string = strftime_now("%d %b %Y") %} + {%- else %} + {%- set date_string = "26 Jul 2024" %} + {%- endif %} +{%- endif %} +{%- if not tools is defined %} + {%- set tools = none %} +{%- endif %} + +{#- This block extracts the system message, so we can slot it into the right place. #} +{%- if messages[0]['role'] == 'system' %} + {%- set system_message = messages[0]['content']|trim %} + {%- set messages = messages[1:] %} +{%- else %} + {%- set system_message = "" %} +{%- endif %} + +{#- System message #} +{{- "<|start_header_id|>system<|end_header_id|>\n\n" }} +{%- if tools is not none %} + {{- "Environment: ipython\n" }} +{%- endif %} +{{- "Cutting Knowledge Date: December 2023\n" }} +{{- "Today Date: " + date_string + "\n\n" }} +{%- if tools is not none and not tools_in_user_message %} + {{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }} + {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }} + {{- "Do not use variables.\n\n" }} + {%- for t in tools %} + {{- t | tojson(indent=4) }} + {{- "\n\n" }} + {%- endfor %} +{%- endif %} +{{- system_message }} +{{- "<|eot_id|>" }} + +{#- Custom tools are passed in a user message with some extra guidance #} +{%- if tools_in_user_message and not tools is none %} + {#- Extract the first user message so we can plug it in here #} + {%- if messages | length != 0 %} + {%- set first_user_message = messages[0]['content']|trim %} + {%- set messages = messages[1:] %} + {%- else %} + {{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }} +{%- endif %} + {{- '<|start_header_id|>user<|end_header_id|>\n\n' -}} + {{- "Given the following functions, please respond with a JSON for a function call " }} + {{- "with its proper arguments that best answers the given prompt.\n\n" }} + {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }} + {{- "Do not use variables.\n\n" }} + {%- for t in tools %} + {{- t | tojson(indent=4) }} + {{- "\n\n" }} + {%- endfor %} + {{- first_user_message + "<|eot_id|>"}} +{%- endif %} + +{%- for message in messages %} + {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %} + {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' }} + {%- elif 'tool_calls' in message %} + {%- if not message.tool_calls|length == 1 %} + {{- raise_exception("This model only supports single tool-calls at once!") }} + {%- endif %} + {%- set tool_call = message.tool_calls[0].function %} + {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}} + {{- '{"name": "' + tool_call.name + '", ' }} + {{- '"parameters": ' }} + {{- tool_call.arguments | tojson }} + {{- "}" }} + {{- "<|eot_id|>" }} + {%- elif message.role == "tool" or message.role == "ipython" %} + {{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }} + {%- if message.content is mapping or message.content is iterable %} + {{- message.content | tojson }} + {%- else %} + {{- message.content }} + {%- endif %} + {{- "<|eot_id|>" }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }} +{%- endif %} diff --git a/lora_adapter/checkpoint-300/optimizer.pt b/lora_adapter/checkpoint-300/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..ec20eb0a2794694d373650eecfe9915e593b8cb3 --- /dev/null +++ b/lora_adapter/checkpoint-300/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b864b170703c7ff3bd4b166bc4c2496dcc068f47b21b661c0650ebbe93b358de +size 90359883 diff --git a/lora_adapter/checkpoint-300/rng_state.pth b/lora_adapter/checkpoint-300/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..7d150fc4504460cdea273ef2adcb04a65c626709 --- /dev/null +++ b/lora_adapter/checkpoint-300/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dba4fde4ee04d2f472bb4dea96a48e8fdf7891d2b0694a8f012e8133a2e176ae +size 14455 diff --git a/lora_adapter/checkpoint-300/scheduler.pt b/lora_adapter/checkpoint-300/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..c928268d2ec14e73b04df7deb4a4061c4cf26d9c --- /dev/null +++ b/lora_adapter/checkpoint-300/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:25fcf670f053f7304b15a0d03a8d7d981c4f3341ba3098848093cb91bc25fd70 +size 1465 diff --git a/lora_adapter/checkpoint-300/tokenizer.json b/lora_adapter/checkpoint-300/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/lora_adapter/checkpoint-300/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/lora_adapter/checkpoint-300/tokenizer_config.json b/lora_adapter/checkpoint-300/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..e96dccba83271308819f796d3b00a0aa21dfef00 --- /dev/null +++ b/lora_adapter/checkpoint-300/tokenizer_config.json @@ -0,0 +1,17 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|eot_id|>", + "is_local": false, + "local_files_only": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "left", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/lora_adapter/checkpoint-300/trainer_state.json b/lora_adapter/checkpoint-300/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..a2ed958e962145ca09b3265d14eb902bed3eb672 --- /dev/null +++ b/lora_adapter/checkpoint-300/trainer_state.json @@ -0,0 +1,345 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 1.299511665762344, + "eval_steps": 500, + "global_step": 300, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 3.268431743979454, + "epoch": 0.04340748779164406, + "grad_norm": 5.425721168518066, + "learning_rate": 3e-05, + "loss": 4.763444137573242, + "mean_token_accuracy": 0.37437669970095155, + "num_tokens": 15851.0, + "step": 10 + }, + { + "entropy": 3.6355564504861833, + "epoch": 0.08681497558328811, + "grad_norm": 2.6653194427490234, + "learning_rate": 6.333333333333333e-05, + "loss": 3.661287307739258, + "mean_token_accuracy": 0.4522986955940723, + "num_tokens": 31565.0, + "step": 20 + }, + { + "entropy": 3.110316979885101, + "epoch": 0.13022246337493218, + "grad_norm": 1.8292694091796875, + "learning_rate": 9.666666666666667e-05, + "loss": 2.4040077209472654, + "mean_token_accuracy": 0.6126278236508369, + "num_tokens": 47681.0, + "step": 30 + }, + { + "entropy": 1.947795458137989, + "epoch": 0.17362995116657623, + "grad_norm": 1.7558073997497559, + "learning_rate": 0.00013000000000000002, + "loss": 1.4649612426757812, + "mean_token_accuracy": 0.7671711064875126, + "num_tokens": 63639.0, + "step": 40 + }, + { + "entropy": 1.2642615631222724, + "epoch": 0.21703743895822028, + "grad_norm": 1.8000116348266602, + "learning_rate": 0.00016333333333333334, + "loss": 0.9385161399841309, + "mean_token_accuracy": 0.8446647509932518, + "num_tokens": 79224.0, + "step": 50 + }, + { + "entropy": 0.9772241789847612, + "epoch": 0.26044492674986436, + "grad_norm": 1.5789580345153809, + "learning_rate": 0.00019666666666666666, + "loss": 0.6508745193481446, + "mean_token_accuracy": 0.8930118441581726, + "num_tokens": 94825.0, + "step": 60 + }, + { + "entropy": 0.7386516474187375, + "epoch": 0.3038524145415084, + "grad_norm": 1.118341088294983, + "learning_rate": 0.0001999002586734068, + "loss": 0.5544538021087646, + "mean_token_accuracy": 0.9125440023839474, + "num_tokens": 110902.0, + "step": 70 + }, + { + "entropy": 0.4801172070205212, + "epoch": 0.34725990233315246, + "grad_norm": 1.0871493816375732, + "learning_rate": 0.00019955572927610798, + "loss": 0.32133638858795166, + "mean_token_accuracy": 0.9453130982816219, + "num_tokens": 126758.0, + "step": 80 + }, + { + "entropy": 0.4470752142369747, + "epoch": 0.3906673901247965, + "grad_norm": 0.9949904084205627, + "learning_rate": 0.00019896602868774615, + "loss": 0.33235070705413816, + "mean_token_accuracy": 0.9432531543076038, + "num_tokens": 142247.0, + "step": 90 + }, + { + "entropy": 0.43914212100207806, + "epoch": 0.43407487791644056, + "grad_norm": 1.2417030334472656, + "learning_rate": 0.00019813260913610048, + "loss": 0.32300994396209715, + "mean_token_accuracy": 0.9425150409340859, + "num_tokens": 158033.0, + "step": 100 + }, + { + "entropy": 0.38672009818255904, + "epoch": 0.47748236570808467, + "grad_norm": 1.4303337335586548, + "learning_rate": 0.00019705752304412648, + "loss": 0.3090308904647827, + "mean_token_accuracy": 0.9426406390964985, + "num_tokens": 173972.0, + "step": 110 + }, + { + "entropy": 0.2582590217702091, + "epoch": 0.5208898534997287, + "grad_norm": 0.7586016654968262, + "learning_rate": 0.00019574341797555143, + "loss": 0.16584413051605223, + "mean_token_accuracy": 0.9635460428893566, + "num_tokens": 189557.0, + "step": 120 + }, + { + "entropy": 0.29735598172992467, + "epoch": 0.5642973412913728, + "grad_norm": 1.3573423624038696, + "learning_rate": 0.00019419353011484387, + "loss": 0.23453230857849122, + "mean_token_accuracy": 0.9539774417877197, + "num_tokens": 205568.0, + "step": 130 + }, + { + "entropy": 0.3157164487987757, + "epoch": 0.6077048290830168, + "grad_norm": 0.7886211276054382, + "learning_rate": 0.00019241167629761527, + "loss": 0.24561758041381837, + "mean_token_accuracy": 0.951296404749155, + "num_tokens": 221240.0, + "step": 140 + }, + { + "entropy": 0.41249370062723756, + "epoch": 0.6511123168746609, + "grad_norm": 0.6835598945617676, + "learning_rate": 0.00019040224461107917, + "loss": 0.3280463695526123, + "mean_token_accuracy": 0.9425421200692654, + "num_tokens": 236889.0, + "step": 150 + }, + { + "entropy": 0.25797676630318167, + "epoch": 0.6945198046663049, + "grad_norm": 0.5169897675514221, + "learning_rate": 0.0001881701835877161, + "loss": 0.17580994367599487, + "mean_token_accuracy": 0.9615871131420135, + "num_tokens": 252552.0, + "step": 160 + }, + { + "entropy": 0.3551043555140495, + "epoch": 0.737927292457949, + "grad_norm": 0.9616410136222839, + "learning_rate": 0.0001857209900187565, + "loss": 0.3012498140335083, + "mean_token_accuracy": 0.9450895473361015, + "num_tokens": 268798.0, + "step": 170 + }, + { + "entropy": 0.3095861619338393, + "epoch": 0.781334780249593, + "grad_norm": 1.0524218082427979, + "learning_rate": 0.00018306069541749258, + "loss": 0.21495308876037597, + "mean_token_accuracy": 0.95635409578681, + "num_tokens": 284560.0, + "step": 180 + }, + { + "entropy": 0.3253756103105843, + "epoch": 0.8247422680412371, + "grad_norm": 0.44378986954689026, + "learning_rate": 0.00018019585116575555, + "loss": 0.27938573360443114, + "mean_token_accuracy": 0.9474706895649433, + "num_tokens": 300840.0, + "step": 190 + }, + { + "entropy": 0.2480218150652945, + "epoch": 0.8681497558328811, + "grad_norm": 0.376433789730072, + "learning_rate": 0.000177133512380137, + "loss": 0.18635139465332032, + "mean_token_accuracy": 0.9606560796499253, + "num_tokens": 316455.0, + "step": 200 + }, + { + "entropy": 0.26516002183780074, + "epoch": 0.9115572436245253, + "grad_norm": 0.447360634803772, + "learning_rate": 0.00017388122053768674, + "loss": 0.20903537273406983, + "mean_token_accuracy": 0.9590088307857514, + "num_tokens": 332359.0, + "step": 210 + }, + { + "entropy": 0.22508152723312377, + "epoch": 0.9549647314161693, + "grad_norm": 0.39458373188972473, + "learning_rate": 0.0001704469849038734, + "loss": 0.17320446968078612, + "mean_token_accuracy": 0.9621456168591976, + "num_tokens": 348219.0, + "step": 220 + }, + { + "entropy": 0.1884014437906444, + "epoch": 0.9983722192078134, + "grad_norm": 0.5577853918075562, + "learning_rate": 0.00016683926280854484, + "loss": 0.14232510328292847, + "mean_token_accuracy": 0.967728354781866, + "num_tokens": 363802.0, + "step": 230 + }, + { + "epoch": 1.0, + "eval_entropy": 0.2500555583713006, + "eval_loss": 0.2172880917787552, + "eval_mean_token_accuracy": 0.9547121439661298, + "eval_num_tokens": 364353.0, + "eval_runtime": 43.3662, + "eval_samples_per_second": 2.26, + "eval_steps_per_second": 2.26, + "step": 231 + }, + { + "entropy": 0.26626345694065096, + "epoch": 1.0390667390124797, + "grad_norm": 0.36867332458496094, + "learning_rate": 0.00016306693881846152, + "loss": 0.23021941184997557, + "mean_token_accuracy": 0.9587587014834086, + "num_tokens": 378571.0, + "step": 240 + }, + { + "entropy": 0.1791029059328139, + "epoch": 1.0824742268041236, + "grad_norm": 0.5592738389968872, + "learning_rate": 0.00015913930285769355, + "loss": 0.1204079270362854, + "mean_token_accuracy": 0.970609325170517, + "num_tokens": 394252.0, + "step": 250 + }, + { + "entropy": 0.25584981925785544, + "epoch": 1.1258817145957678, + "grad_norm": 0.6882627606391907, + "learning_rate": 0.00015506602732976373, + "loss": 0.182321298122406, + "mean_token_accuracy": 0.9607684284448623, + "num_tokens": 410118.0, + "step": 260 + }, + { + "entropy": 0.15852767862379552, + "epoch": 1.1692892023874117, + "grad_norm": 0.47175613045692444, + "learning_rate": 0.00015085714329787631, + "loss": 0.10519710779190064, + "mean_token_accuracy": 0.9718552604317665, + "num_tokens": 425967.0, + "step": 270 + }, + { + "entropy": 0.224250613944605, + "epoch": 1.212696690179056, + "grad_norm": 0.8211113214492798, + "learning_rate": 0.0001465230157818914, + "loss": 0.1746065378189087, + "mean_token_accuracy": 0.9628558784723282, + "num_tokens": 441911.0, + "step": 280 + }, + { + "entropy": 0.2187170408666134, + "epoch": 1.2561041779707, + "grad_norm": 1.2185333967208862, + "learning_rate": 0.00014207431823288057, + "loss": 0.16913924217224122, + "mean_token_accuracy": 0.9632994569838047, + "num_tokens": 457767.0, + "step": 290 + }, + { + "entropy": 0.15246864631772042, + "epoch": 1.299511665762344, + "grad_norm": 0.8135276436805725, + "learning_rate": 0.00013752200624812282, + "loss": 0.10427193641662598, + "mean_token_accuracy": 0.9733581781387329, + "num_tokens": 473550.0, + "step": 300 + } + ], + "logging_steps": 10, + "max_steps": 693, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 150, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 2797027727155200.0, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/lora_adapter/checkpoint-300/training_args.bin b/lora_adapter/checkpoint-300/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..b9f6c3f9cbf215fdd6c495aa3f4bd03b36976a6a --- /dev/null +++ b/lora_adapter/checkpoint-300/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f02029ae097ac6a5686a868c70c7fb13e1a18c4978ab722ce3a1759ddbc101a +size 5713 diff --git a/lora_adapter/checkpoint-450/README.md b/lora_adapter/checkpoint-450/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d3dc0eb5ed577a95106ea65ebc59964ca88d0260 --- /dev/null +++ b/lora_adapter/checkpoint-450/README.md @@ -0,0 +1,209 @@ +--- +base_model: unsloth/Llama-3.2-1B-Instruct +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/Llama-3.2-1B-Instruct +- lora +- sft +- transformers +- trl +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +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). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.21.0 \ No newline at end of file diff --git a/lora_adapter/checkpoint-450/adapter_config.json b/lora_adapter/checkpoint-450/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9fc6d48d117b17f3327161e9f5b1303db2b64ee1 --- /dev/null +++ b/lora_adapter/checkpoint-450/adapter_config.json @@ -0,0 +1,51 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "unsloth/Llama-3.2-1B-Instruct", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "kasa_config": null, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 32, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "monteclora_config": null, + "peft_type": "LORA", + "peft_version": "0.21.0", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "up_proj", + "v_proj", + "q_proj", + "down_proj", + "gate_proj", + "o_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false, + "velora_config": null +} \ No newline at end of file diff --git a/lora_adapter/checkpoint-450/adapter_model.safetensors b/lora_adapter/checkpoint-450/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..bed3bbbc3e1d98ca005e511037c6b707548b3c2d --- /dev/null +++ b/lora_adapter/checkpoint-450/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:49595f0e80d22178cee488cf5349a8a1ec2790ce506b4fcdc0c4fe66171f1c2a +size 45118424 diff --git a/lora_adapter/checkpoint-450/chat_template.jinja b/lora_adapter/checkpoint-450/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..1bad6a0f648dccdbec523ca79ba90fbcfc806af0 --- /dev/null +++ b/lora_adapter/checkpoint-450/chat_template.jinja @@ -0,0 +1,93 @@ +{{- bos_token }} +{%- if custom_tools is defined %} + {%- set tools = custom_tools %} +{%- endif %} +{%- if not tools_in_user_message is defined %} + {%- set tools_in_user_message = true %} +{%- endif %} +{%- if not date_string is defined %} + {%- if strftime_now is defined %} + {%- set date_string = strftime_now("%d %b %Y") %} + {%- else %} + {%- set date_string = "26 Jul 2024" %} + {%- endif %} +{%- endif %} +{%- if not tools is defined %} + {%- set tools = none %} +{%- endif %} + +{#- This block extracts the system message, so we can slot it into the right place. #} +{%- if messages[0]['role'] == 'system' %} + {%- set system_message = messages[0]['content']|trim %} + {%- set messages = messages[1:] %} +{%- else %} + {%- set system_message = "" %} +{%- endif %} + +{#- System message #} +{{- "<|start_header_id|>system<|end_header_id|>\n\n" }} +{%- if tools is not none %} + {{- "Environment: ipython\n" }} +{%- endif %} +{{- "Cutting Knowledge Date: December 2023\n" }} +{{- "Today Date: " + date_string + "\n\n" }} +{%- if tools is not none and not tools_in_user_message %} + {{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }} + {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }} + {{- "Do not use variables.\n\n" }} + {%- for t in tools %} + {{- t | tojson(indent=4) }} + {{- "\n\n" }} + {%- endfor %} +{%- endif %} +{{- system_message }} +{{- "<|eot_id|>" }} + +{#- Custom tools are passed in a user message with some extra guidance #} +{%- if tools_in_user_message and not tools is none %} + {#- Extract the first user message so we can plug it in here #} + {%- if messages | length != 0 %} + {%- set first_user_message = messages[0]['content']|trim %} + {%- set messages = messages[1:] %} + {%- else %} + {{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }} +{%- endif %} + {{- '<|start_header_id|>user<|end_header_id|>\n\n' -}} + {{- "Given the following functions, please respond with a JSON for a function call " }} + {{- "with its proper arguments that best answers the given prompt.\n\n" }} + {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }} + {{- "Do not use variables.\n\n" }} + {%- for t in tools %} + {{- t | tojson(indent=4) }} + {{- "\n\n" }} + {%- endfor %} + {{- first_user_message + "<|eot_id|>"}} +{%- endif %} + +{%- for message in messages %} + {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %} + {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' }} + {%- elif 'tool_calls' in message %} + {%- if not message.tool_calls|length == 1 %} + {{- raise_exception("This model only supports single tool-calls at once!") }} + {%- endif %} + {%- set tool_call = message.tool_calls[0].function %} + {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}} + {{- '{"name": "' + tool_call.name + '", ' }} + {{- '"parameters": ' }} + {{- tool_call.arguments | tojson }} + {{- "}" }} + {{- "<|eot_id|>" }} + {%- elif message.role == "tool" or message.role == "ipython" %} + {{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }} + {%- if message.content is mapping or message.content is iterable %} + {{- message.content | tojson }} + {%- else %} + {{- message.content }} + {%- endif %} + {{- "<|eot_id|>" }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }} +{%- endif %} diff --git a/lora_adapter/checkpoint-450/optimizer.pt b/lora_adapter/checkpoint-450/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..8b7b3c6682576ab237f944cd150a47d40952a4f5 --- /dev/null +++ b/lora_adapter/checkpoint-450/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6f11166fb230a2e8a81ba006b0a02c724de952fc855a31e884c52116d990c841 +size 90359883 diff --git a/lora_adapter/checkpoint-450/rng_state.pth b/lora_adapter/checkpoint-450/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..7d150fc4504460cdea273ef2adcb04a65c626709 --- /dev/null +++ b/lora_adapter/checkpoint-450/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dba4fde4ee04d2f472bb4dea96a48e8fdf7891d2b0694a8f012e8133a2e176ae +size 14455 diff --git a/lora_adapter/checkpoint-450/scheduler.pt b/lora_adapter/checkpoint-450/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..4d4291bb8dda27e538988a00ee02c93356d84a9e --- /dev/null +++ b/lora_adapter/checkpoint-450/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:69fc4c2aaf7d4a9f5a5ee70f8183d7f3147b251b143c2dabd876ad9f138a08b4 +size 1465 diff --git a/lora_adapter/checkpoint-450/tokenizer.json b/lora_adapter/checkpoint-450/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/lora_adapter/checkpoint-450/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/lora_adapter/checkpoint-450/tokenizer_config.json b/lora_adapter/checkpoint-450/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..e96dccba83271308819f796d3b00a0aa21dfef00 --- /dev/null +++ b/lora_adapter/checkpoint-450/tokenizer_config.json @@ -0,0 +1,17 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|eot_id|>", + "is_local": false, + "local_files_only": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "left", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/lora_adapter/checkpoint-450/trainer_state.json b/lora_adapter/checkpoint-450/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..31a227fb705594d27ec3fd0d2cbe2c9279764f75 --- /dev/null +++ b/lora_adapter/checkpoint-450/trainer_state.json @@ -0,0 +1,495 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 1.9506239826370049, + "eval_steps": 500, + "global_step": 450, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 3.268431743979454, + "epoch": 0.04340748779164406, + "grad_norm": 5.425721168518066, + "learning_rate": 3e-05, + "loss": 4.763444137573242, + "mean_token_accuracy": 0.37437669970095155, + "num_tokens": 15851.0, + "step": 10 + }, + { + "entropy": 3.6355564504861833, + "epoch": 0.08681497558328811, + "grad_norm": 2.6653194427490234, + "learning_rate": 6.333333333333333e-05, + "loss": 3.661287307739258, + "mean_token_accuracy": 0.4522986955940723, + "num_tokens": 31565.0, + "step": 20 + }, + { + "entropy": 3.110316979885101, + "epoch": 0.13022246337493218, + "grad_norm": 1.8292694091796875, + "learning_rate": 9.666666666666667e-05, + "loss": 2.4040077209472654, + "mean_token_accuracy": 0.6126278236508369, + "num_tokens": 47681.0, + "step": 30 + }, + { + "entropy": 1.947795458137989, + "epoch": 0.17362995116657623, + "grad_norm": 1.7558073997497559, + "learning_rate": 0.00013000000000000002, + "loss": 1.4649612426757812, + "mean_token_accuracy": 0.7671711064875126, + "num_tokens": 63639.0, + "step": 40 + }, + { + "entropy": 1.2642615631222724, + "epoch": 0.21703743895822028, + "grad_norm": 1.8000116348266602, + "learning_rate": 0.00016333333333333334, + "loss": 0.9385161399841309, + "mean_token_accuracy": 0.8446647509932518, + "num_tokens": 79224.0, + "step": 50 + }, + { + "entropy": 0.9772241789847612, + "epoch": 0.26044492674986436, + "grad_norm": 1.5789580345153809, + "learning_rate": 0.00019666666666666666, + "loss": 0.6508745193481446, + "mean_token_accuracy": 0.8930118441581726, + "num_tokens": 94825.0, + "step": 60 + }, + { + "entropy": 0.7386516474187375, + "epoch": 0.3038524145415084, + "grad_norm": 1.118341088294983, + "learning_rate": 0.0001999002586734068, + "loss": 0.5544538021087646, + "mean_token_accuracy": 0.9125440023839474, + "num_tokens": 110902.0, + "step": 70 + }, + { + "entropy": 0.4801172070205212, + "epoch": 0.34725990233315246, + "grad_norm": 1.0871493816375732, + "learning_rate": 0.00019955572927610798, + "loss": 0.32133638858795166, + "mean_token_accuracy": 0.9453130982816219, + "num_tokens": 126758.0, + "step": 80 + }, + { + "entropy": 0.4470752142369747, + "epoch": 0.3906673901247965, + "grad_norm": 0.9949904084205627, + "learning_rate": 0.00019896602868774615, + "loss": 0.33235070705413816, + "mean_token_accuracy": 0.9432531543076038, + "num_tokens": 142247.0, + "step": 90 + }, + { + "entropy": 0.43914212100207806, + "epoch": 0.43407487791644056, + "grad_norm": 1.2417030334472656, + "learning_rate": 0.00019813260913610048, + "loss": 0.32300994396209715, + "mean_token_accuracy": 0.9425150409340859, + "num_tokens": 158033.0, + "step": 100 + }, + { + "entropy": 0.38672009818255904, + "epoch": 0.47748236570808467, + "grad_norm": 1.4303337335586548, + "learning_rate": 0.00019705752304412648, + "loss": 0.3090308904647827, + "mean_token_accuracy": 0.9426406390964985, + "num_tokens": 173972.0, + "step": 110 + }, + { + "entropy": 0.2582590217702091, + "epoch": 0.5208898534997287, + "grad_norm": 0.7586016654968262, + "learning_rate": 0.00019574341797555143, + "loss": 0.16584413051605223, + "mean_token_accuracy": 0.9635460428893566, + "num_tokens": 189557.0, + "step": 120 + }, + { + "entropy": 0.29735598172992467, + "epoch": 0.5642973412913728, + "grad_norm": 1.3573423624038696, + "learning_rate": 0.00019419353011484387, + "loss": 0.23453230857849122, + "mean_token_accuracy": 0.9539774417877197, + "num_tokens": 205568.0, + "step": 130 + }, + { + "entropy": 0.3157164487987757, + "epoch": 0.6077048290830168, + "grad_norm": 0.7886211276054382, + "learning_rate": 0.00019241167629761527, + "loss": 0.24561758041381837, + "mean_token_accuracy": 0.951296404749155, + "num_tokens": 221240.0, + "step": 140 + }, + { + "entropy": 0.41249370062723756, + "epoch": 0.6511123168746609, + "grad_norm": 0.6835598945617676, + "learning_rate": 0.00019040224461107917, + "loss": 0.3280463695526123, + "mean_token_accuracy": 0.9425421200692654, + "num_tokens": 236889.0, + "step": 150 + }, + { + "entropy": 0.25797676630318167, + "epoch": 0.6945198046663049, + "grad_norm": 0.5169897675514221, + "learning_rate": 0.0001881701835877161, + "loss": 0.17580994367599487, + "mean_token_accuracy": 0.9615871131420135, + "num_tokens": 252552.0, + "step": 160 + }, + { + "entropy": 0.3551043555140495, + "epoch": 0.737927292457949, + "grad_norm": 0.9616410136222839, + "learning_rate": 0.0001857209900187565, + "loss": 0.3012498140335083, + "mean_token_accuracy": 0.9450895473361015, + "num_tokens": 268798.0, + "step": 170 + }, + { + "entropy": 0.3095861619338393, + "epoch": 0.781334780249593, + "grad_norm": 1.0524218082427979, + "learning_rate": 0.00018306069541749258, + "loss": 0.21495308876037597, + "mean_token_accuracy": 0.95635409578681, + "num_tokens": 284560.0, + "step": 180 + }, + { + "entropy": 0.3253756103105843, + "epoch": 0.8247422680412371, + "grad_norm": 0.44378986954689026, + "learning_rate": 0.00018019585116575555, + "loss": 0.27938573360443114, + "mean_token_accuracy": 0.9474706895649433, + "num_tokens": 300840.0, + "step": 190 + }, + { + "entropy": 0.2480218150652945, + "epoch": 0.8681497558328811, + "grad_norm": 0.376433789730072, + "learning_rate": 0.000177133512380137, + "loss": 0.18635139465332032, + "mean_token_accuracy": 0.9606560796499253, + "num_tokens": 316455.0, + "step": 200 + }, + { + "entropy": 0.26516002183780074, + "epoch": 0.9115572436245253, + "grad_norm": 0.447360634803772, + "learning_rate": 0.00017388122053768674, + "loss": 0.20903537273406983, + "mean_token_accuracy": 0.9590088307857514, + "num_tokens": 332359.0, + "step": 210 + }, + { + "entropy": 0.22508152723312377, + "epoch": 0.9549647314161693, + "grad_norm": 0.39458373188972473, + "learning_rate": 0.0001704469849038734, + "loss": 0.17320446968078612, + "mean_token_accuracy": 0.9621456168591976, + "num_tokens": 348219.0, + "step": 220 + }, + { + "entropy": 0.1884014437906444, + "epoch": 0.9983722192078134, + "grad_norm": 0.5577853918075562, + "learning_rate": 0.00016683926280854484, + "loss": 0.14232510328292847, + "mean_token_accuracy": 0.967728354781866, + "num_tokens": 363802.0, + "step": 230 + }, + { + "epoch": 1.0, + "eval_entropy": 0.2500555583713006, + "eval_loss": 0.2172880917787552, + "eval_mean_token_accuracy": 0.9547121439661298, + "eval_num_tokens": 364353.0, + "eval_runtime": 43.3662, + "eval_samples_per_second": 2.26, + "eval_steps_per_second": 2.26, + "step": 231 + }, + { + "entropy": 0.26626345694065096, + "epoch": 1.0390667390124797, + "grad_norm": 0.36867332458496094, + "learning_rate": 0.00016306693881846152, + "loss": 0.23021941184997557, + "mean_token_accuracy": 0.9587587014834086, + "num_tokens": 378571.0, + "step": 240 + }, + { + "entropy": 0.1791029059328139, + "epoch": 1.0824742268041236, + "grad_norm": 0.5592738389968872, + "learning_rate": 0.00015913930285769355, + "loss": 0.1204079270362854, + "mean_token_accuracy": 0.970609325170517, + "num_tokens": 394252.0, + "step": 250 + }, + { + "entropy": 0.25584981925785544, + "epoch": 1.1258817145957678, + "grad_norm": 0.6882627606391907, + "learning_rate": 0.00015506602732976373, + "loss": 0.182321298122406, + "mean_token_accuracy": 0.9607684284448623, + "num_tokens": 410118.0, + "step": 260 + }, + { + "entropy": 0.15852767862379552, + "epoch": 1.1692892023874117, + "grad_norm": 0.47175613045692444, + "learning_rate": 0.00015085714329787631, + "loss": 0.10519710779190064, + "mean_token_accuracy": 0.9718552604317665, + "num_tokens": 425967.0, + "step": 270 + }, + { + "entropy": 0.224250613944605, + "epoch": 1.212696690179056, + "grad_norm": 0.8211113214492798, + "learning_rate": 0.0001465230157818914, + "loss": 0.1746065378189087, + "mean_token_accuracy": 0.9628558784723282, + "num_tokens": 441911.0, + "step": 280 + }, + { + "entropy": 0.2187170408666134, + "epoch": 1.2561041779707, + "grad_norm": 1.2185333967208862, + "learning_rate": 0.00014207431823288057, + "loss": 0.16913924217224122, + "mean_token_accuracy": 0.9632994569838047, + "num_tokens": 457767.0, + "step": 290 + }, + { + "entropy": 0.15246864631772042, + "epoch": 1.299511665762344, + "grad_norm": 0.8135276436805725, + "learning_rate": 0.00013752200624812282, + "loss": 0.10427193641662598, + "mean_token_accuracy": 0.9733581781387329, + "num_tokens": 473550.0, + "step": 300 + }, + { + "entropy": 0.14296606807038187, + "epoch": 1.342919153553988, + "grad_norm": 0.4611963927745819, + "learning_rate": 0.00013287729059127288, + "loss": 0.11364473104476928, + "mean_token_accuracy": 0.9724942341446876, + "num_tokens": 489513.0, + "step": 310 + }, + { + "entropy": 0.18273791116662325, + "epoch": 1.386326641345632, + "grad_norm": 0.600029468536377, + "learning_rate": 0.00012815160958414332, + "loss": 0.14306700229644775, + "mean_token_accuracy": 0.9665566079318524, + "num_tokens": 505197.0, + "step": 320 + }, + { + "entropy": 0.12391844158992171, + "epoch": 1.4297341291372763, + "grad_norm": 0.35350969433784485, + "learning_rate": 0.0001233566009380896, + "loss": 0.08826681971549988, + "mean_token_accuracy": 0.9754320561885834, + "num_tokens": 520666.0, + "step": 330 + }, + { + "entropy": 0.14481371184810996, + "epoch": 1.4731416169289202, + "grad_norm": 0.6141801476478577, + "learning_rate": 0.0001185040730943683, + "loss": 0.11338310241699219, + "mean_token_accuracy": 0.9735137969255447, + "num_tokens": 536352.0, + "step": 340 + }, + { + "entropy": 0.18556677168235183, + "epoch": 1.5165491047205641, + "grad_norm": 0.8235384225845337, + "learning_rate": 0.00011360597614404662, + "loss": 0.13062334060668945, + "mean_token_accuracy": 0.9691525533795357, + "num_tokens": 551908.0, + "step": 350 + }, + { + "entropy": 0.19317283374257385, + "epoch": 1.5599565925122083, + "grad_norm": 0.7898983359336853, + "learning_rate": 0.00010867437239907765, + "loss": 0.13731375932693482, + "mean_token_accuracy": 0.9673447087407112, + "num_tokens": 567817.0, + "step": 360 + }, + { + "entropy": 0.23874589540064334, + "epoch": 1.6033640803038525, + "grad_norm": 0.37412697076797485, + "learning_rate": 0.00010372140668701483, + "loss": 0.16327574253082275, + "mean_token_accuracy": 0.9641537763178348, + "num_tokens": 583908.0, + "step": 370 + }, + { + "entropy": 0.11286464962176979, + "epoch": 1.6467715680954966, + "grad_norm": 0.4411953091621399, + "learning_rate": 9.875927644251854e-05, + "loss": 0.08702898025512695, + "mean_token_accuracy": 0.9771473661065102, + "num_tokens": 599617.0, + "step": 380 + }, + { + "entropy": 0.13296716185286642, + "epoch": 1.6901790558871406, + "grad_norm": 0.3289574086666107, + "learning_rate": 9.380020166931036e-05, + "loss": 0.11703462600708008, + "mean_token_accuracy": 0.9712080150842667, + "num_tokens": 615577.0, + "step": 390 + }, + { + "entropy": 0.1416403181385249, + "epoch": 1.7335865436787845, + "grad_norm": 0.571514368057251, + "learning_rate": 8.885639484654701e-05, + "loss": 0.11379531621932984, + "mean_token_accuracy": 0.9724767826497555, + "num_tokens": 631601.0, + "step": 400 + }, + { + "entropy": 0.11030569332651793, + "epoch": 1.7769940314704287, + "grad_norm": 0.4873872995376587, + "learning_rate": 8.394003085372496e-05, + "loss": 0.08141401410102844, + "mean_token_accuracy": 0.9770576477050781, + "num_tokens": 647297.0, + "step": 410 + }, + { + "entropy": 0.12415502546355128, + "epoch": 1.8204015192620728, + "grad_norm": 0.32351386547088623, + "learning_rate": 7.90632169881799e-05, + "loss": 0.08947296738624573, + "mean_token_accuracy": 0.9762426503002644, + "num_tokens": 663176.0, + "step": 420 + }, + { + "entropy": 0.16395117049105465, + "epoch": 1.8638090070537168, + "grad_norm": 0.34445416927337646, + "learning_rate": 7.423796314901768e-05, + "loss": 0.12568631172180175, + "mean_token_accuracy": 0.9712538823485375, + "num_tokens": 678975.0, + "step": 430 + }, + { + "entropy": 0.20411954806186258, + "epoch": 1.9072164948453607, + "grad_norm": 0.8611961603164673, + "learning_rate": 6.947615226090297e-05, + "loss": 0.16005014181137084, + "mean_token_accuracy": 0.9660855703055858, + "num_tokens": 694724.0, + "step": 440 + }, + { + "entropy": 0.1906371342483908, + "epoch": 1.9506239826370049, + "grad_norm": 0.3045775890350342, + "learning_rate": 6.478951101054225e-05, + "loss": 0.13002687692642212, + "mean_token_accuracy": 0.9707569405436516, + "num_tokens": 710764.0, + "step": 450 + } + ], + "logging_steps": 10, + "max_steps": 693, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 150, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 4198134548545536.0, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/lora_adapter/checkpoint-450/training_args.bin b/lora_adapter/checkpoint-450/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..b9f6c3f9cbf215fdd6c495aa3f4bd03b36976a6a --- /dev/null +++ b/lora_adapter/checkpoint-450/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f02029ae097ac6a5686a868c70c7fb13e1a18c4978ab722ce3a1759ddbc101a +size 5713 diff --git a/lora_adapter/checkpoint-600/README.md b/lora_adapter/checkpoint-600/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d3dc0eb5ed577a95106ea65ebc59964ca88d0260 --- /dev/null +++ b/lora_adapter/checkpoint-600/README.md @@ -0,0 +1,209 @@ +--- +base_model: unsloth/Llama-3.2-1B-Instruct +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/Llama-3.2-1B-Instruct +- lora +- sft +- transformers +- trl +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +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). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.21.0 \ No newline at end of file diff --git a/lora_adapter/checkpoint-600/adapter_config.json b/lora_adapter/checkpoint-600/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9fc6d48d117b17f3327161e9f5b1303db2b64ee1 --- /dev/null +++ b/lora_adapter/checkpoint-600/adapter_config.json @@ -0,0 +1,51 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "unsloth/Llama-3.2-1B-Instruct", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "kasa_config": null, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 32, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "monteclora_config": null, + "peft_type": "LORA", + "peft_version": "0.21.0", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "up_proj", + "v_proj", + "q_proj", + "down_proj", + "gate_proj", + "o_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false, + "velora_config": null +} \ No newline at end of file diff --git a/lora_adapter/checkpoint-600/adapter_model.safetensors b/lora_adapter/checkpoint-600/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..dfb48c7c355a0ab34b4db2041492adf99035b792 --- /dev/null +++ b/lora_adapter/checkpoint-600/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d1712ee7e7f7e4c3c777fce6e9c5403963424d3232cb0030c6d1a51d48313f81 +size 45118424 diff --git a/lora_adapter/checkpoint-600/chat_template.jinja b/lora_adapter/checkpoint-600/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..1bad6a0f648dccdbec523ca79ba90fbcfc806af0 --- /dev/null +++ b/lora_adapter/checkpoint-600/chat_template.jinja @@ -0,0 +1,93 @@ +{{- bos_token }} +{%- if custom_tools is defined %} + {%- set tools = custom_tools %} +{%- endif %} +{%- if not tools_in_user_message is defined %} + {%- set tools_in_user_message = true %} +{%- endif %} +{%- if not date_string is defined %} + {%- if strftime_now is defined %} + {%- set date_string = strftime_now("%d %b %Y") %} + {%- else %} + {%- set date_string = "26 Jul 2024" %} + {%- endif %} +{%- endif %} +{%- if not tools is defined %} + {%- set tools = none %} +{%- endif %} + +{#- This block extracts the system message, so we can slot it into the right place. #} +{%- if messages[0]['role'] == 'system' %} + {%- set system_message = messages[0]['content']|trim %} + {%- set messages = messages[1:] %} +{%- else %} + {%- set system_message = "" %} +{%- endif %} + +{#- System message #} +{{- "<|start_header_id|>system<|end_header_id|>\n\n" }} +{%- if tools is not none %} + {{- "Environment: ipython\n" }} +{%- endif %} +{{- "Cutting Knowledge Date: December 2023\n" }} +{{- "Today Date: " + date_string + "\n\n" }} +{%- if tools is not none and not tools_in_user_message %} + {{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }} + {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }} + {{- "Do not use variables.\n\n" }} + {%- for t in tools %} + {{- t | tojson(indent=4) }} + {{- "\n\n" }} + {%- endfor %} +{%- endif %} +{{- system_message }} +{{- "<|eot_id|>" }} + +{#- Custom tools are passed in a user message with some extra guidance #} +{%- if tools_in_user_message and not tools is none %} + {#- Extract the first user message so we can plug it in here #} + {%- if messages | length != 0 %} + {%- set first_user_message = messages[0]['content']|trim %} + {%- set messages = messages[1:] %} + {%- else %} + {{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }} +{%- endif %} + {{- '<|start_header_id|>user<|end_header_id|>\n\n' -}} + {{- "Given the following functions, please respond with a JSON for a function call " }} + {{- "with its proper arguments that best answers the given prompt.\n\n" }} + {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }} + {{- "Do not use variables.\n\n" }} + {%- for t in tools %} + {{- t | tojson(indent=4) }} + {{- "\n\n" }} + {%- endfor %} + {{- first_user_message + "<|eot_id|>"}} +{%- endif %} + +{%- for message in messages %} + {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %} + {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' }} + {%- elif 'tool_calls' in message %} + {%- if not message.tool_calls|length == 1 %} + {{- raise_exception("This model only supports single tool-calls at once!") }} + {%- endif %} + {%- set tool_call = message.tool_calls[0].function %} + {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}} + {{- '{"name": "' + tool_call.name + '", ' }} + {{- '"parameters": ' }} + {{- tool_call.arguments | tojson }} + {{- "}" }} + {{- "<|eot_id|>" }} + {%- elif message.role == "tool" or message.role == "ipython" %} + {{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }} + {%- if message.content is mapping or message.content is iterable %} + {{- message.content | tojson }} + {%- else %} + {{- message.content }} + {%- endif %} + {{- "<|eot_id|>" }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }} +{%- endif %} diff --git a/lora_adapter/checkpoint-600/optimizer.pt b/lora_adapter/checkpoint-600/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..a895b5175c6060282eef9bd4f4ec788b9c49358f --- /dev/null +++ b/lora_adapter/checkpoint-600/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:68e8233b64bbb2bbb6466e698aff71715948a39cf01090d026f5eb94af9e408e +size 90359883 diff --git a/lora_adapter/checkpoint-600/rng_state.pth b/lora_adapter/checkpoint-600/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..7b8e4a2bf4e867d36ec9b2807b89f6d3ae8b55f9 --- /dev/null +++ b/lora_adapter/checkpoint-600/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71b1e5ce7a350c52ef18aceb7dce8450b476076d04fd51abbdfbe08e044226c5 +size 14455 diff --git a/lora_adapter/checkpoint-600/scheduler.pt b/lora_adapter/checkpoint-600/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..89c052a6ce84c5d47322c009475ffe950efe1a09 --- /dev/null +++ b/lora_adapter/checkpoint-600/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1ca53b508d23f29ccad5f68bc4d846fe67adee9f5b097e378caa6373300f6ccc +size 1465 diff --git a/lora_adapter/checkpoint-600/tokenizer.json b/lora_adapter/checkpoint-600/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/lora_adapter/checkpoint-600/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/lora_adapter/checkpoint-600/tokenizer_config.json b/lora_adapter/checkpoint-600/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..e96dccba83271308819f796d3b00a0aa21dfef00 --- /dev/null +++ b/lora_adapter/checkpoint-600/tokenizer_config.json @@ -0,0 +1,17 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|eot_id|>", + "is_local": false, + "local_files_only": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "left", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/lora_adapter/checkpoint-600/trainer_state.json b/lora_adapter/checkpoint-600/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..ef35a0a637d1433b7d748150f3b4953d7167906c --- /dev/null +++ b/lora_adapter/checkpoint-600/trainer_state.json @@ -0,0 +1,656 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 2.599023331524688, + "eval_steps": 500, + "global_step": 600, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 3.268431743979454, + "epoch": 0.04340748779164406, + "grad_norm": 5.425721168518066, + "learning_rate": 3e-05, + "loss": 4.763444137573242, + "mean_token_accuracy": 0.37437669970095155, + "num_tokens": 15851.0, + "step": 10 + }, + { + "entropy": 3.6355564504861833, + "epoch": 0.08681497558328811, + "grad_norm": 2.6653194427490234, + "learning_rate": 6.333333333333333e-05, + "loss": 3.661287307739258, + "mean_token_accuracy": 0.4522986955940723, + "num_tokens": 31565.0, + "step": 20 + }, + { + "entropy": 3.110316979885101, + "epoch": 0.13022246337493218, + "grad_norm": 1.8292694091796875, + "learning_rate": 9.666666666666667e-05, + "loss": 2.4040077209472654, + "mean_token_accuracy": 0.6126278236508369, + "num_tokens": 47681.0, + "step": 30 + }, + { + "entropy": 1.947795458137989, + "epoch": 0.17362995116657623, + "grad_norm": 1.7558073997497559, + "learning_rate": 0.00013000000000000002, + "loss": 1.4649612426757812, + "mean_token_accuracy": 0.7671711064875126, + "num_tokens": 63639.0, + "step": 40 + }, + { + "entropy": 1.2642615631222724, + "epoch": 0.21703743895822028, + "grad_norm": 1.8000116348266602, + "learning_rate": 0.00016333333333333334, + "loss": 0.9385161399841309, + "mean_token_accuracy": 0.8446647509932518, + "num_tokens": 79224.0, + "step": 50 + }, + { + "entropy": 0.9772241789847612, + "epoch": 0.26044492674986436, + "grad_norm": 1.5789580345153809, + "learning_rate": 0.00019666666666666666, + "loss": 0.6508745193481446, + "mean_token_accuracy": 0.8930118441581726, + "num_tokens": 94825.0, + "step": 60 + }, + { + "entropy": 0.7386516474187375, + "epoch": 0.3038524145415084, + "grad_norm": 1.118341088294983, + "learning_rate": 0.0001999002586734068, + "loss": 0.5544538021087646, + "mean_token_accuracy": 0.9125440023839474, + "num_tokens": 110902.0, + "step": 70 + }, + { + "entropy": 0.4801172070205212, + "epoch": 0.34725990233315246, + "grad_norm": 1.0871493816375732, + "learning_rate": 0.00019955572927610798, + "loss": 0.32133638858795166, + "mean_token_accuracy": 0.9453130982816219, + "num_tokens": 126758.0, + "step": 80 + }, + { + "entropy": 0.4470752142369747, + "epoch": 0.3906673901247965, + "grad_norm": 0.9949904084205627, + "learning_rate": 0.00019896602868774615, + "loss": 0.33235070705413816, + "mean_token_accuracy": 0.9432531543076038, + "num_tokens": 142247.0, + "step": 90 + }, + { + "entropy": 0.43914212100207806, + "epoch": 0.43407487791644056, + "grad_norm": 1.2417030334472656, + "learning_rate": 0.00019813260913610048, + "loss": 0.32300994396209715, + "mean_token_accuracy": 0.9425150409340859, + "num_tokens": 158033.0, + "step": 100 + }, + { + "entropy": 0.38672009818255904, + "epoch": 0.47748236570808467, + "grad_norm": 1.4303337335586548, + "learning_rate": 0.00019705752304412648, + "loss": 0.3090308904647827, + "mean_token_accuracy": 0.9426406390964985, + "num_tokens": 173972.0, + "step": 110 + }, + { + "entropy": 0.2582590217702091, + "epoch": 0.5208898534997287, + "grad_norm": 0.7586016654968262, + "learning_rate": 0.00019574341797555143, + "loss": 0.16584413051605223, + "mean_token_accuracy": 0.9635460428893566, + "num_tokens": 189557.0, + "step": 120 + }, + { + "entropy": 0.29735598172992467, + "epoch": 0.5642973412913728, + "grad_norm": 1.3573423624038696, + "learning_rate": 0.00019419353011484387, + "loss": 0.23453230857849122, + "mean_token_accuracy": 0.9539774417877197, + "num_tokens": 205568.0, + "step": 130 + }, + { + "entropy": 0.3157164487987757, + "epoch": 0.6077048290830168, + "grad_norm": 0.7886211276054382, + "learning_rate": 0.00019241167629761527, + "loss": 0.24561758041381837, + "mean_token_accuracy": 0.951296404749155, + "num_tokens": 221240.0, + "step": 140 + }, + { + "entropy": 0.41249370062723756, + "epoch": 0.6511123168746609, + "grad_norm": 0.6835598945617676, + "learning_rate": 0.00019040224461107917, + "loss": 0.3280463695526123, + "mean_token_accuracy": 0.9425421200692654, + "num_tokens": 236889.0, + "step": 150 + }, + { + "entropy": 0.25797676630318167, + "epoch": 0.6945198046663049, + "grad_norm": 0.5169897675514221, + "learning_rate": 0.0001881701835877161, + "loss": 0.17580994367599487, + "mean_token_accuracy": 0.9615871131420135, + "num_tokens": 252552.0, + "step": 160 + }, + { + "entropy": 0.3551043555140495, + "epoch": 0.737927292457949, + "grad_norm": 0.9616410136222839, + "learning_rate": 0.0001857209900187565, + "loss": 0.3012498140335083, + "mean_token_accuracy": 0.9450895473361015, + "num_tokens": 268798.0, + "step": 170 + }, + { + "entropy": 0.3095861619338393, + "epoch": 0.781334780249593, + "grad_norm": 1.0524218082427979, + "learning_rate": 0.00018306069541749258, + "loss": 0.21495308876037597, + "mean_token_accuracy": 0.95635409578681, + "num_tokens": 284560.0, + "step": 180 + }, + { + "entropy": 0.3253756103105843, + "epoch": 0.8247422680412371, + "grad_norm": 0.44378986954689026, + "learning_rate": 0.00018019585116575555, + "loss": 0.27938573360443114, + "mean_token_accuracy": 0.9474706895649433, + "num_tokens": 300840.0, + "step": 190 + }, + { + "entropy": 0.2480218150652945, + "epoch": 0.8681497558328811, + "grad_norm": 0.376433789730072, + "learning_rate": 0.000177133512380137, + "loss": 0.18635139465332032, + "mean_token_accuracy": 0.9606560796499253, + "num_tokens": 316455.0, + "step": 200 + }, + { + "entropy": 0.26516002183780074, + "epoch": 0.9115572436245253, + "grad_norm": 0.447360634803772, + "learning_rate": 0.00017388122053768674, + "loss": 0.20903537273406983, + "mean_token_accuracy": 0.9590088307857514, + "num_tokens": 332359.0, + "step": 210 + }, + { + "entropy": 0.22508152723312377, + "epoch": 0.9549647314161693, + "grad_norm": 0.39458373188972473, + "learning_rate": 0.0001704469849038734, + "loss": 0.17320446968078612, + "mean_token_accuracy": 0.9621456168591976, + "num_tokens": 348219.0, + "step": 220 + }, + { + "entropy": 0.1884014437906444, + "epoch": 0.9983722192078134, + "grad_norm": 0.5577853918075562, + "learning_rate": 0.00016683926280854484, + "loss": 0.14232510328292847, + "mean_token_accuracy": 0.967728354781866, + "num_tokens": 363802.0, + "step": 230 + }, + { + "epoch": 1.0, + "eval_entropy": 0.2500555583713006, + "eval_loss": 0.2172880917787552, + "eval_mean_token_accuracy": 0.9547121439661298, + "eval_num_tokens": 364353.0, + "eval_runtime": 43.3662, + "eval_samples_per_second": 2.26, + "eval_steps_per_second": 2.26, + "step": 231 + }, + { + "entropy": 0.26626345694065096, + "epoch": 1.0390667390124797, + "grad_norm": 0.36867332458496094, + "learning_rate": 0.00016306693881846152, + "loss": 0.23021941184997557, + "mean_token_accuracy": 0.9587587014834086, + "num_tokens": 378571.0, + "step": 240 + }, + { + "entropy": 0.1791029059328139, + "epoch": 1.0824742268041236, + "grad_norm": 0.5592738389968872, + "learning_rate": 0.00015913930285769355, + "loss": 0.1204079270362854, + "mean_token_accuracy": 0.970609325170517, + "num_tokens": 394252.0, + "step": 250 + }, + { + "entropy": 0.25584981925785544, + "epoch": 1.1258817145957678, + "grad_norm": 0.6882627606391907, + "learning_rate": 0.00015506602732976373, + "loss": 0.182321298122406, + "mean_token_accuracy": 0.9607684284448623, + "num_tokens": 410118.0, + "step": 260 + }, + { + "entropy": 0.15852767862379552, + "epoch": 1.1692892023874117, + "grad_norm": 0.47175613045692444, + "learning_rate": 0.00015085714329787631, + "loss": 0.10519710779190064, + "mean_token_accuracy": 0.9718552604317665, + "num_tokens": 425967.0, + "step": 270 + }, + { + "entropy": 0.224250613944605, + "epoch": 1.212696690179056, + "grad_norm": 0.8211113214492798, + "learning_rate": 0.0001465230157818914, + "loss": 0.1746065378189087, + "mean_token_accuracy": 0.9628558784723282, + "num_tokens": 441911.0, + "step": 280 + }, + { + "entropy": 0.2187170408666134, + "epoch": 1.2561041779707, + "grad_norm": 1.2185333967208862, + "learning_rate": 0.00014207431823288057, + "loss": 0.16913924217224122, + "mean_token_accuracy": 0.9632994569838047, + "num_tokens": 457767.0, + "step": 290 + }, + { + "entropy": 0.15246864631772042, + "epoch": 1.299511665762344, + "grad_norm": 0.8135276436805725, + "learning_rate": 0.00013752200624812282, + "loss": 0.10427193641662598, + "mean_token_accuracy": 0.9733581781387329, + "num_tokens": 473550.0, + "step": 300 + }, + { + "entropy": 0.14296606807038187, + "epoch": 1.342919153553988, + "grad_norm": 0.4611963927745819, + "learning_rate": 0.00013287729059127288, + "loss": 0.11364473104476928, + "mean_token_accuracy": 0.9724942341446876, + "num_tokens": 489513.0, + "step": 310 + }, + { + "entropy": 0.18273791116662325, + "epoch": 1.386326641345632, + "grad_norm": 0.600029468536377, + "learning_rate": 0.00012815160958414332, + "loss": 0.14306700229644775, + "mean_token_accuracy": 0.9665566079318524, + "num_tokens": 505197.0, + "step": 320 + }, + { + "entropy": 0.12391844158992171, + "epoch": 1.4297341291372763, + "grad_norm": 0.35350969433784485, + "learning_rate": 0.0001233566009380896, + "loss": 0.08826681971549988, + "mean_token_accuracy": 0.9754320561885834, + "num_tokens": 520666.0, + "step": 330 + }, + { + "entropy": 0.14481371184810996, + "epoch": 1.4731416169289202, + "grad_norm": 0.6141801476478577, + "learning_rate": 0.0001185040730943683, + "loss": 0.11338310241699219, + "mean_token_accuracy": 0.9735137969255447, + "num_tokens": 536352.0, + "step": 340 + }, + { + "entropy": 0.18556677168235183, + "epoch": 1.5165491047205641, + "grad_norm": 0.8235384225845337, + "learning_rate": 0.00011360597614404662, + "loss": 0.13062334060668945, + "mean_token_accuracy": 0.9691525533795357, + "num_tokens": 551908.0, + "step": 350 + }, + { + "entropy": 0.19317283374257385, + "epoch": 1.5599565925122083, + "grad_norm": 0.7898983359336853, + "learning_rate": 0.00010867437239907765, + "loss": 0.13731375932693482, + "mean_token_accuracy": 0.9673447087407112, + "num_tokens": 567817.0, + "step": 360 + }, + { + "entropy": 0.23874589540064334, + "epoch": 1.6033640803038525, + "grad_norm": 0.37412697076797485, + "learning_rate": 0.00010372140668701483, + "loss": 0.16327574253082275, + "mean_token_accuracy": 0.9641537763178348, + "num_tokens": 583908.0, + "step": 370 + }, + { + "entropy": 0.11286464962176979, + "epoch": 1.6467715680954966, + "grad_norm": 0.4411953091621399, + "learning_rate": 9.875927644251854e-05, + "loss": 0.08702898025512695, + "mean_token_accuracy": 0.9771473661065102, + "num_tokens": 599617.0, + "step": 380 + }, + { + "entropy": 0.13296716185286642, + "epoch": 1.6901790558871406, + "grad_norm": 0.3289574086666107, + "learning_rate": 9.380020166931036e-05, + "loss": 0.11703462600708008, + "mean_token_accuracy": 0.9712080150842667, + "num_tokens": 615577.0, + "step": 390 + }, + { + "entropy": 0.1416403181385249, + "epoch": 1.7335865436787845, + "grad_norm": 0.571514368057251, + "learning_rate": 8.885639484654701e-05, + "loss": 0.11379531621932984, + "mean_token_accuracy": 0.9724767826497555, + "num_tokens": 631601.0, + "step": 400 + }, + { + "entropy": 0.11030569332651793, + "epoch": 1.7769940314704287, + "grad_norm": 0.4873872995376587, + "learning_rate": 8.394003085372496e-05, + "loss": 0.08141401410102844, + "mean_token_accuracy": 0.9770576477050781, + "num_tokens": 647297.0, + "step": 410 + }, + { + "entropy": 0.12415502546355128, + "epoch": 1.8204015192620728, + "grad_norm": 0.32351386547088623, + "learning_rate": 7.90632169881799e-05, + "loss": 0.08947296738624573, + "mean_token_accuracy": 0.9762426503002644, + "num_tokens": 663176.0, + "step": 420 + }, + { + "entropy": 0.16395117049105465, + "epoch": 1.8638090070537168, + "grad_norm": 0.34445416927337646, + "learning_rate": 7.423796314901768e-05, + "loss": 0.12568631172180175, + "mean_token_accuracy": 0.9712538823485375, + "num_tokens": 678975.0, + "step": 430 + }, + { + "entropy": 0.20411954806186258, + "epoch": 1.9072164948453607, + "grad_norm": 0.8611961603164673, + "learning_rate": 6.947615226090297e-05, + "loss": 0.16005014181137084, + "mean_token_accuracy": 0.9660855703055858, + "num_tokens": 694724.0, + "step": 440 + }, + { + "entropy": 0.1906371342483908, + "epoch": 1.9506239826370049, + "grad_norm": 0.3045775890350342, + "learning_rate": 6.478951101054225e-05, + "loss": 0.13002687692642212, + "mean_token_accuracy": 0.9707569405436516, + "num_tokens": 710764.0, + "step": 450 + }, + { + "entropy": 0.12089938684366644, + "epoch": 1.994031470428649, + "grad_norm": 0.8321558833122253, + "learning_rate": 6.018958096792642e-05, + "loss": 0.08647857308387756, + "mean_token_accuracy": 0.977338220179081, + "num_tokens": 726521.0, + "step": 460 + }, + { + "epoch": 2.0, + "eval_entropy": 0.18578565937980096, + "eval_loss": 0.15265728533267975, + "eval_mean_token_accuracy": 0.9647377492213736, + "eval_num_tokens": 728706.0, + "eval_runtime": 43.8011, + "eval_samples_per_second": 2.237, + "eval_steps_per_second": 2.237, + "step": 462 + }, + { + "entropy": 0.11111431792378426, + "epoch": 2.0347259902333152, + "grad_norm": 0.31517288088798523, + "learning_rate": 5.568769016345162e-05, + "loss": 0.07631215453147888, + "mean_token_accuracy": 0.9792846202850342, + "num_tokens": 741135.0, + "step": 470 + }, + { + "entropy": 0.12576794293709098, + "epoch": 2.0781334780249594, + "grad_norm": 0.6706956028938293, + "learning_rate": 5.129492519091414e-05, + "loss": 0.08828421831130981, + "mean_token_accuracy": 0.9774440720677375, + "num_tokens": 757149.0, + "step": 480 + }, + { + "entropy": 0.1652247125748545, + "epoch": 2.1215409658166036, + "grad_norm": 0.6188645362854004, + "learning_rate": 4.7022103905079403e-05, + "loss": 0.10453375577926635, + "mean_token_accuracy": 0.9749265879392623, + "num_tokens": 773043.0, + "step": 490 + }, + { + "entropy": 0.13389622955583036, + "epoch": 2.1649484536082473, + "grad_norm": 0.4554220736026764, + "learning_rate": 4.287974878106223e-05, + "loss": 0.0822334885597229, + "mean_token_accuracy": 0.9777384780347347, + "num_tokens": 788836.0, + "step": 500 + }, + { + "entropy": 0.1122925499919802, + "epoch": 2.2083559413998914, + "grad_norm": 0.3267352283000946, + "learning_rate": 3.887806100112449e-05, + "loss": 0.07709192037582398, + "mean_token_accuracy": 0.9793755315244198, + "num_tokens": 804610.0, + "step": 510 + }, + { + "entropy": 0.10615749745629728, + "epoch": 2.2517634291915356, + "grad_norm": 0.30847302079200745, + "learning_rate": 3.5026895332705504e-05, + "loss": 0.07118260264396667, + "mean_token_accuracy": 0.9799461409449577, + "num_tokens": 820138.0, + "step": 520 + }, + { + "entropy": 0.13317556893453003, + "epoch": 2.2951709169831798, + "grad_norm": 0.7525761127471924, + "learning_rate": 3.133573585955194e-05, + "loss": 0.08792675137519837, + "mean_token_accuracy": 0.9784041821956635, + "num_tokens": 835962.0, + "step": 530 + }, + { + "entropy": 0.15031940978951752, + "epoch": 2.3385784047748235, + "grad_norm": 0.36720001697540283, + "learning_rate": 2.7813672625712594e-05, + "loss": 0.08893920779228211, + "mean_token_accuracy": 0.9778918631374836, + "num_tokens": 852357.0, + "step": 540 + }, + { + "entropy": 0.12438173596747219, + "epoch": 2.3819858925664676, + "grad_norm": 0.7582745552062988, + "learning_rate": 2.4469379249916613e-05, + "loss": 0.08149291276931762, + "mean_token_accuracy": 0.9797964461147786, + "num_tokens": 868012.0, + "step": 550 + }, + { + "entropy": 0.1631687331944704, + "epoch": 2.425393380358112, + "grad_norm": 0.29170867800712585, + "learning_rate": 2.131109156546226e-05, + "loss": 0.10433924198150635, + "mean_token_accuracy": 0.9751808606088161, + "num_tokens": 884061.0, + "step": 560 + }, + { + "entropy": 0.10712425396777689, + "epoch": 2.468800868149756, + "grad_norm": 0.6179195642471313, + "learning_rate": 1.8346587338219455e-05, + "loss": 0.07671988606452942, + "mean_token_accuracy": 0.9794992141425609, + "num_tokens": 899982.0, + "step": 570 + }, + { + "entropy": 0.10620055091567338, + "epoch": 2.5122083559414, + "grad_norm": 0.3330930769443512, + "learning_rate": 1.5583167112693153e-05, + "loss": 0.06958608627319336, + "mean_token_accuracy": 0.981497923284769, + "num_tokens": 915669.0, + "step": 580 + }, + { + "entropy": 0.09565388238988817, + "epoch": 2.555615843733044, + "grad_norm": 0.3171375095844269, + "learning_rate": 1.3027636233317342e-05, + "loss": 0.06519963145256043, + "mean_token_accuracy": 0.9813847310841084, + "num_tokens": 931627.0, + "step": 590 + }, + { + "entropy": 0.11542923199012875, + "epoch": 2.599023331524688, + "grad_norm": 0.7167931199073792, + "learning_rate": 1.0686288085254781e-05, + "loss": 0.07995554804801941, + "mean_token_accuracy": 0.9791012987494468, + "num_tokens": 947380.0, + "step": 600 + } + ], + "logging_steps": 10, + "max_steps": 693, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 150, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 5595709277061120.0, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/lora_adapter/checkpoint-600/training_args.bin b/lora_adapter/checkpoint-600/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..b9f6c3f9cbf215fdd6c495aa3f4bd03b36976a6a --- /dev/null +++ b/lora_adapter/checkpoint-600/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f02029ae097ac6a5686a868c70c7fb13e1a18c4978ab722ce3a1759ddbc101a +size 5713 diff --git a/lora_adapter/checkpoint-693/README.md b/lora_adapter/checkpoint-693/README.md new file mode 100644 index 0000000000000000000000000000000000000000..d3dc0eb5ed577a95106ea65ebc59964ca88d0260 --- /dev/null +++ b/lora_adapter/checkpoint-693/README.md @@ -0,0 +1,209 @@ +--- +base_model: unsloth/Llama-3.2-1B-Instruct +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:unsloth/Llama-3.2-1B-Instruct +- lora +- sft +- transformers +- trl +--- + +# Model Card for Model ID + + + + + +## Model Details + +### Model Description + + + + + +- **Developed by:** [More Information Needed] +- **Funded by [optional]:** [More Information Needed] +- **Shared by [optional]:** [More Information Needed] +- **Model type:** [More Information Needed] +- **Language(s) (NLP):** [More Information Needed] +- **License:** [More Information Needed] +- **Finetuned from model [optional]:** [More Information Needed] + +### Model Sources [optional] + + + +- **Repository:** [More Information Needed] +- **Paper [optional]:** [More Information Needed] +- **Demo [optional]:** [More Information Needed] + +## Uses + + + +### Direct Use + + + +[More Information Needed] + +### Downstream Use [optional] + + + +[More Information Needed] + +### Out-of-Scope Use + + + +[More Information Needed] + +## Bias, Risks, and Limitations + + + +[More Information Needed] + +### Recommendations + + + +Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations. + +## How to Get Started with the Model + +Use the code below to get started with the model. + +[More Information Needed] + +## Training Details + +### Training Data + + + +[More Information Needed] + +### Training Procedure + + + +#### Preprocessing [optional] + +[More Information Needed] + + +#### Training Hyperparameters + +- **Training regime:** [More Information Needed] + +#### Speeds, Sizes, Times [optional] + + + +[More Information Needed] + +## Evaluation + + + +### Testing Data, Factors & Metrics + +#### Testing Data + + + +[More Information Needed] + +#### Factors + + + +[More Information Needed] + +#### Metrics + + + +[More Information Needed] + +### Results + +[More Information Needed] + +#### Summary + + + +## Model Examination [optional] + + + +[More Information Needed] + +## Environmental Impact + + + +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). + +- **Hardware Type:** [More Information Needed] +- **Hours used:** [More Information Needed] +- **Cloud Provider:** [More Information Needed] +- **Compute Region:** [More Information Needed] +- **Carbon Emitted:** [More Information Needed] + +## Technical Specifications [optional] + +### Model Architecture and Objective + +[More Information Needed] + +### Compute Infrastructure + +[More Information Needed] + +#### Hardware + +[More Information Needed] + +#### Software + +[More Information Needed] + +## Citation [optional] + + + +**BibTeX:** + +[More Information Needed] + +**APA:** + +[More Information Needed] + +## Glossary [optional] + + + +[More Information Needed] + +## More Information [optional] + +[More Information Needed] + +## Model Card Authors [optional] + +[More Information Needed] + +## Model Card Contact + +[More Information Needed] +### Framework versions + +- PEFT 0.21.0 \ No newline at end of file diff --git a/lora_adapter/checkpoint-693/adapter_config.json b/lora_adapter/checkpoint-693/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..9fc6d48d117b17f3327161e9f5b1303db2b64ee1 --- /dev/null +++ b/lora_adapter/checkpoint-693/adapter_config.json @@ -0,0 +1,51 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "unsloth/Llama-3.2-1B-Instruct", + "bias": "none", + "corda_config": null, + "ensure_weight_tying": false, + "eva_config": null, + "exclude_modules": null, + "fan_in_fan_out": false, + "inference_mode": true, + "init_lora_weights": true, + "kasa_config": null, + "layer_replication": null, + "layers_pattern": null, + "layers_to_transform": null, + "loftq_config": {}, + "lora_alpha": 32, + "lora_bias": false, + "lora_dropout": 0.05, + "lora_ga_config": null, + "megatron_config": null, + "megatron_core": "megatron.core", + "modules_to_save": null, + "monteclora_config": null, + "peft_type": "LORA", + "peft_version": "0.21.0", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "up_proj", + "v_proj", + "q_proj", + "down_proj", + "gate_proj", + "o_proj", + "k_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false, + "velora_config": null +} \ No newline at end of file diff --git a/lora_adapter/checkpoint-693/adapter_model.safetensors b/lora_adapter/checkpoint-693/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..a948167a01fd82ee1ac1a45ffa33252d6403cab7 --- /dev/null +++ b/lora_adapter/checkpoint-693/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:31d1ddd1ca763194d58b9e5cf9e6f532bd715ad8726df701929745cb6a4311f5 +size 45118424 diff --git a/lora_adapter/checkpoint-693/chat_template.jinja b/lora_adapter/checkpoint-693/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..1bad6a0f648dccdbec523ca79ba90fbcfc806af0 --- /dev/null +++ b/lora_adapter/checkpoint-693/chat_template.jinja @@ -0,0 +1,93 @@ +{{- bos_token }} +{%- if custom_tools is defined %} + {%- set tools = custom_tools %} +{%- endif %} +{%- if not tools_in_user_message is defined %} + {%- set tools_in_user_message = true %} +{%- endif %} +{%- if not date_string is defined %} + {%- if strftime_now is defined %} + {%- set date_string = strftime_now("%d %b %Y") %} + {%- else %} + {%- set date_string = "26 Jul 2024" %} + {%- endif %} +{%- endif %} +{%- if not tools is defined %} + {%- set tools = none %} +{%- endif %} + +{#- This block extracts the system message, so we can slot it into the right place. #} +{%- if messages[0]['role'] == 'system' %} + {%- set system_message = messages[0]['content']|trim %} + {%- set messages = messages[1:] %} +{%- else %} + {%- set system_message = "" %} +{%- endif %} + +{#- System message #} +{{- "<|start_header_id|>system<|end_header_id|>\n\n" }} +{%- if tools is not none %} + {{- "Environment: ipython\n" }} +{%- endif %} +{{- "Cutting Knowledge Date: December 2023\n" }} +{{- "Today Date: " + date_string + "\n\n" }} +{%- if tools is not none and not tools_in_user_message %} + {{- "You have access to the following functions. To call a function, please respond with JSON for a function call." }} + {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }} + {{- "Do not use variables.\n\n" }} + {%- for t in tools %} + {{- t | tojson(indent=4) }} + {{- "\n\n" }} + {%- endfor %} +{%- endif %} +{{- system_message }} +{{- "<|eot_id|>" }} + +{#- Custom tools are passed in a user message with some extra guidance #} +{%- if tools_in_user_message and not tools is none %} + {#- Extract the first user message so we can plug it in here #} + {%- if messages | length != 0 %} + {%- set first_user_message = messages[0]['content']|trim %} + {%- set messages = messages[1:] %} + {%- else %} + {{- raise_exception("Cannot put tools in the first user message when there's no first user message!") }} +{%- endif %} + {{- '<|start_header_id|>user<|end_header_id|>\n\n' -}} + {{- "Given the following functions, please respond with a JSON for a function call " }} + {{- "with its proper arguments that best answers the given prompt.\n\n" }} + {{- 'Respond in the format {"name": function name, "parameters": dictionary of argument name and its value}.' }} + {{- "Do not use variables.\n\n" }} + {%- for t in tools %} + {{- t | tojson(indent=4) }} + {{- "\n\n" }} + {%- endfor %} + {{- first_user_message + "<|eot_id|>"}} +{%- endif %} + +{%- for message in messages %} + {%- if not (message.role == 'ipython' or message.role == 'tool' or 'tool_calls' in message) %} + {{- '<|start_header_id|>' + message['role'] + '<|end_header_id|>\n\n'+ message['content'] | trim + '<|eot_id|>' }} + {%- elif 'tool_calls' in message %} + {%- if not message.tool_calls|length == 1 %} + {{- raise_exception("This model only supports single tool-calls at once!") }} + {%- endif %} + {%- set tool_call = message.tool_calls[0].function %} + {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' -}} + {{- '{"name": "' + tool_call.name + '", ' }} + {{- '"parameters": ' }} + {{- tool_call.arguments | tojson }} + {{- "}" }} + {{- "<|eot_id|>" }} + {%- elif message.role == "tool" or message.role == "ipython" %} + {{- "<|start_header_id|>ipython<|end_header_id|>\n\n" }} + {%- if message.content is mapping or message.content is iterable %} + {{- message.content | tojson }} + {%- else %} + {{- message.content }} + {%- endif %} + {{- "<|eot_id|>" }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|start_header_id|>assistant<|end_header_id|>\n\n' }} +{%- endif %} diff --git a/lora_adapter/checkpoint-693/optimizer.pt b/lora_adapter/checkpoint-693/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..f1c5bbd2fd818c4a6b21cbe65331576015c51a1c --- /dev/null +++ b/lora_adapter/checkpoint-693/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4508168cfb64111ce055d22eccec80a0cd3782e5797c48600877a442389a0359 +size 90359883 diff --git a/lora_adapter/checkpoint-693/rng_state.pth b/lora_adapter/checkpoint-693/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..7b8e4a2bf4e867d36ec9b2807b89f6d3ae8b55f9 --- /dev/null +++ b/lora_adapter/checkpoint-693/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71b1e5ce7a350c52ef18aceb7dce8450b476076d04fd51abbdfbe08e044226c5 +size 14455 diff --git a/lora_adapter/checkpoint-693/scheduler.pt b/lora_adapter/checkpoint-693/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..b53440af2abd6963d53d9d327d179a6a9a8caf2b --- /dev/null +++ b/lora_adapter/checkpoint-693/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e050c62c2ae3b46deb76aa033e4dbfc65cfa150f2ddec739de46b43922c8f45 +size 1465 diff --git a/lora_adapter/checkpoint-693/tokenizer.json b/lora_adapter/checkpoint-693/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/lora_adapter/checkpoint-693/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/lora_adapter/checkpoint-693/tokenizer_config.json b/lora_adapter/checkpoint-693/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..e96dccba83271308819f796d3b00a0aa21dfef00 --- /dev/null +++ b/lora_adapter/checkpoint-693/tokenizer_config.json @@ -0,0 +1,17 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|eot_id|>", + "is_local": false, + "local_files_only": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "left", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/lora_adapter/checkpoint-693/trainer_state.json b/lora_adapter/checkpoint-693/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..3812078f22e492582bf7fa192df2af84730c5479 --- /dev/null +++ b/lora_adapter/checkpoint-693/trainer_state.json @@ -0,0 +1,746 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 3.0, + "eval_steps": 500, + "global_step": 693, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 3.268431743979454, + "epoch": 0.04340748779164406, + "grad_norm": 5.425721168518066, + "learning_rate": 3e-05, + "loss": 4.763444137573242, + "mean_token_accuracy": 0.37437669970095155, + "num_tokens": 15851.0, + "step": 10 + }, + { + "entropy": 3.6355564504861833, + "epoch": 0.08681497558328811, + "grad_norm": 2.6653194427490234, + "learning_rate": 6.333333333333333e-05, + "loss": 3.661287307739258, + "mean_token_accuracy": 0.4522986955940723, + "num_tokens": 31565.0, + "step": 20 + }, + { + "entropy": 3.110316979885101, + "epoch": 0.13022246337493218, + "grad_norm": 1.8292694091796875, + "learning_rate": 9.666666666666667e-05, + "loss": 2.4040077209472654, + "mean_token_accuracy": 0.6126278236508369, + "num_tokens": 47681.0, + "step": 30 + }, + { + "entropy": 1.947795458137989, + "epoch": 0.17362995116657623, + "grad_norm": 1.7558073997497559, + "learning_rate": 0.00013000000000000002, + "loss": 1.4649612426757812, + "mean_token_accuracy": 0.7671711064875126, + "num_tokens": 63639.0, + "step": 40 + }, + { + "entropy": 1.2642615631222724, + "epoch": 0.21703743895822028, + "grad_norm": 1.8000116348266602, + "learning_rate": 0.00016333333333333334, + "loss": 0.9385161399841309, + "mean_token_accuracy": 0.8446647509932518, + "num_tokens": 79224.0, + "step": 50 + }, + { + "entropy": 0.9772241789847612, + "epoch": 0.26044492674986436, + "grad_norm": 1.5789580345153809, + "learning_rate": 0.00019666666666666666, + "loss": 0.6508745193481446, + "mean_token_accuracy": 0.8930118441581726, + "num_tokens": 94825.0, + "step": 60 + }, + { + "entropy": 0.7386516474187375, + "epoch": 0.3038524145415084, + "grad_norm": 1.118341088294983, + "learning_rate": 0.0001999002586734068, + "loss": 0.5544538021087646, + "mean_token_accuracy": 0.9125440023839474, + "num_tokens": 110902.0, + "step": 70 + }, + { + "entropy": 0.4801172070205212, + "epoch": 0.34725990233315246, + "grad_norm": 1.0871493816375732, + "learning_rate": 0.00019955572927610798, + "loss": 0.32133638858795166, + "mean_token_accuracy": 0.9453130982816219, + "num_tokens": 126758.0, + "step": 80 + }, + { + "entropy": 0.4470752142369747, + "epoch": 0.3906673901247965, + "grad_norm": 0.9949904084205627, + "learning_rate": 0.00019896602868774615, + "loss": 0.33235070705413816, + "mean_token_accuracy": 0.9432531543076038, + "num_tokens": 142247.0, + "step": 90 + }, + { + "entropy": 0.43914212100207806, + "epoch": 0.43407487791644056, + "grad_norm": 1.2417030334472656, + "learning_rate": 0.00019813260913610048, + "loss": 0.32300994396209715, + "mean_token_accuracy": 0.9425150409340859, + "num_tokens": 158033.0, + "step": 100 + }, + { + "entropy": 0.38672009818255904, + "epoch": 0.47748236570808467, + "grad_norm": 1.4303337335586548, + "learning_rate": 0.00019705752304412648, + "loss": 0.3090308904647827, + "mean_token_accuracy": 0.9426406390964985, + "num_tokens": 173972.0, + "step": 110 + }, + { + "entropy": 0.2582590217702091, + "epoch": 0.5208898534997287, + "grad_norm": 0.7586016654968262, + "learning_rate": 0.00019574341797555143, + "loss": 0.16584413051605223, + "mean_token_accuracy": 0.9635460428893566, + "num_tokens": 189557.0, + "step": 120 + }, + { + "entropy": 0.29735598172992467, + "epoch": 0.5642973412913728, + "grad_norm": 1.3573423624038696, + "learning_rate": 0.00019419353011484387, + "loss": 0.23453230857849122, + "mean_token_accuracy": 0.9539774417877197, + "num_tokens": 205568.0, + "step": 130 + }, + { + "entropy": 0.3157164487987757, + "epoch": 0.6077048290830168, + "grad_norm": 0.7886211276054382, + "learning_rate": 0.00019241167629761527, + "loss": 0.24561758041381837, + "mean_token_accuracy": 0.951296404749155, + "num_tokens": 221240.0, + "step": 140 + }, + { + "entropy": 0.41249370062723756, + "epoch": 0.6511123168746609, + "grad_norm": 0.6835598945617676, + "learning_rate": 0.00019040224461107917, + "loss": 0.3280463695526123, + "mean_token_accuracy": 0.9425421200692654, + "num_tokens": 236889.0, + "step": 150 + }, + { + "entropy": 0.25797676630318167, + "epoch": 0.6945198046663049, + "grad_norm": 0.5169897675514221, + "learning_rate": 0.0001881701835877161, + "loss": 0.17580994367599487, + "mean_token_accuracy": 0.9615871131420135, + "num_tokens": 252552.0, + "step": 160 + }, + { + "entropy": 0.3551043555140495, + "epoch": 0.737927292457949, + "grad_norm": 0.9616410136222839, + "learning_rate": 0.0001857209900187565, + "loss": 0.3012498140335083, + "mean_token_accuracy": 0.9450895473361015, + "num_tokens": 268798.0, + "step": 170 + }, + { + "entropy": 0.3095861619338393, + "epoch": 0.781334780249593, + "grad_norm": 1.0524218082427979, + "learning_rate": 0.00018306069541749258, + "loss": 0.21495308876037597, + "mean_token_accuracy": 0.95635409578681, + "num_tokens": 284560.0, + "step": 180 + }, + { + "entropy": 0.3253756103105843, + "epoch": 0.8247422680412371, + "grad_norm": 0.44378986954689026, + "learning_rate": 0.00018019585116575555, + "loss": 0.27938573360443114, + "mean_token_accuracy": 0.9474706895649433, + "num_tokens": 300840.0, + "step": 190 + }, + { + "entropy": 0.2480218150652945, + "epoch": 0.8681497558328811, + "grad_norm": 0.376433789730072, + "learning_rate": 0.000177133512380137, + "loss": 0.18635139465332032, + "mean_token_accuracy": 0.9606560796499253, + "num_tokens": 316455.0, + "step": 200 + }, + { + "entropy": 0.26516002183780074, + "epoch": 0.9115572436245253, + "grad_norm": 0.447360634803772, + "learning_rate": 0.00017388122053768674, + "loss": 0.20903537273406983, + "mean_token_accuracy": 0.9590088307857514, + "num_tokens": 332359.0, + "step": 210 + }, + { + "entropy": 0.22508152723312377, + "epoch": 0.9549647314161693, + "grad_norm": 0.39458373188972473, + "learning_rate": 0.0001704469849038734, + "loss": 0.17320446968078612, + "mean_token_accuracy": 0.9621456168591976, + "num_tokens": 348219.0, + "step": 220 + }, + { + "entropy": 0.1884014437906444, + "epoch": 0.9983722192078134, + "grad_norm": 0.5577853918075562, + "learning_rate": 0.00016683926280854484, + "loss": 0.14232510328292847, + "mean_token_accuracy": 0.967728354781866, + "num_tokens": 363802.0, + "step": 230 + }, + { + "epoch": 1.0, + "eval_entropy": 0.2500555583713006, + "eval_loss": 0.2172880917787552, + "eval_mean_token_accuracy": 0.9547121439661298, + "eval_num_tokens": 364353.0, + "eval_runtime": 43.3662, + "eval_samples_per_second": 2.26, + "eval_steps_per_second": 2.26, + "step": 231 + }, + { + "entropy": 0.26626345694065096, + "epoch": 1.0390667390124797, + "grad_norm": 0.36867332458496094, + "learning_rate": 0.00016306693881846152, + "loss": 0.23021941184997557, + "mean_token_accuracy": 0.9587587014834086, + "num_tokens": 378571.0, + "step": 240 + }, + { + "entropy": 0.1791029059328139, + "epoch": 1.0824742268041236, + "grad_norm": 0.5592738389968872, + "learning_rate": 0.00015913930285769355, + "loss": 0.1204079270362854, + "mean_token_accuracy": 0.970609325170517, + "num_tokens": 394252.0, + "step": 250 + }, + { + "entropy": 0.25584981925785544, + "epoch": 1.1258817145957678, + "grad_norm": 0.6882627606391907, + "learning_rate": 0.00015506602732976373, + "loss": 0.182321298122406, + "mean_token_accuracy": 0.9607684284448623, + "num_tokens": 410118.0, + "step": 260 + }, + { + "entropy": 0.15852767862379552, + "epoch": 1.1692892023874117, + "grad_norm": 0.47175613045692444, + "learning_rate": 0.00015085714329787631, + "loss": 0.10519710779190064, + "mean_token_accuracy": 0.9718552604317665, + "num_tokens": 425967.0, + "step": 270 + }, + { + "entropy": 0.224250613944605, + "epoch": 1.212696690179056, + "grad_norm": 0.8211113214492798, + "learning_rate": 0.0001465230157818914, + "loss": 0.1746065378189087, + "mean_token_accuracy": 0.9628558784723282, + "num_tokens": 441911.0, + "step": 280 + }, + { + "entropy": 0.2187170408666134, + "epoch": 1.2561041779707, + "grad_norm": 1.2185333967208862, + "learning_rate": 0.00014207431823288057, + "loss": 0.16913924217224122, + "mean_token_accuracy": 0.9632994569838047, + "num_tokens": 457767.0, + "step": 290 + }, + { + "entropy": 0.15246864631772042, + "epoch": 1.299511665762344, + "grad_norm": 0.8135276436805725, + "learning_rate": 0.00013752200624812282, + "loss": 0.10427193641662598, + "mean_token_accuracy": 0.9733581781387329, + "num_tokens": 473550.0, + "step": 300 + }, + { + "entropy": 0.14296606807038187, + "epoch": 1.342919153553988, + "grad_norm": 0.4611963927745819, + "learning_rate": 0.00013287729059127288, + "loss": 0.11364473104476928, + "mean_token_accuracy": 0.9724942341446876, + "num_tokens": 489513.0, + "step": 310 + }, + { + "entropy": 0.18273791116662325, + "epoch": 1.386326641345632, + "grad_norm": 0.600029468536377, + "learning_rate": 0.00012815160958414332, + "loss": 0.14306700229644775, + "mean_token_accuracy": 0.9665566079318524, + "num_tokens": 505197.0, + "step": 320 + }, + { + "entropy": 0.12391844158992171, + "epoch": 1.4297341291372763, + "grad_norm": 0.35350969433784485, + "learning_rate": 0.0001233566009380896, + "loss": 0.08826681971549988, + "mean_token_accuracy": 0.9754320561885834, + "num_tokens": 520666.0, + "step": 330 + }, + { + "entropy": 0.14481371184810996, + "epoch": 1.4731416169289202, + "grad_norm": 0.6141801476478577, + "learning_rate": 0.0001185040730943683, + "loss": 0.11338310241699219, + "mean_token_accuracy": 0.9735137969255447, + "num_tokens": 536352.0, + "step": 340 + }, + { + "entropy": 0.18556677168235183, + "epoch": 1.5165491047205641, + "grad_norm": 0.8235384225845337, + "learning_rate": 0.00011360597614404662, + "loss": 0.13062334060668945, + "mean_token_accuracy": 0.9691525533795357, + "num_tokens": 551908.0, + "step": 350 + }, + { + "entropy": 0.19317283374257385, + "epoch": 1.5599565925122083, + "grad_norm": 0.7898983359336853, + "learning_rate": 0.00010867437239907765, + "loss": 0.13731375932693482, + "mean_token_accuracy": 0.9673447087407112, + "num_tokens": 567817.0, + "step": 360 + }, + { + "entropy": 0.23874589540064334, + "epoch": 1.6033640803038525, + "grad_norm": 0.37412697076797485, + "learning_rate": 0.00010372140668701483, + "loss": 0.16327574253082275, + "mean_token_accuracy": 0.9641537763178348, + "num_tokens": 583908.0, + "step": 370 + }, + { + "entropy": 0.11286464962176979, + "epoch": 1.6467715680954966, + "grad_norm": 0.4411953091621399, + "learning_rate": 9.875927644251854e-05, + "loss": 0.08702898025512695, + "mean_token_accuracy": 0.9771473661065102, + "num_tokens": 599617.0, + "step": 380 + }, + { + "entropy": 0.13296716185286642, + "epoch": 1.6901790558871406, + "grad_norm": 0.3289574086666107, + "learning_rate": 9.380020166931036e-05, + "loss": 0.11703462600708008, + "mean_token_accuracy": 0.9712080150842667, + "num_tokens": 615577.0, + "step": 390 + }, + { + "entropy": 0.1416403181385249, + "epoch": 1.7335865436787845, + "grad_norm": 0.571514368057251, + "learning_rate": 8.885639484654701e-05, + "loss": 0.11379531621932984, + "mean_token_accuracy": 0.9724767826497555, + "num_tokens": 631601.0, + "step": 400 + }, + { + "entropy": 0.11030569332651793, + "epoch": 1.7769940314704287, + "grad_norm": 0.4873872995376587, + "learning_rate": 8.394003085372496e-05, + "loss": 0.08141401410102844, + "mean_token_accuracy": 0.9770576477050781, + "num_tokens": 647297.0, + "step": 410 + }, + { + "entropy": 0.12415502546355128, + "epoch": 1.8204015192620728, + "grad_norm": 0.32351386547088623, + "learning_rate": 7.90632169881799e-05, + "loss": 0.08947296738624573, + "mean_token_accuracy": 0.9762426503002644, + "num_tokens": 663176.0, + "step": 420 + }, + { + "entropy": 0.16395117049105465, + "epoch": 1.8638090070537168, + "grad_norm": 0.34445416927337646, + "learning_rate": 7.423796314901768e-05, + "loss": 0.12568631172180175, + "mean_token_accuracy": 0.9712538823485375, + "num_tokens": 678975.0, + "step": 430 + }, + { + "entropy": 0.20411954806186258, + "epoch": 1.9072164948453607, + "grad_norm": 0.8611961603164673, + "learning_rate": 6.947615226090297e-05, + "loss": 0.16005014181137084, + "mean_token_accuracy": 0.9660855703055858, + "num_tokens": 694724.0, + "step": 440 + }, + { + "entropy": 0.1906371342483908, + "epoch": 1.9506239826370049, + "grad_norm": 0.3045775890350342, + "learning_rate": 6.478951101054225e-05, + "loss": 0.13002687692642212, + "mean_token_accuracy": 0.9707569405436516, + "num_tokens": 710764.0, + "step": 450 + }, + { + "entropy": 0.12089938684366644, + "epoch": 1.994031470428649, + "grad_norm": 0.8321558833122253, + "learning_rate": 6.018958096792642e-05, + "loss": 0.08647857308387756, + "mean_token_accuracy": 0.977338220179081, + "num_tokens": 726521.0, + "step": 460 + }, + { + "epoch": 2.0, + "eval_entropy": 0.18578565937980096, + "eval_loss": 0.15265728533267975, + "eval_mean_token_accuracy": 0.9647377492213736, + "eval_num_tokens": 728706.0, + "eval_runtime": 43.8011, + "eval_samples_per_second": 2.237, + "eval_steps_per_second": 2.237, + "step": 462 + }, + { + "entropy": 0.11111431792378426, + "epoch": 2.0347259902333152, + "grad_norm": 0.31517288088798523, + "learning_rate": 5.568769016345162e-05, + "loss": 0.07631215453147888, + "mean_token_accuracy": 0.9792846202850342, + "num_tokens": 741135.0, + "step": 470 + }, + { + "entropy": 0.12576794293709098, + "epoch": 2.0781334780249594, + "grad_norm": 0.6706956028938293, + "learning_rate": 5.129492519091414e-05, + "loss": 0.08828421831130981, + "mean_token_accuracy": 0.9774440720677375, + "num_tokens": 757149.0, + "step": 480 + }, + { + "entropy": 0.1652247125748545, + "epoch": 2.1215409658166036, + "grad_norm": 0.6188645362854004, + "learning_rate": 4.7022103905079403e-05, + "loss": 0.10453375577926635, + "mean_token_accuracy": 0.9749265879392623, + "num_tokens": 773043.0, + "step": 490 + }, + { + "entropy": 0.13389622955583036, + "epoch": 2.1649484536082473, + "grad_norm": 0.4554220736026764, + "learning_rate": 4.287974878106223e-05, + "loss": 0.0822334885597229, + "mean_token_accuracy": 0.9777384780347347, + "num_tokens": 788836.0, + "step": 500 + }, + { + "entropy": 0.1122925499919802, + "epoch": 2.2083559413998914, + "grad_norm": 0.3267352283000946, + "learning_rate": 3.887806100112449e-05, + "loss": 0.07709192037582398, + "mean_token_accuracy": 0.9793755315244198, + "num_tokens": 804610.0, + "step": 510 + }, + { + "entropy": 0.10615749745629728, + "epoch": 2.2517634291915356, + "grad_norm": 0.30847302079200745, + "learning_rate": 3.5026895332705504e-05, + "loss": 0.07118260264396667, + "mean_token_accuracy": 0.9799461409449577, + "num_tokens": 820138.0, + "step": 520 + }, + { + "entropy": 0.13317556893453003, + "epoch": 2.2951709169831798, + "grad_norm": 0.7525761127471924, + "learning_rate": 3.133573585955194e-05, + "loss": 0.08792675137519837, + "mean_token_accuracy": 0.9784041821956635, + "num_tokens": 835962.0, + "step": 530 + }, + { + "entropy": 0.15031940978951752, + "epoch": 2.3385784047748235, + "grad_norm": 0.36720001697540283, + "learning_rate": 2.7813672625712594e-05, + "loss": 0.08893920779228211, + "mean_token_accuracy": 0.9778918631374836, + "num_tokens": 852357.0, + "step": 540 + }, + { + "entropy": 0.12438173596747219, + "epoch": 2.3819858925664676, + "grad_norm": 0.7582745552062988, + "learning_rate": 2.4469379249916613e-05, + "loss": 0.08149291276931762, + "mean_token_accuracy": 0.9797964461147786, + "num_tokens": 868012.0, + "step": 550 + }, + { + "entropy": 0.1631687331944704, + "epoch": 2.425393380358112, + "grad_norm": 0.29170867800712585, + "learning_rate": 2.131109156546226e-05, + "loss": 0.10433924198150635, + "mean_token_accuracy": 0.9751808606088161, + "num_tokens": 884061.0, + "step": 560 + }, + { + "entropy": 0.10712425396777689, + "epoch": 2.468800868149756, + "grad_norm": 0.6179195642471313, + "learning_rate": 1.8346587338219455e-05, + "loss": 0.07671988606452942, + "mean_token_accuracy": 0.9794992141425609, + "num_tokens": 899982.0, + "step": 570 + }, + { + "entropy": 0.10620055091567338, + "epoch": 2.5122083559414, + "grad_norm": 0.3330930769443512, + "learning_rate": 1.5583167112693153e-05, + "loss": 0.06958608627319336, + "mean_token_accuracy": 0.981497923284769, + "num_tokens": 915669.0, + "step": 580 + }, + { + "entropy": 0.09565388238988817, + "epoch": 2.555615843733044, + "grad_norm": 0.3171375095844269, + "learning_rate": 1.3027636233317342e-05, + "loss": 0.06519963145256043, + "mean_token_accuracy": 0.9813847310841084, + "num_tokens": 931627.0, + "step": 590 + }, + { + "entropy": 0.11542923199012875, + "epoch": 2.599023331524688, + "grad_norm": 0.7167931199073792, + "learning_rate": 1.0686288085254781e-05, + "loss": 0.07995554804801941, + "mean_token_accuracy": 0.9791012987494468, + "num_tokens": 947380.0, + "step": 600 + }, + { + "entropy": 0.11827345448546112, + "epoch": 2.642430819316332, + "grad_norm": 0.7201513051986694, + "learning_rate": 8.564888595974718e-06, + "loss": 0.0786819577217102, + "mean_token_accuracy": 0.9796186953783035, + "num_tokens": 963202.0, + "step": 610 + }, + { + "entropy": 0.13062830795533956, + "epoch": 2.685838307107976, + "grad_norm": 0.29200178384780884, + "learning_rate": 6.6686620357756745e-06, + "loss": 0.08588576316833496, + "mean_token_accuracy": 0.9774093441665173, + "num_tokens": 978854.0, + "step": 620 + }, + { + "entropy": 0.11200794829055667, + "epoch": 2.72924579489962, + "grad_norm": 0.3197459280490875, + "learning_rate": 5.002278152221884e-06, + "loss": 0.07561949491500855, + "mean_token_accuracy": 0.9791875034570694, + "num_tokens": 994854.0, + "step": 630 + }, + { + "entropy": 0.11359881502576172, + "epoch": 2.772653282691264, + "grad_norm": 0.7663329243659973, + "learning_rate": 3.569840670176483e-06, + "loss": 0.0805785059928894, + "mean_token_accuracy": 0.9776594989001751, + "num_tokens": 1010447.0, + "step": 640 + }, + { + "entropy": 0.11259827674366533, + "epoch": 2.8160607704829084, + "grad_norm": 0.27714982628822327, + "learning_rate": 2.3748771857522225e-06, + "loss": 0.08109834194183349, + "mean_token_accuracy": 0.9786082617938519, + "num_tokens": 1026439.0, + "step": 650 + }, + { + "entropy": 0.15431087678298355, + "epoch": 2.8594682582745525, + "grad_norm": 0.4866115152835846, + "learning_rate": 1.4203304790671556e-06, + "loss": 0.10093202590942382, + "mean_token_accuracy": 0.9762960068881512, + "num_tokens": 1042308.0, + "step": 660 + }, + { + "entropy": 0.11404016092419625, + "epoch": 2.9028757460661962, + "grad_norm": 0.350322961807251, + "learning_rate": 7.08551267199098e-07, + "loss": 0.07340958714485168, + "mean_token_accuracy": 0.9801267758011818, + "num_tokens": 1057860.0, + "step": 670 + }, + { + "entropy": 0.10399061464704573, + "epoch": 2.9462832338578404, + "grad_norm": 0.3793535530567169, + "learning_rate": 2.412924151857121e-07, + "loss": 0.06545245051383972, + "mean_token_accuracy": 0.9819599337875843, + "num_tokens": 1073830.0, + "step": 680 + }, + { + "entropy": 0.14847381091676654, + "epoch": 2.9896907216494846, + "grad_norm": 0.5287635922431946, + "learning_rate": 1.9704619326621487e-08, + "loss": 0.09734154939651489, + "mean_token_accuracy": 0.974915123730898, + "num_tokens": 1089455.0, + "step": 690 + } + ], + "logging_steps": 10, + "max_steps": 693, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 150, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": true + }, + "attributes": {} + } + }, + "total_flos": 6456163721711616.0, + "train_batch_size": 1, + "trial_name": null, + "trial_params": null +} diff --git a/lora_adapter/checkpoint-693/training_args.bin b/lora_adapter/checkpoint-693/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..b9f6c3f9cbf215fdd6c495aa3f4bd03b36976a6a --- /dev/null +++ b/lora_adapter/checkpoint-693/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f02029ae097ac6a5686a868c70c7fb13e1a18c4978ab722ce3a1759ddbc101a +size 5713 diff --git a/lora_adapter/tokenizer.json b/lora_adapter/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..1c1d8d5c9024994f1d3b00f9662b8dd89ca13cf2 --- /dev/null +++ b/lora_adapter/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6b9e4e7fb171f92fd137b777cc2714bf87d11576700a1dcd7a399e7bbe39537b +size 17209920 diff --git a/lora_adapter/tokenizer_config.json b/lora_adapter/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..e96dccba83271308819f796d3b00a0aa21dfef00 --- /dev/null +++ b/lora_adapter/tokenizer_config.json @@ -0,0 +1,17 @@ +{ + "backend": "tokenizers", + "bos_token": "<|begin_of_text|>", + "clean_up_tokenization_spaces": true, + "eos_token": "<|eot_id|>", + "is_local": false, + "local_files_only": false, + "model_input_names": [ + "input_ids", + "attention_mask" + ], + "model_max_length": 131072, + "pad_token": "<|finetune_right_pad_id|>", + "padding_side": "left", + "tokenizer_class": "TokenizersBackend", + "unk_token": null +} diff --git a/lora_adapter/training_args.bin b/lora_adapter/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..b9f6c3f9cbf215fdd6c495aa3f4bd03b36976a6a --- /dev/null +++ b/lora_adapter/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3f02029ae097ac6a5686a868c70c7fb13e1a18c4978ab722ce3a1759ddbc101a +size 5713