diff --git a/.gitattributes b/.gitattributes index 96eb6c4568ca5168f57c3f873b3353e2a3658889..02ecd02f5ff5aeec6a412fcebdcdd6e030b78424 100644 --- a/.gitattributes +++ b/.gitattributes @@ -69,3 +69,19 @@ L2/checkpoints/checkpoint-70/tokenizer.json filter=lfs diff=lfs merge=lfs -text L2/checkpoints/checkpoint-80/tokenizer.json filter=lfs diff=lfs merge=lfs -text L2/checkpoints/checkpoint-90/tokenizer.json filter=lfs diff=lfs merge=lfs -text L3/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-10/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-100/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-110/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-120/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-130/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-140/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-150/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-159/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-20/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-30/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-40/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-50/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-60/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-70/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-80/tokenizer.json filter=lfs diff=lfs merge=lfs -text +L3/checkpoints/checkpoint-90/tokenizer.json filter=lfs diff=lfs merge=lfs -text diff --git a/L3/checkpoints/README.md b/L3/checkpoints/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c9e1b45c3f2c163e22e44bb30165b4f69ede96ae --- /dev/null +++ b/L3/checkpoints/README.md @@ -0,0 +1,58 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: transformers +model_name: checkpoints +tags: +- generated_from_trainer +- trl +- sft +licence: license +--- + +# Model Card for checkpoints + +This model is a fine-tuned version of [Qwen/Qwen3.5-0.8B](https://huggingface.co/Qwen/Qwen3.5-0.8B). +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 + +- TRL: 1.2.0.dev0 +- Transformers: 5.6.0.dev0 +- Pytorch: 2.9.0.dev20250803 +- Datasets: 4.8.4 +- Tokenizers: 0.22.1 + +## 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/L3/checkpoints/checkpoint-10/README.md b/L3/checkpoints/checkpoint-10/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-10/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-10/adapter_config.json b/L3/checkpoints/checkpoint-10/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-10/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-10/adapter_model.safetensors b/L3/checkpoints/checkpoint-10/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..81d67fc77eb464ea11c57e7c69df8bf3a81025b0 --- /dev/null +++ b/L3/checkpoints/checkpoint-10/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:603831696ac5ebdf3453195533a72a9a729e1aa1c3d31a7051bba9f1b808298a +size 4331744 diff --git a/L3/checkpoints/checkpoint-10/chat_template.jinja b/L3/checkpoints/checkpoint-10/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-10/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-10/optimizer.pt b/L3/checkpoints/checkpoint-10/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..c901446567b32db58b224a55796bd01b387b20de --- /dev/null +++ b/L3/checkpoints/checkpoint-10/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:70859cabf1091657539c71c239c675786cb06b43c92230c844f23f997815178a +size 8690571 diff --git a/L3/checkpoints/checkpoint-10/rng_state.pth b/L3/checkpoints/checkpoint-10/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..3f5c250a692e034a27fb06d7008612b2de078116 --- /dev/null +++ b/L3/checkpoints/checkpoint-10/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cddf27219365242ec1046a3532a63a24c3f350c77f100e4f973369db2cc849d +size 14455 diff --git a/L3/checkpoints/checkpoint-10/scheduler.pt b/L3/checkpoints/checkpoint-10/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..f77a8c35a99260d65736ac6295c06ee1053ff084 --- /dev/null +++ b/L3/checkpoints/checkpoint-10/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e7fe1ca4b3f5360608595ce0b8c7a836143524c2bd8b15c3dedc0d66309506ab +size 1465 diff --git a/L3/checkpoints/checkpoint-10/tokenizer.json b/L3/checkpoints/checkpoint-10/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-10/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-10/tokenizer_config.json b/L3/checkpoints/checkpoint-10/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-10/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-10/trainer_state.json b/L3/checkpoints/checkpoint-10/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..cf28e032401eb7a42fd6cdbb6befd4b0a722ff39 --- /dev/null +++ b/L3/checkpoints/checkpoint-10/trainer_state.json @@ -0,0 +1,44 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 0.18867924528301888, + "eval_steps": 500, + "global_step": 10, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 111779674536960.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-10/training_args.bin b/L3/checkpoints/checkpoint-10/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-10/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713 diff --git a/L3/checkpoints/checkpoint-100/README.md b/L3/checkpoints/checkpoint-100/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-100/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-100/adapter_config.json b/L3/checkpoints/checkpoint-100/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-100/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-100/adapter_model.safetensors b/L3/checkpoints/checkpoint-100/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..1632be71ae8795ef08d86f0d09bf214171238669 --- /dev/null +++ b/L3/checkpoints/checkpoint-100/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:71b1ce6dd39084b482ad44bbd0b5951a309832203f1d5888a416d3698bbc1494 +size 4331744 diff --git a/L3/checkpoints/checkpoint-100/chat_template.jinja b/L3/checkpoints/checkpoint-100/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-100/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-100/optimizer.pt b/L3/checkpoints/checkpoint-100/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..3c914db97c5592794f5b383e971d6c7d22c6a46e --- /dev/null +++ b/L3/checkpoints/checkpoint-100/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2c97f4dee988dfa445d662fa06e172a84a15f21c1c541dd9b3d834b0e64ec04f +size 8690571 diff --git a/L3/checkpoints/checkpoint-100/rng_state.pth b/L3/checkpoints/checkpoint-100/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..38c6d5df0a659b81300f358fefb31a6f4aa51ddc --- /dev/null +++ b/L3/checkpoints/checkpoint-100/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3a77d4a8b98ce027a4d6a3b9fb5d7c904e27ec1efd5c0468c24fa26bb738316 +size 14455 diff --git a/L3/checkpoints/checkpoint-100/scheduler.pt b/L3/checkpoints/checkpoint-100/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..2e86f16121c94952328173d2bd55e9d7711b6ed2 --- /dev/null +++ b/L3/checkpoints/checkpoint-100/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3177aafb877f9c541c793d0b5d70c393194524b75cdf776a7c9c47187919c5f0 +size 1465 diff --git a/L3/checkpoints/checkpoint-100/tokenizer.json b/L3/checkpoints/checkpoint-100/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-100/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-100/tokenizer_config.json b/L3/checkpoints/checkpoint-100/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-100/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-100/trainer_state.json b/L3/checkpoints/checkpoint-100/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..83a145a48f295adb9653d3fb2d5dc8ffc6487676 --- /dev/null +++ b/L3/checkpoints/checkpoint-100/trainer_state.json @@ -0,0 +1,134 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 1.8867924528301887, + "eval_steps": 500, + "global_step": 100, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + }, + { + "entropy": 2.03623046875, + "epoch": 0.37735849056603776, + "grad_norm": 1.8039652109146118, + "learning_rate": 0.00019694002659393305, + "loss": 1.8651376724243165, + "mean_token_accuracy": 0.5952314671128989, + "num_tokens": 72245.0, + "step": 20 + }, + { + "entropy": 1.49443359375, + "epoch": 0.5660377358490566, + "grad_norm": 0.7885380387306213, + "learning_rate": 0.0001898390981891979, + "loss": 1.5259657859802247, + "mean_token_accuracy": 0.6693046040832996, + "num_tokens": 108540.0, + "step": 30 + }, + { + "entropy": 1.421875, + "epoch": 0.7547169811320755, + "grad_norm": 0.7279834747314453, + "learning_rate": 0.00017891405093963938, + "loss": 1.4288103103637695, + "mean_token_accuracy": 0.6861812733113766, + "num_tokens": 144637.0, + "step": 40 + }, + { + "entropy": 1.38642578125, + "epoch": 0.9433962264150944, + "grad_norm": 0.6967478394508362, + "learning_rate": 0.00016462992378609407, + "loss": 1.3759333610534668, + "mean_token_accuracy": 0.6965034589171409, + "num_tokens": 180890.0, + "step": 50 + }, + { + "entropy": 1.37880859375, + "epoch": 1.1320754716981132, + "grad_norm": 0.7058449983596802, + "learning_rate": 0.00014759473930370736, + "loss": 1.3774614334106445, + "mean_token_accuracy": 0.6968415275216102, + "num_tokens": 216977.0, + "step": 60 + }, + { + "entropy": 1.3544921875, + "epoch": 1.320754716981132, + "grad_norm": 0.7576785087585449, + "learning_rate": 0.00012853362242491053, + "loss": 1.3501564979553222, + "mean_token_accuracy": 0.699217775464058, + "num_tokens": 253285.0, + "step": 70 + }, + { + "entropy": 1.35498046875, + "epoch": 1.509433962264151, + "grad_norm": 0.6370306015014648, + "learning_rate": 0.00010825793454723325, + "loss": 1.346321201324463, + "mean_token_accuracy": 0.7007117375731469, + "num_tokens": 288932.0, + "step": 80 + }, + { + "entropy": 1.362890625, + "epoch": 1.6981132075471699, + "grad_norm": 0.7341946363449097, + "learning_rate": 8.763073687306524e-05, + "loss": 1.3396063804626466, + "mean_token_accuracy": 0.701534990221262, + "num_tokens": 325309.0, + "step": 90 + }, + { + "entropy": 1.33994140625, + "epoch": 1.8867924528301887, + "grad_norm": 0.7750918865203857, + "learning_rate": 6.753005307953167e-05, + "loss": 1.3485977172851562, + "mean_token_accuracy": 0.7031819194555282, + "num_tokens": 361755.0, + "step": 100 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1133377609971456.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-100/training_args.bin b/L3/checkpoints/checkpoint-100/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-100/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713 diff --git a/L3/checkpoints/checkpoint-110/README.md b/L3/checkpoints/checkpoint-110/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-110/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-110/adapter_config.json b/L3/checkpoints/checkpoint-110/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-110/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-110/adapter_model.safetensors b/L3/checkpoints/checkpoint-110/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..7a2ec31fd65309d37a7e99687fa13a0a80f89cc4 --- /dev/null +++ b/L3/checkpoints/checkpoint-110/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7a05fabafa5405733ebe5187361867cf15a23dd838bb3ea25a262aede051fdaf +size 4331744 diff --git a/L3/checkpoints/checkpoint-110/chat_template.jinja b/L3/checkpoints/checkpoint-110/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-110/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-110/optimizer.pt b/L3/checkpoints/checkpoint-110/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..135216e45becc4b7b50d073fa5764dc9cead6d11 --- /dev/null +++ b/L3/checkpoints/checkpoint-110/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:36a133b64929e209adce564e1fa334cf33184b8e921b738fa283d0fa7ac792f2 +size 8690571 diff --git a/L3/checkpoints/checkpoint-110/rng_state.pth b/L3/checkpoints/checkpoint-110/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..7d150fc4504460cdea273ef2adcb04a65c626709 --- /dev/null +++ b/L3/checkpoints/checkpoint-110/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dba4fde4ee04d2f472bb4dea96a48e8fdf7891d2b0694a8f012e8133a2e176ae +size 14455 diff --git a/L3/checkpoints/checkpoint-110/scheduler.pt b/L3/checkpoints/checkpoint-110/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..2a9fadb38e19952787f70f5d92bdb6eeb301a08a --- /dev/null +++ b/L3/checkpoints/checkpoint-110/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c8f882f0bf7e74a2b304dde78b9fa019bc2cdbf9058f544ba3b9a9ae35031b93 +size 1465 diff --git a/L3/checkpoints/checkpoint-110/tokenizer.json b/L3/checkpoints/checkpoint-110/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-110/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-110/tokenizer_config.json b/L3/checkpoints/checkpoint-110/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-110/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-110/trainer_state.json b/L3/checkpoints/checkpoint-110/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..dd68303bba3d7607eb91094f128aecf452324f6e --- /dev/null +++ b/L3/checkpoints/checkpoint-110/trainer_state.json @@ -0,0 +1,144 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 2.0754716981132075, + "eval_steps": 500, + "global_step": 110, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + }, + { + "entropy": 2.03623046875, + "epoch": 0.37735849056603776, + "grad_norm": 1.8039652109146118, + "learning_rate": 0.00019694002659393305, + "loss": 1.8651376724243165, + "mean_token_accuracy": 0.5952314671128989, + "num_tokens": 72245.0, + "step": 20 + }, + { + "entropy": 1.49443359375, + "epoch": 0.5660377358490566, + "grad_norm": 0.7885380387306213, + "learning_rate": 0.0001898390981891979, + "loss": 1.5259657859802247, + "mean_token_accuracy": 0.6693046040832996, + "num_tokens": 108540.0, + "step": 30 + }, + { + "entropy": 1.421875, + "epoch": 0.7547169811320755, + "grad_norm": 0.7279834747314453, + "learning_rate": 0.00017891405093963938, + "loss": 1.4288103103637695, + "mean_token_accuracy": 0.6861812733113766, + "num_tokens": 144637.0, + "step": 40 + }, + { + "entropy": 1.38642578125, + "epoch": 0.9433962264150944, + "grad_norm": 0.6967478394508362, + "learning_rate": 0.00016462992378609407, + "loss": 1.3759333610534668, + "mean_token_accuracy": 0.6965034589171409, + "num_tokens": 180890.0, + "step": 50 + }, + { + "entropy": 1.37880859375, + "epoch": 1.1320754716981132, + "grad_norm": 0.7058449983596802, + "learning_rate": 0.00014759473930370736, + "loss": 1.3774614334106445, + "mean_token_accuracy": 0.6968415275216102, + "num_tokens": 216977.0, + "step": 60 + }, + { + "entropy": 1.3544921875, + "epoch": 1.320754716981132, + "grad_norm": 0.7576785087585449, + "learning_rate": 0.00012853362242491053, + "loss": 1.3501564979553222, + "mean_token_accuracy": 0.699217775464058, + "num_tokens": 253285.0, + "step": 70 + }, + { + "entropy": 1.35498046875, + "epoch": 1.509433962264151, + "grad_norm": 0.6370306015014648, + "learning_rate": 0.00010825793454723325, + "loss": 1.346321201324463, + "mean_token_accuracy": 0.7007117375731469, + "num_tokens": 288932.0, + "step": 80 + }, + { + "entropy": 1.362890625, + "epoch": 1.6981132075471699, + "grad_norm": 0.7341946363449097, + "learning_rate": 8.763073687306524e-05, + "loss": 1.3396063804626466, + "mean_token_accuracy": 0.701534990221262, + "num_tokens": 325309.0, + "step": 90 + }, + { + "entropy": 1.33994140625, + "epoch": 1.8867924528301887, + "grad_norm": 0.7750918865203857, + "learning_rate": 6.753005307953167e-05, + "loss": 1.3485977172851562, + "mean_token_accuracy": 0.7031819194555282, + "num_tokens": 361755.0, + "step": 100 + }, + { + "entropy": 1.32060546875, + "epoch": 2.0754716981132075, + "grad_norm": 0.6582154631614685, + "learning_rate": 4.8811495091039926e-05, + "loss": 1.3079830169677735, + "mean_token_accuracy": 0.7036498673260212, + "num_tokens": 398143.0, + "step": 110 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1246594965209856.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-110/training_args.bin b/L3/checkpoints/checkpoint-110/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-110/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713 diff --git a/L3/checkpoints/checkpoint-120/README.md b/L3/checkpoints/checkpoint-120/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-120/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-120/adapter_config.json b/L3/checkpoints/checkpoint-120/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-120/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-120/adapter_model.safetensors b/L3/checkpoints/checkpoint-120/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..41d3474f45f263981c2d4b610de4b5a867a7fafd --- /dev/null +++ b/L3/checkpoints/checkpoint-120/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37d8bb647cd39430b378d4f51e47e77e8914814cf930728cb46f9a54ce44abaf +size 4331744 diff --git a/L3/checkpoints/checkpoint-120/chat_template.jinja b/L3/checkpoints/checkpoint-120/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-120/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-120/optimizer.pt b/L3/checkpoints/checkpoint-120/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..fa0437e1f22e7e63758a44e85904247eac36b8f5 --- /dev/null +++ b/L3/checkpoints/checkpoint-120/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c30420b12e6feb1067d57c398bcc4085dc68457f875ece9fd9254c5a7b33ff64 +size 8690571 diff --git a/L3/checkpoints/checkpoint-120/rng_state.pth b/L3/checkpoints/checkpoint-120/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..7d150fc4504460cdea273ef2adcb04a65c626709 --- /dev/null +++ b/L3/checkpoints/checkpoint-120/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dba4fde4ee04d2f472bb4dea96a48e8fdf7891d2b0694a8f012e8133a2e176ae +size 14455 diff --git a/L3/checkpoints/checkpoint-120/scheduler.pt b/L3/checkpoints/checkpoint-120/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..9360bd36ac51b5e1d4ce1f2a58618eee24bcb300 --- /dev/null +++ b/L3/checkpoints/checkpoint-120/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c748cde43f3ac780a033e33735b44512b14c6bcfd555ce64d6b760d4ce31be08 +size 1465 diff --git a/L3/checkpoints/checkpoint-120/tokenizer.json b/L3/checkpoints/checkpoint-120/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-120/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-120/tokenizer_config.json b/L3/checkpoints/checkpoint-120/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-120/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-120/trainer_state.json b/L3/checkpoints/checkpoint-120/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..c9df4c51d3c799609d347f24caf404b321b7ca37 --- /dev/null +++ b/L3/checkpoints/checkpoint-120/trainer_state.json @@ -0,0 +1,154 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 2.2641509433962264, + "eval_steps": 500, + "global_step": 120, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + }, + { + "entropy": 2.03623046875, + "epoch": 0.37735849056603776, + "grad_norm": 1.8039652109146118, + "learning_rate": 0.00019694002659393305, + "loss": 1.8651376724243165, + "mean_token_accuracy": 0.5952314671128989, + "num_tokens": 72245.0, + "step": 20 + }, + { + "entropy": 1.49443359375, + "epoch": 0.5660377358490566, + "grad_norm": 0.7885380387306213, + "learning_rate": 0.0001898390981891979, + "loss": 1.5259657859802247, + "mean_token_accuracy": 0.6693046040832996, + "num_tokens": 108540.0, + "step": 30 + }, + { + "entropy": 1.421875, + "epoch": 0.7547169811320755, + "grad_norm": 0.7279834747314453, + "learning_rate": 0.00017891405093963938, + "loss": 1.4288103103637695, + "mean_token_accuracy": 0.6861812733113766, + "num_tokens": 144637.0, + "step": 40 + }, + { + "entropy": 1.38642578125, + "epoch": 0.9433962264150944, + "grad_norm": 0.6967478394508362, + "learning_rate": 0.00016462992378609407, + "loss": 1.3759333610534668, + "mean_token_accuracy": 0.6965034589171409, + "num_tokens": 180890.0, + "step": 50 + }, + { + "entropy": 1.37880859375, + "epoch": 1.1320754716981132, + "grad_norm": 0.7058449983596802, + "learning_rate": 0.00014759473930370736, + "loss": 1.3774614334106445, + "mean_token_accuracy": 0.6968415275216102, + "num_tokens": 216977.0, + "step": 60 + }, + { + "entropy": 1.3544921875, + "epoch": 1.320754716981132, + "grad_norm": 0.7576785087585449, + "learning_rate": 0.00012853362242491053, + "loss": 1.3501564979553222, + "mean_token_accuracy": 0.699217775464058, + "num_tokens": 253285.0, + "step": 70 + }, + { + "entropy": 1.35498046875, + "epoch": 1.509433962264151, + "grad_norm": 0.6370306015014648, + "learning_rate": 0.00010825793454723325, + "loss": 1.346321201324463, + "mean_token_accuracy": 0.7007117375731469, + "num_tokens": 288932.0, + "step": 80 + }, + { + "entropy": 1.362890625, + "epoch": 1.6981132075471699, + "grad_norm": 0.7341946363449097, + "learning_rate": 8.763073687306524e-05, + "loss": 1.3396063804626466, + "mean_token_accuracy": 0.701534990221262, + "num_tokens": 325309.0, + "step": 90 + }, + { + "entropy": 1.33994140625, + "epoch": 1.8867924528301887, + "grad_norm": 0.7750918865203857, + "learning_rate": 6.753005307953167e-05, + "loss": 1.3485977172851562, + "mean_token_accuracy": 0.7031819194555282, + "num_tokens": 361755.0, + "step": 100 + }, + { + "entropy": 1.32060546875, + "epoch": 2.0754716981132075, + "grad_norm": 0.6582154631614685, + "learning_rate": 4.8811495091039926e-05, + "loss": 1.3079830169677735, + "mean_token_accuracy": 0.7036498673260212, + "num_tokens": 398143.0, + "step": 110 + }, + { + "entropy": 1.31796875, + "epoch": 2.2641509433962264, + "grad_norm": 0.6963320374488831, + "learning_rate": 3.2271842837425906e-05, + "loss": 1.312546443939209, + "mean_token_accuracy": 0.704971169680357, + "num_tokens": 434299.0, + "step": 120 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1359902175492096.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-120/training_args.bin b/L3/checkpoints/checkpoint-120/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-120/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713 diff --git a/L3/checkpoints/checkpoint-130/README.md b/L3/checkpoints/checkpoint-130/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-130/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-130/adapter_config.json b/L3/checkpoints/checkpoint-130/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-130/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-130/adapter_model.safetensors b/L3/checkpoints/checkpoint-130/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..204cfb79988055eee1ad89c30c3e392283c865cd --- /dev/null +++ b/L3/checkpoints/checkpoint-130/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:4646c8698a341f8e4c5f92512b14d51a01699351beab6b63e315e8ba79506403 +size 4331744 diff --git a/L3/checkpoints/checkpoint-130/chat_template.jinja b/L3/checkpoints/checkpoint-130/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-130/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-130/optimizer.pt b/L3/checkpoints/checkpoint-130/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..66a6bf70c75b086ea6858eb79dfa0feeb7578ceb --- /dev/null +++ b/L3/checkpoints/checkpoint-130/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a51c2129c35709656801ad7286adf84aed6dcda5558b6c2abff73c77375dcefe +size 8690571 diff --git a/L3/checkpoints/checkpoint-130/rng_state.pth b/L3/checkpoints/checkpoint-130/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..7d150fc4504460cdea273ef2adcb04a65c626709 --- /dev/null +++ b/L3/checkpoints/checkpoint-130/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dba4fde4ee04d2f472bb4dea96a48e8fdf7891d2b0694a8f012e8133a2e176ae +size 14455 diff --git a/L3/checkpoints/checkpoint-130/scheduler.pt b/L3/checkpoints/checkpoint-130/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..5b6b9c835319c32c5ba395960f5913e2075263be --- /dev/null +++ b/L3/checkpoints/checkpoint-130/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e84db9e363097911357934d81595bf7aeeaa4a6e8b69e7eeb5390b4b7770cc56 +size 1465 diff --git a/L3/checkpoints/checkpoint-130/tokenizer.json b/L3/checkpoints/checkpoint-130/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-130/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-130/tokenizer_config.json b/L3/checkpoints/checkpoint-130/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-130/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-130/trainer_state.json b/L3/checkpoints/checkpoint-130/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..dbec252f3fae05079cdb7cfa9d030148b4d1aee1 --- /dev/null +++ b/L3/checkpoints/checkpoint-130/trainer_state.json @@ -0,0 +1,164 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 2.452830188679245, + "eval_steps": 500, + "global_step": 130, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + }, + { + "entropy": 2.03623046875, + "epoch": 0.37735849056603776, + "grad_norm": 1.8039652109146118, + "learning_rate": 0.00019694002659393305, + "loss": 1.8651376724243165, + "mean_token_accuracy": 0.5952314671128989, + "num_tokens": 72245.0, + "step": 20 + }, + { + "entropy": 1.49443359375, + "epoch": 0.5660377358490566, + "grad_norm": 0.7885380387306213, + "learning_rate": 0.0001898390981891979, + "loss": 1.5259657859802247, + "mean_token_accuracy": 0.6693046040832996, + "num_tokens": 108540.0, + "step": 30 + }, + { + "entropy": 1.421875, + "epoch": 0.7547169811320755, + "grad_norm": 0.7279834747314453, + "learning_rate": 0.00017891405093963938, + "loss": 1.4288103103637695, + "mean_token_accuracy": 0.6861812733113766, + "num_tokens": 144637.0, + "step": 40 + }, + { + "entropy": 1.38642578125, + "epoch": 0.9433962264150944, + "grad_norm": 0.6967478394508362, + "learning_rate": 0.00016462992378609407, + "loss": 1.3759333610534668, + "mean_token_accuracy": 0.6965034589171409, + "num_tokens": 180890.0, + "step": 50 + }, + { + "entropy": 1.37880859375, + "epoch": 1.1320754716981132, + "grad_norm": 0.7058449983596802, + "learning_rate": 0.00014759473930370736, + "loss": 1.3774614334106445, + "mean_token_accuracy": 0.6968415275216102, + "num_tokens": 216977.0, + "step": 60 + }, + { + "entropy": 1.3544921875, + "epoch": 1.320754716981132, + "grad_norm": 0.7576785087585449, + "learning_rate": 0.00012853362242491053, + "loss": 1.3501564979553222, + "mean_token_accuracy": 0.699217775464058, + "num_tokens": 253285.0, + "step": 70 + }, + { + "entropy": 1.35498046875, + "epoch": 1.509433962264151, + "grad_norm": 0.6370306015014648, + "learning_rate": 0.00010825793454723325, + "loss": 1.346321201324463, + "mean_token_accuracy": 0.7007117375731469, + "num_tokens": 288932.0, + "step": 80 + }, + { + "entropy": 1.362890625, + "epoch": 1.6981132075471699, + "grad_norm": 0.7341946363449097, + "learning_rate": 8.763073687306524e-05, + "loss": 1.3396063804626466, + "mean_token_accuracy": 0.701534990221262, + "num_tokens": 325309.0, + "step": 90 + }, + { + "entropy": 1.33994140625, + "epoch": 1.8867924528301887, + "grad_norm": 0.7750918865203857, + "learning_rate": 6.753005307953167e-05, + "loss": 1.3485977172851562, + "mean_token_accuracy": 0.7031819194555282, + "num_tokens": 361755.0, + "step": 100 + }, + { + "entropy": 1.32060546875, + "epoch": 2.0754716981132075, + "grad_norm": 0.6582154631614685, + "learning_rate": 4.8811495091039926e-05, + "loss": 1.3079830169677735, + "mean_token_accuracy": 0.7036498673260212, + "num_tokens": 398143.0, + "step": 110 + }, + { + "entropy": 1.31796875, + "epoch": 2.2641509433962264, + "grad_norm": 0.6963320374488831, + "learning_rate": 3.2271842837425906e-05, + "loss": 1.312546443939209, + "mean_token_accuracy": 0.704971169680357, + "num_tokens": 434299.0, + "step": 120 + }, + { + "entropy": 1.32119140625, + "epoch": 2.452830188679245, + "grad_norm": 0.6907761096954346, + "learning_rate": 1.861512827298051e-05, + "loss": 1.3149855613708497, + "mean_token_accuracy": 0.7058135308325291, + "num_tokens": 470708.0, + "step": 130 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1474533250086912.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-130/training_args.bin b/L3/checkpoints/checkpoint-130/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-130/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713 diff --git a/L3/checkpoints/checkpoint-140/README.md b/L3/checkpoints/checkpoint-140/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-140/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-140/adapter_config.json b/L3/checkpoints/checkpoint-140/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-140/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-140/adapter_model.safetensors b/L3/checkpoints/checkpoint-140/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..f76dd85e6d044b4dc72461a3e0d07f4f7509f332 --- /dev/null +++ b/L3/checkpoints/checkpoint-140/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ac7e7aebc1bd00f196f490a535233b501a5125c330627189206d3f983ac2604c +size 4331744 diff --git a/L3/checkpoints/checkpoint-140/chat_template.jinja b/L3/checkpoints/checkpoint-140/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-140/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-140/optimizer.pt b/L3/checkpoints/checkpoint-140/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..61855a5071a7c79c077a9a0e3097cb385d407849 --- /dev/null +++ b/L3/checkpoints/checkpoint-140/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f7c26169c7c3a3ecd2a3e8811ca3d03513cd5d4aac45da38f51c86f8c4572a76 +size 8690571 diff --git a/L3/checkpoints/checkpoint-140/rng_state.pth b/L3/checkpoints/checkpoint-140/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..7d150fc4504460cdea273ef2adcb04a65c626709 --- /dev/null +++ b/L3/checkpoints/checkpoint-140/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dba4fde4ee04d2f472bb4dea96a48e8fdf7891d2b0694a8f012e8133a2e176ae +size 14455 diff --git a/L3/checkpoints/checkpoint-140/scheduler.pt b/L3/checkpoints/checkpoint-140/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..b49e885f7ca1f34c0094cc8f287cae0d005282f0 --- /dev/null +++ b/L3/checkpoints/checkpoint-140/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cfa9e2ffd448b5ae0809078fa803005d3fb0168890bd12b132bdb4cb8a1d4596 +size 1465 diff --git a/L3/checkpoints/checkpoint-140/tokenizer.json b/L3/checkpoints/checkpoint-140/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-140/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-140/tokenizer_config.json b/L3/checkpoints/checkpoint-140/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-140/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-140/trainer_state.json b/L3/checkpoints/checkpoint-140/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..ad4a127143395244579dda0da268c595491b4a6c --- /dev/null +++ b/L3/checkpoints/checkpoint-140/trainer_state.json @@ -0,0 +1,174 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 2.641509433962264, + "eval_steps": 500, + "global_step": 140, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + }, + { + "entropy": 2.03623046875, + "epoch": 0.37735849056603776, + "grad_norm": 1.8039652109146118, + "learning_rate": 0.00019694002659393305, + "loss": 1.8651376724243165, + "mean_token_accuracy": 0.5952314671128989, + "num_tokens": 72245.0, + "step": 20 + }, + { + "entropy": 1.49443359375, + "epoch": 0.5660377358490566, + "grad_norm": 0.7885380387306213, + "learning_rate": 0.0001898390981891979, + "loss": 1.5259657859802247, + "mean_token_accuracy": 0.6693046040832996, + "num_tokens": 108540.0, + "step": 30 + }, + { + "entropy": 1.421875, + "epoch": 0.7547169811320755, + "grad_norm": 0.7279834747314453, + "learning_rate": 0.00017891405093963938, + "loss": 1.4288103103637695, + "mean_token_accuracy": 0.6861812733113766, + "num_tokens": 144637.0, + "step": 40 + }, + { + "entropy": 1.38642578125, + "epoch": 0.9433962264150944, + "grad_norm": 0.6967478394508362, + "learning_rate": 0.00016462992378609407, + "loss": 1.3759333610534668, + "mean_token_accuracy": 0.6965034589171409, + "num_tokens": 180890.0, + "step": 50 + }, + { + "entropy": 1.37880859375, + "epoch": 1.1320754716981132, + "grad_norm": 0.7058449983596802, + "learning_rate": 0.00014759473930370736, + "loss": 1.3774614334106445, + "mean_token_accuracy": 0.6968415275216102, + "num_tokens": 216977.0, + "step": 60 + }, + { + "entropy": 1.3544921875, + "epoch": 1.320754716981132, + "grad_norm": 0.7576785087585449, + "learning_rate": 0.00012853362242491053, + "loss": 1.3501564979553222, + "mean_token_accuracy": 0.699217775464058, + "num_tokens": 253285.0, + "step": 70 + }, + { + "entropy": 1.35498046875, + "epoch": 1.509433962264151, + "grad_norm": 0.6370306015014648, + "learning_rate": 0.00010825793454723325, + "loss": 1.346321201324463, + "mean_token_accuracy": 0.7007117375731469, + "num_tokens": 288932.0, + "step": 80 + }, + { + "entropy": 1.362890625, + "epoch": 1.6981132075471699, + "grad_norm": 0.7341946363449097, + "learning_rate": 8.763073687306524e-05, + "loss": 1.3396063804626466, + "mean_token_accuracy": 0.701534990221262, + "num_tokens": 325309.0, + "step": 90 + }, + { + "entropy": 1.33994140625, + "epoch": 1.8867924528301887, + "grad_norm": 0.7750918865203857, + "learning_rate": 6.753005307953167e-05, + "loss": 1.3485977172851562, + "mean_token_accuracy": 0.7031819194555282, + "num_tokens": 361755.0, + "step": 100 + }, + { + "entropy": 1.32060546875, + "epoch": 2.0754716981132075, + "grad_norm": 0.6582154631614685, + "learning_rate": 4.8811495091039926e-05, + "loss": 1.3079830169677735, + "mean_token_accuracy": 0.7036498673260212, + "num_tokens": 398143.0, + "step": 110 + }, + { + "entropy": 1.31796875, + "epoch": 2.2641509433962264, + "grad_norm": 0.6963320374488831, + "learning_rate": 3.2271842837425906e-05, + "loss": 1.312546443939209, + "mean_token_accuracy": 0.704971169680357, + "num_tokens": 434299.0, + "step": 120 + }, + { + "entropy": 1.32119140625, + "epoch": 2.452830188679245, + "grad_norm": 0.6907761096954346, + "learning_rate": 1.861512827298051e-05, + "loss": 1.3149855613708497, + "mean_token_accuracy": 0.7058135308325291, + "num_tokens": 470708.0, + "step": 130 + }, + { + "entropy": 1.33837890625, + "epoch": 2.641509433962264, + "grad_norm": 0.7412691712379456, + "learning_rate": 8.422667334494249e-06, + "loss": 1.3250213623046876, + "mean_token_accuracy": 0.7025255858898163, + "num_tokens": 506485.0, + "step": 140 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1586055340164864.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-140/training_args.bin b/L3/checkpoints/checkpoint-140/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-140/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713 diff --git a/L3/checkpoints/checkpoint-150/README.md b/L3/checkpoints/checkpoint-150/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-150/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-150/adapter_config.json b/L3/checkpoints/checkpoint-150/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-150/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-150/adapter_model.safetensors b/L3/checkpoints/checkpoint-150/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..93d0c1225d0adb7e77d1acae2c523e6e75cc6bc7 --- /dev/null +++ b/L3/checkpoints/checkpoint-150/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19f1f6caaf3b2df1e40b12d9af9f8c8fd649f3472813c6dc7c149e9a9b56011c +size 4331744 diff --git a/L3/checkpoints/checkpoint-150/chat_template.jinja b/L3/checkpoints/checkpoint-150/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-150/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-150/optimizer.pt b/L3/checkpoints/checkpoint-150/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..95b9e1682cd1b8f9629f63f2e9669f0307813c53 --- /dev/null +++ b/L3/checkpoints/checkpoint-150/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:af621c8dd054bd157ea26a9feb961e6a7681285a3731a0ff8d8dc4547591b66a +size 8690571 diff --git a/L3/checkpoints/checkpoint-150/rng_state.pth b/L3/checkpoints/checkpoint-150/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..7d150fc4504460cdea273ef2adcb04a65c626709 --- /dev/null +++ b/L3/checkpoints/checkpoint-150/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dba4fde4ee04d2f472bb4dea96a48e8fdf7891d2b0694a8f012e8133a2e176ae +size 14455 diff --git a/L3/checkpoints/checkpoint-150/scheduler.pt b/L3/checkpoints/checkpoint-150/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..08f0521496768738e3855a6425ce4776abf8262b --- /dev/null +++ b/L3/checkpoints/checkpoint-150/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:749a70a739231624cd72b7c431bbcfa6d3f5dea58efe86a276df4a9d9b201e64 +size 1465 diff --git a/L3/checkpoints/checkpoint-150/tokenizer.json b/L3/checkpoints/checkpoint-150/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-150/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-150/tokenizer_config.json b/L3/checkpoints/checkpoint-150/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-150/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-150/trainer_state.json b/L3/checkpoints/checkpoint-150/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..10a9cd44493f80e80c1e8b1454987836f3a32cb7 --- /dev/null +++ b/L3/checkpoints/checkpoint-150/trainer_state.json @@ -0,0 +1,184 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 2.830188679245283, + "eval_steps": 500, + "global_step": 150, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + }, + { + "entropy": 2.03623046875, + "epoch": 0.37735849056603776, + "grad_norm": 1.8039652109146118, + "learning_rate": 0.00019694002659393305, + "loss": 1.8651376724243165, + "mean_token_accuracy": 0.5952314671128989, + "num_tokens": 72245.0, + "step": 20 + }, + { + "entropy": 1.49443359375, + "epoch": 0.5660377358490566, + "grad_norm": 0.7885380387306213, + "learning_rate": 0.0001898390981891979, + "loss": 1.5259657859802247, + "mean_token_accuracy": 0.6693046040832996, + "num_tokens": 108540.0, + "step": 30 + }, + { + "entropy": 1.421875, + "epoch": 0.7547169811320755, + "grad_norm": 0.7279834747314453, + "learning_rate": 0.00017891405093963938, + "loss": 1.4288103103637695, + "mean_token_accuracy": 0.6861812733113766, + "num_tokens": 144637.0, + "step": 40 + }, + { + "entropy": 1.38642578125, + "epoch": 0.9433962264150944, + "grad_norm": 0.6967478394508362, + "learning_rate": 0.00016462992378609407, + "loss": 1.3759333610534668, + "mean_token_accuracy": 0.6965034589171409, + "num_tokens": 180890.0, + "step": 50 + }, + { + "entropy": 1.37880859375, + "epoch": 1.1320754716981132, + "grad_norm": 0.7058449983596802, + "learning_rate": 0.00014759473930370736, + "loss": 1.3774614334106445, + "mean_token_accuracy": 0.6968415275216102, + "num_tokens": 216977.0, + "step": 60 + }, + { + "entropy": 1.3544921875, + "epoch": 1.320754716981132, + "grad_norm": 0.7576785087585449, + "learning_rate": 0.00012853362242491053, + "loss": 1.3501564979553222, + "mean_token_accuracy": 0.699217775464058, + "num_tokens": 253285.0, + "step": 70 + }, + { + "entropy": 1.35498046875, + "epoch": 1.509433962264151, + "grad_norm": 0.6370306015014648, + "learning_rate": 0.00010825793454723325, + "loss": 1.346321201324463, + "mean_token_accuracy": 0.7007117375731469, + "num_tokens": 288932.0, + "step": 80 + }, + { + "entropy": 1.362890625, + "epoch": 1.6981132075471699, + "grad_norm": 0.7341946363449097, + "learning_rate": 8.763073687306524e-05, + "loss": 1.3396063804626466, + "mean_token_accuracy": 0.701534990221262, + "num_tokens": 325309.0, + "step": 90 + }, + { + "entropy": 1.33994140625, + "epoch": 1.8867924528301887, + "grad_norm": 0.7750918865203857, + "learning_rate": 6.753005307953167e-05, + "loss": 1.3485977172851562, + "mean_token_accuracy": 0.7031819194555282, + "num_tokens": 361755.0, + "step": 100 + }, + { + "entropy": 1.32060546875, + "epoch": 2.0754716981132075, + "grad_norm": 0.6582154631614685, + "learning_rate": 4.8811495091039926e-05, + "loss": 1.3079830169677735, + "mean_token_accuracy": 0.7036498673260212, + "num_tokens": 398143.0, + "step": 110 + }, + { + "entropy": 1.31796875, + "epoch": 2.2641509433962264, + "grad_norm": 0.6963320374488831, + "learning_rate": 3.2271842837425906e-05, + "loss": 1.312546443939209, + "mean_token_accuracy": 0.704971169680357, + "num_tokens": 434299.0, + "step": 120 + }, + { + "entropy": 1.32119140625, + "epoch": 2.452830188679245, + "grad_norm": 0.6907761096954346, + "learning_rate": 1.861512827298051e-05, + "loss": 1.3149855613708497, + "mean_token_accuracy": 0.7058135308325291, + "num_tokens": 470708.0, + "step": 130 + }, + { + "entropy": 1.33837890625, + "epoch": 2.641509433962264, + "grad_norm": 0.7412691712379456, + "learning_rate": 8.422667334494249e-06, + "loss": 1.3250213623046876, + "mean_token_accuracy": 0.7025255858898163, + "num_tokens": 506485.0, + "step": 140 + }, + { + "entropy": 1.33466796875, + "epoch": 2.830188679245283, + "grad_norm": 0.7045652866363525, + "learning_rate": 2.128315467264552e-06, + "loss": 1.324216938018799, + "mean_token_accuracy": 0.7067199409008026, + "num_tokens": 542651.0, + "step": 150 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1698943226909184.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-150/training_args.bin b/L3/checkpoints/checkpoint-150/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-150/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713 diff --git a/L3/checkpoints/checkpoint-159/README.md b/L3/checkpoints/checkpoint-159/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-159/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-159/adapter_config.json b/L3/checkpoints/checkpoint-159/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-159/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-159/adapter_model.safetensors b/L3/checkpoints/checkpoint-159/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..9b52576537b3da06122991888102681ed89c09a5 --- /dev/null +++ b/L3/checkpoints/checkpoint-159/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:98a33b83c8b5cc332a5005653cc47eb92f1ff2e9f1be2bd56a8d2f8df58ba93a +size 4331744 diff --git a/L3/checkpoints/checkpoint-159/chat_template.jinja b/L3/checkpoints/checkpoint-159/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-159/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-159/optimizer.pt b/L3/checkpoints/checkpoint-159/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..3eae43175d191cd7bb1800044a729ffe6ed95a78 --- /dev/null +++ b/L3/checkpoints/checkpoint-159/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5d26df2b135af6602a11c180ce0c6fffd9338d05116274c7db5aff248b16aed6 +size 8690571 diff --git a/L3/checkpoints/checkpoint-159/rng_state.pth b/L3/checkpoints/checkpoint-159/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..7d150fc4504460cdea273ef2adcb04a65c626709 --- /dev/null +++ b/L3/checkpoints/checkpoint-159/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dba4fde4ee04d2f472bb4dea96a48e8fdf7891d2b0694a8f012e8133a2e176ae +size 14455 diff --git a/L3/checkpoints/checkpoint-159/scheduler.pt b/L3/checkpoints/checkpoint-159/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..f87e3c19ec47a9a829bf65c0292601f71a3ae173 --- /dev/null +++ b/L3/checkpoints/checkpoint-159/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b2c6206a97d0884fd8dcbde955ce8b12473b8e47fac73a0c0671e5d2c6dfdd9 +size 1465 diff --git a/L3/checkpoints/checkpoint-159/tokenizer.json b/L3/checkpoints/checkpoint-159/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-159/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-159/tokenizer_config.json b/L3/checkpoints/checkpoint-159/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-159/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-159/trainer_state.json b/L3/checkpoints/checkpoint-159/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..cb0eb97520e4a444ebf9709ffd2f9ac5b5908cf4 --- /dev/null +++ b/L3/checkpoints/checkpoint-159/trainer_state.json @@ -0,0 +1,184 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 3.0, + "eval_steps": 500, + "global_step": 159, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + }, + { + "entropy": 2.03623046875, + "epoch": 0.37735849056603776, + "grad_norm": 1.8039652109146118, + "learning_rate": 0.00019694002659393305, + "loss": 1.8651376724243165, + "mean_token_accuracy": 0.5952314671128989, + "num_tokens": 72245.0, + "step": 20 + }, + { + "entropy": 1.49443359375, + "epoch": 0.5660377358490566, + "grad_norm": 0.7885380387306213, + "learning_rate": 0.0001898390981891979, + "loss": 1.5259657859802247, + "mean_token_accuracy": 0.6693046040832996, + "num_tokens": 108540.0, + "step": 30 + }, + { + "entropy": 1.421875, + "epoch": 0.7547169811320755, + "grad_norm": 0.7279834747314453, + "learning_rate": 0.00017891405093963938, + "loss": 1.4288103103637695, + "mean_token_accuracy": 0.6861812733113766, + "num_tokens": 144637.0, + "step": 40 + }, + { + "entropy": 1.38642578125, + "epoch": 0.9433962264150944, + "grad_norm": 0.6967478394508362, + "learning_rate": 0.00016462992378609407, + "loss": 1.3759333610534668, + "mean_token_accuracy": 0.6965034589171409, + "num_tokens": 180890.0, + "step": 50 + }, + { + "entropy": 1.37880859375, + "epoch": 1.1320754716981132, + "grad_norm": 0.7058449983596802, + "learning_rate": 0.00014759473930370736, + "loss": 1.3774614334106445, + "mean_token_accuracy": 0.6968415275216102, + "num_tokens": 216977.0, + "step": 60 + }, + { + "entropy": 1.3544921875, + "epoch": 1.320754716981132, + "grad_norm": 0.7576785087585449, + "learning_rate": 0.00012853362242491053, + "loss": 1.3501564979553222, + "mean_token_accuracy": 0.699217775464058, + "num_tokens": 253285.0, + "step": 70 + }, + { + "entropy": 1.35498046875, + "epoch": 1.509433962264151, + "grad_norm": 0.6370306015014648, + "learning_rate": 0.00010825793454723325, + "loss": 1.346321201324463, + "mean_token_accuracy": 0.7007117375731469, + "num_tokens": 288932.0, + "step": 80 + }, + { + "entropy": 1.362890625, + "epoch": 1.6981132075471699, + "grad_norm": 0.7341946363449097, + "learning_rate": 8.763073687306524e-05, + "loss": 1.3396063804626466, + "mean_token_accuracy": 0.701534990221262, + "num_tokens": 325309.0, + "step": 90 + }, + { + "entropy": 1.33994140625, + "epoch": 1.8867924528301887, + "grad_norm": 0.7750918865203857, + "learning_rate": 6.753005307953167e-05, + "loss": 1.3485977172851562, + "mean_token_accuracy": 0.7031819194555282, + "num_tokens": 361755.0, + "step": 100 + }, + { + "entropy": 1.32060546875, + "epoch": 2.0754716981132075, + "grad_norm": 0.6582154631614685, + "learning_rate": 4.8811495091039926e-05, + "loss": 1.3079830169677735, + "mean_token_accuracy": 0.7036498673260212, + "num_tokens": 398143.0, + "step": 110 + }, + { + "entropy": 1.31796875, + "epoch": 2.2641509433962264, + "grad_norm": 0.6963320374488831, + "learning_rate": 3.2271842837425906e-05, + "loss": 1.312546443939209, + "mean_token_accuracy": 0.704971169680357, + "num_tokens": 434299.0, + "step": 120 + }, + { + "entropy": 1.32119140625, + "epoch": 2.452830188679245, + "grad_norm": 0.6907761096954346, + "learning_rate": 1.861512827298051e-05, + "loss": 1.3149855613708497, + "mean_token_accuracy": 0.7058135308325291, + "num_tokens": 470708.0, + "step": 130 + }, + { + "entropy": 1.33837890625, + "epoch": 2.641509433962264, + "grad_norm": 0.7412691712379456, + "learning_rate": 8.422667334494249e-06, + "loss": 1.3250213623046876, + "mean_token_accuracy": 0.7025255858898163, + "num_tokens": 506485.0, + "step": 140 + }, + { + "entropy": 1.33466796875, + "epoch": 2.830188679245283, + "grad_norm": 0.7045652866363525, + "learning_rate": 2.128315467264552e-06, + "loss": 1.324216938018799, + "mean_token_accuracy": 0.7067199409008026, + "num_tokens": 542651.0, + "step": 150 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": true + }, + "attributes": {} + } + }, + "total_flos": 1801377976886784.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-159/training_args.bin b/L3/checkpoints/checkpoint-159/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-159/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713 diff --git a/L3/checkpoints/checkpoint-20/README.md b/L3/checkpoints/checkpoint-20/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-20/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-20/adapter_config.json b/L3/checkpoints/checkpoint-20/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-20/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-20/adapter_model.safetensors b/L3/checkpoints/checkpoint-20/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..ab0f1f55b0b29632babf236419b704abf97836a1 --- /dev/null +++ b/L3/checkpoints/checkpoint-20/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c92ebacd0594bcb79afd1849c3f33852165a6706aac4affbfe71566d22a8247e +size 4331744 diff --git a/L3/checkpoints/checkpoint-20/chat_template.jinja b/L3/checkpoints/checkpoint-20/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-20/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-20/optimizer.pt b/L3/checkpoints/checkpoint-20/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..805482641332574670ae1720197013d8b6a103c5 --- /dev/null +++ b/L3/checkpoints/checkpoint-20/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:394bbcf3988133d52c965de3bc60c7232e8bc46f25221ef32d32eb05cd03e867 +size 8690571 diff --git a/L3/checkpoints/checkpoint-20/rng_state.pth b/L3/checkpoints/checkpoint-20/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..3f5c250a692e034a27fb06d7008612b2de078116 --- /dev/null +++ b/L3/checkpoints/checkpoint-20/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cddf27219365242ec1046a3532a63a24c3f350c77f100e4f973369db2cc849d +size 14455 diff --git a/L3/checkpoints/checkpoint-20/scheduler.pt b/L3/checkpoints/checkpoint-20/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..19c5d720d9fd1aadfddfa1592620d1a5c18e2d01 --- /dev/null +++ b/L3/checkpoints/checkpoint-20/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a55c2265171097c74232991dbd82262b6cfcfa2cf3bd4b0d5a7dfec293bf8656 +size 1465 diff --git a/L3/checkpoints/checkpoint-20/tokenizer.json b/L3/checkpoints/checkpoint-20/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-20/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-20/tokenizer_config.json b/L3/checkpoints/checkpoint-20/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-20/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-20/trainer_state.json b/L3/checkpoints/checkpoint-20/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..7a7664f463a24117f2b514b44a4849b3baad64be --- /dev/null +++ b/L3/checkpoints/checkpoint-20/trainer_state.json @@ -0,0 +1,54 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 0.37735849056603776, + "eval_steps": 500, + "global_step": 20, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + }, + { + "entropy": 2.03623046875, + "epoch": 0.37735849056603776, + "grad_norm": 1.8039652109146118, + "learning_rate": 0.00019694002659393305, + "loss": 1.8651376724243165, + "mean_token_accuracy": 0.5952314671128989, + "num_tokens": 72245.0, + "step": 20 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 224931136076544.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-20/training_args.bin b/L3/checkpoints/checkpoint-20/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-20/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713 diff --git a/L3/checkpoints/checkpoint-30/README.md b/L3/checkpoints/checkpoint-30/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-30/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-30/adapter_config.json b/L3/checkpoints/checkpoint-30/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-30/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-30/adapter_model.safetensors b/L3/checkpoints/checkpoint-30/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..58e2f049fc6658f24bd2954502fbe82f0060e2ff --- /dev/null +++ b/L3/checkpoints/checkpoint-30/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c066166f8f49ec92950334c86c328114521ea628b6966d391512cb5a72d0f304 +size 4331744 diff --git a/L3/checkpoints/checkpoint-30/chat_template.jinja b/L3/checkpoints/checkpoint-30/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-30/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-30/optimizer.pt b/L3/checkpoints/checkpoint-30/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..541b793a1599ac45908e6ea3b3595bf25588afd0 --- /dev/null +++ b/L3/checkpoints/checkpoint-30/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9369b0eecd030002437e9c4a6b7bbee49455884aa60d35b5979c377efd375a7f +size 8690571 diff --git a/L3/checkpoints/checkpoint-30/rng_state.pth b/L3/checkpoints/checkpoint-30/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..3f5c250a692e034a27fb06d7008612b2de078116 --- /dev/null +++ b/L3/checkpoints/checkpoint-30/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cddf27219365242ec1046a3532a63a24c3f350c77f100e4f973369db2cc849d +size 14455 diff --git a/L3/checkpoints/checkpoint-30/scheduler.pt b/L3/checkpoints/checkpoint-30/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..e67f345290edd2767d65bc2a0d39f112608d731e --- /dev/null +++ b/L3/checkpoints/checkpoint-30/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e5714db383b01493e282f902afe194d44c50334403abd999cb0a6f6d875dd5b8 +size 1465 diff --git a/L3/checkpoints/checkpoint-30/tokenizer.json b/L3/checkpoints/checkpoint-30/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-30/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-30/tokenizer_config.json b/L3/checkpoints/checkpoint-30/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-30/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-30/trainer_state.json b/L3/checkpoints/checkpoint-30/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..e1e8663b9bc03d5b121b6eac469a6712e5d542a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-30/trainer_state.json @@ -0,0 +1,64 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 0.5660377358490566, + "eval_steps": 500, + "global_step": 30, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + }, + { + "entropy": 2.03623046875, + "epoch": 0.37735849056603776, + "grad_norm": 1.8039652109146118, + "learning_rate": 0.00019694002659393305, + "loss": 1.8651376724243165, + "mean_token_accuracy": 0.5952314671128989, + "num_tokens": 72245.0, + "step": 20 + }, + { + "entropy": 1.49443359375, + "epoch": 0.5660377358490566, + "grad_norm": 0.7885380387306213, + "learning_rate": 0.0001898390981891979, + "loss": 1.5259657859802247, + "mean_token_accuracy": 0.6693046040832996, + "num_tokens": 108540.0, + "step": 30 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 338388104765184.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-30/training_args.bin b/L3/checkpoints/checkpoint-30/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-30/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713 diff --git a/L3/checkpoints/checkpoint-40/README.md b/L3/checkpoints/checkpoint-40/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-40/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-40/adapter_config.json b/L3/checkpoints/checkpoint-40/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-40/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-40/adapter_model.safetensors b/L3/checkpoints/checkpoint-40/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..4fa59fb84e2fe706210d0583c632b1195b28cdaa --- /dev/null +++ b/L3/checkpoints/checkpoint-40/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f52694653d39f675397a2977fdf947b489e9846bd043a68008363f271581b193 +size 4331744 diff --git a/L3/checkpoints/checkpoint-40/chat_template.jinja b/L3/checkpoints/checkpoint-40/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-40/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-40/optimizer.pt b/L3/checkpoints/checkpoint-40/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..9a877a3ede0cbbdc933a9c096b83d810d816bfbf --- /dev/null +++ b/L3/checkpoints/checkpoint-40/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:546642515f51f166a34576368a62c0cda729fe54f83adeb207c834c5b1ec9d9e +size 8690571 diff --git a/L3/checkpoints/checkpoint-40/rng_state.pth b/L3/checkpoints/checkpoint-40/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..3f5c250a692e034a27fb06d7008612b2de078116 --- /dev/null +++ b/L3/checkpoints/checkpoint-40/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cddf27219365242ec1046a3532a63a24c3f350c77f100e4f973369db2cc849d +size 14455 diff --git a/L3/checkpoints/checkpoint-40/scheduler.pt b/L3/checkpoints/checkpoint-40/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..d277614299656d3c5f7cf2fa488957961f886c69 --- /dev/null +++ b/L3/checkpoints/checkpoint-40/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f6ab065d4e48130a57f256525f3b5c7ec35cb4454ae9ef2f4ce13133dbee5eee +size 1465 diff --git a/L3/checkpoints/checkpoint-40/tokenizer.json b/L3/checkpoints/checkpoint-40/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-40/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-40/tokenizer_config.json b/L3/checkpoints/checkpoint-40/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-40/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-40/trainer_state.json b/L3/checkpoints/checkpoint-40/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..79517bc1e3520207fe3474937825bed2dedb314d --- /dev/null +++ b/L3/checkpoints/checkpoint-40/trainer_state.json @@ -0,0 +1,74 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 0.7547169811320755, + "eval_steps": 500, + "global_step": 40, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + }, + { + "entropy": 2.03623046875, + "epoch": 0.37735849056603776, + "grad_norm": 1.8039652109146118, + "learning_rate": 0.00019694002659393305, + "loss": 1.8651376724243165, + "mean_token_accuracy": 0.5952314671128989, + "num_tokens": 72245.0, + "step": 20 + }, + { + "entropy": 1.49443359375, + "epoch": 0.5660377358490566, + "grad_norm": 0.7885380387306213, + "learning_rate": 0.0001898390981891979, + "loss": 1.5259657859802247, + "mean_token_accuracy": 0.6693046040832996, + "num_tokens": 108540.0, + "step": 30 + }, + { + "entropy": 1.421875, + "epoch": 0.7547169811320755, + "grad_norm": 0.7279834747314453, + "learning_rate": 0.00017891405093963938, + "loss": 1.4288103103637695, + "mean_token_accuracy": 0.6861812733113766, + "num_tokens": 144637.0, + "step": 40 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 452432126406912.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-40/training_args.bin b/L3/checkpoints/checkpoint-40/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-40/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713 diff --git a/L3/checkpoints/checkpoint-50/README.md b/L3/checkpoints/checkpoint-50/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-50/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-50/adapter_config.json b/L3/checkpoints/checkpoint-50/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-50/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-50/adapter_model.safetensors b/L3/checkpoints/checkpoint-50/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..cfc737608add87168ca02486a8293fb60763e8c2 --- /dev/null +++ b/L3/checkpoints/checkpoint-50/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b20e81fb6669c223c2ccc6b6a71f0c11ec7bddf7eedca19bb673f18cc36457c4 +size 4331744 diff --git a/L3/checkpoints/checkpoint-50/chat_template.jinja b/L3/checkpoints/checkpoint-50/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-50/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-50/optimizer.pt b/L3/checkpoints/checkpoint-50/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..2c3b5bff51e1b619d17277ca289b857172843e6d --- /dev/null +++ b/L3/checkpoints/checkpoint-50/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:037263d94c731c80f48006b55cc09d727765c7e7f4c27e2285e32dbb763de161 +size 8690571 diff --git a/L3/checkpoints/checkpoint-50/rng_state.pth b/L3/checkpoints/checkpoint-50/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..3f5c250a692e034a27fb06d7008612b2de078116 --- /dev/null +++ b/L3/checkpoints/checkpoint-50/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2cddf27219365242ec1046a3532a63a24c3f350c77f100e4f973369db2cc849d +size 14455 diff --git a/L3/checkpoints/checkpoint-50/scheduler.pt b/L3/checkpoints/checkpoint-50/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..8dfa70f8756ce63cbbdda959a0f49cb5d5040eaf --- /dev/null +++ b/L3/checkpoints/checkpoint-50/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:06e42634db8916928265bbd702cb453e8ac4774a2c83e1b2f1905185363111e5 +size 1465 diff --git a/L3/checkpoints/checkpoint-50/tokenizer.json b/L3/checkpoints/checkpoint-50/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-50/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-50/tokenizer_config.json b/L3/checkpoints/checkpoint-50/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-50/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-50/trainer_state.json b/L3/checkpoints/checkpoint-50/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..5cd232bf8a5d3ff282ce23bb34b1814edce28a33 --- /dev/null +++ b/L3/checkpoints/checkpoint-50/trainer_state.json @@ -0,0 +1,84 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 0.9433962264150944, + "eval_steps": 500, + "global_step": 50, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + }, + { + "entropy": 2.03623046875, + "epoch": 0.37735849056603776, + "grad_norm": 1.8039652109146118, + "learning_rate": 0.00019694002659393305, + "loss": 1.8651376724243165, + "mean_token_accuracy": 0.5952314671128989, + "num_tokens": 72245.0, + "step": 20 + }, + { + "entropy": 1.49443359375, + "epoch": 0.5660377358490566, + "grad_norm": 0.7885380387306213, + "learning_rate": 0.0001898390981891979, + "loss": 1.5259657859802247, + "mean_token_accuracy": 0.6693046040832996, + "num_tokens": 108540.0, + "step": 30 + }, + { + "entropy": 1.421875, + "epoch": 0.7547169811320755, + "grad_norm": 0.7279834747314453, + "learning_rate": 0.00017891405093963938, + "loss": 1.4288103103637695, + "mean_token_accuracy": 0.6861812733113766, + "num_tokens": 144637.0, + "step": 40 + }, + { + "entropy": 1.38642578125, + "epoch": 0.9433962264150944, + "grad_norm": 0.6967478394508362, + "learning_rate": 0.00016462992378609407, + "loss": 1.3759333610534668, + "mean_token_accuracy": 0.6965034589171409, + "num_tokens": 180890.0, + "step": 50 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 566422235022336.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-50/training_args.bin b/L3/checkpoints/checkpoint-50/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-50/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713 diff --git a/L3/checkpoints/checkpoint-60/README.md b/L3/checkpoints/checkpoint-60/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-60/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-60/adapter_config.json b/L3/checkpoints/checkpoint-60/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-60/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-60/adapter_model.safetensors b/L3/checkpoints/checkpoint-60/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..6c3c8e6bbe0a8f6e600ea492e85af4422d33fe16 --- /dev/null +++ b/L3/checkpoints/checkpoint-60/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f645f95f1f8ec61dee2d2e39680b98934a9308a0ba90bc4ad46220287e9c2ca6 +size 4331744 diff --git a/L3/checkpoints/checkpoint-60/chat_template.jinja b/L3/checkpoints/checkpoint-60/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-60/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-60/optimizer.pt b/L3/checkpoints/checkpoint-60/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..ca0ac9bad3385f578364efad992a71c209f9188f --- /dev/null +++ b/L3/checkpoints/checkpoint-60/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f36549f13122b556101336cd43afb03c7f31bc5a49385a47818d45b4e14dffc0 +size 8690571 diff --git a/L3/checkpoints/checkpoint-60/rng_state.pth b/L3/checkpoints/checkpoint-60/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..38c6d5df0a659b81300f358fefb31a6f4aa51ddc --- /dev/null +++ b/L3/checkpoints/checkpoint-60/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3a77d4a8b98ce027a4d6a3b9fb5d7c904e27ec1efd5c0468c24fa26bb738316 +size 14455 diff --git a/L3/checkpoints/checkpoint-60/scheduler.pt b/L3/checkpoints/checkpoint-60/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..0332598581c0fc180611ee71c3947361daad8502 --- /dev/null +++ b/L3/checkpoints/checkpoint-60/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:78d647f03c1cf87f7118cf942735589fe5fc5b2f1991d453c311ad9bb47c1543 +size 1465 diff --git a/L3/checkpoints/checkpoint-60/tokenizer.json b/L3/checkpoints/checkpoint-60/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-60/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-60/tokenizer_config.json b/L3/checkpoints/checkpoint-60/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-60/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-60/trainer_state.json b/L3/checkpoints/checkpoint-60/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..7e26c14ad52a296e601047a624c2a1c9cb702ead --- /dev/null +++ b/L3/checkpoints/checkpoint-60/trainer_state.json @@ -0,0 +1,94 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 1.1320754716981132, + "eval_steps": 500, + "global_step": 60, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + }, + { + "entropy": 2.03623046875, + "epoch": 0.37735849056603776, + "grad_norm": 1.8039652109146118, + "learning_rate": 0.00019694002659393305, + "loss": 1.8651376724243165, + "mean_token_accuracy": 0.5952314671128989, + "num_tokens": 72245.0, + "step": 20 + }, + { + "entropy": 1.49443359375, + "epoch": 0.5660377358490566, + "grad_norm": 0.7885380387306213, + "learning_rate": 0.0001898390981891979, + "loss": 1.5259657859802247, + "mean_token_accuracy": 0.6693046040832996, + "num_tokens": 108540.0, + "step": 30 + }, + { + "entropy": 1.421875, + "epoch": 0.7547169811320755, + "grad_norm": 0.7279834747314453, + "learning_rate": 0.00017891405093963938, + "loss": 1.4288103103637695, + "mean_token_accuracy": 0.6861812733113766, + "num_tokens": 144637.0, + "step": 40 + }, + { + "entropy": 1.38642578125, + "epoch": 0.9433962264150944, + "grad_norm": 0.6967478394508362, + "learning_rate": 0.00016462992378609407, + "loss": 1.3759333610534668, + "mean_token_accuracy": 0.6965034589171409, + "num_tokens": 180890.0, + "step": 50 + }, + { + "entropy": 1.37880859375, + "epoch": 1.1320754716981132, + "grad_norm": 0.7058449983596802, + "learning_rate": 0.00014759473930370736, + "loss": 1.3774614334106445, + "mean_token_accuracy": 0.6968415275216102, + "num_tokens": 216977.0, + "step": 60 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 679483841518080.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-60/training_args.bin b/L3/checkpoints/checkpoint-60/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-60/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713 diff --git a/L3/checkpoints/checkpoint-70/README.md b/L3/checkpoints/checkpoint-70/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-70/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-70/adapter_config.json b/L3/checkpoints/checkpoint-70/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-70/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-70/adapter_model.safetensors b/L3/checkpoints/checkpoint-70/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..eca3041daa0510f1ad1bb43727c63615dcefc92e --- /dev/null +++ b/L3/checkpoints/checkpoint-70/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:09f01de7f2e0dd75703483d62784de6372d48c1fa801d66cf1d33c8201f08bd6 +size 4331744 diff --git a/L3/checkpoints/checkpoint-70/chat_template.jinja b/L3/checkpoints/checkpoint-70/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-70/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-70/optimizer.pt b/L3/checkpoints/checkpoint-70/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..848bd2e6e8acc0c780afb1c179999be304461f2c --- /dev/null +++ b/L3/checkpoints/checkpoint-70/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b19263c77724f4540eda65c53e851fa34449df1964288e2a67d43253d07da20a +size 8690571 diff --git a/L3/checkpoints/checkpoint-70/rng_state.pth b/L3/checkpoints/checkpoint-70/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..38c6d5df0a659b81300f358fefb31a6f4aa51ddc --- /dev/null +++ b/L3/checkpoints/checkpoint-70/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3a77d4a8b98ce027a4d6a3b9fb5d7c904e27ec1efd5c0468c24fa26bb738316 +size 14455 diff --git a/L3/checkpoints/checkpoint-70/scheduler.pt b/L3/checkpoints/checkpoint-70/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..f858bbf27b38abd1e565ff130e1a53dec875216b --- /dev/null +++ b/L3/checkpoints/checkpoint-70/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5a6fd9f3206f85fc00865417aaeb161c58ccaf5e621cc80ea7f1ca566f53f390 +size 1465 diff --git a/L3/checkpoints/checkpoint-70/tokenizer.json b/L3/checkpoints/checkpoint-70/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-70/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-70/tokenizer_config.json b/L3/checkpoints/checkpoint-70/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-70/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-70/trainer_state.json b/L3/checkpoints/checkpoint-70/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..39cd551eddf15eafa9fb9d02e776807d5a667732 --- /dev/null +++ b/L3/checkpoints/checkpoint-70/trainer_state.json @@ -0,0 +1,104 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 1.320754716981132, + "eval_steps": 500, + "global_step": 70, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + }, + { + "entropy": 2.03623046875, + "epoch": 0.37735849056603776, + "grad_norm": 1.8039652109146118, + "learning_rate": 0.00019694002659393305, + "loss": 1.8651376724243165, + "mean_token_accuracy": 0.5952314671128989, + "num_tokens": 72245.0, + "step": 20 + }, + { + "entropy": 1.49443359375, + "epoch": 0.5660377358490566, + "grad_norm": 0.7885380387306213, + "learning_rate": 0.0001898390981891979, + "loss": 1.5259657859802247, + "mean_token_accuracy": 0.6693046040832996, + "num_tokens": 108540.0, + "step": 30 + }, + { + "entropy": 1.421875, + "epoch": 0.7547169811320755, + "grad_norm": 0.7279834747314453, + "learning_rate": 0.00017891405093963938, + "loss": 1.4288103103637695, + "mean_token_accuracy": 0.6861812733113766, + "num_tokens": 144637.0, + "step": 40 + }, + { + "entropy": 1.38642578125, + "epoch": 0.9433962264150944, + "grad_norm": 0.6967478394508362, + "learning_rate": 0.00016462992378609407, + "loss": 1.3759333610534668, + "mean_token_accuracy": 0.6965034589171409, + "num_tokens": 180890.0, + "step": 50 + }, + { + "entropy": 1.37880859375, + "epoch": 1.1320754716981132, + "grad_norm": 0.7058449983596802, + "learning_rate": 0.00014759473930370736, + "loss": 1.3774614334106445, + "mean_token_accuracy": 0.6968415275216102, + "num_tokens": 216977.0, + "step": 60 + }, + { + "entropy": 1.3544921875, + "epoch": 1.320754716981132, + "grad_norm": 0.7576785087585449, + "learning_rate": 0.00012853362242491053, + "loss": 1.3501564979553222, + "mean_token_accuracy": 0.699217775464058, + "num_tokens": 253285.0, + "step": 70 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 793599747194880.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-70/training_args.bin b/L3/checkpoints/checkpoint-70/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-70/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713 diff --git a/L3/checkpoints/checkpoint-80/README.md b/L3/checkpoints/checkpoint-80/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-80/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-80/adapter_config.json b/L3/checkpoints/checkpoint-80/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-80/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-80/adapter_model.safetensors b/L3/checkpoints/checkpoint-80/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..a3bdb0b7ef8a7e9bf03852518776b17b0a3e3da4 --- /dev/null +++ b/L3/checkpoints/checkpoint-80/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c44ca2879de762b27a982037bdf90ba46201109da8ac59d22893ad208db0f221 +size 4331744 diff --git a/L3/checkpoints/checkpoint-80/chat_template.jinja b/L3/checkpoints/checkpoint-80/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-80/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-80/optimizer.pt b/L3/checkpoints/checkpoint-80/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..3388974ef0c35316caa5270b207e1c4ef520d632 --- /dev/null +++ b/L3/checkpoints/checkpoint-80/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:66eb8dd952d9612f9ddaa431576898db5d699a5eaa847a204d31be31267ad6a0 +size 8690571 diff --git a/L3/checkpoints/checkpoint-80/rng_state.pth b/L3/checkpoints/checkpoint-80/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..38c6d5df0a659b81300f358fefb31a6f4aa51ddc --- /dev/null +++ b/L3/checkpoints/checkpoint-80/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3a77d4a8b98ce027a4d6a3b9fb5d7c904e27ec1efd5c0468c24fa26bb738316 +size 14455 diff --git a/L3/checkpoints/checkpoint-80/scheduler.pt b/L3/checkpoints/checkpoint-80/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..0b246dec42e48802d2bbbafbff44c90ed32e5ce1 --- /dev/null +++ b/L3/checkpoints/checkpoint-80/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a56e71ec595f148f31173cc2e0fe75a40a9eb1e044fd9c879295d92c4f269c83 +size 1465 diff --git a/L3/checkpoints/checkpoint-80/tokenizer.json b/L3/checkpoints/checkpoint-80/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-80/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-80/tokenizer_config.json b/L3/checkpoints/checkpoint-80/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-80/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-80/trainer_state.json b/L3/checkpoints/checkpoint-80/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..2db1f14f94344d352f07c2e2b1b0c32dd54cec29 --- /dev/null +++ b/L3/checkpoints/checkpoint-80/trainer_state.json @@ -0,0 +1,114 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 1.509433962264151, + "eval_steps": 500, + "global_step": 80, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + }, + { + "entropy": 2.03623046875, + "epoch": 0.37735849056603776, + "grad_norm": 1.8039652109146118, + "learning_rate": 0.00019694002659393305, + "loss": 1.8651376724243165, + "mean_token_accuracy": 0.5952314671128989, + "num_tokens": 72245.0, + "step": 20 + }, + { + "entropy": 1.49443359375, + "epoch": 0.5660377358490566, + "grad_norm": 0.7885380387306213, + "learning_rate": 0.0001898390981891979, + "loss": 1.5259657859802247, + "mean_token_accuracy": 0.6693046040832996, + "num_tokens": 108540.0, + "step": 30 + }, + { + "entropy": 1.421875, + "epoch": 0.7547169811320755, + "grad_norm": 0.7279834747314453, + "learning_rate": 0.00017891405093963938, + "loss": 1.4288103103637695, + "mean_token_accuracy": 0.6861812733113766, + "num_tokens": 144637.0, + "step": 40 + }, + { + "entropy": 1.38642578125, + "epoch": 0.9433962264150944, + "grad_norm": 0.6967478394508362, + "learning_rate": 0.00016462992378609407, + "loss": 1.3759333610534668, + "mean_token_accuracy": 0.6965034589171409, + "num_tokens": 180890.0, + "step": 50 + }, + { + "entropy": 1.37880859375, + "epoch": 1.1320754716981132, + "grad_norm": 0.7058449983596802, + "learning_rate": 0.00014759473930370736, + "loss": 1.3774614334106445, + "mean_token_accuracy": 0.6968415275216102, + "num_tokens": 216977.0, + "step": 60 + }, + { + "entropy": 1.3544921875, + "epoch": 1.320754716981132, + "grad_norm": 0.7576785087585449, + "learning_rate": 0.00012853362242491053, + "loss": 1.3501564979553222, + "mean_token_accuracy": 0.699217775464058, + "num_tokens": 253285.0, + "step": 70 + }, + { + "entropy": 1.35498046875, + "epoch": 1.509433962264151, + "grad_norm": 0.6370306015014648, + "learning_rate": 0.00010825793454723325, + "loss": 1.346321201324463, + "mean_token_accuracy": 0.7007117375731469, + "num_tokens": 288932.0, + "step": 80 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 905301547360512.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-80/training_args.bin b/L3/checkpoints/checkpoint-80/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-80/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713 diff --git a/L3/checkpoints/checkpoint-90/README.md b/L3/checkpoints/checkpoint-90/README.md new file mode 100644 index 0000000000000000000000000000000000000000..9b1d0d5c752a5c9f2e3a0e3a9ead3759650a12a9 --- /dev/null +++ b/L3/checkpoints/checkpoint-90/README.md @@ -0,0 +1,209 @@ +--- +base_model: Qwen/Qwen3.5-0.8B +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Qwen/Qwen3.5-0.8B +- 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.18.2.dev0 \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-90/adapter_config.json b/L3/checkpoints/checkpoint-90/adapter_config.json new file mode 100644 index 0000000000000000000000000000000000000000..466b55ef5352db25f2ac04e8aec438ce0764d848 --- /dev/null +++ b/L3/checkpoints/checkpoint-90/adapter_config.json @@ -0,0 +1,45 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Qwen/Qwen3.5-0.8B", + "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, + "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, + "peft_type": "LORA", + "peft_version": "0.18.2.dev0@076214c61f690898509b97702b5e9d95c826f000", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "o_proj", + "q_proj", + "k_proj", + "v_proj" + ], + "target_parameters": null, + "task_type": "CAUSAL_LM", + "trainable_token_indices": null, + "use_bdlora": null, + "use_dora": false, + "use_qalora": false, + "use_rslora": false +} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-90/adapter_model.safetensors b/L3/checkpoints/checkpoint-90/adapter_model.safetensors new file mode 100644 index 0000000000000000000000000000000000000000..30bc05165b0d72dd9b43853f6abcf290dd802494 --- /dev/null +++ b/L3/checkpoints/checkpoint-90/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7e15af3a94f1a6f99970e419b8616418d28b7103e91c3669f40067cc9632f5ce +size 4331744 diff --git a/L3/checkpoints/checkpoint-90/chat_template.jinja b/L3/checkpoints/checkpoint-90/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..0ef09f214eaa6d9bca297988afc1454b5827b2c7 --- /dev/null +++ b/L3/checkpoints/checkpoint-90/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is true %} + {{- '\n' }} + {%- else %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/L3/checkpoints/checkpoint-90/optimizer.pt b/L3/checkpoints/checkpoint-90/optimizer.pt new file mode 100644 index 0000000000000000000000000000000000000000..b3dac5f08adaa28512f6d40e832653a96c48ca37 --- /dev/null +++ b/L3/checkpoints/checkpoint-90/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b4505fbd04ed43a2014f967399c260400e4945bdc2d04e1750f30d16b630f06 +size 8690571 diff --git a/L3/checkpoints/checkpoint-90/rng_state.pth b/L3/checkpoints/checkpoint-90/rng_state.pth new file mode 100644 index 0000000000000000000000000000000000000000..38c6d5df0a659b81300f358fefb31a6f4aa51ddc --- /dev/null +++ b/L3/checkpoints/checkpoint-90/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3a77d4a8b98ce027a4d6a3b9fb5d7c904e27ec1efd5c0468c24fa26bb738316 +size 14455 diff --git a/L3/checkpoints/checkpoint-90/scheduler.pt b/L3/checkpoints/checkpoint-90/scheduler.pt new file mode 100644 index 0000000000000000000000000000000000000000..9996ef92f3da1dcc1df8c7e09ce0aac1f761217a --- /dev/null +++ b/L3/checkpoints/checkpoint-90/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:111d012cb61279f251d1c7420ef60a994ecb49ac992cc1aad87f183316311861 +size 1465 diff --git a/L3/checkpoints/checkpoint-90/tokenizer.json b/L3/checkpoints/checkpoint-90/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..67741b04f23bfdb46501f748ce27865ec82eccfb --- /dev/null +++ b/L3/checkpoints/checkpoint-90/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:87a7830d63fcf43bf241c3c5242e96e62dd3fdc29224ca26fed8ea333db72de4 +size 19989343 diff --git a/L3/checkpoints/checkpoint-90/tokenizer_config.json b/L3/checkpoints/checkpoint-90/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..0871602fcb7d15fcb2979685b1c7b609eef01a6f --- /dev/null +++ b/L3/checkpoints/checkpoint-90/tokenizer_config.json @@ -0,0 +1,32 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "image_token": "<|image_pad|>", + "is_local": false, + "local_files_only": false, + "model_max_length": 512, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "split_special_tokens": false, + "tokenizer_class": "TokenizersBackend", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/L3/checkpoints/checkpoint-90/trainer_state.json b/L3/checkpoints/checkpoint-90/trainer_state.json new file mode 100644 index 0000000000000000000000000000000000000000..c929a982d3436cf55a6709909b54cc9c39b9f74b --- /dev/null +++ b/L3/checkpoints/checkpoint-90/trainer_state.json @@ -0,0 +1,124 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 1.6981132075471699, + "eval_steps": 500, + "global_step": 90, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.27734375, + "epoch": 0.18867924528301888, + "grad_norm": 1.4095726013183594, + "learning_rate": 0.0001999145758387301, + "loss": 2.535823440551758, + "mean_token_accuracy": 0.4902416098862886, + "num_tokens": 36112.0, + "step": 10 + }, + { + "entropy": 2.03623046875, + "epoch": 0.37735849056603776, + "grad_norm": 1.8039652109146118, + "learning_rate": 0.00019694002659393305, + "loss": 1.8651376724243165, + "mean_token_accuracy": 0.5952314671128989, + "num_tokens": 72245.0, + "step": 20 + }, + { + "entropy": 1.49443359375, + "epoch": 0.5660377358490566, + "grad_norm": 0.7885380387306213, + "learning_rate": 0.0001898390981891979, + "loss": 1.5259657859802247, + "mean_token_accuracy": 0.6693046040832996, + "num_tokens": 108540.0, + "step": 30 + }, + { + "entropy": 1.421875, + "epoch": 0.7547169811320755, + "grad_norm": 0.7279834747314453, + "learning_rate": 0.00017891405093963938, + "loss": 1.4288103103637695, + "mean_token_accuracy": 0.6861812733113766, + "num_tokens": 144637.0, + "step": 40 + }, + { + "entropy": 1.38642578125, + "epoch": 0.9433962264150944, + "grad_norm": 0.6967478394508362, + "learning_rate": 0.00016462992378609407, + "loss": 1.3759333610534668, + "mean_token_accuracy": 0.6965034589171409, + "num_tokens": 180890.0, + "step": 50 + }, + { + "entropy": 1.37880859375, + "epoch": 1.1320754716981132, + "grad_norm": 0.7058449983596802, + "learning_rate": 0.00014759473930370736, + "loss": 1.3774614334106445, + "mean_token_accuracy": 0.6968415275216102, + "num_tokens": 216977.0, + "step": 60 + }, + { + "entropy": 1.3544921875, + "epoch": 1.320754716981132, + "grad_norm": 0.7576785087585449, + "learning_rate": 0.00012853362242491053, + "loss": 1.3501564979553222, + "mean_token_accuracy": 0.699217775464058, + "num_tokens": 253285.0, + "step": 70 + }, + { + "entropy": 1.35498046875, + "epoch": 1.509433962264151, + "grad_norm": 0.6370306015014648, + "learning_rate": 0.00010825793454723325, + "loss": 1.346321201324463, + "mean_token_accuracy": 0.7007117375731469, + "num_tokens": 288932.0, + "step": 80 + }, + { + "entropy": 1.362890625, + "epoch": 1.6981132075471699, + "grad_norm": 0.7341946363449097, + "learning_rate": 8.763073687306524e-05, + "loss": 1.3396063804626466, + "mean_token_accuracy": 0.701534990221262, + "num_tokens": 325309.0, + "step": 90 + } + ], + "logging_steps": 10, + "max_steps": 159, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 10, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 1018884313110528.0, + "train_batch_size": 2, + "trial_name": null, + "trial_params": null +} diff --git a/L3/checkpoints/checkpoint-90/training_args.bin b/L3/checkpoints/checkpoint-90/training_args.bin new file mode 100644 index 0000000000000000000000000000000000000000..d669276de59e9e4d7c51433f618d2e491cd91256 --- /dev/null +++ b/L3/checkpoints/checkpoint-90/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:80b9bb2dae65508f4e6141fa8a45b8dc53f9794f9c5757bce2273b5609882b14 +size 5713