From 6676ee039d3e990f820ef0c24dc6088e9fa8d1fb Mon Sep 17 00:00:00 2001 From: ModelHub XC Date: Wed, 29 Jul 2026 06:12:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=EF=BC=8C=E7=94=B1ModelHub=20XC=E7=A4=BE=E5=8C=BA=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Model: Phantomcloak19/qwen3-4b-dpo Source: Original Platform --- .dpo_complete | 1 + .gitattributes | 38 ++++ README.md | 20 ++ chat_template.jinja | 89 ++++++++ config.json | 73 ++++++ generation_config.json | 9 + lora_adapter/README.md | 70 ++++++ lora_adapter/checkpoint-42/README.md | 209 ++++++++++++++++++ .../checkpoint-42/adapter_config.json | 48 ++++ .../checkpoint-42/adapter_model.safetensors | 3 + .../checkpoint-42/chat_template.jinja | 89 ++++++++ lora_adapter/checkpoint-42/optimizer.pt | 3 + .../checkpoint-42/ref/adapter_config.json | 48 ++++ .../ref/adapter_model.safetensors | 3 + lora_adapter/checkpoint-42/rng_state.pth | 3 + lora_adapter/checkpoint-42/scaler.pt | 3 + lora_adapter/checkpoint-42/scheduler.pt | 3 + lora_adapter/checkpoint-42/tokenizer.json | 3 + .../checkpoint-42/tokenizer_config.json | 31 +++ lora_adapter/checkpoint-42/trainer_state.json | 70 ++++++ lora_adapter/checkpoint-42/training_args.bin | 3 + lora_adapter/checkpoint-63/README.md | 209 ++++++++++++++++++ .../checkpoint-63/adapter_config.json | 48 ++++ .../checkpoint-63/adapter_model.safetensors | 3 + .../checkpoint-63/chat_template.jinja | 89 ++++++++ lora_adapter/checkpoint-63/optimizer.pt | 3 + .../checkpoint-63/ref/adapter_config.json | 48 ++++ .../ref/adapter_model.safetensors | 3 + lora_adapter/checkpoint-63/rng_state.pth | 3 + lora_adapter/checkpoint-63/scaler.pt | 3 + lora_adapter/checkpoint-63/scheduler.pt | 3 + lora_adapter/checkpoint-63/tokenizer.json | 3 + .../checkpoint-63/tokenizer_config.json | 31 +++ lora_adapter/checkpoint-63/trainer_state.json | 107 +++++++++ lora_adapter/checkpoint-63/training_args.bin | 3 + model.safetensors | 3 + tokenizer.json | 3 + tokenizer_config.json | 31 +++ 38 files changed, 1412 insertions(+) create mode 100644 .dpo_complete create mode 100644 .gitattributes create mode 100644 README.md create mode 100644 chat_template.jinja create mode 100644 config.json create mode 100644 generation_config.json create mode 100644 lora_adapter/README.md create mode 100644 lora_adapter/checkpoint-42/README.md create mode 100644 lora_adapter/checkpoint-42/adapter_config.json create mode 100644 lora_adapter/checkpoint-42/adapter_model.safetensors create mode 100644 lora_adapter/checkpoint-42/chat_template.jinja create mode 100644 lora_adapter/checkpoint-42/optimizer.pt create mode 100644 lora_adapter/checkpoint-42/ref/adapter_config.json create mode 100644 lora_adapter/checkpoint-42/ref/adapter_model.safetensors create mode 100644 lora_adapter/checkpoint-42/rng_state.pth create mode 100644 lora_adapter/checkpoint-42/scaler.pt create mode 100644 lora_adapter/checkpoint-42/scheduler.pt create mode 100644 lora_adapter/checkpoint-42/tokenizer.json create mode 100644 lora_adapter/checkpoint-42/tokenizer_config.json create mode 100644 lora_adapter/checkpoint-42/trainer_state.json create mode 100644 lora_adapter/checkpoint-42/training_args.bin create mode 100644 lora_adapter/checkpoint-63/README.md create mode 100644 lora_adapter/checkpoint-63/adapter_config.json create mode 100644 lora_adapter/checkpoint-63/adapter_model.safetensors create mode 100644 lora_adapter/checkpoint-63/chat_template.jinja create mode 100644 lora_adapter/checkpoint-63/optimizer.pt create mode 100644 lora_adapter/checkpoint-63/ref/adapter_config.json create mode 100644 lora_adapter/checkpoint-63/ref/adapter_model.safetensors create mode 100644 lora_adapter/checkpoint-63/rng_state.pth create mode 100644 lora_adapter/checkpoint-63/scaler.pt create mode 100644 lora_adapter/checkpoint-63/scheduler.pt create mode 100644 lora_adapter/checkpoint-63/tokenizer.json create mode 100644 lora_adapter/checkpoint-63/tokenizer_config.json create mode 100644 lora_adapter/checkpoint-63/trainer_state.json create mode 100644 lora_adapter/checkpoint-63/training_args.bin create mode 100644 model.safetensors create mode 100644 tokenizer.json create mode 100644 tokenizer_config.json diff --git a/.dpo_complete b/.dpo_complete new file mode 100644 index 0000000..fa14dbe --- /dev/null +++ b/.dpo_complete @@ -0,0 +1 @@ +DPO complete: 2026-06-30T03:31:24.689219+00:00 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4042aa9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,38 @@ +*.7z filter=lfs diff=lfs merge=lfs -text +*.arrow filter=lfs diff=lfs merge=lfs -text +*.bin filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.ckpt filter=lfs diff=lfs merge=lfs -text +*.ftz filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.h5 filter=lfs diff=lfs merge=lfs -text +*.joblib filter=lfs diff=lfs merge=lfs -text +*.lfs.* filter=lfs diff=lfs merge=lfs -text +*.mlmodel filter=lfs diff=lfs merge=lfs -text +*.model filter=lfs diff=lfs merge=lfs -text +*.msgpack filter=lfs diff=lfs merge=lfs -text +*.npy filter=lfs diff=lfs merge=lfs -text +*.npz filter=lfs diff=lfs merge=lfs -text +*.onnx filter=lfs diff=lfs merge=lfs -text +*.ot filter=lfs diff=lfs merge=lfs -text +*.parquet filter=lfs diff=lfs merge=lfs -text +*.pb filter=lfs diff=lfs merge=lfs -text +*.pickle filter=lfs diff=lfs merge=lfs -text +*.pkl filter=lfs diff=lfs merge=lfs -text +*.pt filter=lfs diff=lfs merge=lfs -text +*.pth filter=lfs diff=lfs merge=lfs -text +*.rar filter=lfs diff=lfs merge=lfs -text +*.safetensors filter=lfs diff=lfs merge=lfs -text +saved_model/**/* filter=lfs diff=lfs merge=lfs -text +*.tar.* filter=lfs diff=lfs merge=lfs -text +*.tar filter=lfs diff=lfs merge=lfs -text +*.tflite filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.wasm filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +*tfevents* filter=lfs diff=lfs merge=lfs -text +lora_adapter/checkpoint-42/tokenizer.json filter=lfs diff=lfs merge=lfs -text +lora_adapter/checkpoint-63/tokenizer.json filter=lfs diff=lfs merge=lfs -text +tokenizer.json filter=lfs diff=lfs merge=lfs -text diff --git a/README.md b/README.md new file mode 100644 index 0000000..ace9a2d --- /dev/null +++ b/README.md @@ -0,0 +1,20 @@ +--- +base_model: Qwen/Qwen3-4B +library_name: transformers +tags: + - horus-llm + - dpo + - qwen3-4b +--- + +# qwen3-4b — DPO + +Merged full-precision model after the **DPO** phase of the +HorusLLM sequential training pipeline (SFT → DPO → Safety-GRPO). + +| Field | Value | +|---|---| +| Base model | `Qwen/Qwen3-4B` | +| Phase | DPO | +| Short name | qwen3-4b | +| Generated | 2026-07-01 19:31 UTC | diff --git a/chat_template.jinja b/chat_template.jinja new file mode 100644 index 0000000..01be9b3 --- /dev/null +++ b/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].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" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|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 %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/config.json b/config.json new file mode 100644 index 0000000..398042b --- /dev/null +++ b/config.json @@ -0,0 +1,73 @@ +{ + "architectures": [ + "Qwen3ForCausalLM" + ], + "attention_bias": false, + "attention_dropout": 0.0, + "bos_token_id": null, + "dtype": "float16", + "eos_token_id": 151645, + "head_dim": 128, + "hidden_act": "silu", + "hidden_size": 2560, + "initializer_range": 0.02, + "intermediate_size": 9728, + "layer_types": [ + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention", + "full_attention" + ], + "max_position_embeddings": 40960, + "max_window_layers": 36, + "model_type": "qwen3", + "num_attention_heads": 32, + "num_hidden_layers": 36, + "num_key_value_heads": 8, + "pad_token_id": 151643, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "rope_theta": 1000000, + "rope_type": "default" + }, + "sliding_window": null, + "tie_word_embeddings": true, + "transformers_version": "5.10.2", + "unsloth_fixed": true, + "unsloth_version": "2026.1.4", + "use_cache": false, + "use_sliding_window": false, + "vocab_size": 151936 +} diff --git a/generation_config.json b/generation_config.json new file mode 100644 index 0000000..f8d1a24 --- /dev/null +++ b/generation_config.json @@ -0,0 +1,9 @@ +{ + "_from_model_config": true, + "eos_token_id": [ + 151645 + ], + "pad_token_id": 151643, + "transformers_version": "5.10.2", + "use_cache": true +} diff --git a/lora_adapter/README.md b/lora_adapter/README.md new file mode 100644 index 0000000..0fac145 --- /dev/null +++ b/lora_adapter/README.md @@ -0,0 +1,70 @@ +--- +base_model: Phantomcloak19/qwen3-4b-sft-full +library_name: transformers +model_name: lora_adapter +tags: +- generated_from_trainer +- unsloth +- trl +- dpo +licence: license +--- + +# Model Card for lora_adapter + +This model is a fine-tuned version of [Phantomcloak19/qwen3-4b-sft-full](https://huggingface.co/Phantomcloak19/qwen3-4b-sft-full). +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 DPO, a method introduced in [Direct Preference Optimization: Your Language Model is Secretly a Reward Model](https://huggingface.co/papers/2305.18290). + +### Framework versions + +- TRL: 1.5.1 +- Transformers: 5.10.2 +- Pytorch: 2.10.0 +- Datasets: 4.8.4 +- Tokenizers: 0.22.2 + +## Citations + +Cite DPO as: + +```bibtex +@inproceedings{rafailov2023direct, + title = {{Direct Preference Optimization: Your Language Model is Secretly a Reward Model}}, + author = {Rafael Rafailov and Archit Sharma and Eric Mitchell and Christopher D. Manning and Stefano Ermon and Chelsea Finn}, + year = 2023, + booktitle = {Advances in Neural Information Processing Systems 36: Annual Conference on Neural Information Processing Systems 2023, NeurIPS 2023, New Orleans, LA, USA, December 10 - 16, 2023}, + url = {http://papers.nips.cc/paper_files/paper/2023/hash/a85b405ed65c6477a4fe8302b5e06ce7-Abstract-Conference.html}, + editor = {Alice Oh and Tristan Naumann and Amir Globerson and Kate Saenko and Moritz Hardt and Sergey Levine}, +} +``` + +Cite TRL as: + +```bibtex +@software{vonwerra2020trl, + title = {{TRL: Transformers Reinforcement Learning}}, + author = {von Werra, Leandro and Belkada, Younes and Tunstall, Lewis and Beeching, Edward and Thrush, Tristan and Lambert, Nathan and Huang, Shengyi and Rasul, Kashif and Gallouédec, Quentin}, + license = {Apache-2.0}, + url = {https://github.com/huggingface/trl}, + year = {2020} +} +``` \ No newline at end of file diff --git a/lora_adapter/checkpoint-42/README.md b/lora_adapter/checkpoint-42/README.md new file mode 100644 index 0000000..0891dd9 --- /dev/null +++ b/lora_adapter/checkpoint-42/README.md @@ -0,0 +1,209 @@ +--- +base_model: Phantomcloak19/qwen3-4b-sft-full +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Phantomcloak19/qwen3-4b-sft-full +- dpo +- lora +- 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.19.1 \ No newline at end of file diff --git a/lora_adapter/checkpoint-42/adapter_config.json b/lora_adapter/checkpoint-42/adapter_config.json new file mode 100644 index 0000000..21b7b5e --- /dev/null +++ b/lora_adapter/checkpoint-42/adapter_config.json @@ -0,0 +1,48 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Phantomcloak19/qwen3-4b-sft-full", + "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.19.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "up_proj", + "o_proj", + "k_proj", + "down_proj", + "gate_proj", + "v_proj", + "q_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/lora_adapter/checkpoint-42/adapter_model.safetensors b/lora_adapter/checkpoint-42/adapter_model.safetensors new file mode 100644 index 0000000..28728ca --- /dev/null +++ b/lora_adapter/checkpoint-42/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d043ca4e6b755f5821ac3717c8cf971fd5018f3876b1995de391d81389cd1ff +size 132187888 diff --git a/lora_adapter/checkpoint-42/chat_template.jinja b/lora_adapter/checkpoint-42/chat_template.jinja new file mode 100644 index 0000000..01be9b3 --- /dev/null +++ b/lora_adapter/checkpoint-42/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].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" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|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 %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/lora_adapter/checkpoint-42/optimizer.pt b/lora_adapter/checkpoint-42/optimizer.pt new file mode 100644 index 0000000..d9f89ef --- /dev/null +++ b/lora_adapter/checkpoint-42/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:586e392440f73c7a2eb9986caf1611e794746531c39d08ca0afd3795d44605ea +size 264673227 diff --git a/lora_adapter/checkpoint-42/ref/adapter_config.json b/lora_adapter/checkpoint-42/ref/adapter_config.json new file mode 100644 index 0000000..21b7b5e --- /dev/null +++ b/lora_adapter/checkpoint-42/ref/adapter_config.json @@ -0,0 +1,48 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Phantomcloak19/qwen3-4b-sft-full", + "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.19.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "up_proj", + "o_proj", + "k_proj", + "down_proj", + "gate_proj", + "v_proj", + "q_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/lora_adapter/checkpoint-42/ref/adapter_model.safetensors b/lora_adapter/checkpoint-42/ref/adapter_model.safetensors new file mode 100644 index 0000000..91ecc8d --- /dev/null +++ b/lora_adapter/checkpoint-42/ref/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c731eb92b122c345dccef761d44ad7cb860e558257c79eb0aabbb5729ef77ca5 +size 132187888 diff --git a/lora_adapter/checkpoint-42/rng_state.pth b/lora_adapter/checkpoint-42/rng_state.pth new file mode 100644 index 0000000..435e005 --- /dev/null +++ b/lora_adapter/checkpoint-42/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a8e2011629d8bed3ef560fa11175cac55684c4e12a72634bb24abf767b6c7399 +size 14645 diff --git a/lora_adapter/checkpoint-42/scaler.pt b/lora_adapter/checkpoint-42/scaler.pt new file mode 100644 index 0000000..eb4b3d6 --- /dev/null +++ b/lora_adapter/checkpoint-42/scaler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:73724ecbb293c433e222e4ddd1118f0e5a681c1a3d5f69c3dce9929e331ed56a +size 1383 diff --git a/lora_adapter/checkpoint-42/scheduler.pt b/lora_adapter/checkpoint-42/scheduler.pt new file mode 100644 index 0000000..f04b8cd --- /dev/null +++ b/lora_adapter/checkpoint-42/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f26743cbd4fdd5b763666a66a0bff7d2f4e34379d2750a7cc6ceb7a53090343b +size 1465 diff --git a/lora_adapter/checkpoint-42/tokenizer.json b/lora_adapter/checkpoint-42/tokenizer.json new file mode 100644 index 0000000..c7afbed --- /dev/null +++ b/lora_adapter/checkpoint-42/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be75606093db2094d7cd20f3c2f385c212750648bd6ea4fb2bf507a6a4c55506 +size 11422650 diff --git a/lora_adapter/checkpoint-42/tokenizer_config.json b/lora_adapter/checkpoint-42/tokenizer_config.json new file mode 100644 index 0000000..6623da0 --- /dev/null +++ b/lora_adapter/checkpoint-42/tokenizer_config.json @@ -0,0 +1,31 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": false, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "padding_side": "right", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/lora_adapter/checkpoint-42/trainer_state.json b/lora_adapter/checkpoint-42/trainer_state.json new file mode 100644 index 0000000..022cb70 --- /dev/null +++ b/lora_adapter/checkpoint-42/trainer_state.json @@ -0,0 +1,70 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 2.0, + "eval_steps": 100, + "global_step": 42, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.08540016412735, + "epoch": 0.963855421686747, + "grad_norm": 1.4502723217010498, + "learning_rate": 1.9000000000000002e-06, + "logits/chosen": 1.9373448673414857, + "logits/rejected": 1.4560297831585156, + "logps/chosen": -43.992462682723996, + "logps/rejected": -51.50791831016541, + "loss": 0.6897519111633301, + "mean_token_accuracy": 0.2624862600117922, + "num_tokens": 37803.0, + "rewards/accuracies": 0.7875, + "rewards/chosen": 0.0014421886393392925, + "rewards/margins": 0.0068238718846259875, + "rewards/rejected": -0.005381683184623398, + "step": 20 + }, + { + "entropy": 2.1433570188812063, + "epoch": 1.9156626506024095, + "grad_norm": 1.7149038314819336, + "learning_rate": 3.900000000000001e-06, + "logits/chosen": 2.0310179220420284, + "logits/rejected": 1.5091439161978566, + "logps/chosen": -43.38176954245265, + "logps/rejected": -52.56174864950059, + "loss": 0.628478717803955, + "mean_token_accuracy": 0.2560643789511693, + "num_tokens": 74911.0, + "rewards/accuracies": 0.9968354430379747, + "rewards/chosen": 0.02222161173903018, + "rewards/margins": 0.13752426909683627, + "rewards/rejected": -0.11530265806219246, + "step": 40 + } + ], + "logging_steps": 20, + "max_steps": 63, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 500, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": false + }, + "attributes": {} + } + }, + "total_flos": 2006470394830848.0, + "train_batch_size": 4, + "trial_name": null, + "trial_params": null +} diff --git a/lora_adapter/checkpoint-42/training_args.bin b/lora_adapter/checkpoint-42/training_args.bin new file mode 100644 index 0000000..bd840c2 --- /dev/null +++ b/lora_adapter/checkpoint-42/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d7c1c458136fb19c9ea6010bc106108f49bd3b2789481dc8b396d3f7638deba +size 5777 diff --git a/lora_adapter/checkpoint-63/README.md b/lora_adapter/checkpoint-63/README.md new file mode 100644 index 0000000..0891dd9 --- /dev/null +++ b/lora_adapter/checkpoint-63/README.md @@ -0,0 +1,209 @@ +--- +base_model: Phantomcloak19/qwen3-4b-sft-full +library_name: peft +pipeline_tag: text-generation +tags: +- base_model:adapter:Phantomcloak19/qwen3-4b-sft-full +- dpo +- lora +- 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.19.1 \ No newline at end of file diff --git a/lora_adapter/checkpoint-63/adapter_config.json b/lora_adapter/checkpoint-63/adapter_config.json new file mode 100644 index 0000000..21b7b5e --- /dev/null +++ b/lora_adapter/checkpoint-63/adapter_config.json @@ -0,0 +1,48 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Phantomcloak19/qwen3-4b-sft-full", + "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.19.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "up_proj", + "o_proj", + "k_proj", + "down_proj", + "gate_proj", + "v_proj", + "q_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/lora_adapter/checkpoint-63/adapter_model.safetensors b/lora_adapter/checkpoint-63/adapter_model.safetensors new file mode 100644 index 0000000..acb8f65 --- /dev/null +++ b/lora_adapter/checkpoint-63/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ed8988dbf67c79b3abe4deca52ef19195c28cd3d2cef9e717be7e000c5bf83df +size 132187888 diff --git a/lora_adapter/checkpoint-63/chat_template.jinja b/lora_adapter/checkpoint-63/chat_template.jinja new file mode 100644 index 0000000..01be9b3 --- /dev/null +++ b/lora_adapter/checkpoint-63/chat_template.jinja @@ -0,0 +1,89 @@ +{%- if tools %} + {{- '<|im_start|>system\n' }} + {%- if messages[0].role == 'system' %} + {{- messages[0].content + '\n\n' }} + {%- endif %} + {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within XML tags:\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n\n\nFor each function call, return a json object with function name and arguments within XML tags:\n\n{\"name\": , \"arguments\": }\n<|im_end|>\n" }} +{%- else %} + {%- if messages[0].role == 'system' %} + {{- '<|im_start|>system\n' + messages[0].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" and message.content is string and not(message.content.startswith('') and message.content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} +{%- endfor %} +{%- for message in messages %} + {%- if message.content is string %} + {%- set content = message.content %} + {%- else %} + {%- set content = '' %} + {%- endif %} + {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} + {{- '<|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 %} + {%- if loop.index0 > ns.last_query_index %} + {%- if loop.last or (not loop.last and reasoning_content) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content.strip('\n') + '\n\n\n' + content.lstrip('\n') }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls %} + {%- for tool_call in message.tool_calls %} + {%- if (loop.first and content) or (not loop.first) %} + {{- '\n' }} + {%- endif %} + {%- if tool_call.function %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {{- '\n{"name": "' }} + {{- tool_call.name }} + {{- '", "arguments": ' }} + {%- if tool_call.arguments is string %} + {{- tool_call.arguments }} + {%- else %} + {{- tool_call.arguments | tojson }} + {%- endif %} + {{- '}\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/lora_adapter/checkpoint-63/optimizer.pt b/lora_adapter/checkpoint-63/optimizer.pt new file mode 100644 index 0000000..ee783f4 --- /dev/null +++ b/lora_adapter/checkpoint-63/optimizer.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:6421a0930a15e020373027cb9916e20d7851fbcd4b1a334867f8f368aa9e6266 +size 264673227 diff --git a/lora_adapter/checkpoint-63/ref/adapter_config.json b/lora_adapter/checkpoint-63/ref/adapter_config.json new file mode 100644 index 0000000..21b7b5e --- /dev/null +++ b/lora_adapter/checkpoint-63/ref/adapter_config.json @@ -0,0 +1,48 @@ +{ + "alora_invocation_tokens": null, + "alpha_pattern": {}, + "arrow_config": null, + "auto_mapping": null, + "base_model_name_or_path": "Phantomcloak19/qwen3-4b-sft-full", + "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.19.1", + "qalora_group_size": 16, + "r": 16, + "rank_pattern": {}, + "revision": null, + "target_modules": [ + "up_proj", + "o_proj", + "k_proj", + "down_proj", + "gate_proj", + "v_proj", + "q_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/lora_adapter/checkpoint-63/ref/adapter_model.safetensors b/lora_adapter/checkpoint-63/ref/adapter_model.safetensors new file mode 100644 index 0000000..91ecc8d --- /dev/null +++ b/lora_adapter/checkpoint-63/ref/adapter_model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c731eb92b122c345dccef761d44ad7cb860e558257c79eb0aabbb5729ef77ca5 +size 132187888 diff --git a/lora_adapter/checkpoint-63/rng_state.pth b/lora_adapter/checkpoint-63/rng_state.pth new file mode 100644 index 0000000..3ab6836 --- /dev/null +++ b/lora_adapter/checkpoint-63/rng_state.pth @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:01f9a0f7843a37be87edd23f4e88aa93b38b95cc2c07503eeb1cf2e4632453a2 +size 14645 diff --git a/lora_adapter/checkpoint-63/scaler.pt b/lora_adapter/checkpoint-63/scaler.pt new file mode 100644 index 0000000..e4ef8f2 --- /dev/null +++ b/lora_adapter/checkpoint-63/scaler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7b09ff53dfdeb98feaa25ccade54f490eaebb7ca5b59d6e930f01eab95790c26 +size 1383 diff --git a/lora_adapter/checkpoint-63/scheduler.pt b/lora_adapter/checkpoint-63/scheduler.pt new file mode 100644 index 0000000..4130185 --- /dev/null +++ b/lora_adapter/checkpoint-63/scheduler.pt @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a670e67a384f6ed5f63c4eb61bc4cbb10cecb148d2595489f539117562eb898f +size 1465 diff --git a/lora_adapter/checkpoint-63/tokenizer.json b/lora_adapter/checkpoint-63/tokenizer.json new file mode 100644 index 0000000..c7afbed --- /dev/null +++ b/lora_adapter/checkpoint-63/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be75606093db2094d7cd20f3c2f385c212750648bd6ea4fb2bf507a6a4c55506 +size 11422650 diff --git a/lora_adapter/checkpoint-63/tokenizer_config.json b/lora_adapter/checkpoint-63/tokenizer_config.json new file mode 100644 index 0000000..6623da0 --- /dev/null +++ b/lora_adapter/checkpoint-63/tokenizer_config.json @@ -0,0 +1,31 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": false, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "padding_side": "right", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +} diff --git a/lora_adapter/checkpoint-63/trainer_state.json b/lora_adapter/checkpoint-63/trainer_state.json new file mode 100644 index 0000000..a701cbb --- /dev/null +++ b/lora_adapter/checkpoint-63/trainer_state.json @@ -0,0 +1,107 @@ +{ + "best_global_step": null, + "best_metric": null, + "best_model_checkpoint": null, + "epoch": 3.0, + "eval_steps": 100, + "global_step": 63, + "is_hyper_param_search": false, + "is_local_process_zero": true, + "is_world_process_zero": true, + "log_history": [ + { + "entropy": 2.08540016412735, + "epoch": 0.963855421686747, + "grad_norm": 1.4502723217010498, + "learning_rate": 1.9000000000000002e-06, + "logits/chosen": 1.9373448673414857, + "logits/rejected": 1.4560297831585156, + "logps/chosen": -43.992462682723996, + "logps/rejected": -51.50791831016541, + "loss": 0.6897519111633301, + "mean_token_accuracy": 0.2624862600117922, + "num_tokens": 37803.0, + "rewards/accuracies": 0.7875, + "rewards/chosen": 0.0014421886393392925, + "rewards/margins": 0.0068238718846259875, + "rewards/rejected": -0.005381683184623398, + "step": 20 + }, + { + "entropy": 2.1433570188812063, + "epoch": 1.9156626506024095, + "grad_norm": 1.7149038314819336, + "learning_rate": 3.900000000000001e-06, + "logits/chosen": 2.0310179220420284, + "logits/rejected": 1.5091439161978566, + "logps/chosen": -43.38176954245265, + "logps/rejected": -52.56174864950059, + "loss": 0.628478717803955, + "mean_token_accuracy": 0.2560643789511693, + "num_tokens": 74911.0, + "rewards/accuracies": 0.9968354430379747, + "rewards/chosen": 0.02222161173903018, + "rewards/margins": 0.13752426909683627, + "rewards/rejected": -0.11530265806219246, + "step": 40 + }, + { + "entropy": 2.2126575768748418, + "epoch": 2.8674698795180724, + "grad_norm": 1.3426592350006104, + "learning_rate": 5.9e-06, + "logits/chosen": 2.04987203167158, + "logits/rejected": 1.484420240733255, + "logps/chosen": -43.2671080963521, + "logps/rejected": -56.65543109555788, + "loss": 0.4599471569061279, + "mean_token_accuracy": 0.2588409010933924, + "num_tokens": 112046.0, + "rewards/accuracies": 1.0, + "rewards/chosen": 0.032298280657092227, + "rewards/margins": 0.5631697264653218, + "rewards/rejected": -0.5308714414699168, + "step": 60 + }, + { + "epoch": 3.0, + "eval_entropy": 2.2325300216674804, + "eval_logits/chosen": 1.9693634026292444, + "eval_logits/rejected": 1.4018482016627885, + "eval_logps/chosen": -43.20057983398438, + "eval_logps/rejected": -61.643408966064456, + "eval_loss": 0.324849396944046, + "eval_mean_token_accuracy": 0.2726498693227768, + "eval_num_tokens": 117000.0, + "eval_rewards/accuracies": 1.0, + "eval_rewards/chosen": -0.06716743037104607, + "eval_rewards/margins": 0.9790484547615051, + "eval_rewards/rejected": -1.0462158918380737, + "eval_runtime": 1.2337, + "eval_samples_per_second": 14.59, + "eval_steps_per_second": 4.053, + "step": 63 + } + ], + "logging_steps": 20, + "max_steps": 63, + "num_input_tokens_seen": 0, + "num_train_epochs": 3, + "save_steps": 500, + "stateful_callbacks": { + "TrainerControl": { + "args": { + "should_epoch_stop": false, + "should_evaluate": false, + "should_log": false, + "should_save": true, + "should_training_stop": true + }, + "attributes": {} + } + }, + "total_flos": 3003135151976448.0, + "train_batch_size": 4, + "trial_name": null, + "trial_params": null +} diff --git a/lora_adapter/checkpoint-63/training_args.bin b/lora_adapter/checkpoint-63/training_args.bin new file mode 100644 index 0000000..bd840c2 --- /dev/null +++ b/lora_adapter/checkpoint-63/training_args.bin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7d7c1c458136fb19c9ea6010bc106108f49bd3b2789481dc8b396d3f7638deba +size 5777 diff --git a/model.safetensors b/model.safetensors new file mode 100644 index 0000000..57f0bd9 --- /dev/null +++ b/model.safetensors @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:d2de9f199c0e1e854097f1b6e2eb4c641537d229e3b3a60c4ae10ed7d1323995 +size 8044981680 diff --git a/tokenizer.json b/tokenizer.json new file mode 100644 index 0000000..c7afbed --- /dev/null +++ b/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be75606093db2094d7cd20f3c2f385c212750648bd6ea4fb2bf507a6a4c55506 +size 11422650 diff --git a/tokenizer_config.json b/tokenizer_config.json new file mode 100644 index 0000000..6623da0 --- /dev/null +++ b/tokenizer_config.json @@ -0,0 +1,31 @@ +{ + "add_prefix_space": false, + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|im_start|>", + "<|im_end|>", + "<|object_ref_start|>", + "<|object_ref_end|>", + "<|box_start|>", + "<|box_end|>", + "<|quad_start|>", + "<|quad_end|>", + "<|vision_start|>", + "<|vision_end|>", + "<|vision_pad|>", + "<|image_pad|>", + "<|video_pad|>" + ], + "is_local": false, + "local_files_only": false, + "model_max_length": 131072, + "pad_token": "<|endoftext|>", + "padding_side": "right", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null +}