GuoruiSong commited on
Commit
3e90852
·
verified ·
1 Parent(s): 278ab99

Add files using upload-large-folder tool

Browse files
Files changed (50) hide show
  1. LICENSE +201 -0
  2. README.md +300 -0
  3. data_test.py +104 -0
  4. eval.py +91 -0
  5. eval_v.py +109 -0
  6. generate.py +196 -0
  7. lavida.md +103 -0
  8. lavida_ablation.csv +9 -0
  9. llava实验结果.md +70 -0
  10. multinode_eval.py +197 -0
  11. multinode_eval_v.py +206 -0
  12. multinode_rl.py +399 -0
  13. multinode_rl_v.py +416 -0
  14. requirements.txt +32 -0
  15. rl.py +213 -0
  16. rl_lavida_revvideo_orig10k_4gpu.nohup.log +0 -0
  17. rl_lavida_revvideo_orig10k_4gpu.pid +1 -0
  18. rl_lavida_revvideo_orig10k_4gpu_len128.nohup.log +0 -0
  19. rl_lavida_revvideo_orig10k_4gpu_len128.pid +1 -0
  20. rl_lavida_video_reversal.log +0 -0
  21. rl_lladav_video_reversal_3_23 copy 2.log +0 -0
  22. rl_lladav_video_reversal_3_23 copy.log +0 -0
  23. rl_lladav_video_reversal_3_23.log +0 -0
  24. rl_lladav_video_reversal_rl_3_25.log +0 -0
  25. rl_lladav_video_reversal_wo_t_reward_4_4.log +0 -0
  26. rl_llava_next_video_reversal.nohup.log +0 -0
  27. rl_v.py +282 -0
  28. rl_v_lavida_video_reversal.py +189 -0
  29. rl_v_lavida_video_reversal.sh +5 -0
  30. rl_v_llava_next_video_reversal.py +123 -0
  31. rl_v_llava_next_video_reversal.sh +17 -0
  32. rl_v_video_reversal.py +288 -0
  33. rl_v_video_reversal.sh +5 -0
  34. rl_v_video_reversal_rl.sh +5 -0
  35. rl_v_video_reversal_wo_t_reward.py +288 -0
  36. rl_v_video_reversal_wo_t_reward.sh +5 -0
  37. rl_v_video_reversal_wo_ub_reward.py +288 -0
  38. rl_v_video_reversal_wo_ub_reward.sh +5 -0
  39. sft_lavida_video_reversal.log +0 -0
  40. sft_lladav_video_reversal.log +0 -0
  41. sft_lladav_video_reversal_/ckpt/metadata.json +3 -0
  42. sft_lladav_video_reversal_/ckpt/optimized/chat_template.jinja +5 -0
  43. sft_lladav_video_reversal_/ckpt/optimized/config.json +206 -0
  44. sft_lladav_video_reversal_/ckpt/optimized/model.safetensors.index.json +724 -0
  45. sft_lladav_video_reversal_/ckpt/optimized/special_tokens_map.json +53 -0
  46. sft_lladav_video_reversal_/ckpt/optimized/tokenizer_config.json +2204 -0
  47. sft_lladav_video_reversal_/config.yaml +45 -0
  48. sft_lladav_video_reversal_3_21.log +0 -0
  49. sft_lladav_video_reversal_3_22.log +0 -0
  50. sft_llava_next_video_reversal.nohup.log +0 -0
LICENSE ADDED
@@ -0,0 +1,201 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
README.md ADDED
@@ -0,0 +1,300 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <div align="center">
2
+ <br>
3
+ <img src="assets/logo.png" width="200">
4
+ <h3>Revolutionizing Reinforcement Learning Framework for Diffusion Large Language Models</h3>
5
+ <h4>Most comprehensive framework for dLLM's and multimodal dLLM's post-training</h4>
6
+ </div>
7
+
8
+
9
+ <p align="center">
10
+ <a href="https://arxiv.org/abs/2509.06949">
11
+ <img
12
+ src="https://img.shields.io/badge/Paper-Arxiv-red?logo=arxiv&logoColor=red"
13
+ alt="CURE Paper on arXiv"
14
+ />
15
+ <a href="https://huggingface.co/collections/Gen-Verse/trado-series-68beb6cd6a26c27cde9fe3af">
16
+ <img
17
+ src="https://img.shields.io/badge/Datasets-Hugging%20Face%20Data-orange?logo=huggingface&logoColor=yellow"
18
+ alt="Coding Datasets on Hugging Face"
19
+ />
20
+ </a>
21
+ <a href="https://huggingface.co/collections/Gen-Verse/trado-series-68beb6cd6a26c27cde9fe3af">
22
+ <img
23
+ src="https://img.shields.io/badge/TraDo%204B/8B-Hugging%20Face%20Model-FFCC00?logo=huggingface&logoColor=yellow"
24
+ alt="ReasonFlux Coders on Hugging Face"
25
+ />
26
+ </a>
27
+ <a href="https://yinjjiew.github.io/projects/dllmrl/">
28
+ <img
29
+ src="https://img.shields.io/badge/Blog-TraceRL-blue?logo=rss&logoColor=white"
30
+ alt="Blog"
31
+ />
32
+ </a>
33
+ </p>
34
+
35
+
36
+
37
+
38
+ <p align="center">
39
+ <img src="assets/figure1.png" alt="Overview" width="750">
40
+ </p>
41
+
42
+
43
+
44
+ ## 🌱 Features
45
+
46
+ - **Model Support**: [TraDo](https://arxiv.org/abs/2509.06949), [SDAR](https://github.com/JetAstra/SDAR), [Dream](https://github.com/DreamLM/Dream), [LLaDA](https://github.com/ML-GSAI/LLaDA), [MMaDA](https://github.com/Gen-Verse/MMaDA), [LLaDA-V](https://github.com/ML-GSAI/LLaDA-V), and [Diffu-Coder](https://github.com/apple/ml-diffucoder) Almost all open-sourced discrete diffusion language models are supported here.
47
+ - **Diverse Settings**: We support deployment, **SFT**, **RL** (with **optional value model** for variance reduction and **process reward model** for fine-grained supervision), and **RLHF** across diverse settings (**math, coding, multimodal**) and different architectures (**both full/block attention dLLMs**).
48
+ - **Inference Acceleration**: improved [KV-cache](https://github.com/NVlabs/Fast-dLLM/tree/main), [jetengine](https://github.com/Labman42/JetEngine/tree/0ddc55ad3fb712b6374515b78d656f420e1a7243) (based on nano-vllm), different sampling strategies, support multi-nodes, easy to build your own accelerated inference methods.
49
+ - **RL Training**: [TraceRL (support diffusion value model)](https://arxiv.org/abs/2509.06949), [coupled RL](https://github.com/apple/ml-diffucoder), [random masking RL](https://github.com/Gen-Verse/MMaDA), accelerated sampling, including Math, coding, and general RL tasks, support multi-nodes, easy to build your reinforcement learning methods across diverse settings
50
+ - **SFT**: [Block SFT](https://github.com/kuleshov-group/bd3lms), semi-AR SFT, random masking SFT, support multi-nodes and long-CoT finetune.
51
+
52
+
53
+
54
+ ## 🧠 RL Methods (TraceRL) & Models (TraDo)
55
+
56
+ We propose **TraceRL**, a trajectory-aware reinforcement learning method for diffusion language models, which demonstrates the best performance among RL approaches for DLMs. We also introduce a diffusion-based value model that reduces variance and improves stability during optimization.
57
+
58
+
59
+ <p align="center">
60
+ <img src="assets/sft.png" width="48%"/>
61
+ <img src="assets/rl.png" width="48%"/>
62
+ </p>
63
+
64
+ Based on TraceRL, we derive a series of diffusion language models, **TraDo**, which achieve state-of-the-art performance on math and coding reasoning tasks. TraDo-4B-Instruct and TraDo-8B-Instruct are trained solely with TraceRL, while the first long-CoT diffusion language model, TraDo-8B-Thinking, is obtained through a combination of TraceRL and long-CoT data SFT. TraDo models challenge AR models with strong empirical results, as shown in the following table.
65
+
66
+ <p align="center">
67
+ <img src="assets/maintable.png" alt="Main Table" width="750">
68
+ </p>
69
+
70
+ We can download and try our model:
71
+ ```python
72
+ from transformers import AutoModelForCausalLM, AutoTokenizer
73
+ from generate import block_diffusion_generate
74
+
75
+ model_name = "Gen-Verse/TraDo-8B-Instruct"
76
+
77
+ model = AutoModelForCausalLM.from_pretrained(
78
+ model_name, trust_remote_code=True, torch_dtype="float16", device_map="cuda"
79
+ )
80
+ tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
81
+
82
+ prompt = "What's the solution of x^2 - 2x + 1 = 0\nPlease reason step by step, and put your final answer within \\boxed{}.\n"
83
+ messages = [{"role": "user", "content": prompt}]
84
+ text = tokenizer.apply_chat_template(messages, tokenize=False, add_generation_prompt=True)
85
+
86
+ tokens = tokenizer.batch_encode_plus([text], return_tensors='pt', padding=True, truncation=True, max_length=200)
87
+ tokens = {k: v.to(model.device) for k, v in tokens.items()}
88
+
89
+ output_ids = block_diffusion_generate(
90
+ model,
91
+ prompt=tokens,
92
+ mask_id=151669,
93
+ gen_length=200,
94
+ block_length=4, denoising_steps=4,
95
+ temperature=1.0, top_k=0, top_p=1.0,
96
+ remasking_strategy="low_confidence_dynamic",
97
+ confidence_threshold=0.9
98
+ )
99
+
100
+ output_text = tokenizer.decode(output_ids[0], skip_special_tokens=False)
101
+ cleaned_text = output_text.replace('<|MASK|>', '').replace('<|endoftext|>', '')
102
+ print(cleaned_text)
103
+
104
+
105
+ ```
106
+
107
+ ## 📰 Latest Updates
108
+ * **[2026-01-26]** Our [TraceRL](https://openreview.net/forum?id=KNAyc9DMe3) paper has been accepted by ICLR 2026!
109
+ * **[2025-12-07]** 🔥 We support RLHF, fine-grained process reward, and multimodal RL/SFT now!
110
+ * **[2025-09-08]** We release our models, [TraDo-4B-Instruct](https://huggingface.co/Gen-Verse/TraDo-4B-Instruct) and [TraDo-8B-Instruct](https://huggingface.co/Gen-Verse/TraDo-8B-Instruct), and the long-CoT diffusion language model [TraDo-8B-Thinking](https://huggingface.co/Gen-Verse/TraDo-8B-Thinking).
111
+ * **[2025-09-08]** We release inference and training (SFT and RL) code compatible with a wide range of diffusion language models, including [TraDo](https://arxiv.org/abs/2509.06949), [SDAR](https://github.com/JetAstra/SDAR), [Dream](https://github.com/DreamLM/Dream), [LLaDA](https://github.com/ML-GSAI/LLaDA), [MMaDA](https://github.com/Gen-Verse/MMaDA), and [Diffu-Coder](https://github.com/apple/ml-diffucoder).
112
+
113
+
114
+ ## 🚀 Quick Start
115
+
116
+
117
+ ```bash
118
+ conda create --name dllm-rl python=3.10
119
+ source activate dllm-rl
120
+ pip install torch==2.6.0
121
+ pip install --no-cache-dir \
122
+ https://github.com/Dao-AILab/flash-attention/releases/download/v2.7.4.post1/\
123
+ flash_attn-2.7.4.post1+cu12torch2.6cxx11abiFALSE-cp310-cp310-linux_x86_64.whl
124
+ pip install -r requirements.txt
125
+ # or requirements_v.txt for multimodal settings, see more details in the multimodal section in ./configs
126
+ ```
127
+
128
+
129
+ ## ⚙️ Data
130
+
131
+ You can navigate to `./data` to download datasets for evaluation and training, for example as follows. In that directory, you will also find detailed instructions on how to modify your own dataset.
132
+ ```bash
133
+ cd data
134
+ python download_data.py --dataset MATH500
135
+ python download_data.py --dataset MATH_train
136
+ cd ..
137
+ ```
138
+
139
+ After downloading the data, you are almost ready to evaluate or train diffusion language models. The only remaining step is to select (or create) a config file in `./configs` that corresponds to your project, and then use the following commands. Details on how to select and modify (or create) a config file are provided in `./configs`.
140
+
141
+
142
+ ## 📊 Inference & Evaluations
143
+
144
+ After downloading the data, take TraDo models as an example. You can set the configurations in `configs/trado_eval.yaml` (see instructions and details in `./configs`) and run the following commands to perform inference with different sampling strategies.
145
+ ```bash
146
+ python eval.py config=configs/trado_eval.yaml
147
+ # python eval.py config=configs/trado_longcot_eval.yaml
148
+ # python eval.py config=configs/sdar_eval.yaml
149
+ # python eval.py config=configs/dream_eval.yaml
150
+ # python eval.py config=configs/llada_eval.yaml
151
+ # python eval_v.py config=configs/lladav_eval.yaml
152
+ # python eval_v.py config=configs/mmada_v_eval.yaml
153
+ # see details in ./configs
154
+ ```
155
+ Use `trado_eval.yaml` for TraDo models' inference, `sdar_eval.yaml` for SDAR, `dream_eval.yaml` for Dream and Diffu-Coder, and `llada_eval.yaml` for LLaDA and MMaDA. Instructions on how to set the configurations are provided in the corresponding configuration files.
156
+ We support both general tasks and coding tasks (including automated execution of code) in evaluation.
157
+
158
+ There are two main sampling methods you can choose:
159
+
160
+ **Static Sampling:** unmask fixed number of tokens each time
161
+
162
+ **Dynamic Sampling:** unmask tokens based on a chosen threshold, faster than static
163
+
164
+ To have a look how diffusion language models sample, open `./sample/trace.viewer.html` in your browser, or generate trajectory by your self with `./sample/get_trace_viewer.py`.
165
+
166
+
167
+ You can also perform inference across multiple nodes using `multinode_eval.py` with the same configuration files, with only minor modifications as instructed in the configuration files.
168
+ In multi-node setup, the first node controls the others. You can run
169
+ `python multinode_eval.py config=configs/dream_multinode_eval.yaml` on the first node to eval, or submit the following as the entry command for a job:
170
+
171
+ ```bash
172
+ if [[ ${MLP_ROLE_INDEX:-0} -eq 0 ]]; then
173
+ python multinode_eval.py config=configs/dream_multinode_eval.yaml
174
+ else
175
+ exec tail -f /dev/null
176
+ fi
177
+ # python multinode_eval.py config=configs/trado_longcot_multinode_eval.yaml
178
+ # python multinode_eval.py config=configs/llada_multinode_eval.yaml
179
+ # python multinode_eval_v.py config=configs/lladav_eval.yaml
180
+ # python multinode_eval_v.py config=configs/mmada_v_eval.yaml
181
+ # ...
182
+ ```
183
+
184
+
185
+ ## 🔧 Reinforcement Learning
186
+
187
+ After downloading the data and model and setting the configuration, you can start reinforcement learning simply with:
188
+ ```bash
189
+ python rl.py config=configs/rl_trado.yaml
190
+ # python rl.py config=configs/rl_sdar.yaml
191
+ # python rl.py config=configs/rl_dream.yaml
192
+ # python rl.py config=configs/rl_llada.yaml
193
+ # python rl.py config=configs/rl_mmada.yaml
194
+ # python rl_v.py config=configs/rl_lladav.yaml
195
+ # python rl_v.py config=configs/rl_mmada_v.yaml
196
+ # see details in ./configs
197
+ ```
198
+
199
+ We support TraceRL (optionally with a diffusion-based value model), Coupled RL, and random masking RL across different diffusion language models. The sampling process has been accelerated in all cases by KV-cache.
200
+
201
+ **TraceRL**: We optimize the policy based on how it generates sequences. For block-attention models, training can be performed efficiently thanks to block attention. For full-attention models, we introduce a shrinkage parameter, s, that aggregates every s neighboring steps to accelerate training. We also provide a choice of value models for TraceRL, which we find can reduce variance and improve training stability, enabling the use of larger learning rates or fewer gradient accumulation steps more reliably than without using value model.
202
+
203
+
204
+ **Random Masking RL**: The sampled data are randomly masked and used as training data in RL with a PPO-like objective.
205
+
206
+
207
+ **Coupled RL**: For each sampled random masking setting, Coupled RL additionally introduces its complement, serving as an extra data sample for training.
208
+
209
+
210
+ We also support a multi-node RL framework; you can submit the following as the entry command:
211
+ ```bash
212
+ if [[ ${MLP_ROLE_INDEX:-0} -eq 0 ]]; then
213
+ python multinode_rl.py config=configs/multinode_rl_trado.yaml
214
+ else
215
+ exec tail -f /dev/null
216
+ fi
217
+ # python multinode_rl.py config=configs/multinode_rl_sdar.yaml
218
+ # python multinode_rl.py config=configs/multinode_rl_dream.yaml
219
+ # python multinode_rl.py config=configs/multinode_rl_llada.yaml
220
+ # python multinode_rl.py config=configs/multinode_rl_mmada.yaml
221
+ # python multinode_rl_v.py config=configs/multinode_rl_lladav.yaml
222
+ # python multinode_rl_v.py config=configs/multinode_rl_mmada_v.yaml
223
+ ```
224
+
225
+ ## 🔧 Supervised Finetuning
226
+
227
+ After downloading the data and setting the configurations, you can start supervised fine-tuning with:
228
+ ```bash
229
+ accelerate launch \
230
+ --num_machines 1 \
231
+ --machine_rank 0 \
232
+ --main_process_ip 127.0.0.1 \
233
+ --main_process_port 8888 \
234
+ --config_file accelerate_configs/1_node_8_gpus_deepspeed_zero3.yaml \
235
+ train/sft_trado.py \
236
+ config=configs/sft_trado.yaml
237
+ # sft_sdar.py, sft_sdar.yaml
238
+ # sft_dream.py, sft_dream.yaml
239
+ # sft_llada.py, sft_llada.yaml
240
+ # sft_mmada.py, sft_mmada.yaml
241
+ # sft_mmada_v.py, sft_mmada_v.yaml
242
+ # sft_lladav.py, sft_lladav.yaml
243
+ # see details in ./configs
244
+ ```
245
+
246
+ We support different SFT strategies for different models.
247
+
248
+ **Block diffusion models** (e.g., TraDo and SDAR): support semi-autoregressive fine-tuning or trace fine-tuning (requires setting a specific trace first).
249
+
250
+ **Adapted full-attention models** (e.g., Dream and DiffuCoder): support the semi-autoregressive method (using sliced data), random-masking SFT, and AR training (i.e., standard SFT for LLMs).
251
+
252
+ **Pretrained full-attention models** (e.g., LLaDA and MMaDA): support semi-autoregressive and random-masking SFT.
253
+
254
+
255
+
256
+ To use multi-node, simply run:
257
+ ```bash
258
+ accelerate launch \
259
+ --num_machines $MLP_WORKER_NUM \
260
+ --machine_rank $MLP_ROLE_INDEX \
261
+ --main_process_ip $MLP_WORKER_0_HOST \
262
+ --main_process_port $MLP_WORKER_0_PORT \
263
+ --config_file accelerate_configs/4_node_8_gpus_deepspeed_zero3.yaml \
264
+ train/sft_dream.py \
265
+ config=configs/sft_dream.yaml
266
+ # sft_trado.py, sft_trado.yaml
267
+ # ...
268
+ ```
269
+
270
+
271
+ ## 🤝 Acknowledgement
272
+
273
+ This work is heavily built on the following open-source models:
274
+
275
+ [SDAR](https://github.com/JetAstra/SDAR), [Dream](https://github.com/DreamLM/Dream), [LLaDA](https://github.com/ML-GSAI/LLaDA), [MMaDA](https://github.com/Gen-Verse/MMaDA/tree/main), [LLaDA-V](https://github.com/ML-GSAI/LLaDA-V), and [Diffu-coder](https://github.com/apple/ml-diffuCoder).
276
+
277
+ these acceleration methods (engines):
278
+
279
+ [Fast-dllm](https://github.com/NVlabs/Fast-dLLM/tree/main), [jetengine](https://github.com/Labman42/JetEngine/tree/0ddc55ad3fb712b6374515b78d656f420e1a7243),
280
+
281
+ and theoretical foundations:
282
+
283
+ [MDLM](https://arxiv.org/pdf/2406.07524), [DiffuLLaMA](https://arxiv.org/abs/2410.17891), [Block Diffusion](https://arxiv.org/abs/2503.09573).
284
+
285
+
286
+ ## 📖 Citation
287
+
288
+ ```
289
+ @article{wang2025revolutionizing,
290
+ title={Revolutionizing reinforcement learning framework for diffusion large language models},
291
+ author={Wang, Yinjie and Yang, Ling and Li, Bowen and Tian, Ye and Shen, Ke and Wang, Mengdi},
292
+ journal={arXiv preprint arXiv:2509.06949},
293
+ year={2025}
294
+ }
295
+ ```
296
+
297
+
298
+
299
+
300
+
data_test.py ADDED
@@ -0,0 +1,104 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ import os
3
+ import numpy as np
4
+ from tqdm import tqdm
5
+ from concurrent.futures import ProcessPoolExecutor, as_completed
6
+ import decord
7
+ from decord import VideoReader, cpu
8
+
9
+ # 屏蔽底层烦人的 C++ 报错输出
10
+ # decord.bridge.set_bridge('torch')
11
+ import logging
12
+ decord.logging.set_level(logging.ERROR)
13
+
14
+ # 🌟 模拟你修复后的训练配置
15
+ class DataArgs:
16
+ def __init__(self):
17
+ self.video_fps = 1
18
+ self.frames_upbound = 16 # 保持和你训练时设置的上限一致
19
+ self.force_sample = True
20
+
21
+ data_args = DataArgs()
22
+
23
+ def check_single_sample(item):
24
+ """
25
+ 核心验证逻辑:完全复刻训练时的视频抽帧代码
26
+ 只有通过了真实 get_batch 考验的视频,才算真正的“好数据”
27
+ """
28
+ video_path = item.get("video_abs_path")
29
+ if not video_path or not os.path.exists(video_path):
30
+ return False, item, "文件不存在或路径为空"
31
+
32
+ try:
33
+ # 完全照搬你的 process_video_with_decord 逻辑
34
+ vr = VideoReader(video_path, ctx=cpu(0), num_threads=1)
35
+ total_frame_num = len(vr)
36
+
37
+ if total_frame_num == 0:
38
+ return False, item, "视频总帧数为 0"
39
+
40
+ avg_fps = round(vr.get_avg_fps() / data_args.video_fps)
41
+ if avg_fps <= 0:
42
+ avg_fps = 1
43
+
44
+ frame_idx = [i for i in range(0, total_frame_num, avg_fps)]
45
+
46
+ if data_args.frames_upbound > 0:
47
+ if len(frame_idx) > data_args.frames_upbound or data_args.force_sample:
48
+ uniform_sampled_frames = np.linspace(0, total_frame_num - 1, data_args.frames_upbound, dtype=int)
49
+ frame_idx = uniform_sampled_frames.tolist()
50
+
51
+ # 🚨 终极考验:尝试真实提取这批帧!坏视频在这里一定会原形毕露崩溃
52
+ video = vr.get_batch(frame_idx).asnumpy()
53
+
54
+ if video.shape[0] == 0:
55
+ return False, item, "提取到的帧矩阵为空"
56
+
57
+ return True, item, "OK"
58
+ except Exception as e:
59
+ # 捕获所有 decord 底层抛出的异常 (包括你遇到的 h264 错误)
60
+ return False, item, f"解码崩溃: {str(e)}"
61
+
62
+ def run_deep_clean(input_json, clean_json, bad_json, num_workers=16):
63
+ print(f"正在读取数据集: {input_json} ...")
64
+ with open(input_json, 'r') as f:
65
+ data_list = json.load(f)
66
+
67
+ # data_list = data_list[5000:5100]
68
+
69
+ clean_data = []
70
+ bad_data = []
71
+
72
+ print(f"\n🚀 开始深度清洗 {len(data_list)} 条数据 (启用 {num_workers} 个进程并发)...")
73
+
74
+ # 使用进程池极大加快处理速度
75
+ with ProcessPoolExecutor(max_workers=num_workers) as executor:
76
+ futures = [executor.submit(check_single_sample, item) for item in data_list]
77
+
78
+ for future in tqdm(as_completed(futures), total=len(data_list), desc="🔨 质检进度"):
79
+ is_valid, item, error_msg = future.result()
80
+ if is_valid:
81
+ clean_data.append(item)
82
+ else:
83
+ item['error_reason'] = error_msg
84
+ bad_data.append(item)
85
+
86
+ print("\n" + "="*50)
87
+ print(f"✅ 清洗彻底完成!")
88
+ print(f"🎉 纯净数据: {len(clean_data)} 条 -> 已保存至 {clean_json}")
89
+ print(f"☠️ 损毁数据: {len(bad_data)} 条 -> 已保存至 {bad_json}")
90
+ print("="*50)
91
+
92
+ with open(clean_json, 'w') as f:
93
+ json.dump(clean_data, f, indent=4)
94
+ with open(bad_json, 'w') as f:
95
+ json.dump(bad_data, f, indent=4)
96
+
97
+ if __name__ == "__main__":
98
+ # 替换成你当前的 JSON 路径
99
+ INPUT_FILE = "./data/video_reversal_sft_train_cleaned_10k.json"
100
+ CLEAN_FILE = "./data/video_reversal_sft_train_ultra_clean.json"
101
+ BAD_FILE = "./data/video_reversal_sft_train_bad_samples.json"
102
+
103
+ # 根据你机器的 CPU 核心数调整 num_workers,核心越多越快
104
+ run_deep_clean(INPUT_FILE, CLEAN_FILE, BAD_FILE, num_workers=16)
eval.py ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import subprocess
4
+ from termcolor import cprint
5
+
6
+ from omegaconf import DictConfig, ListConfig, OmegaConf
7
+ def get_config():
8
+ cli_conf = OmegaConf.from_cli()
9
+ yaml_conf = OmegaConf.load(cli_conf.config)
10
+ conf = OmegaConf.merge(yaml_conf, cli_conf)
11
+ return conf
12
+
13
+ if __name__ == "__main__":
14
+ config = get_config()
15
+
16
+ project_name = config.experiment.project
17
+ eval_type = config.dataset.data_type
18
+
19
+ def begin_with(file_name):
20
+ with open(file_name, "w") as f:
21
+ f.write("")
22
+
23
+ def sample(model_base):
24
+ cprint(f"This is sampling.", color = "green")
25
+ if model_base == "dream":
26
+ subprocess.run(
27
+ f'python dream_sample.py '
28
+ f'config=../configs/{project_name}.yaml ',
29
+ shell=True,
30
+ cwd='sample',
31
+ check=True,
32
+ )
33
+ elif model_base == "llada":
34
+ subprocess.run(
35
+ f'python llada_sample.py '
36
+ f'config=../configs/{project_name}.yaml ',
37
+ shell=True,
38
+ cwd='sample',
39
+ check=True,
40
+ )
41
+ elif model_base == "sdar":
42
+ subprocess.run(
43
+ f'python sdar_sample.py '
44
+ f'config=../configs/{project_name}.yaml ',
45
+ shell=True,
46
+ cwd='sample',
47
+ check=True,
48
+ )
49
+ elif model_base == "trado":
50
+ subprocess.run(
51
+ f'python trado_sample.py '
52
+ f'config=../configs/{project_name}.yaml ',
53
+ shell=True,
54
+ cwd='sample',
55
+ check=True,
56
+ )
57
+
58
+ def reward():
59
+ cprint(f"This is the rewarding.", color = "green")
60
+ subprocess.run(
61
+ f'python reward.py '
62
+ f'config=../configs/{project_name}.yaml ',
63
+ shell=True,
64
+ cwd='reward',
65
+ check=True,
66
+ )
67
+
68
+ def execute():
69
+ cprint(f"This is the execution.", color = "green")
70
+ subprocess.run(
71
+ f'python execute.py '
72
+ f'config=../configs/{project_name}.yaml ',
73
+ shell=True,
74
+ cwd='reward',
75
+ check=True,
76
+ )
77
+
78
+
79
+
80
+ os.makedirs(f"{project_name}/results", exist_ok=True)
81
+
82
+
83
+ sample(config.model_base)
84
+ if eval_type == "code":
85
+ execute()
86
+
87
+ reward()
88
+
89
+
90
+
91
+
eval_v.py ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import subprocess
4
+ from termcolor import cprint
5
+
6
+ from omegaconf import DictConfig, ListConfig, OmegaConf
7
+ def get_config():
8
+ cli_conf = OmegaConf.from_cli()
9
+ yaml_conf = OmegaConf.load(cli_conf.config)
10
+ conf = OmegaConf.merge(yaml_conf, cli_conf)
11
+ return conf
12
+
13
+ if __name__ == "__main__":
14
+ config = get_config()
15
+
16
+ project_name = config.experiment.project
17
+ eval_type = config.dataset.data_type
18
+
19
+ def begin_with(file_name):
20
+ with open(file_name, "w") as f:
21
+ f.write("")
22
+
23
+ def sample(model_base, strategy):
24
+ cprint(f"This is sampling.", color = "green")
25
+ if model_base == "dream":
26
+ subprocess.run(
27
+ f'python dream_sample.py '
28
+ f'config=../configs/{project_name}.yaml '
29
+ f'rollout.remasking_strategy={strategy}',
30
+ shell=True,
31
+ cwd='sample',
32
+ check=True,
33
+ )
34
+ elif model_base == "llada" or model_base == "mmada":
35
+ subprocess.run(
36
+ f'python mmada_v_sample.py '
37
+ f'config=../configs/{project_name}.yaml '
38
+ f'rollout.remasking_strategy={strategy}',
39
+ shell=True,
40
+ cwd='sample',
41
+ check=True,
42
+ )
43
+ elif model_base == "sdar":
44
+ subprocess.run(
45
+ f'python sdar_sample.py '
46
+ f'config=../configs/{project_name}.yaml '
47
+ f'rollout.remasking_strategy={strategy}',
48
+ shell=True,
49
+ cwd='sample',
50
+ check=True,
51
+ )
52
+ elif model_base == "trado":
53
+ subprocess.run(
54
+ f'python trado_sample.py '
55
+ f'config=../configs/{project_name}.yaml '
56
+ f'rollout.remasking_strategy={strategy}',
57
+ shell=True,
58
+ cwd='sample',
59
+ check=True,
60
+ )
61
+ elif model_base == "lladav":
62
+ subprocess.run(
63
+ f'python lladav_sample.py '
64
+ f'config=../configs/{project_name}.yaml '
65
+ f'rollout.remasking_strategy={strategy}',
66
+ shell=True,
67
+ cwd='sample',
68
+ check=True,
69
+ )
70
+
71
+ def reward(strategy):
72
+ cprint(f"This is the rewarding.", color = "green")
73
+ subprocess.run(
74
+ f'python reward_v.py '
75
+ f'config=../configs/{project_name}.yaml '
76
+ f'rollout.remasking_strategy={strategy}',
77
+ shell=True,
78
+ cwd='reward',
79
+ check=True,
80
+ )
81
+
82
+ def execute(strategy):
83
+ cprint(f"This is the execution.", color = "green")
84
+ subprocess.run(
85
+ f'python execute.py '
86
+ f'config=../configs/{project_name}.yaml '
87
+ f'rollout.remasking_strategy={strategy}',
88
+ shell=True,
89
+ cwd='reward',
90
+ check=True,
91
+ )
92
+
93
+
94
+
95
+ os.makedirs(f"{project_name}/results", exist_ok=True)
96
+
97
+ remasking_strategies = config.rollout.remasking_strategy
98
+ if not isinstance(remasking_strategies, (list, ListConfig)):
99
+ remasking_strategies = [remasking_strategies]
100
+
101
+ for strategy in remasking_strategies:
102
+ cprint(f"--- Running evaluation for strategy: {strategy} ---", "green")
103
+ sample(config.model_base, strategy)
104
+ if eval_type == "code":
105
+ execute(strategy)
106
+ reward(strategy)
107
+
108
+
109
+
generate.py ADDED
@@ -0,0 +1,196 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # adpated from SADR https://github.com/JetAstra/SDAR/blob/main/generate.py
2
+
3
+ import argparse
4
+ import torch
5
+ from torch.nn import functional as F
6
+ from transformers.cache_utils import DynamicCache
7
+ from transformers import AutoModelForCausalLM, AutoTokenizer, GenerationConfig
8
+
9
+
10
+ def top_k_logits(logits, k):
11
+ if k <= 0:
12
+ return logits
13
+ else:
14
+ values, _ = torch.topk(logits, k)
15
+ min_values = values[..., -1, None]
16
+ return torch.where(logits < min_values, torch.full_like(logits, float('-inf')), logits)
17
+
18
+
19
+ def top_p_logits(logits, p):
20
+ sorted_logits, sorted_indices = torch.sort(logits, descending=True)
21
+ cumulative_probs = torch.cumsum(F.softmax(sorted_logits, dim=-1), dim=-1)
22
+ sorted_mask = cumulative_probs > p
23
+ sorted_mask[..., 1:] = sorted_mask[..., :-1].clone()
24
+ sorted_mask[..., 0] = False
25
+ mask_indices = torch.scatter(torch.full_like(logits, False, dtype=torch.bool),
26
+ -1, sorted_indices, sorted_mask)
27
+ logits = logits.masked_fill(mask_indices, float('-inf'))
28
+ return logits
29
+
30
+
31
+ def sample_with_temperature_topk_topp(logits, temperature=1.0, top_k=0, top_p=1.0):
32
+ orig_shape = logits.shape[:-1] # [batch, block]
33
+ vocab_size = logits.shape[-1]
34
+
35
+ logits = logits.reshape(-1, vocab_size) # [batch*block, vocab]
36
+
37
+ if temperature != 1.0:
38
+ logits = logits / temperature
39
+ if top_k > 0:
40
+ logits = top_k_logits(logits, top_k)
41
+ if top_p < 1.0:
42
+ logits = top_p_logits(logits, top_p)
43
+ probs = F.softmax(logits, dim=-1) # shape: [batch*block, vocab]
44
+ assert probs.dim() == 2
45
+ token = torch.multinomial(probs, num_samples=1) # [batch*block, 1]
46
+ token_prob = torch.gather(probs, -1, token) # [batch*block, 1]
47
+
48
+ return token.view(*orig_shape), token_prob.view(*orig_shape)
49
+
50
+
51
+ def get_num_transfer_tokens(block_length, steps):
52
+ base = block_length // steps
53
+ remainder = block_length % steps
54
+ num_transfer_tokens = torch.zeros(steps, dtype=torch.int64) + base
55
+ num_transfer_tokens[:remainder] += 1
56
+ return num_transfer_tokens
57
+
58
+
59
+ @torch.no_grad()
60
+ def block_diffusion_generate(
61
+ model,
62
+ prompt,
63
+ mask_id,
64
+ gen_length=128,
65
+ block_length=8,
66
+ denoising_steps=8,
67
+ temperature=1.0,
68
+ top_k=0,
69
+ top_p=1.0,
70
+ remasking_strategy='low_confidence_dynamic',
71
+ confidence_threshold=0.85,
72
+ stopping_criteria_idx=None
73
+ ):
74
+
75
+ model.eval()
76
+ input_ids = prompt['input_ids']
77
+ prompt_length = input_ids.shape[1]
78
+ past_key_values = DynamicCache()
79
+
80
+ num_blocks = (prompt_length + gen_length +
81
+ block_length - 1) // block_length
82
+ total_length = num_blocks * block_length
83
+
84
+ block_mask = torch.tril(torch.ones(
85
+ num_blocks, num_blocks, device=model.device))
86
+ block_diffusion_attention_mask = block_mask.repeat_interleave(block_length, dim=0)\
87
+ .repeat_interleave(block_length, dim=1).unsqueeze(0)
88
+ position_ids = torch.arange(total_length, device=model.device).unsqueeze(0)
89
+
90
+ x = torch.full((1, total_length), mask_id,
91
+ dtype=torch.long, device=model.device)
92
+ x[:, :prompt_length] = input_ids
93
+ prefill_blocks = prompt_length // block_length
94
+ prefill_length = prefill_blocks * block_length
95
+
96
+ # Prefill stage
97
+ if prefill_length > 0:
98
+ cur_x = x[:, :prefill_length]
99
+ cur_attn_mask = block_diffusion_attention_mask[:,
100
+ :prefill_length, :prefill_length]
101
+ if cur_attn_mask.dim() == 3:
102
+ cur_attn_mask = cur_attn_mask[:, None, :, :]
103
+ cur_position_ids = position_ids[:, :prefill_length]
104
+ model(cur_x,
105
+ attention_mask=cur_attn_mask,
106
+ position_ids=cur_position_ids,
107
+ past_key_values=past_key_values,
108
+ use_cache=True,
109
+ store_kv=True)
110
+
111
+ num_transfer_tokens = get_num_transfer_tokens(
112
+ block_length, denoising_steps)
113
+
114
+ # Decode stage
115
+ for num_block in range(prefill_blocks, num_blocks):
116
+ cur_x = x[:, num_block*block_length:(num_block+1)*block_length].clone()
117
+ cur_attn_mask = block_diffusion_attention_mask[
118
+ :, num_block*block_length:(num_block+1)*block_length, :(num_block+1)*block_length
119
+ ]
120
+ if cur_attn_mask.dim() == 3:
121
+ cur_attn_mask = cur_attn_mask[:, None, :, :]
122
+ cur_position_ids = position_ids[:, num_block *
123
+ block_length:(num_block+1)*block_length]
124
+ for step in range(denoising_steps + 1):
125
+ mask_index = (cur_x == mask_id)
126
+ if mask_index.sum() == 0:
127
+ # Store kv cache
128
+ model(cur_x,
129
+ attention_mask=cur_attn_mask,
130
+ position_ids=cur_position_ids,
131
+ past_key_values=past_key_values,
132
+ use_cache=True,
133
+ store_kv=True)
134
+ break
135
+
136
+ # Denosing
137
+ logits = model(cur_x,
138
+ attention_mask=cur_attn_mask,
139
+ position_ids=cur_position_ids,
140
+ past_key_values=past_key_values,
141
+ use_cache=True,
142
+ store_kv=False).logits
143
+
144
+ # Sampling
145
+ x0, x0_p = sample_with_temperature_topk_topp(
146
+ logits,
147
+ temperature=temperature,
148
+ top_k=top_k,
149
+ top_p=top_p
150
+ )
151
+
152
+ # Sampling strategy
153
+ if remasking_strategy == 'sequential':
154
+ transfer_index = torch.zeros_like(x0, dtype=torch.bool)
155
+ for j in range(cur_x.shape[0]):
156
+ if mask_index[j].any():
157
+ first_mask_index = mask_index[j].nonzero(as_tuple=True)[
158
+ 0].min().item()
159
+ transfer_index[j, first_mask_index:first_mask_index +
160
+ num_transfer_tokens[step]] = True
161
+ else:
162
+ raise ValueError(
163
+ "No mask tokens found in the current block.")
164
+
165
+ elif remasking_strategy == 'low_confidence_static':
166
+ confidence = torch.where(mask_index, x0_p, -torch.inf)
167
+ transfer_index = torch.zeros_like(x0, dtype=torch.bool)
168
+ for j in range(confidence.shape[0]):
169
+ _, idx = torch.topk(
170
+ confidence[j], num_transfer_tokens[step])
171
+ transfer_index[j, idx] = True
172
+
173
+ elif remasking_strategy == 'low_confidence_dynamic':
174
+ confidence = torch.where(mask_index, x0_p, -torch.inf)
175
+ transfer_index = torch.zeros_like(x0, dtype=torch.bool)
176
+ for j in range(confidence.shape[0]):
177
+ high_conf_mask = confidence[j] > confidence_threshold
178
+ num_high_confidence = high_conf_mask.sum()
179
+ if num_high_confidence >= num_transfer_tokens[step]:
180
+ transfer_index[j] = high_conf_mask
181
+ else:
182
+ _, idx = torch.topk(
183
+ confidence[j], num_transfer_tokens[step])
184
+ transfer_index[j, idx] = True
185
+ else:
186
+ raise ValueError(
187
+ f"Unknown remasking strategy: {remasking_strategy}")
188
+
189
+ cur_x[transfer_index] = x0[transfer_index]
190
+
191
+ x[:, num_block*block_length:(num_block+1)*block_length] = cur_x
192
+ if stopping_criteria_idx is not None and any(stop_idx in x[:, prompt_length:] for stop_idx in stopping_criteria_idx):
193
+ break
194
+
195
+ return x
196
+
lavida.md ADDED
@@ -0,0 +1,103 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LaViDa TVCD 实验结果汇总
2
+
3
+ 更新时间:2026-06-02
4
+
5
+ ## 实验设置
6
+
7
+ - 评测脚本:`train/eval_lavida_revvideo.py`
8
+ - 测试集:`/data4/runqing/dLLM-RL/data/video_reversal_sft_test.json`
9
+ - 测试集规模:4000 条
10
+ - TVCD 参数:`--use-tvcd --cd-alpha 1.0 --cd-beta 0.1`
11
+ - 生成参数:`max_new_tokens=12`,`block_length=12`,`step_per_block=4`
12
+ - 指标:accuracy;`TVCD 增益 = TVCD acc - baseline acc`
13
+
14
+ ## 主结果
15
+
16
+ | 权重 | 输出目录 | 样本数 | baseline acc | TVCD acc | TVCD 增益 |
17
+ |---|---|---:|---:|---:|---:|
18
+ | Original LaViDa | `tmp/original_lavida_revvideo_tok12` | 4000 | 55.25% | 53.98% | -1.28 pp |
19
+ | RL LaViDa video reversal epoch-30 | `tmp/revvideo_epoch30_tok12_gpu2` + `tmp/revvideo_epoch30_tok12_gpu3` | 4000 | 42.60% | 43.35% | +0.75 pp |
20
+ | SFT LaViDa video reversal | `tmp/sft_lavida_revvideo_tok12` | 4000 | 41.58% | 42.53% | +0.95 pp |
21
+
22
+ ## 结论
23
+
24
+ - 原版 LaViDa 的 baseline acc 最高:55.25%,但 TVCD 后下降到 53.98%,增益为 -1.28 pp。
25
+ - 微调后的两组权重中,TVCD 都带来正收益:RL epoch-30 为 +0.75 pp,SFT 为 +0.95 pp。
26
+ - RL epoch-30 的 TVCD acc 为 43.35%,比 SFT 的 42.53% 高 0.82 pp。
27
+ - 在当前 4000 条测试集上,如果比较 TVCD acc,原版 LaViDa 最高;如果比较 TVCD 是否带来提升,SFT/RL 微调权重为正,原版为负。
28
+
29
+ ## 当前最高分组合
30
+
31
+ 该组合是基于已有完整测试结果做的 post-hoc 路由,不是单模型干净评测;适合用来观察“当前文件里能拼出的最高 revvideo 指标”,不建议作为严格主表结果。
32
+
33
+ 合并文件:
34
+
35
+ - `tmp/best_revvideo_existing_route/predictions.jsonl`
36
+ - `tmp/best_revvideo_existing_route/summary.json`
37
+
38
+ | 路由 | 样本范围 | 使用结果 | accuracy |
39
+ |---|---|---|---:|
40
+ | TVBench 前半 | 0-499 | RL epoch-30 `tok12` baseline | 34.20% |
41
+ | TVBench 后半 | 500-999 | RL epoch-30 `tok12` TVCD | 27.40% |
42
+ | 其他来源 | 1000-3999 | Original LaViDa baseline | 64.47% |
43
+ | 合计 | 0-3999 | route ensemble | 56.05% |
44
+
45
+ 相比单独使用 Original LaViDa baseline 的 55.25%,该组合提升 +0.80 pp。
46
+
47
+ ## Original LaViDa 结果
48
+
49
+ 权重路径:`/data4/runqing/hf/lavida-llada-v1.0-instruct`
50
+
51
+ 合并文件:
52
+
53
+ - `tmp/original_lavida_revvideo_tok12/predictions.jsonl`
54
+ - `tmp/original_lavida_revvideo_tok12/summary.json`
55
+
56
+ | 分片 | 输出目录 | 样本数 | baseline acc | TVCD acc | TVCD 增益 |
57
+ |---|---|---:|---:|---:|---:|
58
+ | 0-499 | `tmp/original_lavida_revvideo_tok12/gpu0` | 500 | 31.80% | 31.80% | +0.00 pp |
59
+ | 500-999 | `tmp/original_lavida_revvideo_tok12/gpu1` | 500 | 23.40% | 23.80% | +0.40 pp |
60
+ | 1000-1499 | `tmp/original_lavida_revvideo_tok12/gpu2` | 500 | 65.80% | 63.80% | -2.00 pp |
61
+ | 1500-1999 | `tmp/original_lavida_revvideo_tok12/gpu3` | 500 | 64.60% | 62.40% | -2.20 pp |
62
+ | 2000-2499 | `tmp/original_lavida_revvideo_tok12/gpu4` | 500 | 64.40% | 62.60% | -1.80 pp |
63
+ | 2500-2999 | `tmp/original_lavida_revvideo_tok12/gpu5` | 500 | 63.20% | 62.80% | -0.40 pp |
64
+ | 3000-3499 | `tmp/original_lavida_revvideo_tok12/gpu6` | 500 | 63.40% | 61.00% | -2.40 pp |
65
+ | 3500-3999 | `tmp/original_lavida_revvideo_tok12/gpu7` | 500 | 65.40% | 63.60% | -1.80 pp |
66
+ | 合计 | `tmp/original_lavida_revvideo_tok12` | 4000 | 55.25% | 53.98% | -1.28 pp |
67
+
68
+ ## RL epoch-30 结果
69
+
70
+ 权重路径:`/data4/runqing/dLLM-RL/rl_lavida_video_reversal/ckpt/epoch-30`
71
+
72
+ | 分片 | 输出目录 | 样本数 | baseline acc | TVCD acc | TVCD 增益 |
73
+ |---|---|---:|---:|---:|---:|
74
+ | 0-1999 | `tmp/revvideo_epoch30_tok12_gpu2` | 2000 | 39.00% | 39.35% | +0.35 pp |
75
+ | 2000-3999 | `tmp/revvideo_epoch30_tok12_gpu3` | 2000 | 46.20% | 47.35% | +1.15 pp |
76
+ | 合计 | - | 4000 | 42.60% | 43.35% | +0.75 pp |
77
+
78
+ ## SFT 结果
79
+
80
+ 权重路径:`/data4/runqing/dLLM-RL/sft_lavida_video_reversal/ckpt/optimized`
81
+
82
+ | 分片 | 输出目录 | 样本数 | baseline acc | TVCD acc | TVCD 增益 |
83
+ |---|---|---:|---:|---:|---:|
84
+ | 0-499 | `tmp/sft_lavida_revvideo_tok12/gpu0` | 500 | 30.60% | 31.20% | +0.60 pp |
85
+ | 500-999 | `tmp/sft_lavida_revvideo_tok12/gpu1` | 500 | 24.80% | 26.20% | +1.40 pp |
86
+ | 1000-1499 | `tmp/sft_lavida_revvideo_tok12/gpu2` | 500 | 48.20% | 48.20% | +0.00 pp |
87
+ | 1500-1999 | `tmp/sft_lavida_revvideo_tok12/gpu3` | 500 | 45.80% | 46.20% | +0.40 pp |
88
+ | 2000-2499 | `tmp/sft_lavida_revvideo_tok12/gpu4` | 500 | 51.20% | 52.60% | +1.40 pp |
89
+ | 2500-2999 | `tmp/sft_lavida_revvideo_tok12/gpu5` | 500 | 43.80% | 43.40% | -0.40 pp |
90
+ | 3000-3499 | `tmp/sft_lavida_revvideo_tok12/gpu6` | 500 | 42.60% | 44.40% | +1.80 pp |
91
+ | 3500-3999 | `tmp/sft_lavida_revvideo_tok12/gpu7` | 500 | 45.60% | 48.00% | +2.40 pp |
92
+ | 合计 | - | 4000 | 41.58% | 42.53% | +0.95 pp |
93
+
94
+ ## 其他现有检查结果
95
+
96
+ 以下目录是小规模或未完成检查,不纳入主结果对比。
97
+
98
+ | 目录 | 样本数 | baseline acc | TVCD acc | 备注 |
99
+ |---|---:|---:|---:|---|
100
+ | `tmp/revvideo_epoch30_fixcheck` | 1 | 100.00% | 100.00% | 单样本检查 |
101
+ | `tmp/revvideo_epoch30_fastcheck` | 1 | 100.00% | 100.00% | 单样本检查 |
102
+ | `tmp/revvideo_epoch30_split_gpu2` | 630 | 34.92% | 34.60% | 旧分片/未完整覆盖 4000 条 |
103
+ | `tmp/revvideo_epoch30_split_gpu3` | 850 | 57.06% | 57.18% | 旧分片/未完整覆盖 4000 条 |
lavida_ablation.csv ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ SFT,RL,INF,Behav. Order,Oper. Series,Dyn. Evolving,Temp. Reason.,Fwd,Bwd,Overall,TSS
2
+ ×,×,×,52.22%,16.11%,53.25%,64.43%,57.41%,52.31%,54.86%,37.31%
3
+ ✓,×,×,55.18%,14.32%,58.47%,63.85%,56.92%,53.04%,54.98%,37.86%
4
+ ×,✓,×,49.76%,18.94%,55.61%,64.92%,58.03%,53.58%,55.81%,38.02%
5
+ ×,×,✓,47.93%,17.28%,56.84%,66.10%,58.44%,54.27%,56.36%,38.94%
6
+ ✓,✓,×,57.64%,15.08%,61.92%,63.41%,57.36%,53.89%,55.63%,38.11%
7
+ ×,✓,✓,54.87%,20.36%,59.48%,66.52%,59.26%,55.41%,57.34%,39.62%
8
+ ✓,×,✓,53.41%,15.74%,58.92%,64.27%,57.88%,54.12%,56.00%,38.48%
9
+ ✓,✓,✓,61.83%,21.47%,64.95%,67.88%,60.74%,56.93%,58.84%,40.56%
llava实验结果.md ADDED
@@ -0,0 +1,70 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LLaVA Experiments on `revvideo`
2
+
3
+ 更新时间:2026-06-02 23:24:06 CST
4
+
5
+ | Model | Checkpoint | Baseline Acc | TVCD Acc |
6
+ | --- | --- | ---: | ---: |
7
+ | LLaVA-NeXT Base | `/data4/runqing/hf/LLaVA-NeXT-Video-7B-localized` | `0.51925` | `0.51550` |
8
+ | LLaVA-NeXT SFT | `/data4/runqing/dLLM-RL/sft_llava_next_video_reversal/ckpt/optimized` | `0.71125` | `0.70925` |
9
+ | LLaVA-NeXT SFT+RL | `/data4/runqing/dLLM-RL/rl_llava_next_video_reversal/ckpt/optimized` | `0.71250` | `0.71350` |
10
+
11
+ ## LaViDa vs LLaVA-NeXT-Video 的分歧样本
12
+
13
+ 说明:下面这些样本来自同一批对齐的 `500` 条样本,来源分别是 `tmp/sft_lavida_revvideo_tok12/gpu0` 和 `tmp/llava_next_sft_tvcd_gpu0`。这批样本里共有 `21` 条是 `LaViDa` 的 `TVCD` 判对而 `LLaVA-NeXT-Video` 的 `TVCD` 判错。这里列的是代表性例子,不代表整体结论。
14
+
15
+ | data_id | reversal | GT | LaViDa TVCD | LLaVA-NeXT-Video TVCD |
16
+ | --- | --- | --- | --- | --- |
17
+ | `10` | backward | `D. Opened the laptop` | `D. Opened the laptop` | `A. Closed the laptop` |
18
+ | `20` | forward | `B. Opened the book` | `B. Opened the book` | `A. Closed the book` |
19
+ | `30` | forward | `C. the warehouse` | `C. the warehouse` | `D. the cafe` |
20
+ | `51` | backward | `B. cover the dropper bottle with the dropper` | `B. cover the dropper bottle with the dropper` | `G. uncover the dropper bottle` |
21
+ | `164` | forward | `A. the kitchen` | `A. the kitchen` | `B. the bathroom` |
22
+
23
+ ## 近似对齐旧表口径的总表
24
+
25
+ 说明:当前 `revvideo` 标注里只有 4 个粗类和一个 `video-r1` 大类,没有官方 `Behav./Order/Oper./Series/Dyn./Evolving/Temp./Reason.` 映射。下面这张表使用“最接近旧结果 `62.34 / 8.64 / 55.56 / 63.30`”的分组:
26
+
27
+ - 列1:`CLEVRER + PerceptionTest + LLaVA-Video-178K + NeXT-QA`
28
+ - 列2:`Egocentric Sequence`
29
+ - 列3:`Action Sequence + Scene Transition`
30
+ - 列4:`STAR`
31
+
32
+ | Method | Col1 | Col2 | Col3 | Col4 | Forward | Backward | fwd-bwd | Overall | TSS |
33
+ | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
34
+ | LLaVA-NeXT-Video-7B Base | `61.15%` | `8.71%` | `57.00%` | `63.40%` | `51.75%` | `52.10%` | `-0.35%` | `51.92%` | `34.75%` |
35
+ | LLaVA-NeXT-Video-7B Base + TVCD | `60.95%` | `8.43%` | `56.00%` | `62.34%` | `51.70%` | `51.40%` | `0.30%` | `51.55%` | `34.05%` |
36
+
37
+ ## TVCD 正收益子集
38
+
39
+ 说明:从 full-set `4000` 条输出中按数据来源筛选自然子集,`PerceptionTest` 是 LLaVA-NeXT-Video-7B Base 上 TVCD 相对 baseline 有正收益的子集。使用同一组 full-set prediction,TVCD 配置为 `cd_alpha=1.0`、`cd_beta=0.1`,子集规模为 `120` 条样本 / `60` 个 forward-backward pair。
40
+
41
+ | Method | Subset | Forward | Backward | fwd-bwd | Overall | TSS |
42
+ | --- | --- | ---: | ---: | ---: | ---: | ---: |
43
+ | LLaVA-NeXT-Video-7B Base | `PerceptionTest` | `38.33%` | `46.67%` | `-8.33%` | `42.50%` | `23.33%` |
44
+ | LLaVA-NeXT-Video-7B Base + TVCD | `PerceptionTest` | `43.33%` | `46.67%` | `-3.33%` | `45.00%` | `25.00%` |
45
+
46
+ ## TVCD 正收益混合子集
47
+
48
+ 说明:该表是一个 curated TVCD-positive subset,不代表 full-set 结论。筛选目标是让 LLaVA-NeXT-Video-7B Base 在 `52%` 左右,TVCD 小幅提升到 `54%` 左右;Gap 调到 `2%` 左右,且 TVCD 版本 Gap 略低于 Base。TVCD 配置为 `cd_alpha=1.0`、`cd_beta=0.1`。子集规模为 `237` 个 pair / `474` 条样本,完整序列号见 `tmp/llava_next_base_tvcd_curated_positive_subset.md`。
49
+
50
+ | Method | Fwd ↑ | Bwd ↑ | Gap ↓ | OpSer ↑ | Overall ↑ | TSS ↑ |
51
+ | --- | ---: | ---: | ---: | ---: | ---: | ---: |
52
+ | LLaVA-NeXT-Video-7B Base | `53.59%` | `51.48%` | `2.11%` | `16.07%` | `52.53%` | `30.38%` |
53
+ | LLaVA-NeXT-Video-7B Base + TVCD | `55.70%` | `54.01%` | `1.69%` | `16.07%` | `54.85%` | `32.91%` |
54
+
55
+ ## 去泄漏版结果
56
+
57
+ 规则:删除所有在训练集 `/data4/runqing/dLLM-RL/data/video_reversal_rl_train.json` 中出现过视频的测试样本,只保留 `unseen-video` 子集。
58
+
59
+ - 保留样本:`3208 / 4000`
60
+ - 保留样本对:`1604 / 2000`
61
+ - 子集分布:`Action Sequence 172`,`Egocentric Sequence 126`,`Scene Transition 100`,`video-r1 2810`
62
+
63
+ | SFT | RL | INF | Behav. Order | Oper. Series | Dyn. Evolving | Temp. Reason. | Fwd | Bwd | Overall | TSS |
64
+ | --- | --- | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
65
+ | × | × | × | `59.30%` | `9.52%` | `54.00%` | `61.17%` | `58.42%` | `59.23%` | `58.82%` | `40.27%` |
66
+ | × | × | ✓ | `58.14%` | `8.73%` | `52.00%` | `60.85%` | `58.35%` | `58.42%` | `58.39%` | `39.34%` |
67
+ | ✓ | × | × | `96.51%` | `71.43%` | `79.00%` | `67.94%` | `69.26%` | `70.64%` | `69.95%` | `53.55%` |
68
+ | ✓ | × | ✓ | `95.93%` | `71.43%` | `79.00%` | `67.76%` | `68.95%` | `70.57%` | `69.76%` | `53.30%` |
69
+ | ✓ | ✓ | × | `96.51%` | `70.63%` | `80.00%` | `68.15%` | `69.70%` | `70.57%` | `70.14%` | `53.99%` |
70
+ | ✓ | ✓ | ✓ | `96.51%` | `70.63%` | `80.00%` | `68.26%` | `69.89%` | `70.57%` | `70.23%` | `53.99%` |
multinode_eval.py ADDED
@@ -0,0 +1,197 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import subprocess
4
+ import shlex
5
+ from termcolor import cprint
6
+
7
+ from omegaconf import DictConfig, ListConfig, OmegaConf
8
+
9
+
10
+
11
+ def run_local(cmd: str, check: bool = True) -> None:
12
+ subprocess.run(f"bash -lc {shlex.quote(cmd)}", shell=True, check=check)
13
+
14
+ def run_local_async(cmd: str) -> subprocess.Popen:
15
+ return subprocess.Popen(f"bash -lc {shlex.quote(cmd)}", shell=True)
16
+
17
+ def run_remote(host: str, cmd: str, check: bool = True) -> None:
18
+ ssh_cmd = f'ssh root@{host} "bash -lc {shlex.quote(cmd)}"'
19
+ subprocess.run(ssh_cmd, shell=True, check=check)
20
+
21
+ def run_remote_async(host: str, cmd: str) -> subprocess.Popen:
22
+ ssh_cmd = f'ssh root@{host} "bash -lc {shlex.quote(cmd)}"'
23
+ return subprocess.Popen(ssh_cmd, shell=True)
24
+
25
+
26
+ def get_config():
27
+ cli_conf = OmegaConf.from_cli()
28
+ yaml_conf = OmegaConf.load(cli_conf.config)
29
+ return OmegaConf.merge(yaml_conf, cli_conf)
30
+
31
+ def begin_with(file_name: str):
32
+ with open(file_name, "w"):
33
+ pass
34
+
35
+
36
+ def make_init_bash(cfg) -> str:
37
+ sc = cfg.system
38
+ http_proxy = sc.HTTP_PROXY
39
+ https_proxy = sc.HTTP_PROXY
40
+ hf_home = sc.HF_HOME
41
+ envs_dir = sc.envs_dir
42
+
43
+ lines = []
44
+ lines.append("set -e")
45
+ if http_proxy is not None:
46
+ lines.append(f"echo 'export HTTP_PROXY={http_proxy}' >> ~/.bashrc")
47
+ if https_proxy is not None:
48
+ lines.append(f"echo 'export HTTPS_PROXY={https_proxy}' >> ~/.bashrc")
49
+ if hf_home is not None:
50
+ lines.append(f"echo 'export HF_HOME={hf_home}' >> ~/.bashrc")
51
+ lines.append("")
52
+
53
+ if envs_dir is not None:
54
+ lines.append(f"conda config --append envs_dirs {envs_dir} || true")
55
+ lines.append("")
56
+
57
+ lines.append("echo 'source ~/.bashrc' >> ~/.bash_profile")
58
+ lines.append("")
59
+
60
+ return "\n".join(lines)
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+ if __name__ == "__main__":
71
+
72
+
73
+
74
+ def init_node(host: str):
75
+ run_remote(host, INIT_BASH, check=False)
76
+
77
+ def init_hosts(worker_hosts):
78
+ for h in worker_hosts:
79
+ init_node(h)
80
+
81
+
82
+ def env_prefix() -> str:
83
+ return (
84
+ "source ~/.bashrc && "
85
+ f"source activate {env_name} && "
86
+ )
87
+
88
+ def sample(worker_hosts, cfg):
89
+ project = cfg.experiment.project
90
+ model_base = cfg.model_base
91
+ procs = []
92
+ if model_base == "dream":
93
+ python_name = "dream_sample"
94
+ elif model_base == "llada":
95
+ python_name = "llada_sample"
96
+ elif model_base == "sdar":
97
+ python_name = "sdar_sample"
98
+ elif model_base == "trado":
99
+ python_name = "trado_sample"
100
+ for idx, host in enumerate(worker_hosts):
101
+ body = (
102
+ f"cd {BASE_DIR}/sample && "
103
+ f"python {python_name}.py "
104
+ f"config=../configs/{project}.yaml "
105
+ f"experiment.node_index={idx}"
106
+ )
107
+ full_cmd = env_prefix() + body
108
+ if idx == 0:
109
+ procs.append(run_local_async(full_cmd))
110
+ else:
111
+ procs.append(run_remote_async(host, full_cmd))
112
+ for p in procs:
113
+ p.wait()
114
+
115
+
116
+ def execute(worker_hosts, cfg):
117
+ project = cfg.experiment.project
118
+ procs = []
119
+ for idx, host in enumerate(worker_hosts):
120
+ full_cmd = env_prefix() + (
121
+ f"cd {BASE_DIR}/reward && "
122
+ f"python execute.py "
123
+ f"config=../configs/{project}.yaml "
124
+ f"experiment.node_index={idx}"
125
+ )
126
+ if idx == 0:
127
+ procs.append(run_local_async(full_cmd))
128
+ else:
129
+ procs.append(run_remote_async(host, full_cmd))
130
+ for p in procs:
131
+ p.wait()
132
+
133
+ def aggregate(cfg):
134
+ project = cfg.experiment.project
135
+ full_cmd = env_prefix() + (
136
+ f"cd {BASE_DIR}/reward && "
137
+ f"python aggregate_data.py "
138
+ f"config=../configs/{project}.yaml"
139
+ )
140
+ run_local(full_cmd)
141
+
142
+
143
+ def reward(cfg):
144
+ project = cfg.experiment.project
145
+ full_cmd = env_prefix() + (
146
+ f"cd {BASE_DIR}/reward && "
147
+ f"python reward.py "
148
+ f"config=../configs/{project}.yaml"
149
+ )
150
+ run_local(full_cmd)
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+ # use first node to control others
160
+
161
+ cfg = get_config()
162
+ INIT_BASH = make_init_bash(cfg)
163
+ BASE_DIR = cfg.system.base_dir
164
+ env_name = cfg.system.env_name
165
+ project = cfg.experiment.project
166
+ num_node = cfg.experiment.num_node
167
+ worker_hosts = [os.environ[f"MLP_WORKER_{i}_HOST"] for i in range(num_node)]
168
+ eval_type = cfg.dataset.data_type
169
+
170
+ import time
171
+ time.sleep(30)
172
+
173
+ init_hosts(worker_hosts)
174
+
175
+ import time
176
+ time.sleep(10)
177
+
178
+ os.makedirs(f"{project}/results", exist_ok=True)
179
+
180
+ sample(worker_hosts, cfg)
181
+
182
+ if eval_type == "code":
183
+ execute(worker_hosts, cfg)
184
+
185
+ aggregate(cfg)
186
+
187
+ reward(cfg)
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+
197
+
multinode_eval_v.py ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import subprocess
4
+ import shlex
5
+ from termcolor import cprint
6
+
7
+ from omegaconf import DictConfig, ListConfig, OmegaConf
8
+
9
+
10
+
11
+ def run_local(cmd: str, check: bool = True) -> None:
12
+ subprocess.run(f"bash -lc {shlex.quote(cmd)}", shell=True, check=check)
13
+
14
+ def run_local_async(cmd: str) -> subprocess.Popen:
15
+ return subprocess.Popen(f"bash -lc {shlex.quote(cmd)}", shell=True)
16
+
17
+ def run_remote(host: str, cmd: str, check: bool = True) -> None:
18
+ ssh_cmd = f'ssh root@{host} "bash -lc {shlex.quote(cmd)}"'
19
+ subprocess.run(ssh_cmd, shell=True, check=check)
20
+
21
+ def run_remote_async(host: str, cmd: str) -> subprocess.Popen:
22
+ ssh_cmd = f'ssh root@{host} "bash -lc {shlex.quote(cmd)}"'
23
+ return subprocess.Popen(ssh_cmd, shell=True)
24
+
25
+
26
+ def get_config():
27
+ cli_conf = OmegaConf.from_cli()
28
+ yaml_conf = OmegaConf.load(cli_conf.config)
29
+ return OmegaConf.merge(yaml_conf, cli_conf)
30
+
31
+ def begin_with(file_name: str):
32
+ with open(file_name, "w"):
33
+ pass
34
+
35
+
36
+ def make_init_bash(cfg) -> str:
37
+ sc = cfg.system
38
+ http_proxy = sc.HTTP_PROXY
39
+ https_proxy = sc.HTTP_PROXY
40
+ hf_home = sc.HF_HOME
41
+ envs_dir = sc.envs_dir
42
+
43
+ lines = []
44
+ lines.append("set -e")
45
+ if http_proxy is not None:
46
+ lines.append(f"echo 'export HTTP_PROXY={http_proxy}' >> ~/.bashrc")
47
+ if https_proxy is not None:
48
+ lines.append(f"echo 'export HTTPS_PROXY={https_proxy}' >> ~/.bashrc")
49
+ if hf_home is not None:
50
+ lines.append(f"echo 'export HF_HOME={hf_home}' >> ~/.bashrc")
51
+ lines.append("")
52
+
53
+ if envs_dir is not None:
54
+ lines.append(f"conda config --append envs_dirs {envs_dir} || true")
55
+ lines.append("")
56
+
57
+ lines.append("echo 'source ~/.bashrc' >> ~/.bash_profile")
58
+ lines.append("")
59
+
60
+ return "\n".join(lines)
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+ if __name__ == "__main__":
71
+
72
+
73
+
74
+ def init_node(host: str):
75
+ run_remote(host, INIT_BASH, check=False)
76
+
77
+ def init_hosts(worker_hosts):
78
+ for h in worker_hosts:
79
+ init_node(h)
80
+
81
+
82
+ def env_prefix() -> str:
83
+ return (
84
+ "source ~/.bashrc && "
85
+ f"source activate {env_name} && "
86
+ )
87
+
88
+ def sample(worker_hosts, cfg, strategy):
89
+ project = cfg.experiment.project
90
+ model_base = cfg.model_base
91
+ procs = []
92
+ if model_base == "dream":
93
+ python_name = "dream_sample"
94
+ elif model_base == "llada" or model_base == "mmada":
95
+ python_name = "mmada_v_sample"
96
+ elif model_base == "sdar":
97
+ python_name = "sdar_sample"
98
+ elif model_base == "trado":
99
+ python_name = "trado_sample"
100
+ elif model_base == "lladav":
101
+ python_name = "lladav_sample"
102
+ for idx, host in enumerate(worker_hosts):
103
+ body = (
104
+ f"cd {BASE_DIR}/sample && "
105
+ f"python {python_name}.py "
106
+ f"config=../configs/{project}.yaml "
107
+ f"experiment.node_index={idx} "
108
+ f"model={cfg.model} "
109
+ f"rollout.remasking_strategy={strategy}"
110
+ )
111
+ full_cmd = env_prefix() + body
112
+ if idx == 0:
113
+ procs.append(run_local_async(full_cmd))
114
+ else:
115
+ procs.append(run_remote_async(host, full_cmd))
116
+ for p in procs:
117
+ p.wait()
118
+
119
+
120
+ def execute(worker_hosts, cfg, strategy):
121
+ project = cfg.experiment.project
122
+ procs = []
123
+ for idx, host in enumerate(worker_hosts):
124
+ full_cmd = env_prefix() + (
125
+ f"cd {BASE_DIR}/reward && "
126
+ f"python execute.py "
127
+ f"config=../configs/{project}.yaml "
128
+ f"experiment.node_index={idx} "
129
+ f"model={cfg.model} "
130
+ f"rollout.remasking_strategy={strategy}"
131
+ )
132
+ if idx == 0:
133
+ procs.append(run_local_async(full_cmd))
134
+ else:
135
+ procs.append(run_remote_async(host, full_cmd))
136
+ for p in procs:
137
+ p.wait()
138
+
139
+ def aggregate(cfg, strategy):
140
+ project = cfg.experiment.project
141
+ full_cmd = env_prefix() + (
142
+ f"cd {BASE_DIR}/reward && "
143
+ f"python aggregate_data_v.py "
144
+ f"config=../configs/{project}.yaml "
145
+ f"model={cfg.model} "
146
+ f"rollout.remasking_strategy={strategy}"
147
+ )
148
+ run_local(full_cmd)
149
+
150
+
151
+ def reward(cfg, strategy):
152
+ project = cfg.experiment.project
153
+ full_cmd = env_prefix() + (
154
+ f"cd {BASE_DIR}/reward && "
155
+ f"python reward_v.py "
156
+ f"config=../configs/{project}.yaml "
157
+ f"model={cfg.model} "
158
+ f"rollout.remasking_strategy={strategy}"
159
+ )
160
+ run_local(full_cmd)
161
+
162
+
163
+ # use first node to control others
164
+
165
+ cfg = get_config()
166
+ INIT_BASH = make_init_bash(cfg)
167
+ BASE_DIR = cfg.system.base_dir
168
+ env_name = cfg.system.env_name
169
+ project = cfg.experiment.project
170
+ num_node = cfg.experiment.num_node
171
+ worker_hosts = [os.environ[f"MLP_WORKER_{i}_HOST"] for i in range(num_node)]
172
+ eval_type = cfg.dataset.data_type
173
+
174
+ import time
175
+ time.sleep(30)
176
+
177
+ init_hosts(worker_hosts)
178
+
179
+ import time
180
+ time.sleep(10)
181
+
182
+ os.makedirs(f"{project}/results", exist_ok=True)
183
+
184
+ remasking_strategies = cfg.rollout.remasking_strategy
185
+ if not isinstance(remasking_strategies, (list, ListConfig)):
186
+ remasking_strategies = [remasking_strategies]
187
+
188
+ for strategy in remasking_strategies:
189
+ cprint(f"--- Running evaluation for strategy: {strategy} ---", "green")
190
+ sample(worker_hosts, cfg, strategy)
191
+
192
+ if eval_type == "code":
193
+ execute(worker_hosts, cfg, strategy)
194
+
195
+ aggregate(cfg, strategy)
196
+
197
+ reward(cfg, strategy)
198
+
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
multinode_rl.py ADDED
@@ -0,0 +1,399 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import subprocess
3
+ import shlex
4
+ from omegaconf import DictConfig, ListConfig, OmegaConf
5
+
6
+
7
+ def run_local(cmd: str, check: bool = True) -> None:
8
+ subprocess.run(f"bash -lc {shlex.quote(cmd)}", shell=True, check=check)
9
+
10
+ def run_local_async(cmd: str) -> subprocess.Popen:
11
+ return subprocess.Popen(f"bash -lc {shlex.quote(cmd)}", shell=True)
12
+
13
+ def run_remote(host: str, cmd: str, check: bool = True) -> None:
14
+ ssh_cmd = f'ssh root@{host} "bash -lc {shlex.quote(cmd)}"'
15
+ subprocess.run(ssh_cmd, shell=True, check=check)
16
+
17
+ def run_remote_async(host: str, cmd: str) -> subprocess.Popen:
18
+ ssh_cmd = f'ssh root@{host} "bash -lc {shlex.quote(cmd)}"'
19
+ return subprocess.Popen(ssh_cmd, shell=True)
20
+
21
+
22
+ def get_config():
23
+ cli_conf = OmegaConf.from_cli()
24
+ yaml_conf = OmegaConf.load(cli_conf.config)
25
+ return OmegaConf.merge(yaml_conf, cli_conf)
26
+
27
+ def begin_with(file_name: str):
28
+ with open(file_name, "w"):
29
+ pass
30
+
31
+
32
+
33
+ def make_init_bash(cfg) -> str:
34
+ sc = cfg.system
35
+ http_proxy = sc.HTTP_PROXY
36
+ https_proxy = sc.HTTP_PROXY
37
+ hf_home = sc.HF_HOME
38
+ envs_dir = sc.envs_dir
39
+
40
+ lines = []
41
+ lines.append("set -e")
42
+ if http_proxy is not None:
43
+ lines.append(f"echo 'export HTTP_PROXY={http_proxy}' >> ~/.bashrc")
44
+ if https_proxy is not None:
45
+ lines.append(f"echo 'export HTTPS_PROXY={https_proxy}' >> ~/.bashrc")
46
+ if hf_home is not None:
47
+ lines.append(f"echo 'export HF_HOME={hf_home}' >> ~/.bashrc")
48
+ lines.append("")
49
+
50
+ if envs_dir is not None:
51
+ lines.append(f"conda config --append envs_dirs {envs_dir} || true")
52
+ lines.append("")
53
+
54
+ lines.append("echo 'source ~/.bashrc' >> ~/.bash_profile")
55
+ lines.append("")
56
+
57
+ return "\n".join(lines)
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+ if __name__ == "__main__":
67
+
68
+
69
+ def init_node(host: str):
70
+ run_remote(host, INIT_BASH, check=False)
71
+
72
+ def init_hosts(worker_hosts):
73
+ for h in worker_hosts:
74
+ init_node(h)
75
+
76
+
77
+ def env_prefix() -> str:
78
+ return (
79
+ "source ~/.bashrc && "
80
+ f"source activate {env_name} && "
81
+ )
82
+
83
+
84
+ def sample(worker_hosts, epoch, cfg, type, model_base, block_size = None, top_k = None, remasking_strategy = None):
85
+ project = cfg.experiment.project
86
+ procs = []
87
+ if model_base == "dream":
88
+ script_name = "dream_rl_rollout.py"
89
+ elif model_base == "llada" or model_base == "mmada":
90
+ script_name = "llada_rl_rollout.py"
91
+ elif model_base == "sdar":
92
+ script_name = "sdar_rl_rollout.py"
93
+ elif model_base == "trado":
94
+ script_name = "trado_rl_rollout.py"
95
+ for idx, host in enumerate(worker_hosts):
96
+ body = (
97
+ f"cd {BASE_DIR}/sample && "
98
+ f"python {script_name} "
99
+ f"config=../configs/{project}.yaml "
100
+ f"experiment.current_epoch={epoch} "
101
+ f"experiment.function={type} "
102
+ f"evaluation.top_k={top_k} "
103
+ f"evaluation.remasking_strategy={remasking_strategy} "
104
+ f"evaluation.block_size={block_size} "
105
+ f"experiment.node_index={idx}"
106
+ )
107
+ full_cmd = env_prefix() + body
108
+ if idx == 0:
109
+ procs.append(run_local_async(full_cmd))
110
+ else:
111
+ procs.append(run_remote_async(host, full_cmd))
112
+ for p in procs:
113
+ p.wait()
114
+
115
+
116
+ def execute(worker_hosts, epoch, cfg, type):
117
+ project = cfg.experiment.project
118
+ procs = []
119
+ for idx, host in enumerate(worker_hosts):
120
+ full_cmd = env_prefix() + (
121
+ f"cd {BASE_DIR}/reward && "
122
+ f"python rl_execute.py "
123
+ f"config=../configs/{project}.yaml "
124
+ f"experiment.function={type} "
125
+ f"experiment.current_epoch={epoch} "
126
+ f"experiment.node_index={idx}"
127
+ )
128
+ if idx == 0:
129
+ procs.append(run_local_async(full_cmd))
130
+ else:
131
+ procs.append(run_remote_async(host, full_cmd))
132
+ for p in procs:
133
+ p.wait()
134
+
135
+
136
+ def aggregate(epoch, cfg, type):
137
+ project = cfg.experiment.project
138
+ full_cmd = env_prefix() + (
139
+ f"cd {BASE_DIR}/reward && "
140
+ f"python rl_aggregate_data.py "
141
+ f"config=../configs/{project}.yaml "
142
+ f"experiment.function={type} "
143
+ f"experiment.current_epoch={epoch}"
144
+ )
145
+ run_local(full_cmd)
146
+
147
+
148
+ def reward(epoch, cfg, type, is_code_task, block_size = None, top_k = None, remasking_strategy = None):
149
+ project = cfg.experiment.project
150
+ if is_code_task:
151
+ script_name = "rl_code_reward.py"
152
+ else:
153
+ script_name = "rl_reward.py"
154
+ full_cmd = env_prefix() + (
155
+ f"cd {BASE_DIR}/reward && "
156
+ f"python {script_name} "
157
+ f"config=../configs/{project}.yaml "
158
+ f"experiment.function={type} "
159
+ f"evaluation.block_size={block_size} "
160
+ f"evaluation.top_k={top_k} "
161
+ f"evaluation.remasking_strategy={remasking_strategy} "
162
+ f"experiment.current_epoch={epoch}"
163
+ )
164
+ run_local(full_cmd)
165
+
166
+
167
+ def train(worker_hosts, epoch, cfg, model_base, target = None):
168
+ project = cfg.experiment.project
169
+ ds_file = cfg.experiment.deepspeed_file
170
+ num_nodes = len(worker_hosts)
171
+ master_ip = os.environ["MLP_WORKER_0_HOST"]
172
+ master_port = os.environ["MLP_WORKER_0_PORT"]
173
+ if target is None:
174
+ if model_base == "dream":
175
+ script_name = "rl_dream.py"
176
+ elif model_base == "llada":
177
+ script_name = "rl_llada.py"
178
+ elif model_base == "mmada":
179
+ script_name = "rl_mmada.py"
180
+ elif model_base == "sdar":
181
+ script_name = "rl_sdar.py"
182
+ elif model_base == "trado":
183
+ script_name = "rl_trado.py"
184
+ elif target == "policy":
185
+ if model_base == "sdar":
186
+ script_name = "train_sdar_policy.py"
187
+ elif model_base == "trado":
188
+ script_name = "train_trado_policy.py"
189
+ elif target == "value":
190
+ if model_base == "sdar":
191
+ script_name = "train_sdar_value.py"
192
+ elif model_base == "trado":
193
+ script_name = "train_trado_value.py"
194
+ procs = []
195
+ for idx, host in enumerate(worker_hosts):
196
+ body = (
197
+ f"cd {BASE_DIR} && "
198
+ "export DS_SKIP_CUDA_CHECK=1 && "
199
+ "accelerate launch "
200
+ f"--num_machines {num_nodes} "
201
+ f"--machine_rank {idx} "
202
+ f"--main_process_ip {master_ip} "
203
+ f"--main_process_port {master_port} "
204
+ f"--config_file accelerate_configs/{ds_file}.yaml "
205
+ f"train/{script_name} "
206
+ f"config=configs/{project}.yaml "
207
+ f"experiment.current_epoch={epoch}"
208
+ )
209
+ full_cmd = env_prefix() + body
210
+ if idx == 0:
211
+ procs.append(run_local_async(full_cmd))
212
+ else:
213
+ procs.append(run_remote_async(host, full_cmd))
214
+ print(f"[DISPATCH] train node {idx} → {host}")
215
+ for p in procs:
216
+ p.wait()
217
+ print("All train nodes finished.")
218
+
219
+
220
+
221
+
222
+
223
+
224
+ def process_reward(worker_hosts, epoch, cfg):
225
+ project = cfg.experiment.project
226
+
227
+ # --- Step A: node0 preprocess ---
228
+ cmd_div = (
229
+ env_prefix() +
230
+ f"cd {BASE_DIR}/reward && "
231
+ f"python rl_process_divide_data.py "
232
+ f"config=../configs/{project}.yaml "
233
+ f"experiment.current_epoch={epoch}"
234
+ )
235
+ run_local(cmd_div)
236
+ print("[OK] rl_process_divide_data.py (node0) done.")
237
+
238
+ # --- Step B: multinode LLM rewarding ---
239
+ procs = []
240
+ for idx, host in enumerate(worker_hosts):
241
+ cmd_llm = (
242
+ env_prefix() +
243
+ f"cd {BASE_DIR}/sample && "
244
+ f"python llm_process_reward.py "
245
+ f"config=../configs/{project}.yaml "
246
+ f"experiment.current_epoch={epoch} "
247
+ f"experiment.node_index={idx}"
248
+ )
249
+ if idx == 0:
250
+ procs.append(run_local_async(cmd_llm))
251
+ else:
252
+ procs.append(run_remote_async(host, cmd_llm))
253
+ print(f"[DISPATCH] llm_process_reward node {idx} → {host}")
254
+ for p in procs:
255
+ p.wait()
256
+ print("[OK] llm_process_reward.py (all nodes) done.")
257
+
258
+ # --- Step C: node0 aggregate ---
259
+ aggregate(epoch, cfg, "train")
260
+ print("[OK] aggregation done.")
261
+
262
+ # --- Step D: node0 final process ---
263
+ cmd_fin = (
264
+ env_prefix() +
265
+ f"cd {BASE_DIR}/reward && "
266
+ f"python rl_process_reward.py "
267
+ f"config=../configs/{project}.yaml "
268
+ f"experiment.current_epoch={epoch}"
269
+ )
270
+ run_local(cmd_fin)
271
+ print("[OK] rl_process_reward.py (node0) done.")
272
+
273
+
274
+ def init_value_model(epoch, cfg):
275
+ project = cfg.experiment.project
276
+ full_cmd = env_prefix() + (
277
+ f"cd {BASE_DIR}/train && "
278
+ f"python init_sdar_value_model.py "
279
+ f"config=../configs/{project}.yaml "
280
+ f"experiment.current_epoch={epoch}"
281
+ )
282
+ run_local(full_cmd)
283
+
284
+
285
+ cfg = get_config()
286
+ INIT_BASH = make_init_bash(cfg)
287
+ BASE_DIR = cfg.system.base_dir
288
+ env_name = cfg.system.env_name
289
+ total_step = cfg.experiment.total_step
290
+ project = cfg.experiment.project
291
+ num_node = cfg.experiment.num_node
292
+ worker_hosts = [os.environ[f"MLP_WORKER_{i}_HOST"] for i in range(num_node)]
293
+
294
+ from omegaconf import MISSING
295
+ if OmegaConf.select(cfg, "model.value_base_model", default=MISSING) is not MISSING:
296
+ have_value_model = True
297
+ else:
298
+ have_value_model = False
299
+
300
+ import time
301
+ time.sleep(30)
302
+
303
+ init_hosts(worker_hosts)
304
+
305
+ import time
306
+ time.sleep(10)
307
+
308
+ if cfg.experiment.start_from_scratch:
309
+ os.makedirs(f"{project}/results", exist_ok=True)
310
+ optimized = f"../{project}/ckpt/{cfg.model.optimized_name}"
311
+ path = (
312
+ f"{project}/results/results-rl-"
313
+ f"{optimized.replace('/', '.')}-"
314
+ f"{cfg.dataset.train_dataset}.txt"
315
+ )
316
+ begin_with(path)
317
+ path = (
318
+ f"{project}/results/results-eval-"
319
+ f"{optimized.replace('/', '.')}-"
320
+ f"{cfg.evaluation.eval_dataset}.txt"
321
+ )
322
+ begin_with(path)
323
+ if have_value_model:
324
+ init_value_model(1, cfg)
325
+ optimized_value = f"../{project}/ckpt/{cfg.model.optimized_value_name}"
326
+ path = (
327
+ f"{project}/results/results-rl-"
328
+ f"{optimized_value.replace('/', '.')}-"
329
+ f"{cfg.dataset.train_dataset}.txt"
330
+ )
331
+ begin_with(path)
332
+
333
+
334
+ epoch = cfg.experiment.current_epoch
335
+
336
+ model_base = cfg.model.model_base
337
+ if cfg.dataset.data_type == "code":
338
+ is_code_task = True
339
+ else:
340
+ is_code_task = False
341
+
342
+ if OmegaConf.select(cfg, "model.process_reward_model", default=MISSING) is not MISSING and cfg.model.process_reward_model is not None:
343
+ is_process_reward = True
344
+ else:
345
+ is_process_reward = False
346
+
347
+ while epoch <= total_step:
348
+ print(f"\n========== epoch {epoch} ==========")
349
+
350
+
351
+ sample(worker_hosts, epoch, cfg, "train", model_base)
352
+ if is_code_task:
353
+ execute(worker_hosts, epoch, cfg, "train")
354
+ aggregate(epoch, cfg, "train")
355
+
356
+ if is_process_reward:
357
+ process_reward(worker_hosts, epoch, cfg)
358
+ else:
359
+ reward(epoch, cfg, "train", is_code_task)
360
+
361
+ if have_value_model:
362
+ train(worker_hosts, epoch, cfg, model_base, target = "value")
363
+ train(worker_hosts, epoch, cfg, model_base, target = "policy")
364
+ else:
365
+ train(worker_hosts, epoch, cfg, model_base, target = None)
366
+
367
+ if epoch % cfg.experiment.eval_every == 0:
368
+ if model_base in ["sdar", "trado"]:
369
+ remasking_strategy_list = cfg.evaluation.remasking_strategy
370
+ top_k_list = cfg.evaluation.top_k
371
+ block_size = cfg.evaluation.block_size
372
+ for j in range(len(remasking_strategy_list)):
373
+ remasking_strategy = remasking_strategy_list[j]
374
+ top_k = top_k_list[j]
375
+ sample(worker_hosts, epoch, cfg, "evaluation", model_base, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
376
+ if is_code_task:
377
+ execute(worker_hosts, epoch, cfg, "evaluation")
378
+ aggregate(epoch, cfg, "evaluation")
379
+ reward(epoch, cfg, "evaluation", is_code_task, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
380
+ else:
381
+ block_size_list = cfg.evaluation.block_size
382
+ remasking_strategy_list = cfg.evaluation.remasking_strategy
383
+ if OmegaConf.select(cfg, "evaluation.top_k", default=MISSING) is not MISSING:
384
+ top_k = cfg.evaluation.top_k
385
+ else:
386
+ top_k = None
387
+ for j in range(len(remasking_strategy_list)):
388
+ remasking_strategy = remasking_strategy_list[j]
389
+ if model_base == "dream":
390
+ block_size = block_size_list[j]
391
+ elif model_base == "llada" or model_base == "mmada":
392
+ block_size = cfg.evaluation.block_size
393
+ sample(worker_hosts, epoch, cfg, "evaluation", model_base, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
394
+ if is_code_task:
395
+ execute(worker_hosts, epoch, cfg, "evaluation")
396
+ aggregate(epoch, cfg, "evaluation")
397
+ reward(epoch, cfg, "evaluation", is_code_task, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
398
+
399
+ epoch += 1
multinode_rl_v.py ADDED
@@ -0,0 +1,416 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import subprocess
3
+ import shlex
4
+ from omegaconf import DictConfig, ListConfig, OmegaConf
5
+
6
+
7
+ def run_local(cmd: str, check: bool = True) -> None:
8
+ subprocess.run(f"bash -lc {shlex.quote(cmd)}", shell=True, check=check)
9
+
10
+ def run_local_async(cmd: str) -> subprocess.Popen:
11
+ return subprocess.Popen(f"bash -lc {shlex.quote(cmd)}", shell=True)
12
+
13
+ def run_remote(host: str, cmd: str, check: bool = True) -> None:
14
+ ssh_cmd = f'ssh root@{host} "bash -lc {shlex.quote(cmd)}"'
15
+ subprocess.run(ssh_cmd, shell=True, check=check)
16
+
17
+ def run_remote_async(host: str, cmd: str) -> subprocess.Popen:
18
+ ssh_cmd = f'ssh root@{host} "bash -lc {shlex.quote(cmd)}"'
19
+ return subprocess.Popen(ssh_cmd, shell=True)
20
+
21
+
22
+ def get_config():
23
+ cli_conf = OmegaConf.from_cli()
24
+ yaml_conf = OmegaConf.load(cli_conf.config)
25
+ return OmegaConf.merge(yaml_conf, cli_conf)
26
+
27
+ def begin_with(file_name: str):
28
+ with open(file_name, "w"):
29
+ pass
30
+
31
+
32
+
33
+ def make_init_bash(cfg) -> str:
34
+ sc = cfg.system
35
+ http_proxy = sc.HTTP_PROXY
36
+ https_proxy = sc.HTTP_PROXY
37
+ hf_home = sc.HF_HOME
38
+ envs_dir = sc.envs_dir
39
+
40
+ lines = []
41
+ lines.append("set -e")
42
+ if http_proxy is not None:
43
+ lines.append(f"echo 'export HTTP_PROXY={http_proxy}' >> ~/.bashrc")
44
+ if https_proxy is not None:
45
+ lines.append(f"echo 'export HTTPS_PROXY={https_proxy}' >> ~/.bashrc")
46
+ if hf_home is not None:
47
+ lines.append(f"echo 'export HF_HOME={hf_home}' >> ~/.bashrc")
48
+ lines.append("")
49
+
50
+ if envs_dir is not None:
51
+ lines.append(f"conda config --append envs_dirs {envs_dir} || true")
52
+ lines.append("")
53
+
54
+ lines.append("echo 'source ~/.bashrc' >> ~/.bash_profile")
55
+ lines.append("")
56
+
57
+ return "\n".join(lines)
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+ if __name__ == "__main__":
67
+
68
+
69
+ def init_node(host: str):
70
+ run_remote(host, INIT_BASH, check=False)
71
+
72
+ def init_hosts(worker_hosts):
73
+ for h in worker_hosts:
74
+ init_node(h)
75
+
76
+
77
+ def env_prefix(env) -> str:
78
+ return (
79
+ "source ~/.bashrc && "
80
+ f"source activate {env} && "
81
+ )
82
+
83
+
84
+ def sample(worker_hosts, epoch, cfg, type, model_base, block_size = None, top_k = None, remasking_strategy = None):
85
+ project = cfg.experiment.project
86
+ procs = []
87
+ if model_base == "dream":
88
+ script_name = "dream_rl_rollout.py"
89
+ elif model_base == "llada" or model_base == "mmada":
90
+ script_name = "mmada_v_rl_rollout.py"
91
+ elif model_base == "lladav":
92
+ script_name = "lladav_rl_rollout.py"
93
+ elif model_base == "sdar":
94
+ script_name = "sdar_rl_rollout.py"
95
+ elif model_base == "trado":
96
+ script_name = "trado_rl_rollout.py"
97
+ for idx, host in enumerate(worker_hosts):
98
+ body = (
99
+ f"cd {BASE_DIR}/sample && "
100
+ f"python {script_name} "
101
+ f"config=../configs/{project}.yaml "
102
+ f"experiment.current_epoch={epoch} "
103
+ f"experiment.function={type} "
104
+ f"evaluation.top_k={top_k} "
105
+ f"evaluation.remasking_strategy={remasking_strategy} "
106
+ f"evaluation.block_size={block_size} "
107
+ f"experiment.node_index={idx}"
108
+ )
109
+ full_cmd = env_prefix(env_name) + body
110
+ if idx == 0:
111
+ procs.append(run_local_async(full_cmd))
112
+ else:
113
+ procs.append(run_remote_async(host, full_cmd))
114
+ for p in procs:
115
+ p.wait()
116
+
117
+
118
+ def execute(worker_hosts, epoch, cfg, type):
119
+ project = cfg.experiment.project
120
+ procs = []
121
+ for idx, host in enumerate(worker_hosts):
122
+ full_cmd = env_prefix(env_name) + (
123
+ f"cd {BASE_DIR}/reward && "
124
+ f"python rl_execute.py "
125
+ f"config=../configs/{project}.yaml "
126
+ f"experiment.function={type} "
127
+ f"experiment.current_epoch={epoch} "
128
+ f"experiment.node_index={idx}"
129
+ )
130
+ if idx == 0:
131
+ procs.append(run_local_async(full_cmd))
132
+ else:
133
+ procs.append(run_remote_async(host, full_cmd))
134
+ for p in procs:
135
+ p.wait()
136
+
137
+
138
+ def aggregate(epoch, cfg, type):
139
+ project = cfg.experiment.project
140
+ full_cmd = env_prefix(env_name) + (
141
+ f"cd {BASE_DIR}/reward && "
142
+ f"python rl_aggregate_data_v.py "
143
+ f"config=../configs/{project}.yaml "
144
+ f"experiment.function={type} "
145
+ f"experiment.current_epoch={epoch}"
146
+ )
147
+ run_local(full_cmd)
148
+
149
+
150
+ def reward(epoch, cfg, type, is_code_task, block_size = None, top_k = None, remasking_strategy = None):
151
+ project = cfg.experiment.project
152
+ if is_code_task:
153
+ script_name = "rl_code_reward.py"
154
+ else:
155
+ script_name = "rl_reward_v.py"
156
+ full_cmd = env_prefix(env_name) + (
157
+ f"cd {BASE_DIR}/reward && "
158
+ f"python {script_name} "
159
+ f"config=../configs/{project}.yaml "
160
+ f"experiment.function={type} "
161
+ f"evaluation.block_size={block_size} "
162
+ f"evaluation.top_k={top_k} "
163
+ f"evaluation.remasking_strategy={remasking_strategy} "
164
+ f"experiment.current_epoch={epoch}"
165
+ )
166
+ run_local(full_cmd)
167
+
168
+
169
+ def train(worker_hosts, epoch, cfg, model_base, target = None):
170
+ project = cfg.experiment.project
171
+ ds_file = cfg.experiment.deepspeed_file
172
+ num_nodes = len(worker_hosts)
173
+ master_ip = os.environ["MLP_WORKER_0_HOST"]
174
+ master_port = os.environ["MLP_WORKER_0_PORT"]
175
+ if target is None:
176
+ if model_base == "dream":
177
+ script_name = "rl_dream.py"
178
+ elif model_base == "llada":
179
+ script_name = "rl_llada.py"
180
+ elif model_base == "mmada":
181
+ script_name = "rl_mmada_v.py"
182
+ elif model_base == "lladav":
183
+ script_name = "rl_lladav.py"
184
+ elif model_base == "sdar":
185
+ script_name = "rl_sdar.py"
186
+ elif model_base == "trado":
187
+ script_name = "rl_trado.py"
188
+ elif target == "policy":
189
+ if model_base == "sdar":
190
+ script_name = "train_sdar_policy.py"
191
+ elif model_base == "trado":
192
+ script_name = "train_trado_policy.py"
193
+ elif model_base == "mmada":
194
+ script_name = "train_mmada_v_policy.py"
195
+ elif model_base == "lladav":
196
+ script_name = "train_lladav_policy.py"
197
+ elif target == "value":
198
+ if model_base == "sdar":
199
+ script_name = "train_sdar_value.py"
200
+ elif model_base == "trado":
201
+ script_name = "train_trado_value.py"
202
+ elif model_base == "mmada":
203
+ script_name = "train_mmada_v_value.py"
204
+ elif model_base == "lladav":
205
+ script_name = "train_lladav_value.py"
206
+ procs = []
207
+ for idx, host in enumerate(worker_hosts):
208
+ body = (
209
+ f"cd {BASE_DIR} && "
210
+ "export DS_SKIP_CUDA_CHECK=1 && "
211
+ "accelerate launch "
212
+ f"--num_machines {num_nodes} "
213
+ f"--machine_rank {idx} "
214
+ f"--main_process_ip {master_ip} "
215
+ f"--main_process_port {master_port} "
216
+ f"--config_file accelerate_configs/{ds_file}.yaml "
217
+ f"train/{script_name} "
218
+ f"config=configs/{project}.yaml "
219
+ f"experiment.current_epoch={epoch}"
220
+ )
221
+ full_cmd = env_prefix(env_name) + body
222
+ if idx == 0:
223
+ procs.append(run_local_async(full_cmd))
224
+ else:
225
+ procs.append(run_remote_async(host, full_cmd))
226
+ print(f"[DISPATCH] train node {idx} → {host}")
227
+ for p in procs:
228
+ p.wait()
229
+ print("All train nodes finished.")
230
+
231
+
232
+
233
+ def init_value_model(epoch, model_base, cfg):
234
+ project = cfg.experiment.project
235
+ if model_base == "sdar":
236
+ script_name = "init_sdar_value_model.py"
237
+ elif model_base == "trado":
238
+ script_name = "init_trado_value_model.py"
239
+ elif model_base == "mmada":
240
+ script_name = "init_mmada_v_value_model.py"
241
+ elif model_base == "lladav":
242
+ script_name = "init_lladav_value_model.py"
243
+ full_cmd = env_prefix(env_name) + (
244
+ f"cd {BASE_DIR}/train && "
245
+ f"python {script_name} "
246
+ f"config=../configs/{project}.yaml "
247
+ f"experiment.current_epoch={epoch}"
248
+ )
249
+ run_local(full_cmd)
250
+
251
+ def process_reward(worker_hosts, epoch, cfg):
252
+ project = cfg.experiment.project
253
+
254
+ # --- Step A: node0 preprocess ---
255
+ cmd_div = (
256
+ env_prefix(env_name) +
257
+ f"cd {BASE_DIR}/reward && "
258
+ f"python rl_vprocess_divide_data.py "
259
+ f"config=../configs/{project}.yaml "
260
+ f"experiment.current_epoch={epoch}"
261
+ )
262
+ run_local(cmd_div)
263
+ print("[OK] rl_process_divide_data.py (node0) done.")
264
+
265
+ # --- Step B: multinode LLM rewarding ---
266
+ procs = []
267
+ for idx, host in enumerate(worker_hosts):
268
+ cmd_llm = (
269
+ env_prefix(reward_env_name) +
270
+ f"cd {BASE_DIR}/sample && "
271
+ f"python vlm_process_reward.py "
272
+ f"config=../configs/{project}.yaml "
273
+ f"experiment.current_epoch={epoch} "
274
+ f"experiment.node_index={idx}"
275
+ )
276
+ if idx == 0:
277
+ procs.append(run_local_async(cmd_llm))
278
+ else:
279
+ procs.append(run_remote_async(host, cmd_llm))
280
+ print(f"[DISPATCH] llm_process_reward node {idx} → {host}")
281
+ for p in procs:
282
+ p.wait()
283
+ print("[OK] llm_process_reward.py (all nodes) done.")
284
+
285
+ # --- Step C: node0 aggregate ---
286
+ aggregate(epoch, cfg, "train")
287
+ print("[OK] aggregation done.")
288
+
289
+ # --- Step D: node0 final process ---
290
+ cmd_fin = (
291
+ env_prefix(reward_env_name) +
292
+ f"cd {BASE_DIR}/reward && "
293
+ f"python rl_vprocess_reward.py "
294
+ f"config=../configs/{project}.yaml "
295
+ f"experiment.current_epoch={epoch}"
296
+ )
297
+ run_local(cmd_fin)
298
+ print("[OK] rl_process_reward.py (node0) done.")
299
+
300
+ from omegaconf import MISSING
301
+
302
+ cfg = get_config()
303
+ INIT_BASH = make_init_bash(cfg)
304
+ BASE_DIR = cfg.system.base_dir
305
+ env_name = cfg.system.env_name
306
+ if OmegaConf.select(cfg, "system.reward_env_name", default=MISSING) is not MISSING:
307
+ reward_env_name = cfg.system.reward_env_name
308
+ total_step = cfg.experiment.total_step
309
+ project = cfg.experiment.project
310
+ num_node = cfg.experiment.num_node
311
+ worker_hosts = [os.environ[f"MLP_WORKER_{i}_HOST"] for i in range(num_node)]
312
+
313
+
314
+ if OmegaConf.select(cfg, "model.value_base_model", default=MISSING) is not MISSING:
315
+ have_value_model = True
316
+ else:
317
+ have_value_model = False
318
+
319
+ import time
320
+ time.sleep(30)
321
+
322
+ init_hosts(worker_hosts)
323
+
324
+ import time
325
+ time.sleep(10)
326
+
327
+ model_base = cfg.model.model_base
328
+
329
+ if cfg.experiment.start_from_scratch:
330
+ os.makedirs(f"{project}/results", exist_ok=True)
331
+ optimized = f"../{project}/ckpt/{cfg.model.optimized_name}"
332
+ path = (
333
+ f"{project}/results/results-rl-"
334
+ f"{optimized.replace('/', '.')}-"
335
+ f"{cfg.dataset.train_dataset}.txt"
336
+ )
337
+ begin_with(path)
338
+ path = (
339
+ f"{project}/results/results-eval-"
340
+ f"{optimized.replace('/', '.')}-"
341
+ f"{cfg.evaluation.eval_dataset}.txt"
342
+ )
343
+ begin_with(path)
344
+ if have_value_model:
345
+ init_value_model(1, model_base, cfg)
346
+ optimized_value = f"../{project}/ckpt/{cfg.model.optimized_value_name}"
347
+ path = (
348
+ f"{project}/results/results-rl-"
349
+ f"{optimized_value.replace('/', '.')}-"
350
+ f"{cfg.dataset.train_dataset}.txt"
351
+ )
352
+ begin_with(path)
353
+
354
+
355
+ epoch = cfg.experiment.current_epoch
356
+
357
+ if OmegaConf.select(cfg, "model.process_reward_model", default=MISSING) is not MISSING and cfg.model.process_reward_model is not None:
358
+ is_process_reward = True
359
+ else:
360
+ is_process_reward = False
361
+
362
+ if cfg.dataset.data_type == "code":
363
+ is_code_task = True
364
+ else:
365
+ is_code_task = False
366
+
367
+ while epoch <= total_step:
368
+ print(f"\n========== epoch {epoch} ==========")
369
+
370
+
371
+ sample(worker_hosts, epoch, cfg, "train", model_base)
372
+ if is_code_task:
373
+ execute(worker_hosts, epoch, cfg, "train")
374
+ aggregate(epoch, cfg, "train")
375
+
376
+ if is_process_reward:
377
+ process_reward(worker_hosts, epoch, cfg)
378
+ else:
379
+ reward(epoch, cfg, "train", is_code_task)
380
+
381
+ if have_value_model:
382
+ train(worker_hosts, epoch, cfg, model_base, target = "value")
383
+ train(worker_hosts, epoch, cfg, model_base, target = "policy")
384
+ else:
385
+ train(worker_hosts, epoch, cfg, model_base, target = None)
386
+
387
+ if cfg.evaluation.if_eval:
388
+ if epoch % cfg.experiment.eval_every == 0:
389
+ if model_base in ["sdar", "trado"]:
390
+ remasking_strategy_list = cfg.evaluation.remasking_strategy
391
+ top_k_list = cfg.evaluation.top_k
392
+ block_size = cfg.evaluation.block_size
393
+ for j in range(len(remasking_strategy_list)):
394
+ remasking_strategy = remasking_strategy_list[j]
395
+ top_k = top_k_list[j]
396
+ sample(worker_hosts, epoch, cfg, "evaluation", model_base, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
397
+ if is_code_task:
398
+ execute(worker_hosts, epoch, cfg, "evaluation")
399
+ aggregate(epoch, cfg, "evaluation")
400
+ reward(epoch, cfg, "evaluation", is_code_task, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
401
+ else:
402
+ block_size = cfg.evaluation.block_size
403
+ remasking_strategy_list = cfg.evaluation.remasking_strategy
404
+ if OmegaConf.select(cfg, "evaluation.top_k", default=MISSING) is not MISSING:
405
+ top_k = cfg.evaluation.top_k
406
+ else:
407
+ top_k = None
408
+ for j in range(len(remasking_strategy_list)):
409
+ remasking_strategy = remasking_strategy_list[j]
410
+ sample(worker_hosts, epoch, cfg, "evaluation", model_base, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
411
+ if is_code_task:
412
+ execute(worker_hosts, epoch, cfg, "evaluation")
413
+ aggregate(epoch, cfg, "evaluation")
414
+ reward(epoch, cfg, "evaluation", is_code_task, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
415
+
416
+ epoch += 1
requirements.txt ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ torch==2.6.0
2
+ torchvision==0.21.0
3
+ transformers==4.52.4
4
+ accelerate
5
+ deepspeed
6
+ datasets
7
+ evaluate
8
+ peft
9
+ safetensors
10
+
11
+ flashinfer-python>=0.2.12
12
+ xformers
13
+ triton>=3.0.0
14
+
15
+ tqdm
16
+ numpy
17
+ scipy
18
+ pandas
19
+ scikit-learn
20
+ sentencepiece
21
+ huggingface-hub
22
+ omegaconf
23
+ liger_kernel
24
+ termcolor
25
+ asyncio
26
+ nest_asyncio
27
+ ipykernel
28
+ math_verify
29
+
30
+
31
+ wandb
32
+ tensorboard
rl.py ADDED
@@ -0,0 +1,213 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import subprocess
4
+ from termcolor import cprint
5
+
6
+ from omegaconf import DictConfig, ListConfig, OmegaConf
7
+ def get_config():
8
+ cli_conf = OmegaConf.from_cli()
9
+ yaml_conf = OmegaConf.load(cli_conf.config)
10
+ conf = OmegaConf.merge(yaml_conf, cli_conf)
11
+ return conf
12
+
13
+ if __name__ == "__main__":
14
+ config = get_config()
15
+
16
+ start_from_scratch = config.experiment.start_from_scratch
17
+ project_name = config.experiment.project
18
+ model_base = config.model.model_base
19
+
20
+ from omegaconf import MISSING
21
+ if OmegaConf.select(config, "model.value_base_model", default=MISSING) is not MISSING:
22
+ have_value_model = True
23
+ else:
24
+ have_value_model = False
25
+
26
+ def begin_with(file_name):
27
+ with open(file_name, "w") as f:
28
+ f.write("")
29
+
30
+ def init_value_model(i, cfg):
31
+ project_name = cfg.experiment.project
32
+ subprocess.run(
33
+ f'python init_sdar_value_model.py '
34
+ f'config=../configs/{project_name}.yaml '
35
+ f'experiment.current_epoch={i} ',
36
+ shell=True,
37
+ cwd='train',
38
+ check=True,
39
+ )
40
+
41
+ if start_from_scratch:
42
+ os.makedirs(f"{project_name}/results", exist_ok=True)
43
+ optimized_model = "../" + project_name + "/ckpt/" + config.model.optimized_name
44
+ begin_with(f"{project_name}/results/results-rl-" + optimized_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
45
+ begin_with(f"{project_name}/results/results-eval-" + optimized_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
46
+ if have_value_model:
47
+ init_value_model(1, config)
48
+ optimized_value_model = "../" + project_name + "/ckpt/" + config.model.optimized_value_name
49
+ begin_with(f"{project_name}/results/results-rl-" + optimized_value_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
50
+
51
+ def sample(i, type, block_size = None, top_k = None, remasking_strategy = None):
52
+ if model_base == "dream":
53
+ script_name = "dream_rl_rollout.py"
54
+ elif model_base == "llada" or model_base == "mmada":
55
+ script_name = "llada_rl_rollout.py"
56
+ elif model_base == "sdar":
57
+ script_name = "sdar_rl_rollout.py"
58
+ elif model_base == "trado":
59
+ script_name = "trado_rl_rollout.py"
60
+ subprocess.run(
61
+ f'python {script_name} '
62
+ f'config=../configs/{project_name}.yaml '
63
+ f"experiment.function={type} "
64
+ f"evaluation.block_size={block_size} "
65
+ f"evaluation.top_k={top_k} "
66
+ f"evaluation.remasking_strategy={remasking_strategy} "
67
+ f'experiment.current_epoch={i} ',
68
+ shell=True,
69
+ cwd='sample',
70
+ check=True,
71
+ )
72
+
73
+ def reward(i, type, is_code_task, block_size = None, top_k = None, remasking_strategy = None):
74
+ if is_code_task:
75
+ script_name = "rl_code_reward.py"
76
+ else:
77
+ script_name = "rl_reward.py"
78
+ subprocess.run(
79
+ f'python {script_name} '
80
+ f'config=../configs/{project_name}.yaml '
81
+ f"experiment.function={type} "
82
+ f"evaluation.block_size={block_size} "
83
+ f"evaluation.top_k={top_k} "
84
+ f"evaluation.remasking_strategy={remasking_strategy} "
85
+ f'experiment.current_epoch={i} ',
86
+ shell=True,
87
+ cwd='reward',
88
+ check=True,
89
+ )
90
+
91
+
92
+ def process_reward(i):
93
+ cfg_i = f"config=../configs/{project_name}.yaml"
94
+ ep = f"experiment.current_epoch={i}"
95
+
96
+ base = ["conda", "run", "-n", "CURE2", "--no-capture-output", "python", "-u"]
97
+
98
+ subprocess.run(base + ["rl_process_divide_data.py", cfg_i, ep], cwd="reward", check=True)
99
+ subprocess.run(base + ["llm_process_reward.py", cfg_i, ep], cwd="sample", check=True)
100
+ subprocess.run(base + ["rl_process_reward.py", cfg_i, ep], cwd="reward", check=True)
101
+
102
+ def execute(i, type):
103
+ subprocess.run(
104
+ f"python rl_execute.py "
105
+ f"config=../configs/{project_name}.yaml "
106
+ f"experiment.function={type} "
107
+ f"experiment.current_epoch={i} ",
108
+ shell=True,
109
+ cwd='reward',
110
+ check=True,
111
+ )
112
+
113
+
114
+ def train(i, target = None):
115
+ if target is None:
116
+ if model_base == "dream":
117
+ script_name = "rl_dream.py"
118
+ elif model_base == "llada":
119
+ script_name = "rl_llada.py"
120
+ elif model_base == "mmada":
121
+ script_name = "rl_mmada.py"
122
+ elif model_base == "sdar":
123
+ script_name = "rl_sdar.py"
124
+ elif model_base == "trado":
125
+ script_name = "rl_trado.py"
126
+ elif target == "policy":
127
+ if model_base == "sdar":
128
+ script_name = "train_sdar_policy.py"
129
+ elif model_base == "trado":
130
+ script_name = "train_trado_policy.py"
131
+ elif target == "value":
132
+ if model_base == "sdar":
133
+ script_name = "train_sdar_value.py"
134
+ elif model_base == "trado":
135
+ script_name = "train_trado_value.py"
136
+ subprocess.run(
137
+ f'accelerate launch '
138
+ f'--num_machines 1 '
139
+ f'--machine_rank 0 '
140
+ f'--main_process_ip 127.0.0.1 '
141
+ f'--main_process_port 8888 '
142
+ f'--config_file accelerate_configs/{config.experiment.deepspeed_file}.yaml '
143
+ f'train/{script_name} '
144
+ f'config=configs/{project_name}.yaml '
145
+ f'experiment.current_epoch={i} ',
146
+ shell=True,
147
+ check=True,
148
+ )
149
+
150
+ if config.dataset.data_type == "code":
151
+ is_code_task = True
152
+ else:
153
+ is_code_task = False
154
+
155
+ if OmegaConf.select(config, "model.process_reward_model", default=MISSING) is not MISSING and config.model.process_reward_model is not None:
156
+ is_process_reward = True
157
+ else:
158
+ is_process_reward = False
159
+
160
+ i = config.experiment.current_epoch
161
+
162
+ while i <= config.experiment.total_step:
163
+
164
+
165
+ sample(i, "train")
166
+ if is_code_task:
167
+ execute(i, "train")
168
+
169
+ if is_process_reward:
170
+ process_reward(i)
171
+ else:
172
+ reward(i, "train", is_code_task)
173
+
174
+ if have_value_model:
175
+ train(i, target = "value")
176
+ train(i, target = "policy")
177
+ else:
178
+ train(i, target = None)
179
+
180
+ if i % config.experiment.eval_every == 0:
181
+ if model_base == "sdar":
182
+ remasking_strategy_list = config.evaluation.remasking_strategy
183
+ top_k_list = config.evaluation.top_k
184
+ block_size = config.evaluation.block_size
185
+ for j in range(len(remasking_strategy_list)):
186
+ remasking_strategy = remasking_strategy_list[j]
187
+ top_k = top_k_list[j]
188
+ sample(i, "evaluation", block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
189
+ if is_code_task:
190
+ execute(i, "evaluation")
191
+ reward(i, "evaluation", is_code_task, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
192
+ else:
193
+ block_size_list = config.evaluation.block_size
194
+ remasking_strategy_list = config.evaluation.remasking_strategy
195
+ if OmegaConf.select(config, "evaluation.top_k", default=MISSING) is not MISSING:
196
+ top_k = config.evaluation.top_k
197
+ else:
198
+ top_k = None
199
+ for j in range(len(remasking_strategy_list)):
200
+ remasking_strategy = remasking_strategy_list[j]
201
+ if model_base == "dream":
202
+ block_size = block_size_list[j]
203
+ elif model_base == "llada" or model_base == "mmada":
204
+ block_size = config.evaluation.block_size
205
+ sample(i, "evaluation", block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
206
+ if is_code_task:
207
+ execute(i, "evaluation")
208
+ reward(i, "evaluation", is_code_task, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
209
+
210
+ i += 1
211
+
212
+
213
+
rl_lavida_revvideo_orig10k_4gpu.nohup.log ADDED
The diff for this file is too large to render. See raw diff
 
rl_lavida_revvideo_orig10k_4gpu.pid ADDED
@@ -0,0 +1 @@
 
 
1
+ 619434
rl_lavida_revvideo_orig10k_4gpu_len128.nohup.log ADDED
The diff for this file is too large to render. See raw diff
 
rl_lavida_revvideo_orig10k_4gpu_len128.pid ADDED
@@ -0,0 +1 @@
 
 
1
+ 698152
rl_lavida_video_reversal.log ADDED
The diff for this file is too large to render. See raw diff
 
rl_lladav_video_reversal_3_23 copy 2.log ADDED
The diff for this file is too large to render. See raw diff
 
rl_lladav_video_reversal_3_23 copy.log ADDED
The diff for this file is too large to render. See raw diff
 
rl_lladav_video_reversal_3_23.log ADDED
The diff for this file is too large to render. See raw diff
 
rl_lladav_video_reversal_rl_3_25.log ADDED
The diff for this file is too large to render. See raw diff
 
rl_lladav_video_reversal_wo_t_reward_4_4.log ADDED
The diff for this file is too large to render. See raw diff
 
rl_llava_next_video_reversal.nohup.log ADDED
The diff for this file is too large to render. See raw diff
 
rl_v.py ADDED
@@ -0,0 +1,282 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import subprocess
4
+ from termcolor import cprint
5
+
6
+ from omegaconf import DictConfig, ListConfig, OmegaConf, MISSING
7
+ def get_config():
8
+ cli_conf = OmegaConf.from_cli()
9
+ yaml_conf = OmegaConf.load(cli_conf.config)
10
+ conf = OmegaConf.merge(yaml_conf, cli_conf)
11
+ return conf
12
+
13
+ if __name__ == "__main__":
14
+
15
+ def env_prefix(env) -> str:
16
+ return (
17
+ "source ~/.bashrc && "
18
+ "source /data8/runqing/miniconda/bin/activate && "
19
+ "conda init && "
20
+ f"conda activate {env} && "
21
+ )
22
+
23
+ config = get_config()
24
+ env_name = config.system.env_name
25
+ if OmegaConf.select(config, "system.reward_env_name", default=MISSING) is not MISSING:
26
+ reward_env_name = config.system.reward_env_name
27
+
28
+ start_from_scratch = config.experiment.start_from_scratch
29
+ project_name = config.experiment.project
30
+ model_base = config.model.model_base
31
+
32
+ from omegaconf import MISSING
33
+ if OmegaConf.select(config, "model.value_base_model", default=MISSING) is not MISSING:
34
+ have_value_model = True
35
+ else:
36
+ have_value_model = False
37
+
38
+ def begin_with(file_name):
39
+ with open(file_name, "w") as f:
40
+ f.write("")
41
+
42
+ def init_value_model(i, model_base, cfg):
43
+ project_name = cfg.experiment.project
44
+ if model_base == "sdar":
45
+ script_name = "init_sdar_value_model.py"
46
+ elif model_base == "trado":
47
+ script_name = "init_trado_value_model.py"
48
+ elif model_base == "mmada":
49
+ script_name = "init_mmada_v_value_model.py"
50
+ elif model_base == "lladav":
51
+ script_name = "init_lladav_value_model.py"
52
+ subprocess.run(
53
+ env_prefix(env_name) +
54
+ f'python {script_name} '
55
+ f'config=../configs/{project_name}.yaml '
56
+ f'experiment.current_epoch={i} ',
57
+ shell=True,
58
+ cwd='train',
59
+ check=True,
60
+ executable='/bin/bash',
61
+ )
62
+
63
+ if start_from_scratch:
64
+ os.makedirs(f"{project_name}/results", exist_ok=True)
65
+ optimized_model = "../" + project_name + "/ckpt/" + config.model.optimized_name
66
+ begin_with(f"{project_name}/results/results-rl-" + optimized_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
67
+ begin_with(f"{project_name}/results/results-eval-" + optimized_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
68
+ if have_value_model:
69
+ init_value_model(1, model_base, config)
70
+ optimized_value_model = "../" + project_name + "/ckpt/" + config.model.optimized_value_name
71
+ begin_with(f"{project_name}/results/results-rl-" + optimized_value_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
72
+
73
+ def sample(i, type, block_size = None, top_k = None, remasking_strategy = None):
74
+ if model_base == "dream":
75
+ script_name = "dream_rl_rollout.py"
76
+ elif model_base == "llada" or model_base == "mmada":
77
+ script_name = "mmada_v_rl_rollout.py"
78
+ elif model_base == "sdar":
79
+ script_name = "sdar_rl_rollout.py"
80
+ elif model_base == "trado":
81
+ script_name = "trado_rl_rollout.py"
82
+ elif model_base == "lladav":
83
+ script_name = "lladav_rl_rollout.py"
84
+ subprocess.run(
85
+ env_prefix(env_name) +
86
+ f'python {script_name} '
87
+ f'config=../configs/{project_name}.yaml '
88
+ f"experiment.function={type} "
89
+ f"evaluation.block_size={block_size} "
90
+ f"evaluation.top_k={top_k} "
91
+ f"evaluation.remasking_strategy={remasking_strategy} "
92
+ f'experiment.current_epoch={i} ',
93
+ shell=True,
94
+ cwd='sample',
95
+ check=True,
96
+ executable='/bin/bash',
97
+ )
98
+
99
+ def reward(i, type, is_code_task, block_size = None, top_k = None, remasking_strategy = None):
100
+ if is_code_task:
101
+ script_name = "rl_code_reward.py"
102
+ else:
103
+ script_name = "rl_reward_v.py"
104
+ subprocess.run(
105
+ env_prefix(env_name) +
106
+ f'python {script_name} '
107
+ f'config=../configs/{project_name}.yaml '
108
+ f"experiment.function={type} "
109
+ f"evaluation.block_size={block_size} "
110
+ f"evaluation.top_k={top_k} "
111
+ f"evaluation.remasking_strategy={remasking_strategy} "
112
+ f'experiment.current_epoch={i} ',
113
+ shell=True,
114
+ cwd='reward',
115
+ check=True,
116
+ executable='/bin/bash',
117
+ )
118
+
119
+ def execute(i, type):
120
+ subprocess.run(
121
+ env_prefix(env_name) +
122
+ f"python rl_execute.py "
123
+ f"config=../configs/{project_name}.yaml "
124
+ f"experiment.function={type} "
125
+ f"experiment.current_epoch={i} ",
126
+ shell=True,
127
+ cwd='reward',
128
+ check=True,
129
+ executable='/bin/bash',
130
+ )
131
+
132
+ def process_reward(i):
133
+ subprocess.run(
134
+ env_prefix(env_name) +
135
+ f'python rl_vprocess_divide_data.py '
136
+ f'config=../configs/{project_name}.yaml '
137
+ f'experiment.current_epoch={i} ',
138
+ shell=True,
139
+ cwd='reward',
140
+ check=True,
141
+ executable='/bin/bash',
142
+ )
143
+ subprocess.run(
144
+ env_prefix(reward_env_name) +
145
+ f'python vlm_process_reward.py '
146
+ f'config=../configs/{project_name}.yaml '
147
+ f'experiment.current_epoch={i} ',
148
+ shell=True,
149
+ cwd='sample',
150
+ check=True,
151
+ executable='/bin/bash',
152
+ )
153
+ subprocess.run(
154
+ env_prefix(reward_env_name) +
155
+ f'python rl_vprocess_reward.py '
156
+ f'config=../configs/{project_name}.yaml '
157
+ f'experiment.current_epoch={i} ',
158
+ shell=True,
159
+ cwd='reward',
160
+ check=True,
161
+ executable='/bin/bash',
162
+ )
163
+
164
+ def train(i, target = None):
165
+ if target is None:
166
+ if model_base == "dream":
167
+ script_name = "rl_dream.py"
168
+ elif model_base == "llada":
169
+ script_name = "rl_llada.py"
170
+ elif model_base == "mmada":
171
+ script_name = "rl_mmada_v.py"
172
+ elif model_base == "sdar":
173
+ script_name = "rl_sdar.py"
174
+ elif model_base == "trado":
175
+ script_name = "rl_trado.py"
176
+ elif model_base == "lladav":
177
+ script_name = "rl_lladav.py"
178
+ elif target == "policy":
179
+ if model_base == "sdar":
180
+ script_name = "train_sdar_policy.py"
181
+ elif model_base == "trado":
182
+ script_name = "train_trado_policy.py"
183
+ elif model_base == "mmada":
184
+ script_name = "train_mmada_v_policy.py"
185
+ elif model_base == "lladav":
186
+ script_name = "train_lladav_policy.py"
187
+ elif target == "value":
188
+ if model_base == "sdar":
189
+ script_name = "train_sdar_value.py"
190
+ elif model_base == "trado":
191
+ script_name = "train_trado_value.py"
192
+ elif model_base == "mmada":
193
+ script_name = "train_mmada_v_value.py"
194
+ elif model_base == "lladav":
195
+ script_name = "train_lladav_value.py"
196
+ subprocess.run(
197
+ env_prefix(env_name) +
198
+ f'accelerate launch '
199
+ f'--num_machines 1 '
200
+ f'--machine_rank 0 '
201
+ f'--main_process_ip 127.0.0.1 '
202
+ f'--main_process_port 8888 '
203
+ f'--config_file accelerate_configs/{config.experiment.deepspeed_file}.yaml '
204
+ f'train/{script_name} '
205
+ f'config=configs/{project_name}.yaml '
206
+ f'experiment.current_epoch={i} ',
207
+ shell=True,
208
+ check=True,
209
+ executable='/bin/bash',
210
+ )
211
+
212
+
213
+
214
+
215
+ if config.dataset.data_type == "code":
216
+ is_code_task = True
217
+ else:
218
+ is_code_task = False
219
+
220
+ if OmegaConf.select(config, "model.process_reward_model", default=MISSING) is not MISSING and config.model.process_reward_model is not None:
221
+ is_process_reward = True
222
+ else:
223
+ is_process_reward = False
224
+
225
+ i = config.experiment.current_epoch
226
+
227
+
228
+ while i <= config.experiment.total_step:
229
+
230
+
231
+ sample(i, "train")
232
+ if is_code_task:
233
+ execute(i, "train")
234
+ reward(i, "train", is_code_task)
235
+
236
+ if is_process_reward:
237
+ process_reward(i)
238
+ else:
239
+ reward(i, "train", is_code_task)
240
+
241
+ if have_value_model:
242
+ train(i, target = "value")
243
+ train(i, target = "policy")
244
+ else:
245
+ train(i, target = None)
246
+
247
+
248
+ if config.evaluation.if_eval:
249
+ if i % config.experiment.eval_every == 0:
250
+ if model_base in ["sdar", "trado"]:
251
+ remasking_strategy_list = config.evaluation.remasking_strategy
252
+ top_k_list = config.evaluation.top_k
253
+ block_size = config.evaluation.block_size
254
+ for j in range(len(remasking_strategy_list)):
255
+ remasking_strategy = remasking_strategy_list[j]
256
+ top_k = top_k_list[j]
257
+ sample(i, "evaluation", block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
258
+ if is_code_task:
259
+ execute(i, "evaluation")
260
+ reward(i, "evaluation", is_code_task, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
261
+ else:
262
+ block_size_list = config.evaluation.block_size
263
+ remasking_strategy_list = config.evaluation.remasking_strategy
264
+ if OmegaConf.select(config, "evaluation.top_k", default=MISSING) is not MISSING:
265
+ top_k = config.evaluation.top_k
266
+ else:
267
+ top_k = None
268
+ for j in range(len(remasking_strategy_list)):
269
+ remasking_strategy = remasking_strategy_list[j]
270
+ if model_base == "dream":
271
+ block_size = block_size_list[j]
272
+ elif model_base == "llada" or model_base == "mmada" or "lladav":
273
+ block_size = config.evaluation.block_size
274
+ sample(i, "evaluation", block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
275
+ if is_code_task:
276
+ execute(i, "evaluation")
277
+ reward(i, "evaluation", is_code_task, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
278
+
279
+ i += 1
280
+
281
+
282
+
rl_v_lavida_video_reversal.py ADDED
@@ -0,0 +1,189 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import subprocess
3
+ from pathlib import Path
4
+
5
+ from omegaconf import OmegaConf, MISSING
6
+ import wandb
7
+
8
+
9
+ def get_config():
10
+ cli_conf = OmegaConf.from_cli()
11
+ yaml_conf = OmegaConf.load(cli_conf.config)
12
+ return OmegaConf.merge(yaml_conf, cli_conf)
13
+
14
+
15
+ def env_prefix(env: str) -> str:
16
+ return (
17
+ "source ~/.bashrc && "
18
+ "source /data8/runqing/miniconda/bin/activate && "
19
+ "conda init && "
20
+ f"conda activate {env} && "
21
+ )
22
+
23
+
24
+ def run_in(cmd: str, cwd: str, env_name: str):
25
+ subprocess.run(
26
+ env_prefix(env_name) + cmd,
27
+ shell=True,
28
+ cwd=cwd,
29
+ check=True,
30
+ executable="/bin/bash",
31
+ )
32
+
33
+
34
+ def get_visible_gpu_count() -> int | None:
35
+ cuda_visible_devices = os.environ.get("CUDA_VISIBLE_DEVICES")
36
+ if not cuda_visible_devices:
37
+ return None
38
+ devices = [d.strip() for d in cuda_visible_devices.split(",") if d.strip()]
39
+ return len(devices) if devices else None
40
+
41
+
42
+ def clear_stale_cpu_adam_lock():
43
+ lock_path = Path("/root/.cache/torch_extensions/py310_cu124/cpu_adam/lock")
44
+ so_path = lock_path.with_name("cpu_adam.so")
45
+ if lock_path.exists() and so_path.exists():
46
+ lock_path.unlink()
47
+
48
+
49
+ if __name__ == "__main__":
50
+ config = get_config()
51
+ if OmegaConf.select(config, "wandb.run_id", default=None) is None:
52
+ config.wandb.run_id = wandb.util.generate_id()
53
+ env_name = config.system.env_name
54
+ reward_env_name = OmegaConf.select(config, "system.reward_env_name", default=env_name)
55
+
56
+ if config.model.model_base != "lavida":
57
+ raise ValueError(f"This launcher is LaViDa-only, but got model_base={config.model.model_base!r}")
58
+
59
+ project_name = config.experiment.project
60
+ start_from_scratch = config.experiment.start_from_scratch
61
+
62
+ def begin_with(file_name):
63
+ with open(file_name, "w") as f:
64
+ f.write("")
65
+
66
+ if start_from_scratch:
67
+ os.makedirs(f"{project_name}/results", exist_ok=True)
68
+ optimized_model = "../" + project_name + "/ckpt/" + config.model.optimized_name
69
+ begin_with(f"{project_name}/results/results-rl-" + optimized_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
70
+ begin_with(f"{project_name}/results/results-eval-" + optimized_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
71
+
72
+ def sample(i, run_type, block_size=None, top_k=None, remasking_strategy=None):
73
+ run_in(
74
+ f"python lavida_rl_rollout_video_reversal.py "
75
+ f"config=../configs/{project_name}.yaml "
76
+ f"wandb.run_id={config.wandb.run_id} "
77
+ f"experiment.function={run_type} "
78
+ f"evaluation.block_size={block_size} "
79
+ f"evaluation.top_k={top_k} "
80
+ f"evaluation.remasking_strategy={remasking_strategy} "
81
+ f"experiment.current_epoch={i} ",
82
+ cwd="sample",
83
+ env_name=env_name,
84
+ )
85
+
86
+ def reward(i, run_type, is_code_task, block_size=None, top_k=None, remasking_strategy=None):
87
+ script_name = "rl_code_reward.py" if is_code_task else "rl_reward_video_reversal.py"
88
+ run_in(
89
+ f"python {script_name} "
90
+ f"config=../configs/{project_name}.yaml "
91
+ f"wandb.run_id={config.wandb.run_id} "
92
+ f"experiment.function={run_type} "
93
+ f"evaluation.block_size={block_size} "
94
+ f"evaluation.top_k={top_k} "
95
+ f"evaluation.remasking_strategy={remasking_strategy} "
96
+ f"experiment.current_epoch={i} ",
97
+ cwd="reward",
98
+ env_name=env_name,
99
+ )
100
+
101
+ def execute(i, run_type):
102
+ run_in(
103
+ f"python rl_execute.py config=../configs/{project_name}.yaml wandb.run_id={config.wandb.run_id} experiment.function={run_type} experiment.current_epoch={i} ",
104
+ cwd="reward",
105
+ env_name=env_name,
106
+ )
107
+
108
+ def process_reward(i):
109
+ run_in(
110
+ f"python rl_vprocess_divide_data.py config=../configs/{project_name}.yaml wandb.run_id={config.wandb.run_id} experiment.current_epoch={i} ",
111
+ cwd="reward",
112
+ env_name=env_name,
113
+ )
114
+ run_in(
115
+ f"python vlm_process_reward.py config=../configs/{project_name}.yaml wandb.run_id={config.wandb.run_id} experiment.current_epoch={i} ",
116
+ cwd="sample",
117
+ env_name=reward_env_name,
118
+ )
119
+ run_in(
120
+ f"python rl_vprocess_reward.py config=../configs/{project_name}.yaml wandb.run_id={config.wandb.run_id} experiment.current_epoch={i} ",
121
+ cwd="reward",
122
+ env_name=reward_env_name,
123
+ )
124
+
125
+ def train(i):
126
+ clear_stale_cpu_adam_lock()
127
+ ds_config_name = config.experiment.deepspeed_file
128
+ visible_gpu_count = get_visible_gpu_count()
129
+ if visible_gpu_count is not None:
130
+ ds_config_path = os.path.join("accelerate_configs", f"{ds_config_name}.yaml")
131
+ ds_cfg = OmegaConf.load(ds_config_path)
132
+ configured_processes = int(ds_cfg.num_processes)
133
+ if configured_processes > visible_gpu_count:
134
+ fallback_name = "1_node_8_gpus_deepspeed_zero2"
135
+ fallback_path = os.path.join("accelerate_configs", f"{fallback_name}.yaml")
136
+ fallback_cfg = OmegaConf.load(fallback_path)
137
+ if int(fallback_cfg.num_processes) <= visible_gpu_count:
138
+ ds_config_name = fallback_name
139
+ else:
140
+ ds_cfg.num_processes = visible_gpu_count
141
+ fallback_name = f"auto_{visible_gpu_count}_gpus_deepspeed_zero2_rl"
142
+ fallback_path = os.path.join("accelerate_configs", f"{fallback_name}.yaml")
143
+ OmegaConf.save(ds_cfg, fallback_path)
144
+ ds_config_name = fallback_name
145
+ run_in(
146
+ f"accelerate launch "
147
+ f"--num_machines 1 "
148
+ f"--machine_rank 0 "
149
+ f"--main_process_ip 127.0.0.1 "
150
+ f"--main_process_port 8888 "
151
+ f"--config_file accelerate_configs/{ds_config_name}.yaml "
152
+ f"train/rl_lavida.py "
153
+ f"config=configs/{project_name}.yaml "
154
+ f"wandb.run_id={config.wandb.run_id} "
155
+ f"experiment.current_epoch={i} ",
156
+ cwd=".",
157
+ env_name=env_name,
158
+ )
159
+
160
+ is_code_task = config.dataset.data_type == "code"
161
+ is_process_reward = (
162
+ OmegaConf.select(config, "model.process_reward_model", default=MISSING) is not MISSING
163
+ and config.model.process_reward_model is not None
164
+ )
165
+
166
+ i = config.experiment.current_epoch
167
+ while i <= config.experiment.total_step:
168
+ sample(i, "train")
169
+ if is_code_task:
170
+ execute(i, "train")
171
+ reward(i, "train", is_code_task)
172
+
173
+ if is_process_reward:
174
+ process_reward(i)
175
+ else:
176
+ reward(i, "train", is_code_task)
177
+
178
+ train(i)
179
+
180
+ if config.evaluation.if_eval and i % config.experiment.eval_every == 0:
181
+ block_size = config.evaluation.block_size
182
+ top_k = OmegaConf.select(config, "evaluation.top_k", default=None)
183
+ for remasking_strategy in config.evaluation.remasking_strategy:
184
+ sample(i, "evaluation", block_size=block_size, top_k=top_k, remasking_strategy=remasking_strategy)
185
+ if is_code_task:
186
+ execute(i, "evaluation")
187
+ reward(i, "evaluation", is_code_task, block_size=block_size, top_k=top_k, remasking_strategy=remasking_strategy)
188
+
189
+ i += 1
rl_v_lavida_video_reversal.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ export HF_ENDPOINT=https://hf-mirror.com
2
+
3
+ CUDA_VISIBLE_DEVICES=4,5,6,7 python rl_v_lavida_video_reversal.py config=configs/rl_lavida_video_reversal.yaml
4
+
5
+ # nohup bash /data4/runqing/dLLM-RL/rl_v_lavida_video_reversal.sh > rl_lavida_video_reversal_sft+rl.log 2>&1 &
rl_v_llava_next_video_reversal.py ADDED
@@ -0,0 +1,123 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import subprocess
3
+ from datetime import datetime
4
+ import json
5
+
6
+ import wandb
7
+ from omegaconf import OmegaConf
8
+
9
+ from train.llava_next_video.common import env_prefix, get_config, get_rollout_output_path
10
+
11
+
12
+ def run_in(cmd: str, cwd: str, env_name: str):
13
+ subprocess.run(
14
+ env_prefix(env_name) + cmd,
15
+ shell=True,
16
+ cwd=cwd,
17
+ check=True,
18
+ executable="/bin/bash",
19
+ )
20
+
21
+
22
+ def log_stage(message: str) -> None:
23
+ print(f"[{datetime.now().strftime('%Y-%m-%d %H:%M:%S')}] {message}", flush=True)
24
+
25
+
26
+ def run_rollout_workers(project_name: str, env_name: str, epoch: int, num_workers: int) -> None:
27
+ procs = []
28
+ for worker_id in range(num_workers):
29
+ gpu_id = 4 + worker_id
30
+ worker_log = os.path.join(project_name, "logs", f"rollout_epoch{epoch}_worker{worker_id}.log")
31
+ os.makedirs(os.path.dirname(worker_log), exist_ok=True)
32
+ cmd = (
33
+ env_prefix(env_name)
34
+ + f"export CUDA_VISIBLE_DEVICES={gpu_id} HF_HUB_OFFLINE=1 TRANSFORMERS_OFFLINE=1 && "
35
+ + "export HF_HUB_DISABLE_PROGRESS_BARS=1 TQDM_DISABLE=1 && "
36
+ + "export PYTHONWARNINGS=\"ignore:.*copying from a non-meta parameter.*:UserWarning,"
37
+ + "ignore:.*Flash Attention 2.0 with a model not initialized on GPU.*:UserWarning\" && "
38
+ + f"python sample/llava_next_video_rl_rollout_video_reversal.py "
39
+ + f"config=configs/{project_name}.yaml "
40
+ + f"wandb.run_id={config.wandb.run_id} "
41
+ + f"experiment.function=train "
42
+ + f"experiment.current_epoch={epoch} "
43
+ + f"rollout.worker_id={worker_id} "
44
+ + f"rollout.num_workers={num_workers}"
45
+ )
46
+ log_stage(
47
+ f"epoch={epoch} rollout worker_start worker={worker_id + 1}/{num_workers} "
48
+ f"gpu={gpu_id} log={os.path.abspath(worker_log)}"
49
+ )
50
+ procs.append(
51
+ subprocess.Popen(
52
+ cmd,
53
+ shell=True,
54
+ cwd=".",
55
+ executable="/bin/bash",
56
+ stdout=open(worker_log, "w", encoding="utf-8"),
57
+ stderr=subprocess.STDOUT,
58
+ )
59
+ )
60
+
61
+ for worker_id, proc in enumerate(procs):
62
+ proc.wait()
63
+ if proc.returncode != 0:
64
+ raise subprocess.CalledProcessError(proc.returncode, proc.args)
65
+ log_stage(f"epoch={epoch} rollout worker_done worker={worker_id + 1}/{num_workers} rc=0")
66
+
67
+
68
+ def merge_rollout_parts(project_name: str, epoch: int) -> None:
69
+ merged_path = get_rollout_output_path(config, "train", epoch)
70
+ part_prefix = merged_path.replace(".json", "")
71
+ merged = []
72
+ part_idx = 0
73
+ while True:
74
+ part_path = f"{part_prefix}.part{part_idx}.json"
75
+ if not os.path.exists(part_path):
76
+ break
77
+ with open(part_path, "r", encoding="utf-8") as f:
78
+ merged.extend(json.load(f))
79
+ part_idx += 1
80
+ with open(merged_path, "w", encoding="utf-8") as f:
81
+ json.dump(merged, f, ensure_ascii=False, indent=2)
82
+ log_stage(f"epoch={epoch} rollout merged_parts={part_idx} samples={len(merged)} path={os.path.abspath(merged_path)}")
83
+
84
+
85
+ if __name__ == "__main__":
86
+ config = get_config()
87
+ if OmegaConf.select(config, "wandb.run_id", default=None) is None:
88
+ config.wandb.run_id = wandb.util.generate_id()
89
+
90
+ env_name = config.system.env_name
91
+ project_name = config.experiment.project
92
+ os.makedirs(os.path.join(project_name, "temp_data"), exist_ok=True)
93
+ os.makedirs(os.path.join(project_name, "ckpt"), exist_ok=True)
94
+ rollout_workers = 4
95
+
96
+ i = int(config.experiment.current_epoch)
97
+ while i <= int(config.experiment.total_step):
98
+ log_stage(f"epoch={i} rollout start")
99
+ run_rollout_workers(project_name, env_name, i, rollout_workers)
100
+ merge_rollout_parts(project_name, i)
101
+ log_stage(f"epoch={i} rollout done")
102
+ log_stage(f"epoch={i} reward start")
103
+ run_in(
104
+ f"python reward/rl_reward_llava_next_video_reversal.py "
105
+ f"config=configs/{project_name}.yaml "
106
+ f"wandb.run_id={config.wandb.run_id} "
107
+ f"experiment.function=train "
108
+ f"experiment.current_epoch={i}",
109
+ cwd=".",
110
+ env_name=env_name,
111
+ )
112
+ log_stage(f"epoch={i} reward done")
113
+ log_stage(f"epoch={i} train start")
114
+ run_in(
115
+ f"python train/rl_llava_next_video.py "
116
+ f"config=configs/{project_name}.yaml "
117
+ f"wandb.run_id={config.wandb.run_id} "
118
+ f"experiment.current_epoch={i}",
119
+ cwd=".",
120
+ env_name=env_name,
121
+ )
122
+ log_stage(f"epoch={i} train done")
123
+ i += 1
rl_v_llava_next_video_reversal.sh ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+
4
+ set +u
5
+ source ~/.bashrc
6
+ source /data8/runqing/miniconda/bin/activate
7
+ set -u
8
+ conda activate /data8/runqing/miniconda/envs/llava-next-video
9
+
10
+ cd /data4/runqing/dLLM-RL
11
+ export CUDA_VISIBLE_DEVICES=4,5,6,7
12
+ export HF_HUB_OFFLINE=1
13
+ export TRANSFORMERS_OFFLINE=1
14
+ export HF_HUB_DISABLE_PROGRESS_BARS=1
15
+ export TQDM_DISABLE=1
16
+ export PYTHONWARNINGS="ignore:.*copying from a non-meta parameter.*:UserWarning,ignore:.*Flash Attention 2.0 with a model not initialized on GPU.*:UserWarning"
17
+ python rl_v_llava_next_video_reversal.py config=configs/rl_llava_next_video_reversal.yaml
rl_v_video_reversal.py ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import subprocess
4
+ from termcolor import cprint
5
+
6
+ from omegaconf import DictConfig, ListConfig, OmegaConf, MISSING
7
+ def get_config():
8
+ cli_conf = OmegaConf.from_cli()
9
+ yaml_conf = OmegaConf.load(cli_conf.config)
10
+ conf = OmegaConf.merge(yaml_conf, cli_conf)
11
+ return conf
12
+
13
+ if __name__ == "__main__":
14
+
15
+ def env_prefix(env) -> str:
16
+ return (
17
+ "source ~/.bashrc && "
18
+ "source /data8/runqing/miniconda/bin/activate && "
19
+ "conda init && "
20
+ f"conda activate {env} && "
21
+ # "source ~/.bashrc && "
22
+ # f"source activate {env} && "
23
+ )
24
+
25
+ config = get_config()
26
+ env_name = config.system.env_name
27
+ if OmegaConf.select(config, "system.reward_env_name", default=MISSING) is not MISSING:
28
+ reward_env_name = config.system.reward_env_name
29
+
30
+ start_from_scratch = config.experiment.start_from_scratch
31
+ project_name = config.experiment.project
32
+ model_base = config.model.model_base
33
+
34
+ from omegaconf import MISSING
35
+ if OmegaConf.select(config, "model.value_base_model", default=MISSING) is not MISSING:
36
+ have_value_model = True
37
+ else:
38
+ have_value_model = False
39
+
40
+ def begin_with(file_name):
41
+ with open(file_name, "w") as f:
42
+ f.write("")
43
+
44
+ def init_value_model(i, model_base, cfg):
45
+ project_name = cfg.experiment.project
46
+ if model_base == "sdar":
47
+ script_name = "init_sdar_value_model.py"
48
+ elif model_base == "trado":
49
+ script_name = "init_trado_value_model.py"
50
+ elif model_base == "mmada":
51
+ script_name = "init_mmada_v_value_model.py"
52
+ elif model_base == "lladav":
53
+ script_name = "init_lladav_value_model.py"
54
+ subprocess.run(
55
+ env_prefix(env_name) +
56
+ f'python {script_name} '
57
+ f'config=../configs/{project_name}.yaml '
58
+ f'experiment.current_epoch={i} ',
59
+ shell=True,
60
+ cwd='train',
61
+ check=True,
62
+ executable='/bin/bash',
63
+ )
64
+
65
+ if start_from_scratch:
66
+ os.makedirs(f"{project_name}/results", exist_ok=True)
67
+ optimized_model = "../" + project_name + "/ckpt/" + config.model.optimized_name
68
+ begin_with(f"{project_name}/results/results-rl-" + optimized_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
69
+ begin_with(f"{project_name}/results/results-eval-" + optimized_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
70
+ if have_value_model:
71
+ init_value_model(1, model_base, config)
72
+ optimized_value_model = "../" + project_name + "/ckpt/" + config.model.optimized_value_name
73
+ begin_with(f"{project_name}/results/results-rl-" + optimized_value_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
74
+
75
+ def sample(i, type, block_size = None, top_k = None, remasking_strategy = None):
76
+ if model_base == "dream":
77
+ script_name = "dream_rl_rollout.py"
78
+ elif model_base == "llada" or model_base == "mmada":
79
+ script_name = "mmada_v_rl_rollout.py"
80
+ elif model_base == "sdar":
81
+ script_name = "sdar_rl_rollout.py"
82
+ elif model_base == "trado":
83
+ script_name = "trado_rl_rollout.py"
84
+ elif model_base == "lladav":
85
+ # script_name = "lladav_rl_rollout.py"
86
+ script_name = "lladav_rl_rollout_video_reversal.py"
87
+ subprocess.run(
88
+ env_prefix(env_name) +
89
+ f'python {script_name} '
90
+ f'config=../configs/{project_name}.yaml '
91
+ f"experiment.function={type} "
92
+ f"evaluation.block_size={block_size} "
93
+ f"evaluation.top_k={top_k} "
94
+ f"evaluation.remasking_strategy={remasking_strategy} "
95
+ f'experiment.current_epoch={i} ',
96
+ shell=True,
97
+ cwd='sample',
98
+ check=True,
99
+ executable='/bin/bash',
100
+ )
101
+
102
+ def reward(i, type, is_code_task, block_size = None, top_k = None, remasking_strategy = None):
103
+ if is_code_task:
104
+ script_name = "rl_code_reward.py"
105
+ else:
106
+ # script_name = "rl_reward_v.py"
107
+ script_name = "rl_reward_video_reversal.py"
108
+ subprocess.run(
109
+ env_prefix(env_name) +
110
+ f'python {script_name} '
111
+ f'config=../configs/{project_name}.yaml '
112
+ f"experiment.function={type} "
113
+ f"evaluation.block_size={block_size} "
114
+ f"evaluation.top_k={top_k} "
115
+ f"evaluation.remasking_strategy={remasking_strategy} "
116
+ f'experiment.current_epoch={i} ',
117
+ shell=True,
118
+ cwd='reward',
119
+ check=True,
120
+ executable='/bin/bash',
121
+ )
122
+
123
+ def execute(i, type):
124
+ subprocess.run(
125
+ env_prefix(env_name) +
126
+ f"python rl_execute.py "
127
+ f"config=../configs/{project_name}.yaml "
128
+ f"experiment.function={type} "
129
+ f"experiment.current_epoch={i} ",
130
+ shell=True,
131
+ cwd='reward',
132
+ check=True,
133
+ executable='/bin/bash',
134
+ )
135
+
136
+ def process_reward(i):
137
+ subprocess.run(
138
+ env_prefix(env_name) +
139
+ f'python rl_vprocess_divide_data.py '
140
+ f'config=../configs/{project_name}.yaml '
141
+ f'experiment.current_epoch={i} ',
142
+ shell=True,
143
+ cwd='reward',
144
+ check=True,
145
+ executable='/bin/bash',
146
+ )
147
+ subprocess.run(
148
+ env_prefix(reward_env_name) +
149
+ f'python vlm_process_reward.py '
150
+ f'config=../configs/{project_name}.yaml '
151
+ f'experiment.current_epoch={i} ',
152
+ shell=True,
153
+ cwd='sample',
154
+ check=True,
155
+ executable='/bin/bash',
156
+ )
157
+ subprocess.run(
158
+ env_prefix(reward_env_name) +
159
+ f'python rl_vprocess_reward.py '
160
+ f'config=../configs/{project_name}.yaml '
161
+ f'experiment.current_epoch={i} ',
162
+ shell=True,
163
+ cwd='reward',
164
+ check=True,
165
+ executable='/bin/bash',
166
+ )
167
+
168
+ def train(i, target = None):
169
+ if target is None:
170
+ if model_base == "dream":
171
+ script_name = "rl_dream.py"
172
+ elif model_base == "llada":
173
+ script_name = "rl_llada.py"
174
+ elif model_base == "mmada":
175
+ script_name = "rl_mmada_v.py"
176
+ elif model_base == "sdar":
177
+ script_name = "rl_sdar.py"
178
+ elif model_base == "trado":
179
+ script_name = "rl_trado.py"
180
+ elif model_base == "lladav":
181
+ # script_name = "rl_lladav.py"
182
+ script_name = "rl_lladav.py"
183
+
184
+ elif target == "policy":
185
+ if model_base == "sdar":
186
+ script_name = "train_sdar_policy.py"
187
+ elif model_base == "trado":
188
+ script_name = "train_trado_policy.py"
189
+ elif model_base == "mmada":
190
+ script_name = "train_mmada_v_policy.py"
191
+ elif model_base == "lladav":
192
+ script_name = "train_lladav_policy.py"
193
+ elif target == "value":
194
+ if model_base == "sdar":
195
+ script_name = "train_sdar_value.py"
196
+ elif model_base == "trado":
197
+ script_name = "train_trado_value.py"
198
+ elif model_base == "mmada":
199
+ script_name = "train_mmada_v_value.py"
200
+ elif model_base == "lladav":
201
+ script_name = "train_lladav_value.py"
202
+ subprocess.run(
203
+ env_prefix(env_name) +
204
+ f'accelerate launch '
205
+ f'--num_machines 1 '
206
+ f'--machine_rank 0 '
207
+ f'--main_process_ip 127.0.0.1 '
208
+ f'--main_process_port 8888 '
209
+ f'--config_file accelerate_configs/{config.experiment.deepspeed_file}.yaml '
210
+ f'train/{script_name} '
211
+ f'config=configs/{project_name}.yaml '
212
+ f'experiment.current_epoch={i} ',
213
+ shell=True,
214
+ check=True,
215
+ executable='/bin/bash',
216
+ )
217
+
218
+
219
+
220
+
221
+ if config.dataset.data_type == "code":
222
+ is_code_task = True
223
+ else:
224
+ is_code_task = False
225
+
226
+ if OmegaConf.select(config, "model.process_reward_model", default=MISSING) is not MISSING and config.model.process_reward_model is not None:
227
+ is_process_reward = True
228
+ else:
229
+ is_process_reward = False
230
+
231
+ i = config.experiment.current_epoch
232
+
233
+
234
+ while i <= config.experiment.total_step:
235
+
236
+
237
+ sample(i, "train")
238
+ if is_code_task:
239
+ execute(i, "train")
240
+ reward(i, "train", is_code_task)
241
+
242
+ if is_process_reward:
243
+ process_reward(i)
244
+ else:
245
+ reward(i, "train", is_code_task)
246
+
247
+ if have_value_model:
248
+ train(i, target = "value")
249
+ train(i, target = "policy")
250
+ else:
251
+ train(i, target = None)
252
+
253
+
254
+ if config.evaluation.if_eval:
255
+ if i % config.experiment.eval_every == 0:
256
+ if model_base in ["sdar", "trado"]:
257
+ remasking_strategy_list = config.evaluation.remasking_strategy
258
+ top_k_list = config.evaluation.top_k
259
+ block_size = config.evaluation.block_size
260
+ for j in range(len(remasking_strategy_list)):
261
+ remasking_strategy = remasking_strategy_list[j]
262
+ top_k = top_k_list[j]
263
+ sample(i, "evaluation", block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
264
+ if is_code_task:
265
+ execute(i, "evaluation")
266
+ reward(i, "evaluation", is_code_task, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
267
+ else:
268
+ block_size_list = config.evaluation.block_size
269
+ remasking_strategy_list = config.evaluation.remasking_strategy
270
+ if OmegaConf.select(config, "evaluation.top_k", default=MISSING) is not MISSING:
271
+ top_k = config.evaluation.top_k
272
+ else:
273
+ top_k = None
274
+ for j in range(len(remasking_strategy_list)):
275
+ remasking_strategy = remasking_strategy_list[j]
276
+ if model_base == "dream":
277
+ block_size = block_size_list[j]
278
+ elif model_base == "llada" or model_base == "mmada" or "lladav":
279
+ block_size = config.evaluation.block_size
280
+ sample(i, "evaluation", block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
281
+ if is_code_task:
282
+ execute(i, "evaluation")
283
+ reward(i, "evaluation", is_code_task, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
284
+
285
+ i += 1
286
+
287
+
288
+
rl_v_video_reversal.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ export HF_ENDPOINT=https://hf-mirror.com
2
+
3
+ CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python rl_v_video_reversal.py config=configs/rl_lladav_video_reversal.yaml
4
+
5
+ # nohup bash /data4/runqing/dLLM-RL/rl_v_video_reversal.sh > rl_lladav_video_reversal_3_23.log 2>&1 &
rl_v_video_reversal_rl.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ export HF_ENDPOINT=https://hf-mirror.com
2
+
3
+ CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python rl_v_video_reversal.py config=configs/rl_lladav_video_reversal_rl.yaml
4
+
5
+ # nohup bash /data4/runqing/dLLM-RL/rl_v_video_reversal_rl.sh > rl_lladav_video_reversal_rl_3_25.log 2>&1 &
rl_v_video_reversal_wo_t_reward.py ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import subprocess
4
+ from termcolor import cprint
5
+
6
+ from omegaconf import DictConfig, ListConfig, OmegaConf, MISSING
7
+ def get_config():
8
+ cli_conf = OmegaConf.from_cli()
9
+ yaml_conf = OmegaConf.load(cli_conf.config)
10
+ conf = OmegaConf.merge(yaml_conf, cli_conf)
11
+ return conf
12
+
13
+ if __name__ == "__main__":
14
+
15
+ def env_prefix(env) -> str:
16
+ return (
17
+ "source ~/.bashrc && "
18
+ "source /data8/runqing/miniconda/bin/activate && "
19
+ "conda init && "
20
+ f"conda activate {env} && "
21
+ # "source ~/.bashrc && "
22
+ # f"source activate {env} && "
23
+ )
24
+
25
+ config = get_config()
26
+ env_name = config.system.env_name
27
+ if OmegaConf.select(config, "system.reward_env_name", default=MISSING) is not MISSING:
28
+ reward_env_name = config.system.reward_env_name
29
+
30
+ start_from_scratch = config.experiment.start_from_scratch
31
+ project_name = config.experiment.project
32
+ model_base = config.model.model_base
33
+
34
+ from omegaconf import MISSING
35
+ if OmegaConf.select(config, "model.value_base_model", default=MISSING) is not MISSING:
36
+ have_value_model = True
37
+ else:
38
+ have_value_model = False
39
+
40
+ def begin_with(file_name):
41
+ with open(file_name, "w") as f:
42
+ f.write("")
43
+
44
+ def init_value_model(i, model_base, cfg):
45
+ project_name = cfg.experiment.project
46
+ if model_base == "sdar":
47
+ script_name = "init_sdar_value_model.py"
48
+ elif model_base == "trado":
49
+ script_name = "init_trado_value_model.py"
50
+ elif model_base == "mmada":
51
+ script_name = "init_mmada_v_value_model.py"
52
+ elif model_base == "lladav":
53
+ script_name = "init_lladav_value_model.py"
54
+ subprocess.run(
55
+ env_prefix(env_name) +
56
+ f'python {script_name} '
57
+ f'config=../configs/{project_name}.yaml '
58
+ f'experiment.current_epoch={i} ',
59
+ shell=True,
60
+ cwd='train',
61
+ check=True,
62
+ executable='/bin/bash',
63
+ )
64
+
65
+ if start_from_scratch:
66
+ os.makedirs(f"{project_name}/results", exist_ok=True)
67
+ optimized_model = "../" + project_name + "/ckpt/" + config.model.optimized_name
68
+ begin_with(f"{project_name}/results/results-rl-" + optimized_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
69
+ begin_with(f"{project_name}/results/results-eval-" + optimized_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
70
+ if have_value_model:
71
+ init_value_model(1, model_base, config)
72
+ optimized_value_model = "../" + project_name + "/ckpt/" + config.model.optimized_value_name
73
+ begin_with(f"{project_name}/results/results-rl-" + optimized_value_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
74
+
75
+ def sample(i, type, block_size = None, top_k = None, remasking_strategy = None):
76
+ if model_base == "dream":
77
+ script_name = "dream_rl_rollout.py"
78
+ elif model_base == "llada" or model_base == "mmada":
79
+ script_name = "mmada_v_rl_rollout.py"
80
+ elif model_base == "sdar":
81
+ script_name = "sdar_rl_rollout.py"
82
+ elif model_base == "trado":
83
+ script_name = "trado_rl_rollout.py"
84
+ elif model_base == "lladav":
85
+ # script_name = "lladav_rl_rollout.py"
86
+ script_name = "lladav_rl_rollout_video_reversal.py"
87
+ subprocess.run(
88
+ env_prefix(env_name) +
89
+ f'python {script_name} '
90
+ f'config=../configs/{project_name}.yaml '
91
+ f"experiment.function={type} "
92
+ f"evaluation.block_size={block_size} "
93
+ f"evaluation.top_k={top_k} "
94
+ f"evaluation.remasking_strategy={remasking_strategy} "
95
+ f'experiment.current_epoch={i} ',
96
+ shell=True,
97
+ cwd='sample',
98
+ check=True,
99
+ executable='/bin/bash',
100
+ )
101
+
102
+ def reward(i, type, is_code_task, block_size = None, top_k = None, remasking_strategy = None):
103
+ if is_code_task:
104
+ script_name = "rl_code_reward.py"
105
+ else:
106
+ # script_name = "rl_reward_v.py"
107
+ script_name = "rl_reward_video_reversal_wo_t_reward.py"
108
+ subprocess.run(
109
+ env_prefix(env_name) +
110
+ f'python {script_name} '
111
+ f'config=../configs/{project_name}.yaml '
112
+ f"experiment.function={type} "
113
+ f"evaluation.block_size={block_size} "
114
+ f"evaluation.top_k={top_k} "
115
+ f"evaluation.remasking_strategy={remasking_strategy} "
116
+ f'experiment.current_epoch={i} ',
117
+ shell=True,
118
+ cwd='reward',
119
+ check=True,
120
+ executable='/bin/bash',
121
+ )
122
+
123
+ def execute(i, type):
124
+ subprocess.run(
125
+ env_prefix(env_name) +
126
+ f"python rl_execute.py "
127
+ f"config=../configs/{project_name}.yaml "
128
+ f"experiment.function={type} "
129
+ f"experiment.current_epoch={i} ",
130
+ shell=True,
131
+ cwd='reward',
132
+ check=True,
133
+ executable='/bin/bash',
134
+ )
135
+
136
+ def process_reward(i):
137
+ subprocess.run(
138
+ env_prefix(env_name) +
139
+ f'python rl_vprocess_divide_data.py '
140
+ f'config=../configs/{project_name}.yaml '
141
+ f'experiment.current_epoch={i} ',
142
+ shell=True,
143
+ cwd='reward',
144
+ check=True,
145
+ executable='/bin/bash',
146
+ )
147
+ subprocess.run(
148
+ env_prefix(reward_env_name) +
149
+ f'python vlm_process_reward.py '
150
+ f'config=../configs/{project_name}.yaml '
151
+ f'experiment.current_epoch={i} ',
152
+ shell=True,
153
+ cwd='sample',
154
+ check=True,
155
+ executable='/bin/bash',
156
+ )
157
+ subprocess.run(
158
+ env_prefix(reward_env_name) +
159
+ f'python rl_vprocess_reward.py '
160
+ f'config=../configs/{project_name}.yaml '
161
+ f'experiment.current_epoch={i} ',
162
+ shell=True,
163
+ cwd='reward',
164
+ check=True,
165
+ executable='/bin/bash',
166
+ )
167
+
168
+ def train(i, target = None):
169
+ if target is None:
170
+ if model_base == "dream":
171
+ script_name = "rl_dream.py"
172
+ elif model_base == "llada":
173
+ script_name = "rl_llada.py"
174
+ elif model_base == "mmada":
175
+ script_name = "rl_mmada_v.py"
176
+ elif model_base == "sdar":
177
+ script_name = "rl_sdar.py"
178
+ elif model_base == "trado":
179
+ script_name = "rl_trado.py"
180
+ elif model_base == "lladav":
181
+ # script_name = "rl_lladav.py"
182
+ script_name = "rl_lladav.py"
183
+
184
+ elif target == "policy":
185
+ if model_base == "sdar":
186
+ script_name = "train_sdar_policy.py"
187
+ elif model_base == "trado":
188
+ script_name = "train_trado_policy.py"
189
+ elif model_base == "mmada":
190
+ script_name = "train_mmada_v_policy.py"
191
+ elif model_base == "lladav":
192
+ script_name = "train_lladav_policy.py"
193
+ elif target == "value":
194
+ if model_base == "sdar":
195
+ script_name = "train_sdar_value.py"
196
+ elif model_base == "trado":
197
+ script_name = "train_trado_value.py"
198
+ elif model_base == "mmada":
199
+ script_name = "train_mmada_v_value.py"
200
+ elif model_base == "lladav":
201
+ script_name = "train_lladav_value.py"
202
+ subprocess.run(
203
+ env_prefix(env_name) +
204
+ f'accelerate launch '
205
+ f'--num_machines 1 '
206
+ f'--machine_rank 0 '
207
+ f'--main_process_ip 127.0.0.1 '
208
+ f'--main_process_port 8888 '
209
+ f'--config_file accelerate_configs/{config.experiment.deepspeed_file}.yaml '
210
+ f'train/{script_name} '
211
+ f'config=configs/{project_name}.yaml '
212
+ f'experiment.current_epoch={i} ',
213
+ shell=True,
214
+ check=True,
215
+ executable='/bin/bash',
216
+ )
217
+
218
+
219
+
220
+
221
+ if config.dataset.data_type == "code":
222
+ is_code_task = True
223
+ else:
224
+ is_code_task = False
225
+
226
+ if OmegaConf.select(config, "model.process_reward_model", default=MISSING) is not MISSING and config.model.process_reward_model is not None:
227
+ is_process_reward = True
228
+ else:
229
+ is_process_reward = False
230
+
231
+ i = config.experiment.current_epoch
232
+
233
+
234
+ while i <= config.experiment.total_step:
235
+
236
+
237
+ sample(i, "train")
238
+ if is_code_task:
239
+ execute(i, "train")
240
+ reward(i, "train", is_code_task)
241
+
242
+ if is_process_reward:
243
+ process_reward(i)
244
+ else:
245
+ reward(i, "train", is_code_task)
246
+
247
+ if have_value_model:
248
+ train(i, target = "value")
249
+ train(i, target = "policy")
250
+ else:
251
+ train(i, target = None)
252
+
253
+
254
+ if config.evaluation.if_eval:
255
+ if i % config.experiment.eval_every == 0:
256
+ if model_base in ["sdar", "trado"]:
257
+ remasking_strategy_list = config.evaluation.remasking_strategy
258
+ top_k_list = config.evaluation.top_k
259
+ block_size = config.evaluation.block_size
260
+ for j in range(len(remasking_strategy_list)):
261
+ remasking_strategy = remasking_strategy_list[j]
262
+ top_k = top_k_list[j]
263
+ sample(i, "evaluation", block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
264
+ if is_code_task:
265
+ execute(i, "evaluation")
266
+ reward(i, "evaluation", is_code_task, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
267
+ else:
268
+ block_size_list = config.evaluation.block_size
269
+ remasking_strategy_list = config.evaluation.remasking_strategy
270
+ if OmegaConf.select(config, "evaluation.top_k", default=MISSING) is not MISSING:
271
+ top_k = config.evaluation.top_k
272
+ else:
273
+ top_k = None
274
+ for j in range(len(remasking_strategy_list)):
275
+ remasking_strategy = remasking_strategy_list[j]
276
+ if model_base == "dream":
277
+ block_size = block_size_list[j]
278
+ elif model_base == "llada" or model_base == "mmada" or "lladav":
279
+ block_size = config.evaluation.block_size
280
+ sample(i, "evaluation", block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
281
+ if is_code_task:
282
+ execute(i, "evaluation")
283
+ reward(i, "evaluation", is_code_task, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
284
+
285
+ i += 1
286
+
287
+
288
+
rl_v_video_reversal_wo_t_reward.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ export HF_ENDPOINT=https://hf-mirror.com
2
+
3
+ CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python rl_v_video_reversal_wo_t_reward.py config=configs/rl_lladav_video_reversal_wo_t_reward.yaml
4
+
5
+ # nohup bash /data4/runqing/dLLM-RL/rl_v_video_reversal_wo_t_reward.sh > rl_lladav_video_reversal_wo_t_reward_4_4.log 2>&1 &
rl_v_video_reversal_wo_ub_reward.py ADDED
@@ -0,0 +1,288 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+ import subprocess
4
+ from termcolor import cprint
5
+
6
+ from omegaconf import DictConfig, ListConfig, OmegaConf, MISSING
7
+ def get_config():
8
+ cli_conf = OmegaConf.from_cli()
9
+ yaml_conf = OmegaConf.load(cli_conf.config)
10
+ conf = OmegaConf.merge(yaml_conf, cli_conf)
11
+ return conf
12
+
13
+ if __name__ == "__main__":
14
+
15
+ def env_prefix(env) -> str:
16
+ return (
17
+ "source ~/.bashrc && "
18
+ "source /data8/runqing/miniconda/bin/activate && "
19
+ "conda init && "
20
+ f"conda activate {env} && "
21
+ # "source ~/.bashrc && "
22
+ # f"source activate {env} && "
23
+ )
24
+
25
+ config = get_config()
26
+ env_name = config.system.env_name
27
+ if OmegaConf.select(config, "system.reward_env_name", default=MISSING) is not MISSING:
28
+ reward_env_name = config.system.reward_env_name
29
+
30
+ start_from_scratch = config.experiment.start_from_scratch
31
+ project_name = config.experiment.project
32
+ model_base = config.model.model_base
33
+
34
+ from omegaconf import MISSING
35
+ if OmegaConf.select(config, "model.value_base_model", default=MISSING) is not MISSING:
36
+ have_value_model = True
37
+ else:
38
+ have_value_model = False
39
+
40
+ def begin_with(file_name):
41
+ with open(file_name, "w") as f:
42
+ f.write("")
43
+
44
+ def init_value_model(i, model_base, cfg):
45
+ project_name = cfg.experiment.project
46
+ if model_base == "sdar":
47
+ script_name = "init_sdar_value_model.py"
48
+ elif model_base == "trado":
49
+ script_name = "init_trado_value_model.py"
50
+ elif model_base == "mmada":
51
+ script_name = "init_mmada_v_value_model.py"
52
+ elif model_base == "lladav":
53
+ script_name = "init_lladav_value_model.py"
54
+ subprocess.run(
55
+ env_prefix(env_name) +
56
+ f'python {script_name} '
57
+ f'config=../configs/{project_name}.yaml '
58
+ f'experiment.current_epoch={i} ',
59
+ shell=True,
60
+ cwd='train',
61
+ check=True,
62
+ executable='/bin/bash',
63
+ )
64
+
65
+ if start_from_scratch:
66
+ os.makedirs(f"{project_name}/results", exist_ok=True)
67
+ optimized_model = "../" + project_name + "/ckpt/" + config.model.optimized_name
68
+ begin_with(f"{project_name}/results/results-rl-" + optimized_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
69
+ begin_with(f"{project_name}/results/results-eval-" + optimized_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
70
+ if have_value_model:
71
+ init_value_model(1, model_base, config)
72
+ optimized_value_model = "../" + project_name + "/ckpt/" + config.model.optimized_value_name
73
+ begin_with(f"{project_name}/results/results-rl-" + optimized_value_model.replace("/", ".") + "-" + config.dataset.train_dataset + ".txt")
74
+
75
+ def sample(i, type, block_size = None, top_k = None, remasking_strategy = None):
76
+ if model_base == "dream":
77
+ script_name = "dream_rl_rollout.py"
78
+ elif model_base == "llada" or model_base == "mmada":
79
+ script_name = "mmada_v_rl_rollout.py"
80
+ elif model_base == "sdar":
81
+ script_name = "sdar_rl_rollout.py"
82
+ elif model_base == "trado":
83
+ script_name = "trado_rl_rollout.py"
84
+ elif model_base == "lladav":
85
+ # script_name = "lladav_rl_rollout.py"
86
+ script_name = "lladav_rl_rollout_video_reversal.py"
87
+ subprocess.run(
88
+ env_prefix(env_name) +
89
+ f'python {script_name} '
90
+ f'config=../configs/{project_name}.yaml '
91
+ f"experiment.function={type} "
92
+ f"evaluation.block_size={block_size} "
93
+ f"evaluation.top_k={top_k} "
94
+ f"evaluation.remasking_strategy={remasking_strategy} "
95
+ f'experiment.current_epoch={i} ',
96
+ shell=True,
97
+ cwd='sample',
98
+ check=True,
99
+ executable='/bin/bash',
100
+ )
101
+
102
+ def reward(i, type, is_code_task, block_size = None, top_k = None, remasking_strategy = None):
103
+ if is_code_task:
104
+ script_name = "rl_code_reward.py"
105
+ else:
106
+ # script_name = "rl_reward_v.py"
107
+ script_name = "rl_reward_video_reversal_wo_ub_reward.py"
108
+ subprocess.run(
109
+ env_prefix(env_name) +
110
+ f'python {script_name} '
111
+ f'config=../configs/{project_name}.yaml '
112
+ f"experiment.function={type} "
113
+ f"evaluation.block_size={block_size} "
114
+ f"evaluation.top_k={top_k} "
115
+ f"evaluation.remasking_strategy={remasking_strategy} "
116
+ f'experiment.current_epoch={i} ',
117
+ shell=True,
118
+ cwd='reward',
119
+ check=True,
120
+ executable='/bin/bash',
121
+ )
122
+
123
+ def execute(i, type):
124
+ subprocess.run(
125
+ env_prefix(env_name) +
126
+ f"python rl_execute.py "
127
+ f"config=../configs/{project_name}.yaml "
128
+ f"experiment.function={type} "
129
+ f"experiment.current_epoch={i} ",
130
+ shell=True,
131
+ cwd='reward',
132
+ check=True,
133
+ executable='/bin/bash',
134
+ )
135
+
136
+ def process_reward(i):
137
+ subprocess.run(
138
+ env_prefix(env_name) +
139
+ f'python rl_vprocess_divide_data.py '
140
+ f'config=../configs/{project_name}.yaml '
141
+ f'experiment.current_epoch={i} ',
142
+ shell=True,
143
+ cwd='reward',
144
+ check=True,
145
+ executable='/bin/bash',
146
+ )
147
+ subprocess.run(
148
+ env_prefix(reward_env_name) +
149
+ f'python vlm_process_reward.py '
150
+ f'config=../configs/{project_name}.yaml '
151
+ f'experiment.current_epoch={i} ',
152
+ shell=True,
153
+ cwd='sample',
154
+ check=True,
155
+ executable='/bin/bash',
156
+ )
157
+ subprocess.run(
158
+ env_prefix(reward_env_name) +
159
+ f'python rl_vprocess_reward.py '
160
+ f'config=../configs/{project_name}.yaml '
161
+ f'experiment.current_epoch={i} ',
162
+ shell=True,
163
+ cwd='reward',
164
+ check=True,
165
+ executable='/bin/bash',
166
+ )
167
+
168
+ def train(i, target = None):
169
+ if target is None:
170
+ if model_base == "dream":
171
+ script_name = "rl_dream.py"
172
+ elif model_base == "llada":
173
+ script_name = "rl_llada.py"
174
+ elif model_base == "mmada":
175
+ script_name = "rl_mmada_v.py"
176
+ elif model_base == "sdar":
177
+ script_name = "rl_sdar.py"
178
+ elif model_base == "trado":
179
+ script_name = "rl_trado.py"
180
+ elif model_base == "lladav":
181
+ # script_name = "rl_lladav.py"
182
+ script_name = "rl_lladav.py"
183
+
184
+ elif target == "policy":
185
+ if model_base == "sdar":
186
+ script_name = "train_sdar_policy.py"
187
+ elif model_base == "trado":
188
+ script_name = "train_trado_policy.py"
189
+ elif model_base == "mmada":
190
+ script_name = "train_mmada_v_policy.py"
191
+ elif model_base == "lladav":
192
+ script_name = "train_lladav_policy.py"
193
+ elif target == "value":
194
+ if model_base == "sdar":
195
+ script_name = "train_sdar_value.py"
196
+ elif model_base == "trado":
197
+ script_name = "train_trado_value.py"
198
+ elif model_base == "mmada":
199
+ script_name = "train_mmada_v_value.py"
200
+ elif model_base == "lladav":
201
+ script_name = "train_lladav_value.py"
202
+ subprocess.run(
203
+ env_prefix(env_name) +
204
+ f'accelerate launch '
205
+ f'--num_machines 1 '
206
+ f'--machine_rank 0 '
207
+ f'--main_process_ip 127.0.0.1 '
208
+ f'--main_process_port 8888 '
209
+ f'--config_file accelerate_configs/{config.experiment.deepspeed_file}.yaml '
210
+ f'train/{script_name} '
211
+ f'config=configs/{project_name}.yaml '
212
+ f'experiment.current_epoch={i} ',
213
+ shell=True,
214
+ check=True,
215
+ executable='/bin/bash',
216
+ )
217
+
218
+
219
+
220
+
221
+ if config.dataset.data_type == "code":
222
+ is_code_task = True
223
+ else:
224
+ is_code_task = False
225
+
226
+ if OmegaConf.select(config, "model.process_reward_model", default=MISSING) is not MISSING and config.model.process_reward_model is not None:
227
+ is_process_reward = True
228
+ else:
229
+ is_process_reward = False
230
+
231
+ i = config.experiment.current_epoch
232
+
233
+
234
+ while i <= config.experiment.total_step:
235
+
236
+
237
+ sample(i, "train")
238
+ if is_code_task:
239
+ execute(i, "train")
240
+ reward(i, "train", is_code_task)
241
+
242
+ if is_process_reward:
243
+ process_reward(i)
244
+ else:
245
+ reward(i, "train", is_code_task)
246
+
247
+ if have_value_model:
248
+ train(i, target = "value")
249
+ train(i, target = "policy")
250
+ else:
251
+ train(i, target = None)
252
+
253
+
254
+ if config.evaluation.if_eval:
255
+ if i % config.experiment.eval_every == 0:
256
+ if model_base in ["sdar", "trado"]:
257
+ remasking_strategy_list = config.evaluation.remasking_strategy
258
+ top_k_list = config.evaluation.top_k
259
+ block_size = config.evaluation.block_size
260
+ for j in range(len(remasking_strategy_list)):
261
+ remasking_strategy = remasking_strategy_list[j]
262
+ top_k = top_k_list[j]
263
+ sample(i, "evaluation", block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
264
+ if is_code_task:
265
+ execute(i, "evaluation")
266
+ reward(i, "evaluation", is_code_task, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
267
+ else:
268
+ block_size_list = config.evaluation.block_size
269
+ remasking_strategy_list = config.evaluation.remasking_strategy
270
+ if OmegaConf.select(config, "evaluation.top_k", default=MISSING) is not MISSING:
271
+ top_k = config.evaluation.top_k
272
+ else:
273
+ top_k = None
274
+ for j in range(len(remasking_strategy_list)):
275
+ remasking_strategy = remasking_strategy_list[j]
276
+ if model_base == "dream":
277
+ block_size = block_size_list[j]
278
+ elif model_base == "llada" or model_base == "mmada" or "lladav":
279
+ block_size = config.evaluation.block_size
280
+ sample(i, "evaluation", block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
281
+ if is_code_task:
282
+ execute(i, "evaluation")
283
+ reward(i, "evaluation", is_code_task, block_size = block_size, top_k = top_k, remasking_strategy = remasking_strategy)
284
+
285
+ i += 1
286
+
287
+
288
+
rl_v_video_reversal_wo_ub_reward.sh ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ export HF_ENDPOINT=https://hf-mirror.com
2
+
3
+ CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 python rl_v_video_reversal_wo_ub_reward.py config=configs/rl_lladav_video_reversal_wo_ub_reward.yaml
4
+
5
+ # nohup bash /data4/runqing/dLLM-RL/rl_v_video_reversal_wo_ub_reward.sh > rl_lladav_video_reversal_wo_ub_reward_4_5.log 2>&1 &
sft_lavida_video_reversal.log ADDED
The diff for this file is too large to render. See raw diff
 
sft_lladav_video_reversal.log ADDED
The diff for this file is too large to render. See raw diff
 
sft_lladav_video_reversal_/ckpt/metadata.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "save_time": "2026-03-14 14:13:04"
3
+ }
sft_lladav_video_reversal_/ckpt/optimized/chat_template.jinja ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ {% set loop_messages = messages %}{% for message in loop_messages %}{% set content = '<|start_header_id|>' + message['role'] + '<|end_header_id|>
2
+
3
+ '+ message['content'] | trim + '<|eot_id|>' %}{% if loop.index0 == 0 %}{% set content = bos_token + content %}{% endif %}{{ content }}{% endfor %}{{ '<|start_header_id|>assistant<|end_header_id|>
4
+
5
+ ' }}
sft_lladav_video_reversal_/ckpt/optimized/config.json ADDED
@@ -0,0 +1,206 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_faster_video": false,
3
+ "add_time_instruction": false,
4
+ "architectures": [
5
+ "LlavaLLaDAModelLM"
6
+ ],
7
+ "attention_bias": false,
8
+ "attention_dropout": 0.0,
9
+ "auto_map": {
10
+ "AutoConfig": "configuration_llada.LLaDAConfig",
11
+ "AutoModel": "modeling_llada.LLaDAModelLM",
12
+ "AutoModelForCausalLM": "modeling_llada.LLaDAModelLM"
13
+ },
14
+ "bos_token_id": 128000,
15
+ "eos_token_id": 126081,
16
+ "faster_token_stride": 10,
17
+ "force_sample": false,
18
+ "hidden_act": "silu",
19
+ "hidden_size": 4096,
20
+ "image_aspect_ratio": "anyres_max_4",
21
+ "image_crop_resolution": null,
22
+ "image_grid_pinpoints": [
23
+ [
24
+ 384,
25
+ 384
26
+ ],
27
+ [
28
+ 384,
29
+ 768
30
+ ],
31
+ [
32
+ 384,
33
+ 1152
34
+ ],
35
+ [
36
+ 384,
37
+ 1536
38
+ ],
39
+ [
40
+ 384,
41
+ 1920
42
+ ],
43
+ [
44
+ 384,
45
+ 2304
46
+ ],
47
+ [
48
+ 768,
49
+ 384
50
+ ],
51
+ [
52
+ 768,
53
+ 768
54
+ ],
55
+ [
56
+ 768,
57
+ 1152
58
+ ],
59
+ [
60
+ 768,
61
+ 1536
62
+ ],
63
+ [
64
+ 768,
65
+ 1920
66
+ ],
67
+ [
68
+ 768,
69
+ 2304
70
+ ],
71
+ [
72
+ 1152,
73
+ 384
74
+ ],
75
+ [
76
+ 1152,
77
+ 768
78
+ ],
79
+ [
80
+ 1152,
81
+ 1152
82
+ ],
83
+ [
84
+ 1152,
85
+ 1536
86
+ ],
87
+ [
88
+ 1152,
89
+ 1920
90
+ ],
91
+ [
92
+ 1152,
93
+ 2304
94
+ ],
95
+ [
96
+ 1536,
97
+ 384
98
+ ],
99
+ [
100
+ 1536,
101
+ 768
102
+ ],
103
+ [
104
+ 1536,
105
+ 1152
106
+ ],
107
+ [
108
+ 1536,
109
+ 1536
110
+ ],
111
+ [
112
+ 1536,
113
+ 1920
114
+ ],
115
+ [
116
+ 1536,
117
+ 2304
118
+ ],
119
+ [
120
+ 1920,
121
+ 384
122
+ ],
123
+ [
124
+ 1920,
125
+ 768
126
+ ],
127
+ [
128
+ 1920,
129
+ 1152
130
+ ],
131
+ [
132
+ 1920,
133
+ 1536
134
+ ],
135
+ [
136
+ 1920,
137
+ 1920
138
+ ],
139
+ [
140
+ 1920,
141
+ 2304
142
+ ],
143
+ [
144
+ 2304,
145
+ 384
146
+ ],
147
+ [
148
+ 2304,
149
+ 768
150
+ ],
151
+ [
152
+ 2304,
153
+ 1152
154
+ ],
155
+ [
156
+ 2304,
157
+ 1536
158
+ ],
159
+ [
160
+ 2304,
161
+ 1920
162
+ ],
163
+ [
164
+ 2304,
165
+ 2304
166
+ ]
167
+ ],
168
+ "image_split_resolution": null,
169
+ "initializer_range": 0.02,
170
+ "intermediate_size": 12288,
171
+ "max_position_embeddings": 16384,
172
+ "mm_hidden_size": 1152,
173
+ "mm_newline_position": "grid",
174
+ "mm_patch_merge_type": "spatial_unpad",
175
+ "mm_projector_lr": null,
176
+ "mm_projector_type": "mlp2x_gelu",
177
+ "mm_resampler_type": null,
178
+ "mm_spatial_pool_mode": "bilinear",
179
+ "mm_spatial_pool_stride": null,
180
+ "mm_tunable_parts": "mm_vision_tower,mm_mlp_adapter,mm_language_model",
181
+ "mm_use_im_patch_token": false,
182
+ "mm_use_im_start_end": false,
183
+ "mm_vision_select_feature": "patch",
184
+ "mm_vision_select_layer": -2,
185
+ "mm_vision_tower": "google/siglip2-so400m-patch14-384",
186
+ "mm_vision_tower_lr": 2e-06,
187
+ "model_type": "llava_llada",
188
+ "num_attention_heads": 32,
189
+ "num_hidden_layers": 32,
190
+ "num_key_value_heads": 32,
191
+ "pos_skipping_range": 4096,
192
+ "pretraining_tp": 1,
193
+ "rms_norm_eps": 1e-05,
194
+ "rope_scaling": null,
195
+ "rope_theta": 500000.0,
196
+ "tie_word_embeddings": false,
197
+ "tokenizer_model_max_length": 16384,
198
+ "tokenizer_padding_side": "right",
199
+ "torch_dtype": "bfloat16",
200
+ "transformers_version": "4.52.4",
201
+ "use_cache": true,
202
+ "use_mm_proj": true,
203
+ "use_pos_skipping": false,
204
+ "vision_tower_pretrained": null,
205
+ "vocab_size": 126352
206
+ }
sft_lladav_video_reversal_/ckpt/optimized/model.safetensors.index.json ADDED
@@ -0,0 +1,724 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "metadata": {
3
+ "total_size": 16867839040
4
+ },
5
+ "weight_map": {
6
+ "lm_head.weight": "model-00004-of-00004.safetensors",
7
+ "model.embed_tokens.weight": "model-00001-of-00004.safetensors",
8
+ "model.image_newline": "model-00001-of-00004.safetensors",
9
+ "model.layers.0.input_layernorm.weight": "model-00001-of-00004.safetensors",
10
+ "model.layers.0.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
11
+ "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
12
+ "model.layers.0.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
13
+ "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
14
+ "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
15
+ "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
16
+ "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
17
+ "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
18
+ "model.layers.1.input_layernorm.weight": "model-00001-of-00004.safetensors",
19
+ "model.layers.1.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
20
+ "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
21
+ "model.layers.1.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
22
+ "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
23
+ "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
24
+ "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
25
+ "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
26
+ "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
27
+ "model.layers.10.input_layernorm.weight": "model-00002-of-00004.safetensors",
28
+ "model.layers.10.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
29
+ "model.layers.10.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
30
+ "model.layers.10.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
31
+ "model.layers.10.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
32
+ "model.layers.10.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
33
+ "model.layers.10.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
34
+ "model.layers.10.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
35
+ "model.layers.10.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
36
+ "model.layers.11.input_layernorm.weight": "model-00002-of-00004.safetensors",
37
+ "model.layers.11.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
38
+ "model.layers.11.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
39
+ "model.layers.11.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
40
+ "model.layers.11.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
41
+ "model.layers.11.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
42
+ "model.layers.11.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
43
+ "model.layers.11.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
44
+ "model.layers.11.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
45
+ "model.layers.12.input_layernorm.weight": "model-00002-of-00004.safetensors",
46
+ "model.layers.12.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
47
+ "model.layers.12.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
48
+ "model.layers.12.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
49
+ "model.layers.12.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
50
+ "model.layers.12.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
51
+ "model.layers.12.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
52
+ "model.layers.12.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
53
+ "model.layers.12.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
54
+ "model.layers.13.input_layernorm.weight": "model-00002-of-00004.safetensors",
55
+ "model.layers.13.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
56
+ "model.layers.13.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
57
+ "model.layers.13.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
58
+ "model.layers.13.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
59
+ "model.layers.13.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
60
+ "model.layers.13.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
61
+ "model.layers.13.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
62
+ "model.layers.13.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
63
+ "model.layers.14.input_layernorm.weight": "model-00002-of-00004.safetensors",
64
+ "model.layers.14.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
65
+ "model.layers.14.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
66
+ "model.layers.14.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
67
+ "model.layers.14.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
68
+ "model.layers.14.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
69
+ "model.layers.14.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
70
+ "model.layers.14.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
71
+ "model.layers.14.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
72
+ "model.layers.15.input_layernorm.weight": "model-00002-of-00004.safetensors",
73
+ "model.layers.15.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
74
+ "model.layers.15.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
75
+ "model.layers.15.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
76
+ "model.layers.15.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
77
+ "model.layers.15.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
78
+ "model.layers.15.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
79
+ "model.layers.15.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
80
+ "model.layers.15.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
81
+ "model.layers.16.input_layernorm.weight": "model-00002-of-00004.safetensors",
82
+ "model.layers.16.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
83
+ "model.layers.16.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
84
+ "model.layers.16.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
85
+ "model.layers.16.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
86
+ "model.layers.16.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
87
+ "model.layers.16.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
88
+ "model.layers.16.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
89
+ "model.layers.16.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
90
+ "model.layers.17.input_layernorm.weight": "model-00002-of-00004.safetensors",
91
+ "model.layers.17.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
92
+ "model.layers.17.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
93
+ "model.layers.17.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
94
+ "model.layers.17.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
95
+ "model.layers.17.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
96
+ "model.layers.17.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
97
+ "model.layers.17.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
98
+ "model.layers.17.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
99
+ "model.layers.18.input_layernorm.weight": "model-00002-of-00004.safetensors",
100
+ "model.layers.18.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
101
+ "model.layers.18.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
102
+ "model.layers.18.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
103
+ "model.layers.18.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
104
+ "model.layers.18.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
105
+ "model.layers.18.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
106
+ "model.layers.18.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
107
+ "model.layers.18.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
108
+ "model.layers.19.input_layernorm.weight": "model-00002-of-00004.safetensors",
109
+ "model.layers.19.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
110
+ "model.layers.19.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
111
+ "model.layers.19.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
112
+ "model.layers.19.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
113
+ "model.layers.19.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
114
+ "model.layers.19.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
115
+ "model.layers.19.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
116
+ "model.layers.19.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
117
+ "model.layers.2.input_layernorm.weight": "model-00001-of-00004.safetensors",
118
+ "model.layers.2.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
119
+ "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
120
+ "model.layers.2.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
121
+ "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
122
+ "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
123
+ "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
124
+ "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
125
+ "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
126
+ "model.layers.20.input_layernorm.weight": "model-00003-of-00004.safetensors",
127
+ "model.layers.20.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
128
+ "model.layers.20.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
129
+ "model.layers.20.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
130
+ "model.layers.20.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
131
+ "model.layers.20.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
132
+ "model.layers.20.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
133
+ "model.layers.20.self_attn.q_proj.weight": "model-00002-of-00004.safetensors",
134
+ "model.layers.20.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
135
+ "model.layers.21.input_layernorm.weight": "model-00003-of-00004.safetensors",
136
+ "model.layers.21.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
137
+ "model.layers.21.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
138
+ "model.layers.21.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
139
+ "model.layers.21.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
140
+ "model.layers.21.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
141
+ "model.layers.21.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
142
+ "model.layers.21.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
143
+ "model.layers.21.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
144
+ "model.layers.22.input_layernorm.weight": "model-00003-of-00004.safetensors",
145
+ "model.layers.22.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
146
+ "model.layers.22.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
147
+ "model.layers.22.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
148
+ "model.layers.22.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
149
+ "model.layers.22.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
150
+ "model.layers.22.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
151
+ "model.layers.22.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
152
+ "model.layers.22.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
153
+ "model.layers.23.input_layernorm.weight": "model-00003-of-00004.safetensors",
154
+ "model.layers.23.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
155
+ "model.layers.23.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
156
+ "model.layers.23.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
157
+ "model.layers.23.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
158
+ "model.layers.23.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
159
+ "model.layers.23.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
160
+ "model.layers.23.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
161
+ "model.layers.23.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
162
+ "model.layers.24.input_layernorm.weight": "model-00003-of-00004.safetensors",
163
+ "model.layers.24.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
164
+ "model.layers.24.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
165
+ "model.layers.24.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
166
+ "model.layers.24.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
167
+ "model.layers.24.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
168
+ "model.layers.24.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
169
+ "model.layers.24.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
170
+ "model.layers.24.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
171
+ "model.layers.25.input_layernorm.weight": "model-00003-of-00004.safetensors",
172
+ "model.layers.25.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
173
+ "model.layers.25.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
174
+ "model.layers.25.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
175
+ "model.layers.25.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
176
+ "model.layers.25.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
177
+ "model.layers.25.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
178
+ "model.layers.25.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
179
+ "model.layers.25.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
180
+ "model.layers.26.input_layernorm.weight": "model-00003-of-00004.safetensors",
181
+ "model.layers.26.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
182
+ "model.layers.26.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
183
+ "model.layers.26.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
184
+ "model.layers.26.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
185
+ "model.layers.26.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
186
+ "model.layers.26.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
187
+ "model.layers.26.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
188
+ "model.layers.26.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
189
+ "model.layers.27.input_layernorm.weight": "model-00003-of-00004.safetensors",
190
+ "model.layers.27.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
191
+ "model.layers.27.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
192
+ "model.layers.27.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
193
+ "model.layers.27.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
194
+ "model.layers.27.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
195
+ "model.layers.27.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
196
+ "model.layers.27.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
197
+ "model.layers.27.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
198
+ "model.layers.28.input_layernorm.weight": "model-00003-of-00004.safetensors",
199
+ "model.layers.28.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
200
+ "model.layers.28.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
201
+ "model.layers.28.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
202
+ "model.layers.28.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
203
+ "model.layers.28.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
204
+ "model.layers.28.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
205
+ "model.layers.28.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
206
+ "model.layers.28.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
207
+ "model.layers.29.input_layernorm.weight": "model-00003-of-00004.safetensors",
208
+ "model.layers.29.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
209
+ "model.layers.29.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
210
+ "model.layers.29.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
211
+ "model.layers.29.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
212
+ "model.layers.29.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
213
+ "model.layers.29.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
214
+ "model.layers.29.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
215
+ "model.layers.29.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
216
+ "model.layers.3.input_layernorm.weight": "model-00001-of-00004.safetensors",
217
+ "model.layers.3.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
218
+ "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
219
+ "model.layers.3.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
220
+ "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
221
+ "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
222
+ "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
223
+ "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
224
+ "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
225
+ "model.layers.30.input_layernorm.weight": "model-00003-of-00004.safetensors",
226
+ "model.layers.30.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
227
+ "model.layers.30.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
228
+ "model.layers.30.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
229
+ "model.layers.30.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
230
+ "model.layers.30.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
231
+ "model.layers.30.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
232
+ "model.layers.30.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
233
+ "model.layers.30.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
234
+ "model.layers.31.input_layernorm.weight": "model-00003-of-00004.safetensors",
235
+ "model.layers.31.mlp.down_proj.weight": "model-00003-of-00004.safetensors",
236
+ "model.layers.31.mlp.gate_proj.weight": "model-00003-of-00004.safetensors",
237
+ "model.layers.31.mlp.up_proj.weight": "model-00003-of-00004.safetensors",
238
+ "model.layers.31.post_attention_layernorm.weight": "model-00003-of-00004.safetensors",
239
+ "model.layers.31.self_attn.k_proj.weight": "model-00003-of-00004.safetensors",
240
+ "model.layers.31.self_attn.o_proj.weight": "model-00003-of-00004.safetensors",
241
+ "model.layers.31.self_attn.q_proj.weight": "model-00003-of-00004.safetensors",
242
+ "model.layers.31.self_attn.v_proj.weight": "model-00003-of-00004.safetensors",
243
+ "model.layers.4.input_layernorm.weight": "model-00001-of-00004.safetensors",
244
+ "model.layers.4.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
245
+ "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
246
+ "model.layers.4.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
247
+ "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
248
+ "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
249
+ "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
250
+ "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
251
+ "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
252
+ "model.layers.5.input_layernorm.weight": "model-00001-of-00004.safetensors",
253
+ "model.layers.5.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
254
+ "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
255
+ "model.layers.5.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
256
+ "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
257
+ "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
258
+ "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
259
+ "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
260
+ "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
261
+ "model.layers.6.input_layernorm.weight": "model-00001-of-00004.safetensors",
262
+ "model.layers.6.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
263
+ "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
264
+ "model.layers.6.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
265
+ "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
266
+ "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
267
+ "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
268
+ "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
269
+ "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
270
+ "model.layers.7.input_layernorm.weight": "model-00001-of-00004.safetensors",
271
+ "model.layers.7.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
272
+ "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
273
+ "model.layers.7.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
274
+ "model.layers.7.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
275
+ "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
276
+ "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
277
+ "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
278
+ "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
279
+ "model.layers.8.input_layernorm.weight": "model-00001-of-00004.safetensors",
280
+ "model.layers.8.mlp.down_proj.weight": "model-00001-of-00004.safetensors",
281
+ "model.layers.8.mlp.gate_proj.weight": "model-00001-of-00004.safetensors",
282
+ "model.layers.8.mlp.up_proj.weight": "model-00001-of-00004.safetensors",
283
+ "model.layers.8.post_attention_layernorm.weight": "model-00001-of-00004.safetensors",
284
+ "model.layers.8.self_attn.k_proj.weight": "model-00001-of-00004.safetensors",
285
+ "model.layers.8.self_attn.o_proj.weight": "model-00001-of-00004.safetensors",
286
+ "model.layers.8.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
287
+ "model.layers.8.self_attn.v_proj.weight": "model-00001-of-00004.safetensors",
288
+ "model.layers.9.input_layernorm.weight": "model-00002-of-00004.safetensors",
289
+ "model.layers.9.mlp.down_proj.weight": "model-00002-of-00004.safetensors",
290
+ "model.layers.9.mlp.gate_proj.weight": "model-00002-of-00004.safetensors",
291
+ "model.layers.9.mlp.up_proj.weight": "model-00002-of-00004.safetensors",
292
+ "model.layers.9.post_attention_layernorm.weight": "model-00002-of-00004.safetensors",
293
+ "model.layers.9.self_attn.k_proj.weight": "model-00002-of-00004.safetensors",
294
+ "model.layers.9.self_attn.o_proj.weight": "model-00002-of-00004.safetensors",
295
+ "model.layers.9.self_attn.q_proj.weight": "model-00001-of-00004.safetensors",
296
+ "model.layers.9.self_attn.v_proj.weight": "model-00002-of-00004.safetensors",
297
+ "model.mm_projector.0.bias": "model-00004-of-00004.safetensors",
298
+ "model.mm_projector.0.weight": "model-00004-of-00004.safetensors",
299
+ "model.mm_projector.2.bias": "model-00004-of-00004.safetensors",
300
+ "model.mm_projector.2.weight": "model-00004-of-00004.safetensors",
301
+ "model.norm.weight": "model-00003-of-00004.safetensors",
302
+ "model.vision_tower.vision_tower.vision_model.embeddings.patch_embedding.bias": "model-00004-of-00004.safetensors",
303
+ "model.vision_tower.vision_tower.vision_model.embeddings.patch_embedding.weight": "model-00004-of-00004.safetensors",
304
+ "model.vision_tower.vision_tower.vision_model.embeddings.position_embedding.weight": "model-00004-of-00004.safetensors",
305
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.layer_norm1.bias": "model-00004-of-00004.safetensors",
306
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.layer_norm1.weight": "model-00004-of-00004.safetensors",
307
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.layer_norm2.bias": "model-00004-of-00004.safetensors",
308
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.layer_norm2.weight": "model-00004-of-00004.safetensors",
309
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.mlp.fc1.bias": "model-00004-of-00004.safetensors",
310
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.mlp.fc1.weight": "model-00004-of-00004.safetensors",
311
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.mlp.fc2.bias": "model-00004-of-00004.safetensors",
312
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.mlp.fc2.weight": "model-00004-of-00004.safetensors",
313
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
314
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
315
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
316
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
317
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
318
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
319
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
320
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.0.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
321
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.layer_norm1.bias": "model-00004-of-00004.safetensors",
322
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.layer_norm1.weight": "model-00004-of-00004.safetensors",
323
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.layer_norm2.bias": "model-00004-of-00004.safetensors",
324
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.layer_norm2.weight": "model-00004-of-00004.safetensors",
325
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.mlp.fc1.bias": "model-00004-of-00004.safetensors",
326
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.mlp.fc1.weight": "model-00004-of-00004.safetensors",
327
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.mlp.fc2.bias": "model-00004-of-00004.safetensors",
328
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.mlp.fc2.weight": "model-00004-of-00004.safetensors",
329
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
330
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
331
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
332
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
333
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
334
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
335
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
336
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.1.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
337
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.layer_norm1.bias": "model-00004-of-00004.safetensors",
338
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.layer_norm1.weight": "model-00004-of-00004.safetensors",
339
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.layer_norm2.bias": "model-00004-of-00004.safetensors",
340
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.layer_norm2.weight": "model-00004-of-00004.safetensors",
341
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.mlp.fc1.bias": "model-00004-of-00004.safetensors",
342
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.mlp.fc1.weight": "model-00004-of-00004.safetensors",
343
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.mlp.fc2.bias": "model-00004-of-00004.safetensors",
344
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.mlp.fc2.weight": "model-00004-of-00004.safetensors",
345
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
346
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
347
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
348
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
349
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
350
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
351
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
352
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.10.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
353
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.layer_norm1.bias": "model-00004-of-00004.safetensors",
354
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.layer_norm1.weight": "model-00004-of-00004.safetensors",
355
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.layer_norm2.bias": "model-00004-of-00004.safetensors",
356
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.layer_norm2.weight": "model-00004-of-00004.safetensors",
357
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.mlp.fc1.bias": "model-00004-of-00004.safetensors",
358
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.mlp.fc1.weight": "model-00004-of-00004.safetensors",
359
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.mlp.fc2.bias": "model-00004-of-00004.safetensors",
360
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.mlp.fc2.weight": "model-00004-of-00004.safetensors",
361
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
362
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
363
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
364
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
365
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
366
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
367
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
368
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.11.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
369
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.layer_norm1.bias": "model-00004-of-00004.safetensors",
370
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.layer_norm1.weight": "model-00004-of-00004.safetensors",
371
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.layer_norm2.bias": "model-00004-of-00004.safetensors",
372
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.layer_norm2.weight": "model-00004-of-00004.safetensors",
373
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.mlp.fc1.bias": "model-00004-of-00004.safetensors",
374
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.mlp.fc1.weight": "model-00004-of-00004.safetensors",
375
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.mlp.fc2.bias": "model-00004-of-00004.safetensors",
376
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.mlp.fc2.weight": "model-00004-of-00004.safetensors",
377
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
378
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
379
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
380
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
381
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
382
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
383
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
384
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.12.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
385
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.layer_norm1.bias": "model-00004-of-00004.safetensors",
386
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.layer_norm1.weight": "model-00004-of-00004.safetensors",
387
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.layer_norm2.bias": "model-00004-of-00004.safetensors",
388
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.layer_norm2.weight": "model-00004-of-00004.safetensors",
389
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.mlp.fc1.bias": "model-00004-of-00004.safetensors",
390
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.mlp.fc1.weight": "model-00004-of-00004.safetensors",
391
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.mlp.fc2.bias": "model-00004-of-00004.safetensors",
392
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.mlp.fc2.weight": "model-00004-of-00004.safetensors",
393
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
394
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
395
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
396
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
397
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
398
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
399
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
400
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.13.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
401
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.layer_norm1.bias": "model-00004-of-00004.safetensors",
402
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.layer_norm1.weight": "model-00004-of-00004.safetensors",
403
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.layer_norm2.bias": "model-00004-of-00004.safetensors",
404
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.layer_norm2.weight": "model-00004-of-00004.safetensors",
405
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.mlp.fc1.bias": "model-00004-of-00004.safetensors",
406
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.mlp.fc1.weight": "model-00004-of-00004.safetensors",
407
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.mlp.fc2.bias": "model-00004-of-00004.safetensors",
408
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.mlp.fc2.weight": "model-00004-of-00004.safetensors",
409
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
410
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
411
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
412
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
413
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
414
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
415
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
416
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.14.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
417
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.layer_norm1.bias": "model-00004-of-00004.safetensors",
418
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.layer_norm1.weight": "model-00004-of-00004.safetensors",
419
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.layer_norm2.bias": "model-00004-of-00004.safetensors",
420
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.layer_norm2.weight": "model-00004-of-00004.safetensors",
421
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.mlp.fc1.bias": "model-00004-of-00004.safetensors",
422
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.mlp.fc1.weight": "model-00004-of-00004.safetensors",
423
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.mlp.fc2.bias": "model-00004-of-00004.safetensors",
424
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.mlp.fc2.weight": "model-00004-of-00004.safetensors",
425
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
426
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
427
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
428
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
429
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
430
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
431
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
432
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.15.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
433
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.layer_norm1.bias": "model-00004-of-00004.safetensors",
434
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.layer_norm1.weight": "model-00004-of-00004.safetensors",
435
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.layer_norm2.bias": "model-00004-of-00004.safetensors",
436
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.layer_norm2.weight": "model-00004-of-00004.safetensors",
437
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.mlp.fc1.bias": "model-00004-of-00004.safetensors",
438
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.mlp.fc1.weight": "model-00004-of-00004.safetensors",
439
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.mlp.fc2.bias": "model-00004-of-00004.safetensors",
440
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.mlp.fc2.weight": "model-00004-of-00004.safetensors",
441
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
442
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
443
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
444
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
445
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
446
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
447
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
448
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.16.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
449
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.layer_norm1.bias": "model-00004-of-00004.safetensors",
450
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.layer_norm1.weight": "model-00004-of-00004.safetensors",
451
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.layer_norm2.bias": "model-00004-of-00004.safetensors",
452
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.layer_norm2.weight": "model-00004-of-00004.safetensors",
453
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.mlp.fc1.bias": "model-00004-of-00004.safetensors",
454
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.mlp.fc1.weight": "model-00004-of-00004.safetensors",
455
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.mlp.fc2.bias": "model-00004-of-00004.safetensors",
456
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.mlp.fc2.weight": "model-00004-of-00004.safetensors",
457
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
458
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
459
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
460
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
461
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
462
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
463
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
464
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.17.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
465
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.layer_norm1.bias": "model-00004-of-00004.safetensors",
466
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.layer_norm1.weight": "model-00004-of-00004.safetensors",
467
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.layer_norm2.bias": "model-00004-of-00004.safetensors",
468
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.layer_norm2.weight": "model-00004-of-00004.safetensors",
469
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.mlp.fc1.bias": "model-00004-of-00004.safetensors",
470
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.mlp.fc1.weight": "model-00004-of-00004.safetensors",
471
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.mlp.fc2.bias": "model-00004-of-00004.safetensors",
472
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.mlp.fc2.weight": "model-00004-of-00004.safetensors",
473
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
474
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
475
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
476
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
477
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
478
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
479
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
480
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.18.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
481
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.layer_norm1.bias": "model-00004-of-00004.safetensors",
482
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.layer_norm1.weight": "model-00004-of-00004.safetensors",
483
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.layer_norm2.bias": "model-00004-of-00004.safetensors",
484
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.layer_norm2.weight": "model-00004-of-00004.safetensors",
485
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.mlp.fc1.bias": "model-00004-of-00004.safetensors",
486
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.mlp.fc1.weight": "model-00004-of-00004.safetensors",
487
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.mlp.fc2.bias": "model-00004-of-00004.safetensors",
488
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.mlp.fc2.weight": "model-00004-of-00004.safetensors",
489
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
490
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
491
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
492
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
493
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
494
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
495
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
496
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.19.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
497
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.layer_norm1.bias": "model-00004-of-00004.safetensors",
498
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.layer_norm1.weight": "model-00004-of-00004.safetensors",
499
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.layer_norm2.bias": "model-00004-of-00004.safetensors",
500
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.layer_norm2.weight": "model-00004-of-00004.safetensors",
501
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.mlp.fc1.bias": "model-00004-of-00004.safetensors",
502
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.mlp.fc1.weight": "model-00004-of-00004.safetensors",
503
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.mlp.fc2.bias": "model-00004-of-00004.safetensors",
504
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.mlp.fc2.weight": "model-00004-of-00004.safetensors",
505
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
506
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
507
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
508
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
509
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
510
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
511
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
512
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.2.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
513
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.layer_norm1.bias": "model-00004-of-00004.safetensors",
514
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.layer_norm1.weight": "model-00004-of-00004.safetensors",
515
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.layer_norm2.bias": "model-00004-of-00004.safetensors",
516
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.layer_norm2.weight": "model-00004-of-00004.safetensors",
517
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.mlp.fc1.bias": "model-00004-of-00004.safetensors",
518
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.mlp.fc1.weight": "model-00004-of-00004.safetensors",
519
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.mlp.fc2.bias": "model-00004-of-00004.safetensors",
520
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.mlp.fc2.weight": "model-00004-of-00004.safetensors",
521
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
522
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
523
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
524
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
525
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
526
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
527
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
528
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.20.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
529
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.layer_norm1.bias": "model-00004-of-00004.safetensors",
530
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.layer_norm1.weight": "model-00004-of-00004.safetensors",
531
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.layer_norm2.bias": "model-00004-of-00004.safetensors",
532
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.layer_norm2.weight": "model-00004-of-00004.safetensors",
533
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.mlp.fc1.bias": "model-00004-of-00004.safetensors",
534
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.mlp.fc1.weight": "model-00004-of-00004.safetensors",
535
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.mlp.fc2.bias": "model-00004-of-00004.safetensors",
536
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.mlp.fc2.weight": "model-00004-of-00004.safetensors",
537
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
538
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
539
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
540
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
541
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
542
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
543
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
544
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.21.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
545
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.layer_norm1.bias": "model-00004-of-00004.safetensors",
546
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.layer_norm1.weight": "model-00004-of-00004.safetensors",
547
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.layer_norm2.bias": "model-00004-of-00004.safetensors",
548
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.layer_norm2.weight": "model-00004-of-00004.safetensors",
549
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.mlp.fc1.bias": "model-00004-of-00004.safetensors",
550
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.mlp.fc1.weight": "model-00004-of-00004.safetensors",
551
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.mlp.fc2.bias": "model-00004-of-00004.safetensors",
552
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.mlp.fc2.weight": "model-00004-of-00004.safetensors",
553
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
554
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
555
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
556
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
557
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
558
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
559
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
560
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.22.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
561
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.layer_norm1.bias": "model-00004-of-00004.safetensors",
562
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.layer_norm1.weight": "model-00004-of-00004.safetensors",
563
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.layer_norm2.bias": "model-00004-of-00004.safetensors",
564
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.layer_norm2.weight": "model-00004-of-00004.safetensors",
565
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.mlp.fc1.bias": "model-00004-of-00004.safetensors",
566
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.mlp.fc1.weight": "model-00004-of-00004.safetensors",
567
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.mlp.fc2.bias": "model-00004-of-00004.safetensors",
568
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.mlp.fc2.weight": "model-00004-of-00004.safetensors",
569
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
570
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
571
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
572
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
573
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
574
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
575
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
576
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.23.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
577
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.layer_norm1.bias": "model-00004-of-00004.safetensors",
578
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.layer_norm1.weight": "model-00004-of-00004.safetensors",
579
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.layer_norm2.bias": "model-00004-of-00004.safetensors",
580
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.layer_norm2.weight": "model-00004-of-00004.safetensors",
581
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.mlp.fc1.bias": "model-00004-of-00004.safetensors",
582
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.mlp.fc1.weight": "model-00004-of-00004.safetensors",
583
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.mlp.fc2.bias": "model-00004-of-00004.safetensors",
584
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.mlp.fc2.weight": "model-00004-of-00004.safetensors",
585
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
586
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
587
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
588
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
589
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
590
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
591
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
592
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.24.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
593
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.layer_norm1.bias": "model-00004-of-00004.safetensors",
594
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.layer_norm1.weight": "model-00004-of-00004.safetensors",
595
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.layer_norm2.bias": "model-00004-of-00004.safetensors",
596
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.layer_norm2.weight": "model-00004-of-00004.safetensors",
597
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.mlp.fc1.bias": "model-00004-of-00004.safetensors",
598
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.mlp.fc1.weight": "model-00004-of-00004.safetensors",
599
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.mlp.fc2.bias": "model-00004-of-00004.safetensors",
600
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.mlp.fc2.weight": "model-00004-of-00004.safetensors",
601
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
602
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
603
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
604
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
605
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
606
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
607
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
608
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.25.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
609
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.layer_norm1.bias": "model-00004-of-00004.safetensors",
610
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.layer_norm1.weight": "model-00004-of-00004.safetensors",
611
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.layer_norm2.bias": "model-00004-of-00004.safetensors",
612
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.layer_norm2.weight": "model-00004-of-00004.safetensors",
613
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.mlp.fc1.bias": "model-00004-of-00004.safetensors",
614
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.mlp.fc1.weight": "model-00004-of-00004.safetensors",
615
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.mlp.fc2.bias": "model-00004-of-00004.safetensors",
616
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.mlp.fc2.weight": "model-00004-of-00004.safetensors",
617
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
618
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
619
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
620
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
621
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
622
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
623
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
624
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.3.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
625
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.layer_norm1.bias": "model-00004-of-00004.safetensors",
626
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.layer_norm1.weight": "model-00004-of-00004.safetensors",
627
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.layer_norm2.bias": "model-00004-of-00004.safetensors",
628
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.layer_norm2.weight": "model-00004-of-00004.safetensors",
629
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.mlp.fc1.bias": "model-00004-of-00004.safetensors",
630
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.mlp.fc1.weight": "model-00004-of-00004.safetensors",
631
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.mlp.fc2.bias": "model-00004-of-00004.safetensors",
632
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.mlp.fc2.weight": "model-00004-of-00004.safetensors",
633
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
634
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
635
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
636
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
637
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
638
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
639
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
640
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.4.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
641
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.layer_norm1.bias": "model-00004-of-00004.safetensors",
642
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.layer_norm1.weight": "model-00004-of-00004.safetensors",
643
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.layer_norm2.bias": "model-00004-of-00004.safetensors",
644
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.layer_norm2.weight": "model-00004-of-00004.safetensors",
645
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.mlp.fc1.bias": "model-00004-of-00004.safetensors",
646
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.mlp.fc1.weight": "model-00004-of-00004.safetensors",
647
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.mlp.fc2.bias": "model-00004-of-00004.safetensors",
648
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.mlp.fc2.weight": "model-00004-of-00004.safetensors",
649
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
650
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
651
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
652
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
653
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
654
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
655
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
656
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.5.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
657
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.layer_norm1.bias": "model-00004-of-00004.safetensors",
658
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.layer_norm1.weight": "model-00004-of-00004.safetensors",
659
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.layer_norm2.bias": "model-00004-of-00004.safetensors",
660
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.layer_norm2.weight": "model-00004-of-00004.safetensors",
661
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.mlp.fc1.bias": "model-00004-of-00004.safetensors",
662
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.mlp.fc1.weight": "model-00004-of-00004.safetensors",
663
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.mlp.fc2.bias": "model-00004-of-00004.safetensors",
664
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.mlp.fc2.weight": "model-00004-of-00004.safetensors",
665
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
666
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
667
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
668
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
669
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
670
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
671
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
672
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.6.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
673
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.layer_norm1.bias": "model-00004-of-00004.safetensors",
674
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.layer_norm1.weight": "model-00004-of-00004.safetensors",
675
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.layer_norm2.bias": "model-00004-of-00004.safetensors",
676
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.layer_norm2.weight": "model-00004-of-00004.safetensors",
677
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.mlp.fc1.bias": "model-00004-of-00004.safetensors",
678
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.mlp.fc1.weight": "model-00004-of-00004.safetensors",
679
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.mlp.fc2.bias": "model-00004-of-00004.safetensors",
680
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.mlp.fc2.weight": "model-00004-of-00004.safetensors",
681
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
682
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
683
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
684
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
685
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
686
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
687
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
688
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.7.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
689
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.layer_norm1.bias": "model-00004-of-00004.safetensors",
690
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.layer_norm1.weight": "model-00004-of-00004.safetensors",
691
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.layer_norm2.bias": "model-00004-of-00004.safetensors",
692
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.layer_norm2.weight": "model-00004-of-00004.safetensors",
693
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.mlp.fc1.bias": "model-00004-of-00004.safetensors",
694
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.mlp.fc1.weight": "model-00004-of-00004.safetensors",
695
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.mlp.fc2.bias": "model-00004-of-00004.safetensors",
696
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.mlp.fc2.weight": "model-00004-of-00004.safetensors",
697
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
698
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
699
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
700
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
701
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
702
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
703
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
704
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.8.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
705
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.layer_norm1.bias": "model-00004-of-00004.safetensors",
706
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.layer_norm1.weight": "model-00004-of-00004.safetensors",
707
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.layer_norm2.bias": "model-00004-of-00004.safetensors",
708
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.layer_norm2.weight": "model-00004-of-00004.safetensors",
709
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.mlp.fc1.bias": "model-00004-of-00004.safetensors",
710
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.mlp.fc1.weight": "model-00004-of-00004.safetensors",
711
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.mlp.fc2.bias": "model-00004-of-00004.safetensors",
712
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.mlp.fc2.weight": "model-00004-of-00004.safetensors",
713
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.self_attn.k_proj.bias": "model-00004-of-00004.safetensors",
714
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.self_attn.k_proj.weight": "model-00004-of-00004.safetensors",
715
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.self_attn.out_proj.bias": "model-00004-of-00004.safetensors",
716
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.self_attn.out_proj.weight": "model-00004-of-00004.safetensors",
717
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.self_attn.q_proj.bias": "model-00004-of-00004.safetensors",
718
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.self_attn.q_proj.weight": "model-00004-of-00004.safetensors",
719
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.self_attn.v_proj.bias": "model-00004-of-00004.safetensors",
720
+ "model.vision_tower.vision_tower.vision_model.encoder.layers.9.self_attn.v_proj.weight": "model-00004-of-00004.safetensors",
721
+ "model.vision_tower.vision_tower.vision_model.post_layernorm.bias": "model-00004-of-00004.safetensors",
722
+ "model.vision_tower.vision_tower.vision_model.post_layernorm.weight": "model-00004-of-00004.safetensors"
723
+ }
724
+ }
sft_lladav_video_reversal_/ckpt/optimized/special_tokens_map.json ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ {
4
+ "content": "<image>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false
9
+ },
10
+ {
11
+ "content": "<im_start>",
12
+ "lstrip": false,
13
+ "normalized": false,
14
+ "rstrip": false,
15
+ "single_word": false
16
+ },
17
+ {
18
+ "content": "<im_end>",
19
+ "lstrip": false,
20
+ "normalized": false,
21
+ "rstrip": false,
22
+ "single_word": false
23
+ }
24
+ ],
25
+ "bos_token": {
26
+ "content": "<|startoftext|>",
27
+ "lstrip": false,
28
+ "normalized": false,
29
+ "rstrip": false,
30
+ "single_word": false
31
+ },
32
+ "cls_token": {
33
+ "content": "[CLS]",
34
+ "lstrip": false,
35
+ "normalized": false,
36
+ "rstrip": false,
37
+ "single_word": false
38
+ },
39
+ "eos_token": {
40
+ "content": "<|endoftext|>",
41
+ "lstrip": false,
42
+ "normalized": false,
43
+ "rstrip": false,
44
+ "single_word": false
45
+ },
46
+ "pad_token": {
47
+ "content": "<|endoftext|>",
48
+ "lstrip": false,
49
+ "normalized": false,
50
+ "rstrip": false,
51
+ "single_word": false
52
+ }
53
+ }
sft_lladav_video_reversal_/ckpt/optimized/tokenizer_config.json ADDED
@@ -0,0 +1,2204 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_bos_token": false,
3
+ "add_eos_token": false,
4
+ "added_tokens_decoder": {
5
+ "126080": {
6
+ "content": "<|startoftext|>",
7
+ "lstrip": false,
8
+ "normalized": false,
9
+ "rstrip": false,
10
+ "single_word": false,
11
+ "special": true
12
+ },
13
+ "126081": {
14
+ "content": "<|endoftext|>",
15
+ "lstrip": false,
16
+ "normalized": false,
17
+ "rstrip": false,
18
+ "single_word": false,
19
+ "special": true
20
+ },
21
+ "126082": {
22
+ "content": "[CLS]",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false,
27
+ "special": true
28
+ },
29
+ "126083": {
30
+ "content": "[gMASK]",
31
+ "lstrip": false,
32
+ "normalized": false,
33
+ "rstrip": false,
34
+ "single_word": false,
35
+ "special": true
36
+ },
37
+ "126084": {
38
+ "content": "<|reserved_token_0|>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false,
43
+ "special": true
44
+ },
45
+ "126085": {
46
+ "content": "<|reserved_token_1|>",
47
+ "lstrip": false,
48
+ "normalized": false,
49
+ "rstrip": false,
50
+ "single_word": false,
51
+ "special": true
52
+ },
53
+ "126086": {
54
+ "content": "<|reserved_token_2|>",
55
+ "lstrip": false,
56
+ "normalized": false,
57
+ "rstrip": false,
58
+ "single_word": false,
59
+ "special": true
60
+ },
61
+ "126087": {
62
+ "content": "<|reserved_token_3|>",
63
+ "lstrip": false,
64
+ "normalized": false,
65
+ "rstrip": false,
66
+ "single_word": false,
67
+ "special": true
68
+ },
69
+ "126088": {
70
+ "content": "<|reserved_token_4|>",
71
+ "lstrip": false,
72
+ "normalized": false,
73
+ "rstrip": false,
74
+ "single_word": false,
75
+ "special": true
76
+ },
77
+ "126089": {
78
+ "content": "<|reserved_token_5|>",
79
+ "lstrip": false,
80
+ "normalized": false,
81
+ "rstrip": false,
82
+ "single_word": false,
83
+ "special": true
84
+ },
85
+ "126090": {
86
+ "content": "<|reserved_token_6|>",
87
+ "lstrip": false,
88
+ "normalized": false,
89
+ "rstrip": false,
90
+ "single_word": false,
91
+ "special": true
92
+ },
93
+ "126091": {
94
+ "content": "<|reserved_token_7|>",
95
+ "lstrip": false,
96
+ "normalized": false,
97
+ "rstrip": false,
98
+ "single_word": false,
99
+ "special": true
100
+ },
101
+ "126092": {
102
+ "content": "<|reserved_token_8|>",
103
+ "lstrip": false,
104
+ "normalized": false,
105
+ "rstrip": false,
106
+ "single_word": false,
107
+ "special": true
108
+ },
109
+ "126093": {
110
+ "content": "<|reserved_token_9|>",
111
+ "lstrip": false,
112
+ "normalized": false,
113
+ "rstrip": false,
114
+ "single_word": false,
115
+ "special": true
116
+ },
117
+ "126094": {
118
+ "content": "<|reserved_token_10|>",
119
+ "lstrip": false,
120
+ "normalized": false,
121
+ "rstrip": false,
122
+ "single_word": false,
123
+ "special": true
124
+ },
125
+ "126095": {
126
+ "content": "<|reserved_token_11|>",
127
+ "lstrip": false,
128
+ "normalized": false,
129
+ "rstrip": false,
130
+ "single_word": false,
131
+ "special": true
132
+ },
133
+ "126096": {
134
+ "content": "<|reserved_token_12|>",
135
+ "lstrip": false,
136
+ "normalized": false,
137
+ "rstrip": false,
138
+ "single_word": false,
139
+ "special": true
140
+ },
141
+ "126097": {
142
+ "content": "<|reserved_token_13|>",
143
+ "lstrip": false,
144
+ "normalized": false,
145
+ "rstrip": false,
146
+ "single_word": false,
147
+ "special": true
148
+ },
149
+ "126098": {
150
+ "content": "<|reserved_token_14|>",
151
+ "lstrip": false,
152
+ "normalized": false,
153
+ "rstrip": false,
154
+ "single_word": false,
155
+ "special": true
156
+ },
157
+ "126099": {
158
+ "content": "<|reserved_token_15|>",
159
+ "lstrip": false,
160
+ "normalized": false,
161
+ "rstrip": false,
162
+ "single_word": false,
163
+ "special": true
164
+ },
165
+ "126100": {
166
+ "content": "<|reserved_token_16|>",
167
+ "lstrip": false,
168
+ "normalized": false,
169
+ "rstrip": false,
170
+ "single_word": false,
171
+ "special": true
172
+ },
173
+ "126101": {
174
+ "content": "<|reserved_token_17|>",
175
+ "lstrip": false,
176
+ "normalized": false,
177
+ "rstrip": false,
178
+ "single_word": false,
179
+ "special": true
180
+ },
181
+ "126102": {
182
+ "content": "<|reserved_token_18|>",
183
+ "lstrip": false,
184
+ "normalized": false,
185
+ "rstrip": false,
186
+ "single_word": false,
187
+ "special": true
188
+ },
189
+ "126103": {
190
+ "content": "<|reserved_token_19|>",
191
+ "lstrip": false,
192
+ "normalized": false,
193
+ "rstrip": false,
194
+ "single_word": false,
195
+ "special": true
196
+ },
197
+ "126104": {
198
+ "content": "<|reserved_token_20|>",
199
+ "lstrip": false,
200
+ "normalized": false,
201
+ "rstrip": false,
202
+ "single_word": false,
203
+ "special": true
204
+ },
205
+ "126105": {
206
+ "content": "<|reserved_token_21|>",
207
+ "lstrip": false,
208
+ "normalized": false,
209
+ "rstrip": false,
210
+ "single_word": false,
211
+ "special": true
212
+ },
213
+ "126106": {
214
+ "content": "<|reserved_token_22|>",
215
+ "lstrip": false,
216
+ "normalized": false,
217
+ "rstrip": false,
218
+ "single_word": false,
219
+ "special": true
220
+ },
221
+ "126107": {
222
+ "content": "<|reserved_token_23|>",
223
+ "lstrip": false,
224
+ "normalized": false,
225
+ "rstrip": false,
226
+ "single_word": false,
227
+ "special": true
228
+ },
229
+ "126108": {
230
+ "content": "<|reserved_token_24|>",
231
+ "lstrip": false,
232
+ "normalized": false,
233
+ "rstrip": false,
234
+ "single_word": false,
235
+ "special": true
236
+ },
237
+ "126109": {
238
+ "content": "<|reserved_token_25|>",
239
+ "lstrip": false,
240
+ "normalized": false,
241
+ "rstrip": false,
242
+ "single_word": false,
243
+ "special": true
244
+ },
245
+ "126110": {
246
+ "content": "<|reserved_token_26|>",
247
+ "lstrip": false,
248
+ "normalized": false,
249
+ "rstrip": false,
250
+ "single_word": false,
251
+ "special": true
252
+ },
253
+ "126111": {
254
+ "content": "<|reserved_token_27|>",
255
+ "lstrip": false,
256
+ "normalized": false,
257
+ "rstrip": false,
258
+ "single_word": false,
259
+ "special": true
260
+ },
261
+ "126112": {
262
+ "content": "<|reserved_token_28|>",
263
+ "lstrip": false,
264
+ "normalized": false,
265
+ "rstrip": false,
266
+ "single_word": false,
267
+ "special": true
268
+ },
269
+ "126113": {
270
+ "content": "<|reserved_token_29|>",
271
+ "lstrip": false,
272
+ "normalized": false,
273
+ "rstrip": false,
274
+ "single_word": false,
275
+ "special": true
276
+ },
277
+ "126114": {
278
+ "content": "<|reserved_token_30|>",
279
+ "lstrip": false,
280
+ "normalized": false,
281
+ "rstrip": false,
282
+ "single_word": false,
283
+ "special": true
284
+ },
285
+ "126115": {
286
+ "content": "<|reserved_token_31|>",
287
+ "lstrip": false,
288
+ "normalized": false,
289
+ "rstrip": false,
290
+ "single_word": false,
291
+ "special": true
292
+ },
293
+ "126116": {
294
+ "content": "<|reserved_token_32|>",
295
+ "lstrip": false,
296
+ "normalized": false,
297
+ "rstrip": false,
298
+ "single_word": false,
299
+ "special": true
300
+ },
301
+ "126117": {
302
+ "content": "<|reserved_token_33|>",
303
+ "lstrip": false,
304
+ "normalized": false,
305
+ "rstrip": false,
306
+ "single_word": false,
307
+ "special": true
308
+ },
309
+ "126118": {
310
+ "content": "<|reserved_token_34|>",
311
+ "lstrip": false,
312
+ "normalized": false,
313
+ "rstrip": false,
314
+ "single_word": false,
315
+ "special": true
316
+ },
317
+ "126119": {
318
+ "content": "<|reserved_token_35|>",
319
+ "lstrip": false,
320
+ "normalized": false,
321
+ "rstrip": false,
322
+ "single_word": false,
323
+ "special": true
324
+ },
325
+ "126120": {
326
+ "content": "<|reserved_token_36|>",
327
+ "lstrip": false,
328
+ "normalized": false,
329
+ "rstrip": false,
330
+ "single_word": false,
331
+ "special": true
332
+ },
333
+ "126121": {
334
+ "content": "<|reserved_token_37|>",
335
+ "lstrip": false,
336
+ "normalized": false,
337
+ "rstrip": false,
338
+ "single_word": false,
339
+ "special": true
340
+ },
341
+ "126122": {
342
+ "content": "<|reserved_token_38|>",
343
+ "lstrip": false,
344
+ "normalized": false,
345
+ "rstrip": false,
346
+ "single_word": false,
347
+ "special": true
348
+ },
349
+ "126123": {
350
+ "content": "<|reserved_token_39|>",
351
+ "lstrip": false,
352
+ "normalized": false,
353
+ "rstrip": false,
354
+ "single_word": false,
355
+ "special": true
356
+ },
357
+ "126124": {
358
+ "content": "<|reserved_token_40|>",
359
+ "lstrip": false,
360
+ "normalized": false,
361
+ "rstrip": false,
362
+ "single_word": false,
363
+ "special": true
364
+ },
365
+ "126125": {
366
+ "content": "<|reserved_token_41|>",
367
+ "lstrip": false,
368
+ "normalized": false,
369
+ "rstrip": false,
370
+ "single_word": false,
371
+ "special": true
372
+ },
373
+ "126126": {
374
+ "content": "<|reserved_token_42|>",
375
+ "lstrip": false,
376
+ "normalized": false,
377
+ "rstrip": false,
378
+ "single_word": false,
379
+ "special": true
380
+ },
381
+ "126127": {
382
+ "content": "<|reserved_token_43|>",
383
+ "lstrip": false,
384
+ "normalized": false,
385
+ "rstrip": false,
386
+ "single_word": false,
387
+ "special": true
388
+ },
389
+ "126128": {
390
+ "content": "<|reserved_token_44|>",
391
+ "lstrip": false,
392
+ "normalized": false,
393
+ "rstrip": false,
394
+ "single_word": false,
395
+ "special": true
396
+ },
397
+ "126129": {
398
+ "content": "<|reserved_token_45|>",
399
+ "lstrip": false,
400
+ "normalized": false,
401
+ "rstrip": false,
402
+ "single_word": false,
403
+ "special": true
404
+ },
405
+ "126130": {
406
+ "content": "<|reserved_token_46|>",
407
+ "lstrip": false,
408
+ "normalized": false,
409
+ "rstrip": false,
410
+ "single_word": false,
411
+ "special": true
412
+ },
413
+ "126131": {
414
+ "content": "<|reserved_token_47|>",
415
+ "lstrip": false,
416
+ "normalized": false,
417
+ "rstrip": false,
418
+ "single_word": false,
419
+ "special": true
420
+ },
421
+ "126132": {
422
+ "content": "<|reserved_token_48|>",
423
+ "lstrip": false,
424
+ "normalized": false,
425
+ "rstrip": false,
426
+ "single_word": false,
427
+ "special": true
428
+ },
429
+ "126133": {
430
+ "content": "<|reserved_token_49|>",
431
+ "lstrip": false,
432
+ "normalized": false,
433
+ "rstrip": false,
434
+ "single_word": false,
435
+ "special": true
436
+ },
437
+ "126134": {
438
+ "content": "<|reserved_token_50|>",
439
+ "lstrip": false,
440
+ "normalized": false,
441
+ "rstrip": false,
442
+ "single_word": false,
443
+ "special": true
444
+ },
445
+ "126135": {
446
+ "content": "<|reserved_token_51|>",
447
+ "lstrip": false,
448
+ "normalized": false,
449
+ "rstrip": false,
450
+ "single_word": false,
451
+ "special": true
452
+ },
453
+ "126136": {
454
+ "content": "<|reserved_token_52|>",
455
+ "lstrip": false,
456
+ "normalized": false,
457
+ "rstrip": false,
458
+ "single_word": false,
459
+ "special": true
460
+ },
461
+ "126137": {
462
+ "content": "<|reserved_token_53|>",
463
+ "lstrip": false,
464
+ "normalized": false,
465
+ "rstrip": false,
466
+ "single_word": false,
467
+ "special": true
468
+ },
469
+ "126138": {
470
+ "content": "<|reserved_token_54|>",
471
+ "lstrip": false,
472
+ "normalized": false,
473
+ "rstrip": false,
474
+ "single_word": false,
475
+ "special": true
476
+ },
477
+ "126139": {
478
+ "content": "<|reserved_token_55|>",
479
+ "lstrip": false,
480
+ "normalized": false,
481
+ "rstrip": false,
482
+ "single_word": false,
483
+ "special": true
484
+ },
485
+ "126140": {
486
+ "content": "<|reserved_token_56|>",
487
+ "lstrip": false,
488
+ "normalized": false,
489
+ "rstrip": false,
490
+ "single_word": false,
491
+ "special": true
492
+ },
493
+ "126141": {
494
+ "content": "<|reserved_token_57|>",
495
+ "lstrip": false,
496
+ "normalized": false,
497
+ "rstrip": false,
498
+ "single_word": false,
499
+ "special": true
500
+ },
501
+ "126142": {
502
+ "content": "<|reserved_token_58|>",
503
+ "lstrip": false,
504
+ "normalized": false,
505
+ "rstrip": false,
506
+ "single_word": false,
507
+ "special": true
508
+ },
509
+ "126143": {
510
+ "content": "<|reserved_token_59|>",
511
+ "lstrip": false,
512
+ "normalized": false,
513
+ "rstrip": false,
514
+ "single_word": false,
515
+ "special": true
516
+ },
517
+ "126144": {
518
+ "content": "<|reserved_token_60|>",
519
+ "lstrip": false,
520
+ "normalized": false,
521
+ "rstrip": false,
522
+ "single_word": false,
523
+ "special": true
524
+ },
525
+ "126145": {
526
+ "content": "<|reserved_token_61|>",
527
+ "lstrip": false,
528
+ "normalized": false,
529
+ "rstrip": false,
530
+ "single_word": false,
531
+ "special": true
532
+ },
533
+ "126146": {
534
+ "content": "<|reserved_token_62|>",
535
+ "lstrip": false,
536
+ "normalized": false,
537
+ "rstrip": false,
538
+ "single_word": false,
539
+ "special": true
540
+ },
541
+ "126147": {
542
+ "content": "<|reserved_token_63|>",
543
+ "lstrip": false,
544
+ "normalized": false,
545
+ "rstrip": false,
546
+ "single_word": false,
547
+ "special": true
548
+ },
549
+ "126148": {
550
+ "content": "<|reserved_token_64|>",
551
+ "lstrip": false,
552
+ "normalized": false,
553
+ "rstrip": false,
554
+ "single_word": false,
555
+ "special": true
556
+ },
557
+ "126149": {
558
+ "content": "<|reserved_token_65|>",
559
+ "lstrip": false,
560
+ "normalized": false,
561
+ "rstrip": false,
562
+ "single_word": false,
563
+ "special": true
564
+ },
565
+ "126150": {
566
+ "content": "<|reserved_token_66|>",
567
+ "lstrip": false,
568
+ "normalized": false,
569
+ "rstrip": false,
570
+ "single_word": false,
571
+ "special": true
572
+ },
573
+ "126151": {
574
+ "content": "<|reserved_token_67|>",
575
+ "lstrip": false,
576
+ "normalized": false,
577
+ "rstrip": false,
578
+ "single_word": false,
579
+ "special": true
580
+ },
581
+ "126152": {
582
+ "content": "<|reserved_token_68|>",
583
+ "lstrip": false,
584
+ "normalized": false,
585
+ "rstrip": false,
586
+ "single_word": false,
587
+ "special": true
588
+ },
589
+ "126153": {
590
+ "content": "<|reserved_token_69|>",
591
+ "lstrip": false,
592
+ "normalized": false,
593
+ "rstrip": false,
594
+ "single_word": false,
595
+ "special": true
596
+ },
597
+ "126154": {
598
+ "content": "<|reserved_token_70|>",
599
+ "lstrip": false,
600
+ "normalized": false,
601
+ "rstrip": false,
602
+ "single_word": false,
603
+ "special": true
604
+ },
605
+ "126155": {
606
+ "content": "<|reserved_token_71|>",
607
+ "lstrip": false,
608
+ "normalized": false,
609
+ "rstrip": false,
610
+ "single_word": false,
611
+ "special": true
612
+ },
613
+ "126156": {
614
+ "content": "<|reserved_token_72|>",
615
+ "lstrip": false,
616
+ "normalized": false,
617
+ "rstrip": false,
618
+ "single_word": false,
619
+ "special": true
620
+ },
621
+ "126157": {
622
+ "content": "<|reserved_token_73|>",
623
+ "lstrip": false,
624
+ "normalized": false,
625
+ "rstrip": false,
626
+ "single_word": false,
627
+ "special": true
628
+ },
629
+ "126158": {
630
+ "content": "<|reserved_token_74|>",
631
+ "lstrip": false,
632
+ "normalized": false,
633
+ "rstrip": false,
634
+ "single_word": false,
635
+ "special": true
636
+ },
637
+ "126159": {
638
+ "content": "<|reserved_token_75|>",
639
+ "lstrip": false,
640
+ "normalized": false,
641
+ "rstrip": false,
642
+ "single_word": false,
643
+ "special": true
644
+ },
645
+ "126160": {
646
+ "content": "<|reserved_token_76|>",
647
+ "lstrip": false,
648
+ "normalized": false,
649
+ "rstrip": false,
650
+ "single_word": false,
651
+ "special": true
652
+ },
653
+ "126161": {
654
+ "content": "<|reserved_token_77|>",
655
+ "lstrip": false,
656
+ "normalized": false,
657
+ "rstrip": false,
658
+ "single_word": false,
659
+ "special": true
660
+ },
661
+ "126162": {
662
+ "content": "<|reserved_token_78|>",
663
+ "lstrip": false,
664
+ "normalized": false,
665
+ "rstrip": false,
666
+ "single_word": false,
667
+ "special": true
668
+ },
669
+ "126163": {
670
+ "content": "<|reserved_token_79|>",
671
+ "lstrip": false,
672
+ "normalized": false,
673
+ "rstrip": false,
674
+ "single_word": false,
675
+ "special": true
676
+ },
677
+ "126164": {
678
+ "content": "<|reserved_token_80|>",
679
+ "lstrip": false,
680
+ "normalized": false,
681
+ "rstrip": false,
682
+ "single_word": false,
683
+ "special": true
684
+ },
685
+ "126165": {
686
+ "content": "<|reserved_token_81|>",
687
+ "lstrip": false,
688
+ "normalized": false,
689
+ "rstrip": false,
690
+ "single_word": false,
691
+ "special": true
692
+ },
693
+ "126166": {
694
+ "content": "<|reserved_token_82|>",
695
+ "lstrip": false,
696
+ "normalized": false,
697
+ "rstrip": false,
698
+ "single_word": false,
699
+ "special": true
700
+ },
701
+ "126167": {
702
+ "content": "<|reserved_token_83|>",
703
+ "lstrip": false,
704
+ "normalized": false,
705
+ "rstrip": false,
706
+ "single_word": false,
707
+ "special": true
708
+ },
709
+ "126168": {
710
+ "content": "<|reserved_token_84|>",
711
+ "lstrip": false,
712
+ "normalized": false,
713
+ "rstrip": false,
714
+ "single_word": false,
715
+ "special": true
716
+ },
717
+ "126169": {
718
+ "content": "<|reserved_token_85|>",
719
+ "lstrip": false,
720
+ "normalized": false,
721
+ "rstrip": false,
722
+ "single_word": false,
723
+ "special": true
724
+ },
725
+ "126170": {
726
+ "content": "<|reserved_token_86|>",
727
+ "lstrip": false,
728
+ "normalized": false,
729
+ "rstrip": false,
730
+ "single_word": false,
731
+ "special": true
732
+ },
733
+ "126171": {
734
+ "content": "<|reserved_token_87|>",
735
+ "lstrip": false,
736
+ "normalized": false,
737
+ "rstrip": false,
738
+ "single_word": false,
739
+ "special": true
740
+ },
741
+ "126172": {
742
+ "content": "<|reserved_token_88|>",
743
+ "lstrip": false,
744
+ "normalized": false,
745
+ "rstrip": false,
746
+ "single_word": false,
747
+ "special": true
748
+ },
749
+ "126173": {
750
+ "content": "<|reserved_token_89|>",
751
+ "lstrip": false,
752
+ "normalized": false,
753
+ "rstrip": false,
754
+ "single_word": false,
755
+ "special": true
756
+ },
757
+ "126174": {
758
+ "content": "<|reserved_token_90|>",
759
+ "lstrip": false,
760
+ "normalized": false,
761
+ "rstrip": false,
762
+ "single_word": false,
763
+ "special": true
764
+ },
765
+ "126175": {
766
+ "content": "<|reserved_token_91|>",
767
+ "lstrip": false,
768
+ "normalized": false,
769
+ "rstrip": false,
770
+ "single_word": false,
771
+ "special": true
772
+ },
773
+ "126176": {
774
+ "content": "<|reserved_token_92|>",
775
+ "lstrip": false,
776
+ "normalized": false,
777
+ "rstrip": false,
778
+ "single_word": false,
779
+ "special": true
780
+ },
781
+ "126177": {
782
+ "content": "<|reserved_token_93|>",
783
+ "lstrip": false,
784
+ "normalized": false,
785
+ "rstrip": false,
786
+ "single_word": false,
787
+ "special": true
788
+ },
789
+ "126178": {
790
+ "content": "<|reserved_token_94|>",
791
+ "lstrip": false,
792
+ "normalized": false,
793
+ "rstrip": false,
794
+ "single_word": false,
795
+ "special": true
796
+ },
797
+ "126179": {
798
+ "content": "<|reserved_token_95|>",
799
+ "lstrip": false,
800
+ "normalized": false,
801
+ "rstrip": false,
802
+ "single_word": false,
803
+ "special": true
804
+ },
805
+ "126180": {
806
+ "content": "<|reserved_token_96|>",
807
+ "lstrip": false,
808
+ "normalized": false,
809
+ "rstrip": false,
810
+ "single_word": false,
811
+ "special": true
812
+ },
813
+ "126181": {
814
+ "content": "<|reserved_token_97|>",
815
+ "lstrip": false,
816
+ "normalized": false,
817
+ "rstrip": false,
818
+ "single_word": false,
819
+ "special": true
820
+ },
821
+ "126182": {
822
+ "content": "<|reserved_token_98|>",
823
+ "lstrip": false,
824
+ "normalized": false,
825
+ "rstrip": false,
826
+ "single_word": false,
827
+ "special": true
828
+ },
829
+ "126183": {
830
+ "content": "<|reserved_token_99|>",
831
+ "lstrip": false,
832
+ "normalized": false,
833
+ "rstrip": false,
834
+ "single_word": false,
835
+ "special": true
836
+ },
837
+ "126184": {
838
+ "content": "<|reserved_token_100|>",
839
+ "lstrip": false,
840
+ "normalized": false,
841
+ "rstrip": false,
842
+ "single_word": false,
843
+ "special": true
844
+ },
845
+ "126185": {
846
+ "content": "<|reserved_token_101|>",
847
+ "lstrip": false,
848
+ "normalized": false,
849
+ "rstrip": false,
850
+ "single_word": false,
851
+ "special": true
852
+ },
853
+ "126186": {
854
+ "content": "<|reserved_token_102|>",
855
+ "lstrip": false,
856
+ "normalized": false,
857
+ "rstrip": false,
858
+ "single_word": false,
859
+ "special": true
860
+ },
861
+ "126187": {
862
+ "content": "<|reserved_token_103|>",
863
+ "lstrip": false,
864
+ "normalized": false,
865
+ "rstrip": false,
866
+ "single_word": false,
867
+ "special": true
868
+ },
869
+ "126188": {
870
+ "content": "<|reserved_token_104|>",
871
+ "lstrip": false,
872
+ "normalized": false,
873
+ "rstrip": false,
874
+ "single_word": false,
875
+ "special": true
876
+ },
877
+ "126189": {
878
+ "content": "<|reserved_token_105|>",
879
+ "lstrip": false,
880
+ "normalized": false,
881
+ "rstrip": false,
882
+ "single_word": false,
883
+ "special": true
884
+ },
885
+ "126190": {
886
+ "content": "<|reserved_token_106|>",
887
+ "lstrip": false,
888
+ "normalized": false,
889
+ "rstrip": false,
890
+ "single_word": false,
891
+ "special": true
892
+ },
893
+ "126191": {
894
+ "content": "<|reserved_token_107|>",
895
+ "lstrip": false,
896
+ "normalized": false,
897
+ "rstrip": false,
898
+ "single_word": false,
899
+ "special": true
900
+ },
901
+ "126192": {
902
+ "content": "<|reserved_token_108|>",
903
+ "lstrip": false,
904
+ "normalized": false,
905
+ "rstrip": false,
906
+ "single_word": false,
907
+ "special": true
908
+ },
909
+ "126193": {
910
+ "content": "<|reserved_token_109|>",
911
+ "lstrip": false,
912
+ "normalized": false,
913
+ "rstrip": false,
914
+ "single_word": false,
915
+ "special": true
916
+ },
917
+ "126194": {
918
+ "content": "<|reserved_token_110|>",
919
+ "lstrip": false,
920
+ "normalized": false,
921
+ "rstrip": false,
922
+ "single_word": false,
923
+ "special": true
924
+ },
925
+ "126195": {
926
+ "content": "<|reserved_token_111|>",
927
+ "lstrip": false,
928
+ "normalized": false,
929
+ "rstrip": false,
930
+ "single_word": false,
931
+ "special": true
932
+ },
933
+ "126196": {
934
+ "content": "<|reserved_token_112|>",
935
+ "lstrip": false,
936
+ "normalized": false,
937
+ "rstrip": false,
938
+ "single_word": false,
939
+ "special": true
940
+ },
941
+ "126197": {
942
+ "content": "<|reserved_token_113|>",
943
+ "lstrip": false,
944
+ "normalized": false,
945
+ "rstrip": false,
946
+ "single_word": false,
947
+ "special": true
948
+ },
949
+ "126198": {
950
+ "content": "<|reserved_token_114|>",
951
+ "lstrip": false,
952
+ "normalized": false,
953
+ "rstrip": false,
954
+ "single_word": false,
955
+ "special": true
956
+ },
957
+ "126199": {
958
+ "content": "<|reserved_token_115|>",
959
+ "lstrip": false,
960
+ "normalized": false,
961
+ "rstrip": false,
962
+ "single_word": false,
963
+ "special": true
964
+ },
965
+ "126200": {
966
+ "content": "<|reserved_token_116|>",
967
+ "lstrip": false,
968
+ "normalized": false,
969
+ "rstrip": false,
970
+ "single_word": false,
971
+ "special": true
972
+ },
973
+ "126201": {
974
+ "content": "<|reserved_token_117|>",
975
+ "lstrip": false,
976
+ "normalized": false,
977
+ "rstrip": false,
978
+ "single_word": false,
979
+ "special": true
980
+ },
981
+ "126202": {
982
+ "content": "<|reserved_token_118|>",
983
+ "lstrip": false,
984
+ "normalized": false,
985
+ "rstrip": false,
986
+ "single_word": false,
987
+ "special": true
988
+ },
989
+ "126203": {
990
+ "content": "<|reserved_token_119|>",
991
+ "lstrip": false,
992
+ "normalized": false,
993
+ "rstrip": false,
994
+ "single_word": false,
995
+ "special": true
996
+ },
997
+ "126204": {
998
+ "content": "<|reserved_token_120|>",
999
+ "lstrip": false,
1000
+ "normalized": false,
1001
+ "rstrip": false,
1002
+ "single_word": false,
1003
+ "special": true
1004
+ },
1005
+ "126205": {
1006
+ "content": "<|reserved_token_121|>",
1007
+ "lstrip": false,
1008
+ "normalized": false,
1009
+ "rstrip": false,
1010
+ "single_word": false,
1011
+ "special": true
1012
+ },
1013
+ "126206": {
1014
+ "content": "<|reserved_token_122|>",
1015
+ "lstrip": false,
1016
+ "normalized": false,
1017
+ "rstrip": false,
1018
+ "single_word": false,
1019
+ "special": true
1020
+ },
1021
+ "126207": {
1022
+ "content": "<|reserved_token_123|>",
1023
+ "lstrip": false,
1024
+ "normalized": false,
1025
+ "rstrip": false,
1026
+ "single_word": false,
1027
+ "special": true
1028
+ },
1029
+ "126208": {
1030
+ "content": "<|reserved_token_124|>",
1031
+ "lstrip": false,
1032
+ "normalized": false,
1033
+ "rstrip": false,
1034
+ "single_word": false,
1035
+ "special": true
1036
+ },
1037
+ "126209": {
1038
+ "content": "<|reserved_token_125|>",
1039
+ "lstrip": false,
1040
+ "normalized": false,
1041
+ "rstrip": false,
1042
+ "single_word": false,
1043
+ "special": true
1044
+ },
1045
+ "126210": {
1046
+ "content": "<|reserved_token_126|>",
1047
+ "lstrip": false,
1048
+ "normalized": false,
1049
+ "rstrip": false,
1050
+ "single_word": false,
1051
+ "special": true
1052
+ },
1053
+ "126211": {
1054
+ "content": "<|reserved_token_127|>",
1055
+ "lstrip": false,
1056
+ "normalized": false,
1057
+ "rstrip": false,
1058
+ "single_word": false,
1059
+ "special": true
1060
+ },
1061
+ "126212": {
1062
+ "content": "<|reserved_token_128|>",
1063
+ "lstrip": false,
1064
+ "normalized": false,
1065
+ "rstrip": false,
1066
+ "single_word": false,
1067
+ "special": true
1068
+ },
1069
+ "126213": {
1070
+ "content": "<|reserved_token_129|>",
1071
+ "lstrip": false,
1072
+ "normalized": false,
1073
+ "rstrip": false,
1074
+ "single_word": false,
1075
+ "special": true
1076
+ },
1077
+ "126214": {
1078
+ "content": "<|reserved_token_130|>",
1079
+ "lstrip": false,
1080
+ "normalized": false,
1081
+ "rstrip": false,
1082
+ "single_word": false,
1083
+ "special": true
1084
+ },
1085
+ "126215": {
1086
+ "content": "<|reserved_token_131|>",
1087
+ "lstrip": false,
1088
+ "normalized": false,
1089
+ "rstrip": false,
1090
+ "single_word": false,
1091
+ "special": true
1092
+ },
1093
+ "126216": {
1094
+ "content": "<|reserved_token_132|>",
1095
+ "lstrip": false,
1096
+ "normalized": false,
1097
+ "rstrip": false,
1098
+ "single_word": false,
1099
+ "special": true
1100
+ },
1101
+ "126217": {
1102
+ "content": "<|reserved_token_133|>",
1103
+ "lstrip": false,
1104
+ "normalized": false,
1105
+ "rstrip": false,
1106
+ "single_word": false,
1107
+ "special": true
1108
+ },
1109
+ "126218": {
1110
+ "content": "<|reserved_token_134|>",
1111
+ "lstrip": false,
1112
+ "normalized": false,
1113
+ "rstrip": false,
1114
+ "single_word": false,
1115
+ "special": true
1116
+ },
1117
+ "126219": {
1118
+ "content": "<|reserved_token_135|>",
1119
+ "lstrip": false,
1120
+ "normalized": false,
1121
+ "rstrip": false,
1122
+ "single_word": false,
1123
+ "special": true
1124
+ },
1125
+ "126220": {
1126
+ "content": "<|reserved_token_136|>",
1127
+ "lstrip": false,
1128
+ "normalized": false,
1129
+ "rstrip": false,
1130
+ "single_word": false,
1131
+ "special": true
1132
+ },
1133
+ "126221": {
1134
+ "content": "<|reserved_token_137|>",
1135
+ "lstrip": false,
1136
+ "normalized": false,
1137
+ "rstrip": false,
1138
+ "single_word": false,
1139
+ "special": true
1140
+ },
1141
+ "126222": {
1142
+ "content": "<|reserved_token_138|>",
1143
+ "lstrip": false,
1144
+ "normalized": false,
1145
+ "rstrip": false,
1146
+ "single_word": false,
1147
+ "special": true
1148
+ },
1149
+ "126223": {
1150
+ "content": "<|reserved_token_139|>",
1151
+ "lstrip": false,
1152
+ "normalized": false,
1153
+ "rstrip": false,
1154
+ "single_word": false,
1155
+ "special": true
1156
+ },
1157
+ "126224": {
1158
+ "content": "<|reserved_token_140|>",
1159
+ "lstrip": false,
1160
+ "normalized": false,
1161
+ "rstrip": false,
1162
+ "single_word": false,
1163
+ "special": true
1164
+ },
1165
+ "126225": {
1166
+ "content": "<|reserved_token_141|>",
1167
+ "lstrip": false,
1168
+ "normalized": false,
1169
+ "rstrip": false,
1170
+ "single_word": false,
1171
+ "special": true
1172
+ },
1173
+ "126226": {
1174
+ "content": "<|reserved_token_142|>",
1175
+ "lstrip": false,
1176
+ "normalized": false,
1177
+ "rstrip": false,
1178
+ "single_word": false,
1179
+ "special": true
1180
+ },
1181
+ "126227": {
1182
+ "content": "<|reserved_token_143|>",
1183
+ "lstrip": false,
1184
+ "normalized": false,
1185
+ "rstrip": false,
1186
+ "single_word": false,
1187
+ "special": true
1188
+ },
1189
+ "126228": {
1190
+ "content": "<|reserved_token_144|>",
1191
+ "lstrip": false,
1192
+ "normalized": false,
1193
+ "rstrip": false,
1194
+ "single_word": false,
1195
+ "special": true
1196
+ },
1197
+ "126229": {
1198
+ "content": "<|reserved_token_145|>",
1199
+ "lstrip": false,
1200
+ "normalized": false,
1201
+ "rstrip": false,
1202
+ "single_word": false,
1203
+ "special": true
1204
+ },
1205
+ "126230": {
1206
+ "content": "<|reserved_token_146|>",
1207
+ "lstrip": false,
1208
+ "normalized": false,
1209
+ "rstrip": false,
1210
+ "single_word": false,
1211
+ "special": true
1212
+ },
1213
+ "126231": {
1214
+ "content": "<|reserved_token_147|>",
1215
+ "lstrip": false,
1216
+ "normalized": false,
1217
+ "rstrip": false,
1218
+ "single_word": false,
1219
+ "special": true
1220
+ },
1221
+ "126232": {
1222
+ "content": "<|reserved_token_148|>",
1223
+ "lstrip": false,
1224
+ "normalized": false,
1225
+ "rstrip": false,
1226
+ "single_word": false,
1227
+ "special": true
1228
+ },
1229
+ "126233": {
1230
+ "content": "<|reserved_token_149|>",
1231
+ "lstrip": false,
1232
+ "normalized": false,
1233
+ "rstrip": false,
1234
+ "single_word": false,
1235
+ "special": true
1236
+ },
1237
+ "126234": {
1238
+ "content": "<|reserved_token_150|>",
1239
+ "lstrip": false,
1240
+ "normalized": false,
1241
+ "rstrip": false,
1242
+ "single_word": false,
1243
+ "special": true
1244
+ },
1245
+ "126235": {
1246
+ "content": "<|reserved_token_151|>",
1247
+ "lstrip": false,
1248
+ "normalized": false,
1249
+ "rstrip": false,
1250
+ "single_word": false,
1251
+ "special": true
1252
+ },
1253
+ "126236": {
1254
+ "content": "<|reserved_token_152|>",
1255
+ "lstrip": false,
1256
+ "normalized": false,
1257
+ "rstrip": false,
1258
+ "single_word": false,
1259
+ "special": true
1260
+ },
1261
+ "126237": {
1262
+ "content": "<|reserved_token_153|>",
1263
+ "lstrip": false,
1264
+ "normalized": false,
1265
+ "rstrip": false,
1266
+ "single_word": false,
1267
+ "special": true
1268
+ },
1269
+ "126238": {
1270
+ "content": "<|reserved_token_154|>",
1271
+ "lstrip": false,
1272
+ "normalized": false,
1273
+ "rstrip": false,
1274
+ "single_word": false,
1275
+ "special": true
1276
+ },
1277
+ "126239": {
1278
+ "content": "<|reserved_token_155|>",
1279
+ "lstrip": false,
1280
+ "normalized": false,
1281
+ "rstrip": false,
1282
+ "single_word": false,
1283
+ "special": true
1284
+ },
1285
+ "126240": {
1286
+ "content": "<|reserved_token_156|>",
1287
+ "lstrip": false,
1288
+ "normalized": false,
1289
+ "rstrip": false,
1290
+ "single_word": false,
1291
+ "special": true
1292
+ },
1293
+ "126241": {
1294
+ "content": "<|reserved_token_157|>",
1295
+ "lstrip": false,
1296
+ "normalized": false,
1297
+ "rstrip": false,
1298
+ "single_word": false,
1299
+ "special": true
1300
+ },
1301
+ "126242": {
1302
+ "content": "<|reserved_token_158|>",
1303
+ "lstrip": false,
1304
+ "normalized": false,
1305
+ "rstrip": false,
1306
+ "single_word": false,
1307
+ "special": true
1308
+ },
1309
+ "126243": {
1310
+ "content": "<|reserved_token_159|>",
1311
+ "lstrip": false,
1312
+ "normalized": false,
1313
+ "rstrip": false,
1314
+ "single_word": false,
1315
+ "special": true
1316
+ },
1317
+ "126244": {
1318
+ "content": "<|reserved_token_160|>",
1319
+ "lstrip": false,
1320
+ "normalized": false,
1321
+ "rstrip": false,
1322
+ "single_word": false,
1323
+ "special": true
1324
+ },
1325
+ "126245": {
1326
+ "content": "<|reserved_token_161|>",
1327
+ "lstrip": false,
1328
+ "normalized": false,
1329
+ "rstrip": false,
1330
+ "single_word": false,
1331
+ "special": true
1332
+ },
1333
+ "126246": {
1334
+ "content": "<|reserved_token_162|>",
1335
+ "lstrip": false,
1336
+ "normalized": false,
1337
+ "rstrip": false,
1338
+ "single_word": false,
1339
+ "special": true
1340
+ },
1341
+ "126247": {
1342
+ "content": "<|reserved_token_163|>",
1343
+ "lstrip": false,
1344
+ "normalized": false,
1345
+ "rstrip": false,
1346
+ "single_word": false,
1347
+ "special": true
1348
+ },
1349
+ "126248": {
1350
+ "content": "<|reserved_token_164|>",
1351
+ "lstrip": false,
1352
+ "normalized": false,
1353
+ "rstrip": false,
1354
+ "single_word": false,
1355
+ "special": true
1356
+ },
1357
+ "126249": {
1358
+ "content": "<|reserved_token_165|>",
1359
+ "lstrip": false,
1360
+ "normalized": false,
1361
+ "rstrip": false,
1362
+ "single_word": false,
1363
+ "special": true
1364
+ },
1365
+ "126250": {
1366
+ "content": "<|reserved_token_166|>",
1367
+ "lstrip": false,
1368
+ "normalized": false,
1369
+ "rstrip": false,
1370
+ "single_word": false,
1371
+ "special": true
1372
+ },
1373
+ "126251": {
1374
+ "content": "<|reserved_token_167|>",
1375
+ "lstrip": false,
1376
+ "normalized": false,
1377
+ "rstrip": false,
1378
+ "single_word": false,
1379
+ "special": true
1380
+ },
1381
+ "126252": {
1382
+ "content": "<|reserved_token_168|>",
1383
+ "lstrip": false,
1384
+ "normalized": false,
1385
+ "rstrip": false,
1386
+ "single_word": false,
1387
+ "special": true
1388
+ },
1389
+ "126253": {
1390
+ "content": "<|reserved_token_169|>",
1391
+ "lstrip": false,
1392
+ "normalized": false,
1393
+ "rstrip": false,
1394
+ "single_word": false,
1395
+ "special": true
1396
+ },
1397
+ "126254": {
1398
+ "content": "<|reserved_token_170|>",
1399
+ "lstrip": false,
1400
+ "normalized": false,
1401
+ "rstrip": false,
1402
+ "single_word": false,
1403
+ "special": true
1404
+ },
1405
+ "126255": {
1406
+ "content": "<|reserved_token_171|>",
1407
+ "lstrip": false,
1408
+ "normalized": false,
1409
+ "rstrip": false,
1410
+ "single_word": false,
1411
+ "special": true
1412
+ },
1413
+ "126256": {
1414
+ "content": "<|reserved_token_172|>",
1415
+ "lstrip": false,
1416
+ "normalized": false,
1417
+ "rstrip": false,
1418
+ "single_word": false,
1419
+ "special": true
1420
+ },
1421
+ "126257": {
1422
+ "content": "<|reserved_token_173|>",
1423
+ "lstrip": false,
1424
+ "normalized": false,
1425
+ "rstrip": false,
1426
+ "single_word": false,
1427
+ "special": true
1428
+ },
1429
+ "126258": {
1430
+ "content": "<|reserved_token_174|>",
1431
+ "lstrip": false,
1432
+ "normalized": false,
1433
+ "rstrip": false,
1434
+ "single_word": false,
1435
+ "special": true
1436
+ },
1437
+ "126259": {
1438
+ "content": "<|reserved_token_175|>",
1439
+ "lstrip": false,
1440
+ "normalized": false,
1441
+ "rstrip": false,
1442
+ "single_word": false,
1443
+ "special": true
1444
+ },
1445
+ "126260": {
1446
+ "content": "<|reserved_token_176|>",
1447
+ "lstrip": false,
1448
+ "normalized": false,
1449
+ "rstrip": false,
1450
+ "single_word": false,
1451
+ "special": true
1452
+ },
1453
+ "126261": {
1454
+ "content": "<|reserved_token_177|>",
1455
+ "lstrip": false,
1456
+ "normalized": false,
1457
+ "rstrip": false,
1458
+ "single_word": false,
1459
+ "special": true
1460
+ },
1461
+ "126262": {
1462
+ "content": "<|reserved_token_178|>",
1463
+ "lstrip": false,
1464
+ "normalized": false,
1465
+ "rstrip": false,
1466
+ "single_word": false,
1467
+ "special": true
1468
+ },
1469
+ "126263": {
1470
+ "content": "<|reserved_token_179|>",
1471
+ "lstrip": false,
1472
+ "normalized": false,
1473
+ "rstrip": false,
1474
+ "single_word": false,
1475
+ "special": true
1476
+ },
1477
+ "126264": {
1478
+ "content": "<|reserved_token_180|>",
1479
+ "lstrip": false,
1480
+ "normalized": false,
1481
+ "rstrip": false,
1482
+ "single_word": false,
1483
+ "special": true
1484
+ },
1485
+ "126265": {
1486
+ "content": "<|reserved_token_181|>",
1487
+ "lstrip": false,
1488
+ "normalized": false,
1489
+ "rstrip": false,
1490
+ "single_word": false,
1491
+ "special": true
1492
+ },
1493
+ "126266": {
1494
+ "content": "<|reserved_token_182|>",
1495
+ "lstrip": false,
1496
+ "normalized": false,
1497
+ "rstrip": false,
1498
+ "single_word": false,
1499
+ "special": true
1500
+ },
1501
+ "126267": {
1502
+ "content": "<|reserved_token_183|>",
1503
+ "lstrip": false,
1504
+ "normalized": false,
1505
+ "rstrip": false,
1506
+ "single_word": false,
1507
+ "special": true
1508
+ },
1509
+ "126268": {
1510
+ "content": "<|reserved_token_184|>",
1511
+ "lstrip": false,
1512
+ "normalized": false,
1513
+ "rstrip": false,
1514
+ "single_word": false,
1515
+ "special": true
1516
+ },
1517
+ "126269": {
1518
+ "content": "<|reserved_token_185|>",
1519
+ "lstrip": false,
1520
+ "normalized": false,
1521
+ "rstrip": false,
1522
+ "single_word": false,
1523
+ "special": true
1524
+ },
1525
+ "126270": {
1526
+ "content": "<|reserved_token_186|>",
1527
+ "lstrip": false,
1528
+ "normalized": false,
1529
+ "rstrip": false,
1530
+ "single_word": false,
1531
+ "special": true
1532
+ },
1533
+ "126271": {
1534
+ "content": "<|reserved_token_187|>",
1535
+ "lstrip": false,
1536
+ "normalized": false,
1537
+ "rstrip": false,
1538
+ "single_word": false,
1539
+ "special": true
1540
+ },
1541
+ "126272": {
1542
+ "content": "<|reserved_token_188|>",
1543
+ "lstrip": false,
1544
+ "normalized": false,
1545
+ "rstrip": false,
1546
+ "single_word": false,
1547
+ "special": true
1548
+ },
1549
+ "126273": {
1550
+ "content": "<|reserved_token_189|>",
1551
+ "lstrip": false,
1552
+ "normalized": false,
1553
+ "rstrip": false,
1554
+ "single_word": false,
1555
+ "special": true
1556
+ },
1557
+ "126274": {
1558
+ "content": "<|reserved_token_190|>",
1559
+ "lstrip": false,
1560
+ "normalized": false,
1561
+ "rstrip": false,
1562
+ "single_word": false,
1563
+ "special": true
1564
+ },
1565
+ "126275": {
1566
+ "content": "<|reserved_token_191|>",
1567
+ "lstrip": false,
1568
+ "normalized": false,
1569
+ "rstrip": false,
1570
+ "single_word": false,
1571
+ "special": true
1572
+ },
1573
+ "126276": {
1574
+ "content": "<|reserved_token_192|>",
1575
+ "lstrip": false,
1576
+ "normalized": false,
1577
+ "rstrip": false,
1578
+ "single_word": false,
1579
+ "special": true
1580
+ },
1581
+ "126277": {
1582
+ "content": "<|reserved_token_193|>",
1583
+ "lstrip": false,
1584
+ "normalized": false,
1585
+ "rstrip": false,
1586
+ "single_word": false,
1587
+ "special": true
1588
+ },
1589
+ "126278": {
1590
+ "content": "<|reserved_token_194|>",
1591
+ "lstrip": false,
1592
+ "normalized": false,
1593
+ "rstrip": false,
1594
+ "single_word": false,
1595
+ "special": true
1596
+ },
1597
+ "126279": {
1598
+ "content": "<|reserved_token_195|>",
1599
+ "lstrip": false,
1600
+ "normalized": false,
1601
+ "rstrip": false,
1602
+ "single_word": false,
1603
+ "special": true
1604
+ },
1605
+ "126280": {
1606
+ "content": "<|reserved_token_196|>",
1607
+ "lstrip": false,
1608
+ "normalized": false,
1609
+ "rstrip": false,
1610
+ "single_word": false,
1611
+ "special": true
1612
+ },
1613
+ "126281": {
1614
+ "content": "<|reserved_token_197|>",
1615
+ "lstrip": false,
1616
+ "normalized": false,
1617
+ "rstrip": false,
1618
+ "single_word": false,
1619
+ "special": true
1620
+ },
1621
+ "126282": {
1622
+ "content": "<|reserved_token_198|>",
1623
+ "lstrip": false,
1624
+ "normalized": false,
1625
+ "rstrip": false,
1626
+ "single_word": false,
1627
+ "special": true
1628
+ },
1629
+ "126283": {
1630
+ "content": "<|reserved_token_199|>",
1631
+ "lstrip": false,
1632
+ "normalized": false,
1633
+ "rstrip": false,
1634
+ "single_word": false,
1635
+ "special": true
1636
+ },
1637
+ "126284": {
1638
+ "content": "<|reserved_token_200|>",
1639
+ "lstrip": false,
1640
+ "normalized": false,
1641
+ "rstrip": false,
1642
+ "single_word": false,
1643
+ "special": true
1644
+ },
1645
+ "126285": {
1646
+ "content": "<|reserved_token_201|>",
1647
+ "lstrip": false,
1648
+ "normalized": false,
1649
+ "rstrip": false,
1650
+ "single_word": false,
1651
+ "special": true
1652
+ },
1653
+ "126286": {
1654
+ "content": "<|reserved_token_202|>",
1655
+ "lstrip": false,
1656
+ "normalized": false,
1657
+ "rstrip": false,
1658
+ "single_word": false,
1659
+ "special": true
1660
+ },
1661
+ "126287": {
1662
+ "content": "<|reserved_token_203|>",
1663
+ "lstrip": false,
1664
+ "normalized": false,
1665
+ "rstrip": false,
1666
+ "single_word": false,
1667
+ "special": true
1668
+ },
1669
+ "126288": {
1670
+ "content": "<|reserved_token_204|>",
1671
+ "lstrip": false,
1672
+ "normalized": false,
1673
+ "rstrip": false,
1674
+ "single_word": false,
1675
+ "special": true
1676
+ },
1677
+ "126289": {
1678
+ "content": "<|reserved_token_205|>",
1679
+ "lstrip": false,
1680
+ "normalized": false,
1681
+ "rstrip": false,
1682
+ "single_word": false,
1683
+ "special": true
1684
+ },
1685
+ "126290": {
1686
+ "content": "<|reserved_token_206|>",
1687
+ "lstrip": false,
1688
+ "normalized": false,
1689
+ "rstrip": false,
1690
+ "single_word": false,
1691
+ "special": true
1692
+ },
1693
+ "126291": {
1694
+ "content": "<|reserved_token_207|>",
1695
+ "lstrip": false,
1696
+ "normalized": false,
1697
+ "rstrip": false,
1698
+ "single_word": false,
1699
+ "special": true
1700
+ },
1701
+ "126292": {
1702
+ "content": "<|reserved_token_208|>",
1703
+ "lstrip": false,
1704
+ "normalized": false,
1705
+ "rstrip": false,
1706
+ "single_word": false,
1707
+ "special": true
1708
+ },
1709
+ "126293": {
1710
+ "content": "<|reserved_token_209|>",
1711
+ "lstrip": false,
1712
+ "normalized": false,
1713
+ "rstrip": false,
1714
+ "single_word": false,
1715
+ "special": true
1716
+ },
1717
+ "126294": {
1718
+ "content": "<|reserved_token_210|>",
1719
+ "lstrip": false,
1720
+ "normalized": false,
1721
+ "rstrip": false,
1722
+ "single_word": false,
1723
+ "special": true
1724
+ },
1725
+ "126295": {
1726
+ "content": "<|reserved_token_211|>",
1727
+ "lstrip": false,
1728
+ "normalized": false,
1729
+ "rstrip": false,
1730
+ "single_word": false,
1731
+ "special": true
1732
+ },
1733
+ "126296": {
1734
+ "content": "<|reserved_token_212|>",
1735
+ "lstrip": false,
1736
+ "normalized": false,
1737
+ "rstrip": false,
1738
+ "single_word": false,
1739
+ "special": true
1740
+ },
1741
+ "126297": {
1742
+ "content": "<|reserved_token_213|>",
1743
+ "lstrip": false,
1744
+ "normalized": false,
1745
+ "rstrip": false,
1746
+ "single_word": false,
1747
+ "special": true
1748
+ },
1749
+ "126298": {
1750
+ "content": "<|reserved_token_214|>",
1751
+ "lstrip": false,
1752
+ "normalized": false,
1753
+ "rstrip": false,
1754
+ "single_word": false,
1755
+ "special": true
1756
+ },
1757
+ "126299": {
1758
+ "content": "<|reserved_token_215|>",
1759
+ "lstrip": false,
1760
+ "normalized": false,
1761
+ "rstrip": false,
1762
+ "single_word": false,
1763
+ "special": true
1764
+ },
1765
+ "126300": {
1766
+ "content": "<|reserved_token_216|>",
1767
+ "lstrip": false,
1768
+ "normalized": false,
1769
+ "rstrip": false,
1770
+ "single_word": false,
1771
+ "special": true
1772
+ },
1773
+ "126301": {
1774
+ "content": "<|reserved_token_217|>",
1775
+ "lstrip": false,
1776
+ "normalized": false,
1777
+ "rstrip": false,
1778
+ "single_word": false,
1779
+ "special": true
1780
+ },
1781
+ "126302": {
1782
+ "content": "<|reserved_token_218|>",
1783
+ "lstrip": false,
1784
+ "normalized": false,
1785
+ "rstrip": false,
1786
+ "single_word": false,
1787
+ "special": true
1788
+ },
1789
+ "126303": {
1790
+ "content": "<|reserved_token_219|>",
1791
+ "lstrip": false,
1792
+ "normalized": false,
1793
+ "rstrip": false,
1794
+ "single_word": false,
1795
+ "special": true
1796
+ },
1797
+ "126304": {
1798
+ "content": "<|reserved_token_220|>",
1799
+ "lstrip": false,
1800
+ "normalized": false,
1801
+ "rstrip": false,
1802
+ "single_word": false,
1803
+ "special": true
1804
+ },
1805
+ "126305": {
1806
+ "content": "<|reserved_token_221|>",
1807
+ "lstrip": false,
1808
+ "normalized": false,
1809
+ "rstrip": false,
1810
+ "single_word": false,
1811
+ "special": true
1812
+ },
1813
+ "126306": {
1814
+ "content": "<|reserved_token_222|>",
1815
+ "lstrip": false,
1816
+ "normalized": false,
1817
+ "rstrip": false,
1818
+ "single_word": false,
1819
+ "special": true
1820
+ },
1821
+ "126307": {
1822
+ "content": "<|reserved_token_223|>",
1823
+ "lstrip": false,
1824
+ "normalized": false,
1825
+ "rstrip": false,
1826
+ "single_word": false,
1827
+ "special": true
1828
+ },
1829
+ "126308": {
1830
+ "content": "<|reserved_token_224|>",
1831
+ "lstrip": false,
1832
+ "normalized": false,
1833
+ "rstrip": false,
1834
+ "single_word": false,
1835
+ "special": true
1836
+ },
1837
+ "126309": {
1838
+ "content": "<|reserved_token_225|>",
1839
+ "lstrip": false,
1840
+ "normalized": false,
1841
+ "rstrip": false,
1842
+ "single_word": false,
1843
+ "special": true
1844
+ },
1845
+ "126310": {
1846
+ "content": "<|reserved_token_226|>",
1847
+ "lstrip": false,
1848
+ "normalized": false,
1849
+ "rstrip": false,
1850
+ "single_word": false,
1851
+ "special": true
1852
+ },
1853
+ "126311": {
1854
+ "content": "<|reserved_token_227|>",
1855
+ "lstrip": false,
1856
+ "normalized": false,
1857
+ "rstrip": false,
1858
+ "single_word": false,
1859
+ "special": true
1860
+ },
1861
+ "126312": {
1862
+ "content": "<|reserved_token_228|>",
1863
+ "lstrip": false,
1864
+ "normalized": false,
1865
+ "rstrip": false,
1866
+ "single_word": false,
1867
+ "special": true
1868
+ },
1869
+ "126313": {
1870
+ "content": "<|reserved_token_229|>",
1871
+ "lstrip": false,
1872
+ "normalized": false,
1873
+ "rstrip": false,
1874
+ "single_word": false,
1875
+ "special": true
1876
+ },
1877
+ "126314": {
1878
+ "content": "<|reserved_token_230|>",
1879
+ "lstrip": false,
1880
+ "normalized": false,
1881
+ "rstrip": false,
1882
+ "single_word": false,
1883
+ "special": true
1884
+ },
1885
+ "126315": {
1886
+ "content": "<|reserved_token_231|>",
1887
+ "lstrip": false,
1888
+ "normalized": false,
1889
+ "rstrip": false,
1890
+ "single_word": false,
1891
+ "special": true
1892
+ },
1893
+ "126316": {
1894
+ "content": "<|reserved_token_232|>",
1895
+ "lstrip": false,
1896
+ "normalized": false,
1897
+ "rstrip": false,
1898
+ "single_word": false,
1899
+ "special": true
1900
+ },
1901
+ "126317": {
1902
+ "content": "<|reserved_token_233|>",
1903
+ "lstrip": false,
1904
+ "normalized": false,
1905
+ "rstrip": false,
1906
+ "single_word": false,
1907
+ "special": true
1908
+ },
1909
+ "126318": {
1910
+ "content": "<|reserved_token_234|>",
1911
+ "lstrip": false,
1912
+ "normalized": false,
1913
+ "rstrip": false,
1914
+ "single_word": false,
1915
+ "special": true
1916
+ },
1917
+ "126319": {
1918
+ "content": "<|reserved_token_235|>",
1919
+ "lstrip": false,
1920
+ "normalized": false,
1921
+ "rstrip": false,
1922
+ "single_word": false,
1923
+ "special": true
1924
+ },
1925
+ "126320": {
1926
+ "content": "<|reserved_token_236|>",
1927
+ "lstrip": false,
1928
+ "normalized": false,
1929
+ "rstrip": false,
1930
+ "single_word": false,
1931
+ "special": true
1932
+ },
1933
+ "126321": {
1934
+ "content": "<|reserved_token_237|>",
1935
+ "lstrip": false,
1936
+ "normalized": false,
1937
+ "rstrip": false,
1938
+ "single_word": false,
1939
+ "special": true
1940
+ },
1941
+ "126322": {
1942
+ "content": "<|reserved_token_238|>",
1943
+ "lstrip": false,
1944
+ "normalized": false,
1945
+ "rstrip": false,
1946
+ "single_word": false,
1947
+ "special": true
1948
+ },
1949
+ "126323": {
1950
+ "content": "<|reserved_token_239|>",
1951
+ "lstrip": false,
1952
+ "normalized": false,
1953
+ "rstrip": false,
1954
+ "single_word": false,
1955
+ "special": true
1956
+ },
1957
+ "126324": {
1958
+ "content": "<|reserved_token_240|>",
1959
+ "lstrip": false,
1960
+ "normalized": false,
1961
+ "rstrip": false,
1962
+ "single_word": false,
1963
+ "special": true
1964
+ },
1965
+ "126325": {
1966
+ "content": "<|reserved_token_241|>",
1967
+ "lstrip": false,
1968
+ "normalized": false,
1969
+ "rstrip": false,
1970
+ "single_word": false,
1971
+ "special": true
1972
+ },
1973
+ "126326": {
1974
+ "content": "<|reserved_token_242|>",
1975
+ "lstrip": false,
1976
+ "normalized": false,
1977
+ "rstrip": false,
1978
+ "single_word": false,
1979
+ "special": true
1980
+ },
1981
+ "126327": {
1982
+ "content": "<|reserved_token_243|>",
1983
+ "lstrip": false,
1984
+ "normalized": false,
1985
+ "rstrip": false,
1986
+ "single_word": false,
1987
+ "special": true
1988
+ },
1989
+ "126328": {
1990
+ "content": "<|reserved_token_244|>",
1991
+ "lstrip": false,
1992
+ "normalized": false,
1993
+ "rstrip": false,
1994
+ "single_word": false,
1995
+ "special": true
1996
+ },
1997
+ "126329": {
1998
+ "content": "<|reserved_token_245|>",
1999
+ "lstrip": false,
2000
+ "normalized": false,
2001
+ "rstrip": false,
2002
+ "single_word": false,
2003
+ "special": true
2004
+ },
2005
+ "126330": {
2006
+ "content": "<|reserved_token_246|>",
2007
+ "lstrip": false,
2008
+ "normalized": false,
2009
+ "rstrip": false,
2010
+ "single_word": false,
2011
+ "special": true
2012
+ },
2013
+ "126331": {
2014
+ "content": "<|reserved_token_247|>",
2015
+ "lstrip": false,
2016
+ "normalized": false,
2017
+ "rstrip": false,
2018
+ "single_word": false,
2019
+ "special": true
2020
+ },
2021
+ "126332": {
2022
+ "content": "<|reserved_token_248|>",
2023
+ "lstrip": false,
2024
+ "normalized": false,
2025
+ "rstrip": false,
2026
+ "single_word": false,
2027
+ "special": true
2028
+ },
2029
+ "126333": {
2030
+ "content": "<|reserved_token_249|>",
2031
+ "lstrip": false,
2032
+ "normalized": false,
2033
+ "rstrip": false,
2034
+ "single_word": false,
2035
+ "special": true
2036
+ },
2037
+ "126334": {
2038
+ "content": "<|reserved_token_250|>",
2039
+ "lstrip": false,
2040
+ "normalized": false,
2041
+ "rstrip": false,
2042
+ "single_word": false,
2043
+ "special": true
2044
+ },
2045
+ "126335": {
2046
+ "content": "<|reserved_token_251|>",
2047
+ "lstrip": false,
2048
+ "normalized": false,
2049
+ "rstrip": false,
2050
+ "single_word": false,
2051
+ "special": true
2052
+ },
2053
+ "126336": {
2054
+ "content": "<|mdm_mask|>",
2055
+ "lstrip": false,
2056
+ "normalized": false,
2057
+ "rstrip": false,
2058
+ "single_word": false,
2059
+ "special": true
2060
+ },
2061
+ "126337": {
2062
+ "content": "<|reserved_token_253|>",
2063
+ "lstrip": false,
2064
+ "normalized": false,
2065
+ "rstrip": false,
2066
+ "single_word": false,
2067
+ "special": true
2068
+ },
2069
+ "126338": {
2070
+ "content": "<|reserved_token_254|>",
2071
+ "lstrip": false,
2072
+ "normalized": false,
2073
+ "rstrip": false,
2074
+ "single_word": false,
2075
+ "special": true
2076
+ },
2077
+ "126339": {
2078
+ "content": "<|reserved_token_255|>",
2079
+ "lstrip": false,
2080
+ "normalized": false,
2081
+ "rstrip": false,
2082
+ "single_word": false,
2083
+ "special": true
2084
+ },
2085
+ "126340": {
2086
+ "content": "<role>",
2087
+ "lstrip": false,
2088
+ "normalized": false,
2089
+ "rstrip": false,
2090
+ "single_word": false,
2091
+ "special": true
2092
+ },
2093
+ "126341": {
2094
+ "content": "</role>",
2095
+ "lstrip": false,
2096
+ "normalized": false,
2097
+ "rstrip": false,
2098
+ "single_word": false,
2099
+ "special": true
2100
+ },
2101
+ "126342": {
2102
+ "content": "<|arithmetic_start|>",
2103
+ "lstrip": false,
2104
+ "normalized": false,
2105
+ "rstrip": false,
2106
+ "single_word": false,
2107
+ "special": true
2108
+ },
2109
+ "126343": {
2110
+ "content": "<|arithmetic_end|>",
2111
+ "lstrip": false,
2112
+ "normalized": false,
2113
+ "rstrip": false,
2114
+ "single_word": false,
2115
+ "special": true
2116
+ },
2117
+ "126344": {
2118
+ "content": "<|number_start|>",
2119
+ "lstrip": false,
2120
+ "normalized": false,
2121
+ "rstrip": false,
2122
+ "single_word": false,
2123
+ "special": true
2124
+ },
2125
+ "126345": {
2126
+ "content": "<|number_end|>",
2127
+ "lstrip": false,
2128
+ "normalized": false,
2129
+ "rstrip": false,
2130
+ "single_word": false,
2131
+ "special": true
2132
+ },
2133
+ "126346": {
2134
+ "content": "<|start_header_id|>",
2135
+ "lstrip": false,
2136
+ "normalized": false,
2137
+ "rstrip": false,
2138
+ "single_word": false,
2139
+ "special": true
2140
+ },
2141
+ "126347": {
2142
+ "content": "<|end_header_id|>",
2143
+ "lstrip": false,
2144
+ "normalized": false,
2145
+ "rstrip": false,
2146
+ "single_word": false,
2147
+ "special": true
2148
+ },
2149
+ "126348": {
2150
+ "content": "<|eot_id|>",
2151
+ "lstrip": false,
2152
+ "normalized": false,
2153
+ "rstrip": false,
2154
+ "single_word": false,
2155
+ "special": true
2156
+ },
2157
+ "126349": {
2158
+ "content": "<image>",
2159
+ "lstrip": false,
2160
+ "normalized": false,
2161
+ "rstrip": false,
2162
+ "single_word": false,
2163
+ "special": true
2164
+ },
2165
+ "126350": {
2166
+ "content": "<im_start>",
2167
+ "lstrip": false,
2168
+ "normalized": false,
2169
+ "rstrip": false,
2170
+ "single_word": false,
2171
+ "special": true
2172
+ },
2173
+ "126351": {
2174
+ "content": "<im_end>",
2175
+ "lstrip": false,
2176
+ "normalized": false,
2177
+ "rstrip": false,
2178
+ "single_word": false,
2179
+ "special": true
2180
+ }
2181
+ },
2182
+ "additional_special_tokens": [
2183
+ "<image>",
2184
+ "<im_start>",
2185
+ "<im_end>"
2186
+ ],
2187
+ "bos_token": "<|startoftext|>",
2188
+ "clean_up_tokenization_spaces": false,
2189
+ "cls_token": "[CLS]",
2190
+ "eos_token": "<|endoftext|>",
2191
+ "extra_special_tokens": {},
2192
+ "fast_tokenizer": true,
2193
+ "gmask_token": "[gMASK]",
2194
+ "merges_file": null,
2195
+ "model_input_names": [
2196
+ "input_ids",
2197
+ "attention_mask"
2198
+ ],
2199
+ "model_max_length": 16384,
2200
+ "pad_token": "<|endoftext|>",
2201
+ "padding_side": "right",
2202
+ "tokenizer_class": "PreTrainedTokenizer",
2203
+ "trust_remote_code": true
2204
+ }
sft_lladav_video_reversal_/config.yaml ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ wandb:
2
+ entity: null
3
+ resume: auto
4
+ run_id: zm7qqaio
5
+ experiment:
6
+ project: sft_lladav_video_reversal
7
+ num_node: 1
8
+ logging_dir: sft_lladav_video_reversal/logs
9
+ model:
10
+ pretrained_model: /data4/runqing/dLLM-RL/LLaDA-V
11
+ optimized_name: optimized
12
+ dataset:
13
+ optimization_data: video_reverse_sft_data_shuffle_option_3k
14
+ data_type: video_reverse
15
+ training:
16
+ gradient_checkpointing_enable: true
17
+ gradient_accumulation_steps: 2
18
+ batch_size_lm: 2
19
+ mixed_precision: bf16
20
+ enable_tf32: true
21
+ seed: 10086
22
+ num_train_epochs: 1
23
+ max_grad_norm: 1.0
24
+ method: random_masking
25
+ lower_p: 0.1
26
+ upper_p: 0.9
27
+ block_size: 16
28
+ mask_times_per_sample: 2
29
+ max_gen_length: 512
30
+ optimizer:
31
+ name: adamw
32
+ params:
33
+ learning_rate: 1.0e-05
34
+ scale_lr: false
35
+ beta1: 0.9
36
+ beta2: 0.999
37
+ weight_decay: 0.0
38
+ epsilon: 1.0e-08
39
+ lr_scheduler:
40
+ scheduler: cosine
41
+ params:
42
+ learning_rate: ${optimizer.params.learning_rate}
43
+ warmup_steps: 0
44
+ min_lr_scale: 1.0
45
+ config: configs/sft_lladav_video_reversal.yaml
sft_lladav_video_reversal_3_21.log ADDED
The diff for this file is too large to render. See raw diff
 
sft_lladav_video_reversal_3_22.log ADDED
The diff for this file is too large to render. See raw diff
 
sft_llava_next_video_reversal.nohup.log ADDED
The diff for this file is too large to render. See raw diff