diff --git a/.gitattributes b/.gitattributes index a6344aac8c09253b3b630fb776ae94478aa0275b..2d0ba14b28d9576e1623db442319edd57c9b0114 100644 --- a/.gitattributes +++ b/.gitattributes @@ -33,3 +33,8 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text *.zip filter=lfs diff=lfs merge=lfs -text *.zst filter=lfs diff=lfs merge=lfs -text *tfevents* filter=lfs diff=lfs merge=lfs -text +PixelOne-Pro-35B-A3B/runtime/src/pixelone/assets/DejaVuSans.ttf filter=lfs diff=lfs merge=lfs -text +PixelOne-Pro-35B-A3B/tokenizer.json filter=lfs diff=lfs merge=lfs -text +PixelOne-Pro-4B/runtime/src/pixelone/assets/DejaVuSans.ttf filter=lfs diff=lfs merge=lfs -text +PixelOne-Pro-4B/tokenizer.json filter=lfs diff=lfs merge=lfs -text +assets/teaser.png filter=lfs diff=lfs merge=lfs -text diff --git a/PixelOne-Pro-35B-A3B/.gitattributes b/PixelOne-Pro-35B-A3B/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..580d310c2d211aca166288a207e972ced9bb0100 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/.gitattributes @@ -0,0 +1 @@ +*.safetensors filter=lfs diff=lfs merge=lfs -text diff --git a/PixelOne-Pro-35B-A3B/README.md b/PixelOne-Pro-35B-A3B/README.md new file mode 100644 index 0000000000000000000000000000000000000000..7af47ae93efb1f8bd199314be0252333b0ce344f --- /dev/null +++ b/PixelOne-Pro-35B-A3B/README.md @@ -0,0 +1,71 @@ +--- +license: mit +language: +- en +tags: +- gui-grounding +- pixelone +- computer-use +- custom-code +- safetensors +--- + +# PixelOne-Pro-35B-A3B + +PixelOne-Pro-35B-A3B predicts an original-image click from a screenshot and an instruction in one visual encoding and one language-model forward. This is the final full-parameter 500K continuation from the PixelOne paper, with a trained visual encoder, native decision head and lightweight pixel head. + +## Use + +This model is stored in the `PixelOne-Pro-35B-A3B` subfolder of [KangHui2200/PixleOne](https://huggingface.co/KangHui2200/PixleOne). The local-directory commands below remain supported. To load by repository ID, use `PixelOnePredictor.from_pretrained("KangHui2200/PixleOne", subfolder="PixelOne-Pro-35B-A3B", device="cuda:0")`, or add `--subfolder PixelOne-Pro-35B-A3B` to the CLI. Only the selected model is downloaded. Authenticate with Hugging Face if the repository is private. + +The package is self-contained: all model weights and processor assets are included. No separate base-model weights, LoRA adapter or search teacher is needed at inference. + +```bash +python -m pip install ./runtime +python -m pip install flash-linear-attention==0.4.2 causal-conv1d==1.7.0 --no-build-isolation +pixelone infer --model . --image screenshot.png --instruction "Click the search button" --device cuda:0 +``` + +```python +from PIL import Image +from pixelone import PixelOnePredictor + +predictor = PixelOnePredictor.from_pretrained(".", device="cuda:0") +result = predictor.predict(Image.open("screenshot.png"), "Click the search button") +print(result["point"]) +``` + +Use the bundled `PixelOnePredictor`, not `AutoModelForCausalLM.generate` or a generic VideoJEV loader. The direct click head and its coarse-first decoder are essential parts of this checkpoint. `config.json` describes the native backbone; `pixelone.json` specifies the complete PixelOne inference contract and weight index. + +## Input and runtime + +- Output: `[x, y]` in original screenshot pixels, with half-pixel centers. +- Image policy: pad to stride 32 without resizing; exclude padding from pixel selection. Inputs beyond the context budget fail rather than silently downsample. +- Attention: bidirectional masks in existing full-attention layers; native linear-attention computation; no autoregressive KV cache. +- Reference software: Python 3.12, PyTorch 2.11.0, Transformers 5.6.2, Triton 3.7.0, FLA 0.4.2 and causal-conv1d 1.7.0. +- Weights: approximately 68.7 GB across 80 safetensors shards, with the original BF16/FP32 partition. Activations require additional resolution-dependent memory. Do not cast the whole model to BF16/FP16. +- CUDA is required for the released mixed-precision weights. `kernel_backend="torch"` is an explicit diagnostic alternative, not the reported native-kernel latency configuration. + +## Evaluation + +| Benchmark | Correct / targets | Accuracy (%) | +| --- | ---: | ---: | +| screenspot | 1166 / 1272 | 91.67 | +| screenspot-v2 | 1202 / 1272 | 94.50 | +| screenspot-pro | 1139 / 1581 | 72.04 | +| osworld-g | 392 / 510 | 76.86 | +| Equal-weight mean | — | 83.77 | + +Scores use complete benchmark sets and original-image point-in-box correctness. `evaluation.json` retains the hit counts and unrounded accuracies. Weights come from update 1954; they were not reconstructed from adapters or quantized during packaging. + +## Training and limitations + +The model inherits a 22K Top20+KD student, retains its learned pixel head, and continues on 500K targets. Full-parameter updates include the visual encoder. Spatial KD uses a frozen teacher's observed regions and is gated by teacher click correctness; every target still receives box supervision. The 200K PixelOne branch is separate and is not an intermediate stage of this Pro checkpoint. + +This release includes weights, processor assets and executable source, but not upstream training screenshots, sampled target manifests, optimizer states or cached teacher traces. Native-resolution grounding remains limited by context length and available device memory. Applications must validate predicted actions and enforce user permissions before execution. + +## Verification and release status + +All weight files were verified against the final research export, and the source evaluation matches the paper. Tiny dense/MoE CPU tests check the numerical readout, model round trip, training resume and export path. The packaging host has no working NVIDIA driver; full-scale CUDA smoke tests and latency have not been rerun there. + +The model repository retains its existing MIT license metadata. Upstream Qwen/VideoJEV licenses and notices are retained in `UPSTREAM_LICENSE` and `UPSTREAM_NOTICE`; the bundled runtime and font include their upstream attribution. Repository visibility is controlled by the owner and was not changed during upload. diff --git a/PixelOne-Pro-35B-A3B/UPSTREAM_LICENSE b/PixelOne-Pro-35B-A3B/UPSTREAM_LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..1d5180a42f1c3383ba7c7bd0a50f0837ef0168df --- /dev/null +++ b/PixelOne-Pro-35B-A3B/UPSTREAM_LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2026 Alibaba Cloud + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/PixelOne-Pro-35B-A3B/UPSTREAM_NOTICE b/PixelOne-Pro-35B-A3B/UPSTREAM_NOTICE new file mode 100644 index 0000000000000000000000000000000000000000..799a6d414711ec67ec86bba8f7ff4a59c8023f83 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/UPSTREAM_NOTICE @@ -0,0 +1,4 @@ +VideoJev uses native Qwen3.5 and Qwen3.5-MoE modules from Hugging Face Transformers. +Qwen3.5-4B and Qwen3.6-35B-A3B are provided by the Qwen team under Apache-2.0. +Training and optional grouped MoE inference use XTuner (InternLM), Apache-2.0. +VideoJev modifies the language readout and adds a trained cosine decision head. diff --git a/PixelOne-Pro-35B-A3B/chat_template.jinja b/PixelOne-Pro-35B-A3B/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..a8755d827c0a7b614c246c4060dfd58ab352a8ff --- /dev/null +++ b/PixelOne-Pro-35B-A3B/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if (preserve_thinking is defined and preserve_thinking is true) or (loop.index0 > ns.last_query_index) %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | string if args_value is string else args_value | tojson | safe %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/PixelOne-Pro-35B-A3B/config.json b/PixelOne-Pro-35B-A3B/config.json new file mode 100644 index 0000000000000000000000000000000000000000..18b8a28add9b2479933bf2b2ae90b9a959743acd --- /dev/null +++ b/PixelOne-Pro-35B-A3B/config.json @@ -0,0 +1,175 @@ +{ + "architectures": [ + "VideoJevForVideoUnderstanding" + ], + "auto_map": { + "AutoConfig": "configuration_videojev.VideoJevConfig", + "AutoModel": "modeling_videojev.VideoJevForVideoUnderstanding" + }, + "backbone_config": { + "architectures": [ + "Qwen3_5MoeForConditionalGeneration" + ], + "dtype": "bfloat16", + "image_token_id": 248056, + "model_type": "qwen3_5_moe", + "text_config": { + "_name_or_path": "", + "architectures": null, + "attention_bias": false, + "attention_dropout": 0.0, + "attn_output_gate": true, + "bos_token_id": 248044, + "chunk_size_feed_forward": 0, + "dtype": "bfloat16", + "eos_token_id": 248044, + "full_attention_interval": 4, + "head_dim": 256, + "hidden_act": "silu", + "hidden_size": 2048, + "id2label": { + "0": "LABEL_0", + "1": "LABEL_1" + }, + "initializer_range": 0.02, + "is_encoder_decoder": false, + "label2id": { + "LABEL_0": 0, + "LABEL_1": 1 + }, + "layer_types": [ + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention" + ], + "linear_conv_kernel_dim": 4, + "linear_key_head_dim": 128, + "linear_num_key_heads": 16, + "linear_num_value_heads": 32, + "linear_value_head_dim": 128, + "mamba_ssm_dtype": "float32", + "max_position_embeddings": 262144, + "model_type": "qwen3_5_moe_text", + "moe_intermediate_size": 512, + "mtp_num_hidden_layers": 1, + "mtp_use_dedicated_embeddings": false, + "num_attention_heads": 16, + "num_experts": 256, + "num_experts_per_tok": 8, + "num_hidden_layers": 40, + "num_key_value_heads": 2, + "output_attentions": false, + "output_hidden_states": false, + "output_router_logits": false, + "pad_token_id": null, + "partial_rotary_factor": 0.25, + "problem_type": null, + "return_dict": true, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "mrope_interleaved": true, + "mrope_section": [ + 11, + 11, + 10 + ], + "partial_rotary_factor": 0.25, + "rope_theta": 10000000, + "rope_type": "default" + }, + "router_aux_loss_coef": 0.001, + "shared_expert_intermediate_size": 512, + "tie_word_embeddings": false, + "use_cache": true, + "vocab_size": 248320 + }, + "tie_word_embeddings": false, + "video_token_id": 248057, + "vision_config": { + "_name_or_path": "", + "architectures": null, + "chunk_size_feed_forward": 0, + "deepstack_visual_indexes": [], + "depth": 27, + "dtype": "bfloat16", + "hidden_act": "gelu_pytorch_tanh", + "hidden_size": 1152, + "id2label": { + "0": "LABEL_0", + "1": "LABEL_1" + }, + "in_channels": 3, + "initializer_range": 0.02, + "intermediate_size": 4304, + "is_encoder_decoder": false, + "label2id": { + "LABEL_0": 0, + "LABEL_1": 1 + }, + "model_type": "qwen3_5_moe_vision", + "num_heads": 16, + "num_position_embeddings": 2304, + "out_hidden_size": 2048, + "output_attentions": false, + "output_hidden_states": false, + "patch_size": 16, + "problem_type": null, + "return_dict": true, + "spatial_merge_size": 2, + "temporal_patch_size": 2 + }, + "vision_end_token_id": 248054, + "vision_start_token_id": 248053 + }, + "checkpoint_id": "89988f08-2a17-4f7e-99b6-6fff923806cf", + "decide_token_id": 248077, + "decoder": { + "postprocess": "round_repair_clamp_v1", + "smooth": 1, + "threshold": 0.25 + }, + "dtype": "bfloat16", + "head_dim": 512, + "head_logit_scale": 10.0, + "model_type": "videojev", + "option_end_token_id": 248078, + "tie_word_embeddings": false, + "transformers_version": "5.14.1" +} diff --git a/PixelOne-Pro-35B-A3B/evaluation.json b/PixelOne-Pro-35B-A3B/evaluation.json new file mode 100644 index 0000000000000000000000000000000000000000..b013d504127874ca033a680167da4920b12914b4 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/evaluation.json @@ -0,0 +1,30 @@ +{ + "results": [ + { + "benchmark": "screenspot", + "count": 1272, + "hits": 1166, + "accuracy": 0.9166666666666666 + }, + { + "benchmark": "screenspot-v2", + "count": 1272, + "hits": 1202, + "accuracy": 0.9449685534591195 + }, + { + "benchmark": "screenspot-pro", + "count": 1581, + "hits": 1139, + "accuracy": 0.7204301075268817 + }, + { + "benchmark": "osworld-g", + "count": 510, + "hits": 392, + "accuracy": 0.7686274509803922 + } + ], + "mean_accuracy": 0.837673194658265, + "aggregation": "Equal weight per benchmark, not pooled target accuracy" +} diff --git a/PixelOne-Pro-35B-A3B/model.safetensors.index.json b/PixelOne-Pro-35B-A3B/model.safetensors.index.json new file mode 100644 index 0000000000000000000000000000000000000000..f76511e05319d1b40619dd5f505fab14c06d6e72 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/model.safetensors.index.json @@ -0,0 +1,1041 @@ +{ + "metadata": { + "total_size": 68678772196 + }, + "weight_map": { + "native.backbone.language_model.embed_tokens.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.input_layernorm.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.A_log": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.conv1d.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.dt_bias": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_a.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_b.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_qkv.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_z.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.norm.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.out_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.mlp.experts.down_proj": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.mlp.experts.gate_up_proj": "weights-00003.safetensors", + "native.backbone.language_model.layers.0.mlp.gate.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.0.mlp.shared_expert.down_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.0.mlp.shared_expert.gate_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.0.mlp.shared_expert.up_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.0.mlp.shared_expert_gate.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.0.post_attention_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.input_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.A_log": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.conv1d.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.dt_bias": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_a.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_b.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_qkv.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_z.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.norm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.out_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.mlp.experts.down_proj": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.mlp.experts.gate_up_proj": "weights-00005.safetensors", + "native.backbone.language_model.layers.1.mlp.gate.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.1.mlp.shared_expert.down_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.1.mlp.shared_expert.gate_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.1.mlp.shared_expert.up_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.1.mlp.shared_expert_gate.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.1.post_attention_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.input_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.A_log": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.conv1d.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.dt_bias": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_a.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_b.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_qkv.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_z.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.out_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.mlp.experts.down_proj": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.mlp.experts.gate_up_proj": "weights-00007.safetensors", + "native.backbone.language_model.layers.10.mlp.gate.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.10.mlp.shared_expert.down_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.10.mlp.shared_expert.gate_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.10.mlp.shared_expert.up_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.10.mlp.shared_expert_gate.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.10.post_attention_layernorm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.11.input_layernorm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.11.mlp.experts.down_proj": "weights-00008.safetensors", + "native.backbone.language_model.layers.11.mlp.experts.gate_up_proj": "weights-00009.safetensors", + "native.backbone.language_model.layers.11.mlp.gate.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.mlp.shared_expert.down_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.mlp.shared_expert.gate_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.mlp.shared_expert.up_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.mlp.shared_expert_gate.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.post_attention_layernorm.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.self_attn.k_norm.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.self_attn.k_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.self_attn.o_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.self_attn.q_norm.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.self_attn.q_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.self_attn.v_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.input_layernorm.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.A_log": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.conv1d.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.dt_bias": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_a.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_b.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_qkv.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_z.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.norm.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.out_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.mlp.experts.down_proj": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.mlp.experts.gate_up_proj": "weights-00011.safetensors", + "native.backbone.language_model.layers.12.mlp.gate.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.12.mlp.shared_expert.down_proj.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.12.mlp.shared_expert.gate_proj.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.12.mlp.shared_expert.up_proj.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.12.mlp.shared_expert_gate.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.12.post_attention_layernorm.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.input_layernorm.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.A_log": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.conv1d.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.dt_bias": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_a.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_b.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_qkv.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_z.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.norm.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.out_proj.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.mlp.experts.down_proj": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.mlp.experts.gate_up_proj": "weights-00013.safetensors", + "native.backbone.language_model.layers.13.mlp.gate.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.13.mlp.shared_expert.down_proj.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.13.mlp.shared_expert.gate_proj.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.13.mlp.shared_expert.up_proj.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.13.mlp.shared_expert_gate.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.13.post_attention_layernorm.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.input_layernorm.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.A_log": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.conv1d.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.dt_bias": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_a.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_b.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_qkv.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_z.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.norm.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.out_proj.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.mlp.experts.down_proj": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.mlp.experts.gate_up_proj": "weights-00015.safetensors", + "native.backbone.language_model.layers.14.mlp.gate.weight": "weights-00016.safetensors", + "native.backbone.language_model.layers.14.mlp.shared_expert.down_proj.weight": "weights-00016.safetensors", + "native.backbone.language_model.layers.14.mlp.shared_expert.gate_proj.weight": "weights-00016.safetensors", + "native.backbone.language_model.layers.14.mlp.shared_expert.up_proj.weight": "weights-00016.safetensors", + "native.backbone.language_model.layers.14.mlp.shared_expert_gate.weight": "weights-00016.safetensors", + "native.backbone.language_model.layers.14.post_attention_layernorm.weight": "weights-00016.safetensors", + "native.backbone.language_model.layers.15.input_layernorm.weight": "weights-00016.safetensors", + "native.backbone.language_model.layers.15.mlp.experts.down_proj": "weights-00016.safetensors", + "native.backbone.language_model.layers.15.mlp.experts.gate_up_proj": "weights-00017.safetensors", + "native.backbone.language_model.layers.15.mlp.gate.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.mlp.shared_expert.down_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.mlp.shared_expert.gate_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.mlp.shared_expert.up_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.mlp.shared_expert_gate.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.post_attention_layernorm.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.self_attn.k_norm.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.self_attn.k_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.self_attn.o_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.self_attn.q_norm.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.self_attn.q_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.self_attn.v_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.input_layernorm.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.A_log": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.conv1d.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.dt_bias": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_a.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_b.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_qkv.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_z.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.norm.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.out_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.mlp.experts.down_proj": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.mlp.experts.gate_up_proj": "weights-00019.safetensors", + "native.backbone.language_model.layers.16.mlp.gate.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.16.mlp.shared_expert.down_proj.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.16.mlp.shared_expert.gate_proj.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.16.mlp.shared_expert.up_proj.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.16.mlp.shared_expert_gate.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.16.post_attention_layernorm.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.input_layernorm.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.A_log": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.conv1d.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.dt_bias": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_a.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_b.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_qkv.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_z.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.norm.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.out_proj.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.mlp.experts.down_proj": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.mlp.experts.gate_up_proj": "weights-00021.safetensors", + "native.backbone.language_model.layers.17.mlp.gate.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.17.mlp.shared_expert.down_proj.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.17.mlp.shared_expert.gate_proj.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.17.mlp.shared_expert.up_proj.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.17.mlp.shared_expert_gate.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.17.post_attention_layernorm.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.input_layernorm.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.A_log": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.conv1d.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.dt_bias": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_a.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_b.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_qkv.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_z.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.norm.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.out_proj.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.mlp.experts.down_proj": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.mlp.experts.gate_up_proj": "weights-00023.safetensors", + "native.backbone.language_model.layers.18.mlp.gate.weight": "weights-00024.safetensors", + "native.backbone.language_model.layers.18.mlp.shared_expert.down_proj.weight": "weights-00024.safetensors", + "native.backbone.language_model.layers.18.mlp.shared_expert.gate_proj.weight": "weights-00024.safetensors", + "native.backbone.language_model.layers.18.mlp.shared_expert.up_proj.weight": "weights-00024.safetensors", + "native.backbone.language_model.layers.18.mlp.shared_expert_gate.weight": "weights-00024.safetensors", + "native.backbone.language_model.layers.18.post_attention_layernorm.weight": "weights-00024.safetensors", + "native.backbone.language_model.layers.19.input_layernorm.weight": "weights-00024.safetensors", + "native.backbone.language_model.layers.19.mlp.experts.down_proj": "weights-00024.safetensors", + "native.backbone.language_model.layers.19.mlp.experts.gate_up_proj": "weights-00025.safetensors", + "native.backbone.language_model.layers.19.mlp.gate.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.mlp.shared_expert.down_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.mlp.shared_expert.gate_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.mlp.shared_expert.up_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.mlp.shared_expert_gate.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.post_attention_layernorm.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.self_attn.k_norm.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.self_attn.k_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.self_attn.o_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.self_attn.q_norm.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.self_attn.q_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.self_attn.v_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.input_layernorm.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.A_log": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.conv1d.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.dt_bias": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_a.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_b.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_qkv.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_z.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.norm.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.out_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.mlp.experts.down_proj": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.mlp.experts.gate_up_proj": "weights-00027.safetensors", + "native.backbone.language_model.layers.2.mlp.gate.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.2.mlp.shared_expert.down_proj.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.2.mlp.shared_expert.gate_proj.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.2.mlp.shared_expert.up_proj.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.2.mlp.shared_expert_gate.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.2.post_attention_layernorm.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.input_layernorm.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.A_log": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.conv1d.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.dt_bias": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_a.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_b.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_qkv.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_z.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.norm.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.out_proj.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.mlp.experts.down_proj": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.mlp.experts.gate_up_proj": "weights-00029.safetensors", + "native.backbone.language_model.layers.20.mlp.gate.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.20.mlp.shared_expert.down_proj.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.20.mlp.shared_expert.gate_proj.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.20.mlp.shared_expert.up_proj.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.20.mlp.shared_expert_gate.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.20.post_attention_layernorm.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.input_layernorm.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.A_log": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.conv1d.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.dt_bias": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_a.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_b.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_qkv.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_z.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.norm.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.out_proj.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.mlp.experts.down_proj": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.mlp.experts.gate_up_proj": "weights-00031.safetensors", + "native.backbone.language_model.layers.21.mlp.gate.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.21.mlp.shared_expert.down_proj.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.21.mlp.shared_expert.gate_proj.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.21.mlp.shared_expert.up_proj.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.21.mlp.shared_expert_gate.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.21.post_attention_layernorm.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.input_layernorm.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.A_log": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.conv1d.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.dt_bias": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_a.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_b.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_qkv.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_z.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.norm.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.out_proj.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.mlp.experts.down_proj": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.mlp.experts.gate_up_proj": "weights-00033.safetensors", + "native.backbone.language_model.layers.22.mlp.gate.weight": "weights-00034.safetensors", + "native.backbone.language_model.layers.22.mlp.shared_expert.down_proj.weight": "weights-00034.safetensors", + "native.backbone.language_model.layers.22.mlp.shared_expert.gate_proj.weight": "weights-00034.safetensors", + "native.backbone.language_model.layers.22.mlp.shared_expert.up_proj.weight": "weights-00034.safetensors", + "native.backbone.language_model.layers.22.mlp.shared_expert_gate.weight": "weights-00034.safetensors", + "native.backbone.language_model.layers.22.post_attention_layernorm.weight": "weights-00034.safetensors", + "native.backbone.language_model.layers.23.input_layernorm.weight": "weights-00034.safetensors", + "native.backbone.language_model.layers.23.mlp.experts.down_proj": "weights-00034.safetensors", + "native.backbone.language_model.layers.23.mlp.experts.gate_up_proj": "weights-00035.safetensors", + "native.backbone.language_model.layers.23.mlp.gate.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.mlp.shared_expert.down_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.mlp.shared_expert.gate_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.mlp.shared_expert.up_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.mlp.shared_expert_gate.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.post_attention_layernorm.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.self_attn.k_norm.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.self_attn.k_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.self_attn.o_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.self_attn.q_norm.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.self_attn.q_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.self_attn.v_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.input_layernorm.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.A_log": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.conv1d.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.dt_bias": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_a.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_b.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_qkv.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_z.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.norm.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.out_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.mlp.experts.down_proj": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.mlp.experts.gate_up_proj": "weights-00037.safetensors", + "native.backbone.language_model.layers.24.mlp.gate.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.24.mlp.shared_expert.down_proj.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.24.mlp.shared_expert.gate_proj.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.24.mlp.shared_expert.up_proj.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.24.mlp.shared_expert_gate.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.24.post_attention_layernorm.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.input_layernorm.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.A_log": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.conv1d.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.dt_bias": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_a.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_b.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_qkv.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_z.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.norm.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.out_proj.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.mlp.experts.down_proj": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.mlp.experts.gate_up_proj": "weights-00039.safetensors", + "native.backbone.language_model.layers.25.mlp.gate.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.25.mlp.shared_expert.down_proj.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.25.mlp.shared_expert.gate_proj.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.25.mlp.shared_expert.up_proj.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.25.mlp.shared_expert_gate.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.25.post_attention_layernorm.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.input_layernorm.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.A_log": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.conv1d.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.dt_bias": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_a.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_b.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_qkv.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_z.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.norm.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.out_proj.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.mlp.experts.down_proj": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.mlp.experts.gate_up_proj": "weights-00041.safetensors", + "native.backbone.language_model.layers.26.mlp.gate.weight": "weights-00042.safetensors", + "native.backbone.language_model.layers.26.mlp.shared_expert.down_proj.weight": "weights-00042.safetensors", + "native.backbone.language_model.layers.26.mlp.shared_expert.gate_proj.weight": "weights-00042.safetensors", + "native.backbone.language_model.layers.26.mlp.shared_expert.up_proj.weight": "weights-00042.safetensors", + "native.backbone.language_model.layers.26.mlp.shared_expert_gate.weight": "weights-00042.safetensors", + "native.backbone.language_model.layers.26.post_attention_layernorm.weight": "weights-00042.safetensors", + "native.backbone.language_model.layers.27.input_layernorm.weight": "weights-00042.safetensors", + "native.backbone.language_model.layers.27.mlp.experts.down_proj": "weights-00042.safetensors", + "native.backbone.language_model.layers.27.mlp.experts.gate_up_proj": "weights-00043.safetensors", + "native.backbone.language_model.layers.27.mlp.gate.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.mlp.shared_expert.down_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.mlp.shared_expert.gate_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.mlp.shared_expert.up_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.mlp.shared_expert_gate.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.post_attention_layernorm.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.self_attn.k_norm.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.self_attn.k_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.self_attn.o_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.self_attn.q_norm.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.self_attn.q_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.self_attn.v_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.input_layernorm.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.A_log": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.conv1d.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.dt_bias": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_a.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_b.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_qkv.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_z.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.norm.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.out_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.mlp.experts.down_proj": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.mlp.experts.gate_up_proj": "weights-00045.safetensors", + "native.backbone.language_model.layers.28.mlp.gate.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.28.mlp.shared_expert.down_proj.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.28.mlp.shared_expert.gate_proj.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.28.mlp.shared_expert.up_proj.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.28.mlp.shared_expert_gate.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.28.post_attention_layernorm.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.input_layernorm.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.A_log": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.conv1d.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.dt_bias": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_a.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_b.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_qkv.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_z.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.norm.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.out_proj.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.mlp.experts.down_proj": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.mlp.experts.gate_up_proj": "weights-00047.safetensors", + "native.backbone.language_model.layers.29.mlp.gate.weight": "weights-00048.safetensors", + "native.backbone.language_model.layers.29.mlp.shared_expert.down_proj.weight": "weights-00048.safetensors", + "native.backbone.language_model.layers.29.mlp.shared_expert.gate_proj.weight": "weights-00048.safetensors", + "native.backbone.language_model.layers.29.mlp.shared_expert.up_proj.weight": "weights-00048.safetensors", + "native.backbone.language_model.layers.29.mlp.shared_expert_gate.weight": "weights-00048.safetensors", + "native.backbone.language_model.layers.29.post_attention_layernorm.weight": "weights-00048.safetensors", + "native.backbone.language_model.layers.3.input_layernorm.weight": "weights-00048.safetensors", + "native.backbone.language_model.layers.3.mlp.experts.down_proj": "weights-00048.safetensors", + "native.backbone.language_model.layers.3.mlp.experts.gate_up_proj": "weights-00049.safetensors", + "native.backbone.language_model.layers.3.mlp.gate.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.mlp.shared_expert.down_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.mlp.shared_expert.gate_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.mlp.shared_expert.up_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.mlp.shared_expert_gate.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.post_attention_layernorm.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.self_attn.k_norm.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.self_attn.k_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.self_attn.o_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.self_attn.q_norm.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.self_attn.q_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.self_attn.v_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.input_layernorm.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.A_log": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.conv1d.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.dt_bias": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_a.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_b.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_qkv.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_z.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.norm.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.out_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.mlp.experts.down_proj": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.mlp.experts.gate_up_proj": "weights-00051.safetensors", + "native.backbone.language_model.layers.30.mlp.gate.weight": "weights-00052.safetensors", + "native.backbone.language_model.layers.30.mlp.shared_expert.down_proj.weight": "weights-00052.safetensors", + "native.backbone.language_model.layers.30.mlp.shared_expert.gate_proj.weight": "weights-00052.safetensors", + "native.backbone.language_model.layers.30.mlp.shared_expert.up_proj.weight": "weights-00052.safetensors", + "native.backbone.language_model.layers.30.mlp.shared_expert_gate.weight": "weights-00052.safetensors", + "native.backbone.language_model.layers.30.post_attention_layernorm.weight": "weights-00052.safetensors", + "native.backbone.language_model.layers.31.input_layernorm.weight": "weights-00052.safetensors", + "native.backbone.language_model.layers.31.mlp.experts.down_proj": "weights-00052.safetensors", + "native.backbone.language_model.layers.31.mlp.experts.gate_up_proj": "weights-00053.safetensors", + "native.backbone.language_model.layers.31.mlp.gate.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.mlp.shared_expert.down_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.mlp.shared_expert.gate_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.mlp.shared_expert.up_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.mlp.shared_expert_gate.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.post_attention_layernorm.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.self_attn.k_norm.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.self_attn.k_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.self_attn.o_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.self_attn.q_norm.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.self_attn.q_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.self_attn.v_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.input_layernorm.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.A_log": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.conv1d.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.dt_bias": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.in_proj_a.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.in_proj_b.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.in_proj_qkv.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.in_proj_z.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.norm.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.out_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.mlp.experts.down_proj": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.mlp.experts.gate_up_proj": "weights-00055.safetensors", + "native.backbone.language_model.layers.32.mlp.gate.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.32.mlp.shared_expert.down_proj.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.32.mlp.shared_expert.gate_proj.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.32.mlp.shared_expert.up_proj.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.32.mlp.shared_expert_gate.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.32.post_attention_layernorm.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.input_layernorm.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.A_log": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.conv1d.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.dt_bias": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.in_proj_a.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.in_proj_b.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.in_proj_qkv.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.in_proj_z.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.norm.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.out_proj.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.mlp.experts.down_proj": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.mlp.experts.gate_up_proj": "weights-00057.safetensors", + "native.backbone.language_model.layers.33.mlp.gate.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.33.mlp.shared_expert.down_proj.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.33.mlp.shared_expert.gate_proj.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.33.mlp.shared_expert.up_proj.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.33.mlp.shared_expert_gate.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.33.post_attention_layernorm.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.input_layernorm.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.A_log": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.conv1d.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.dt_bias": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.in_proj_a.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.in_proj_b.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.in_proj_qkv.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.in_proj_z.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.norm.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.out_proj.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.mlp.experts.down_proj": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.mlp.experts.gate_up_proj": "weights-00059.safetensors", + "native.backbone.language_model.layers.34.mlp.gate.weight": "weights-00060.safetensors", + "native.backbone.language_model.layers.34.mlp.shared_expert.down_proj.weight": "weights-00060.safetensors", + "native.backbone.language_model.layers.34.mlp.shared_expert.gate_proj.weight": "weights-00060.safetensors", + "native.backbone.language_model.layers.34.mlp.shared_expert.up_proj.weight": "weights-00060.safetensors", + "native.backbone.language_model.layers.34.mlp.shared_expert_gate.weight": "weights-00060.safetensors", + "native.backbone.language_model.layers.34.post_attention_layernorm.weight": "weights-00060.safetensors", + "native.backbone.language_model.layers.35.input_layernorm.weight": "weights-00060.safetensors", + "native.backbone.language_model.layers.35.mlp.experts.down_proj": "weights-00060.safetensors", + "native.backbone.language_model.layers.35.mlp.experts.gate_up_proj": "weights-00061.safetensors", + "native.backbone.language_model.layers.35.mlp.gate.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.mlp.shared_expert.down_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.mlp.shared_expert.gate_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.mlp.shared_expert.up_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.mlp.shared_expert_gate.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.post_attention_layernorm.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.self_attn.k_norm.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.self_attn.k_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.self_attn.o_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.self_attn.q_norm.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.self_attn.q_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.self_attn.v_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.input_layernorm.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.A_log": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.conv1d.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.dt_bias": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.in_proj_a.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.in_proj_b.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.in_proj_qkv.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.in_proj_z.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.norm.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.out_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.mlp.experts.down_proj": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.mlp.experts.gate_up_proj": "weights-00063.safetensors", + "native.backbone.language_model.layers.36.mlp.gate.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.36.mlp.shared_expert.down_proj.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.36.mlp.shared_expert.gate_proj.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.36.mlp.shared_expert.up_proj.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.36.mlp.shared_expert_gate.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.36.post_attention_layernorm.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.input_layernorm.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.A_log": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.conv1d.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.dt_bias": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.in_proj_a.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.in_proj_b.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.in_proj_qkv.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.in_proj_z.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.norm.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.out_proj.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.mlp.experts.down_proj": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.mlp.experts.gate_up_proj": "weights-00065.safetensors", + "native.backbone.language_model.layers.37.mlp.gate.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.37.mlp.shared_expert.down_proj.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.37.mlp.shared_expert.gate_proj.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.37.mlp.shared_expert.up_proj.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.37.mlp.shared_expert_gate.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.37.post_attention_layernorm.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.input_layernorm.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.A_log": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.conv1d.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.dt_bias": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.in_proj_a.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.in_proj_b.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.in_proj_qkv.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.in_proj_z.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.norm.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.out_proj.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.mlp.experts.down_proj": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.mlp.experts.gate_up_proj": "weights-00067.safetensors", + "native.backbone.language_model.layers.38.mlp.gate.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.38.mlp.shared_expert.down_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.38.mlp.shared_expert.gate_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.38.mlp.shared_expert.up_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.38.mlp.shared_expert_gate.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.38.post_attention_layernorm.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.39.input_layernorm.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.39.self_attn.k_norm.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.39.self_attn.k_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.39.self_attn.o_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.39.self_attn.q_norm.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.39.self_attn.q_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.39.self_attn.v_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.input_layernorm.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.A_log": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.conv1d.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.dt_bias": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_a.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_b.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_qkv.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_z.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.norm.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.out_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.mlp.experts.down_proj": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.mlp.experts.gate_up_proj": "weights-00069.safetensors", + "native.backbone.language_model.layers.4.mlp.gate.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.4.mlp.shared_expert.down_proj.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.4.mlp.shared_expert.gate_proj.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.4.mlp.shared_expert.up_proj.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.4.mlp.shared_expert_gate.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.4.post_attention_layernorm.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.input_layernorm.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.A_log": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.conv1d.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.dt_bias": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_a.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_b.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_qkv.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_z.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.norm.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.out_proj.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.mlp.experts.down_proj": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.mlp.experts.gate_up_proj": "weights-00071.safetensors", + "native.backbone.language_model.layers.5.mlp.gate.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.5.mlp.shared_expert.down_proj.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.5.mlp.shared_expert.gate_proj.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.5.mlp.shared_expert.up_proj.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.5.mlp.shared_expert_gate.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.5.post_attention_layernorm.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.input_layernorm.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.A_log": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.conv1d.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.dt_bias": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_a.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_b.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_qkv.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_z.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.norm.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.out_proj.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.mlp.experts.down_proj": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.mlp.experts.gate_up_proj": "weights-00073.safetensors", + "native.backbone.language_model.layers.6.mlp.gate.weight": "weights-00074.safetensors", + "native.backbone.language_model.layers.6.mlp.shared_expert.down_proj.weight": "weights-00074.safetensors", + "native.backbone.language_model.layers.6.mlp.shared_expert.gate_proj.weight": "weights-00074.safetensors", + "native.backbone.language_model.layers.6.mlp.shared_expert.up_proj.weight": "weights-00074.safetensors", + "native.backbone.language_model.layers.6.mlp.shared_expert_gate.weight": "weights-00074.safetensors", + "native.backbone.language_model.layers.6.post_attention_layernorm.weight": "weights-00074.safetensors", + "native.backbone.language_model.layers.7.input_layernorm.weight": "weights-00074.safetensors", + "native.backbone.language_model.layers.7.mlp.experts.down_proj": "weights-00074.safetensors", + "native.backbone.language_model.layers.7.mlp.experts.gate_up_proj": "weights-00075.safetensors", + "native.backbone.language_model.layers.7.mlp.gate.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.mlp.shared_expert.down_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.mlp.shared_expert.gate_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.mlp.shared_expert.up_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.mlp.shared_expert_gate.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.post_attention_layernorm.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.self_attn.k_norm.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.self_attn.k_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.self_attn.o_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.self_attn.q_norm.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.self_attn.q_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.self_attn.v_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.input_layernorm.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.A_log": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.conv1d.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.dt_bias": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_a.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_b.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_qkv.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_z.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.norm.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.out_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.mlp.experts.down_proj": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.mlp.experts.gate_up_proj": "weights-00077.safetensors", + "native.backbone.language_model.layers.8.mlp.gate.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.8.mlp.shared_expert.down_proj.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.8.mlp.shared_expert.gate_proj.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.8.mlp.shared_expert.up_proj.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.8.mlp.shared_expert_gate.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.8.post_attention_layernorm.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.input_layernorm.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.A_log": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.conv1d.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.dt_bias": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_a.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_b.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_qkv.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_z.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.norm.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.out_proj.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.mlp.experts.down_proj": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.mlp.experts.gate_up_proj": "weights-00079.safetensors", + "native.backbone.language_model.layers.9.mlp.gate.weight": "weights-00080.safetensors", + "native.backbone.language_model.layers.9.mlp.shared_expert.down_proj.weight": "weights-00080.safetensors", + "native.backbone.language_model.layers.9.mlp.shared_expert.gate_proj.weight": "weights-00080.safetensors", + "native.backbone.language_model.layers.9.mlp.shared_expert.up_proj.weight": "weights-00080.safetensors", + "native.backbone.language_model.layers.9.mlp.shared_expert_gate.weight": "weights-00080.safetensors", + "native.backbone.language_model.layers.9.post_attention_layernorm.weight": "weights-00080.safetensors", + "native.backbone.language_model.norm.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.merger.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.merger.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.merger.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.merger.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.merger.norm.bias": "weights-00080.safetensors", + "native.backbone.visual.merger.norm.weight": "weights-00080.safetensors", + "native.backbone.visual.patch_embed.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.patch_embed.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.pos_embed.weight": "weights-00080.safetensors", + "native.head.bias": "weights-00080.safetensors", + "native.head.k.bias": "weights-00080.safetensors", + "native.head.k.weight": "weights-00080.safetensors", + "native.head.q.bias": "weights-00080.safetensors", + "native.head.q.weight": "weights-00080.safetensors", + "spatial.local.bias": "weights-00080.safetensors", + "spatial.local.weight": "weights-00080.safetensors", + "spatial.mix.0.bias": "weights-00080.safetensors", + "spatial.mix.0.weight": "weights-00080.safetensors", + "spatial.mix.2.bias": "weights-00080.safetensors", + "spatial.mix.2.weight": "weights-00080.safetensors", + "spatial.norm.bias": "weights-00080.safetensors", + "spatial.norm.weight": "weights-00080.safetensors", + "spatial.query.bias": "weights-00080.safetensors", + "spatial.query.weight": "weights-00080.safetensors", + "spatial.visual.bias": "weights-00080.safetensors", + "spatial.visual.weight": "weights-00080.safetensors" + } +} diff --git a/PixelOne-Pro-35B-A3B/pixelone.json b/PixelOne-Pro-35B-A3B/pixelone.json new file mode 100644 index 0000000000000000000000000000000000000000..7c3c1ff741a4ef7c436a4fcc5004cbdf053dc54c --- /dev/null +++ b/PixelOne-Pro-35B-A3B/pixelone.json @@ -0,0 +1,8124 @@ +{ + "schema": "pixelone-pro-v1", + "model_name": "PixelOne-Pro-35B-A3B", + "use_cache": false, + "precision": "training_cuda", + "recipe": { + "attention": "sdpa", + "attention_mode": "bidirectional_full_layers", + "checkpoint_every": 100, + "checkpoint_timeout_seconds": 600, + "decoder": "coarse_first", + "experts_backend": "grouped_mm", + "first_checkpoint_step": 1, + "full_lr": 1e-06, + "global_batch": 256, + "gradient_checkpointing": true, + "gradient_clip": 1.0, + "gt_routing": "GT center + predicted topK + GT-positive topK; independent of additional KD readout support", + "head_lr": 3e-05, + "head_seed": 20261103, + "kd_weight": 0.5, + "kernel_backend": "native", + "lora_alpha": 32, + "lora_lr": 5e-06, + "lora_rank": 16, + "loss": "coarse GT set likelihood + fine Top20 + observed-support pixel KD", + "lr_schedule": "cosine", + "lr_warmup_steps": 63, + "micro_batch": 4, + "min_lr_ratio": 0.1, + "optimizer_policy": "fresh joint AdamW for weight-only Top20 continuation; trained pixel head retained", + "prompt": "valid_click_v1", + "readout_width": 128, + "routing_topk": 4, + "seed": 20261110, + "sharding": "hybrid_shard", + "spatial_lr": 0.0001, + "speed": { + "batched_gradient_checks": true, + "length_bucket_batches": 32, + "prefetch_batches": 2, + "prefetch_workers": 2, + "progress_every": 1, + "timing": true, + "timing_warmup_steps": 10, + "vectorized_kd": true + }, + "subdivisions": 32, + "temperature": 2, + "train_mode": "full", + "train_vision": true, + "verify_first_checkpoint": true, + "version": 1, + "vision_lr": 1e-06, + "weight_decay": 0.01 + }, + "files": { + "chat_template.jinja": "e84f32a23fdda27689f868aa4a1a5621f41133e51a48d7f3efcbea2839574259", + "config.json": "91f89807fbc6e6cc21c70a3794b008251a6cff9b29c4594dc9a1f9512f755aef", + "processor_config.json": "d89ef49ce9cd37fbf510158e13c1ef063d9286411c1ec9049932dbe0487143b1", + "tokenizer.json": "0b16fb8cbf388f6af8691645a17c909c01e536b4eb1bad865ed05fb6ef4a642a", + "tokenizer_config.json": "715960dd2b2174c1c21622efca22fde4bbf6437fac589c08ebfedda40f886750", + "weights-00001.safetensors": "7a5d4601f997afbecc3f57ccfbc20912cabb15ee845acb2c49883f23ff208d3c", + "weights-00002.safetensors": "a1511724a751a94211444eca2b231e4e83033589f82e5602b789b356ca35f12c", + "weights-00003.safetensors": "52d99f99caec6f7aff46d9fd30e684241e93ed261ee6a6d2e39ba313b72d0756", + "weights-00004.safetensors": "24216a6b7cd37b4267436f0bc5c4b25b09d7eaaa4f135f17b76b44184e8180b0", + "weights-00005.safetensors": "690be859403da1002249fb238f128c2c2806aaae06b0a21cdb946f2a47904b31", + "weights-00006.safetensors": "7f125d93984eea5cc5bdaf5c6fb704cf8f7a8bd1dfdd81ccd09203e47e15269d", + "weights-00007.safetensors": "65a2ba32f28541089098d5c87bfea367d9064bb6f039c2700c00e48a33fa7a96", + "weights-00008.safetensors": "e2c18450dbdd825201f4ca51cda0755f3f6ce218a26feb77d75426b0ede861e7", + "weights-00009.safetensors": "7b3333adfd227ff8946798a2c6abb3b5e34bf1c491844384641e6e4eb7f554a1", + "weights-00010.safetensors": "bf19ae36ac5647b35de9770822c3d0ecf042876a4a5310b9602eca977a9c153c", + "weights-00011.safetensors": "4ab76a890b42f596528ec4e37f2338c585308a98ccb4f5f641ee74657d4ff0eb", + "weights-00012.safetensors": "f75bc75e604e6e30a6299234e0bd44e28054cc3dee8e09fcd7a55a8438cfdbbb", + "weights-00013.safetensors": "cf2643782af6433a989b90b3ca1ace634de0fd37f954d0d99f07f9fc9f1e1ca7", + "weights-00014.safetensors": "fb81f612665b728b2e6978b6c9a05b6418e994318c2d9cde398289a875286bba", + "weights-00015.safetensors": "0393b122e3eedfed9f4a9091838abca76f796b4840db1fc5ecdeb0d186a92920", + "weights-00016.safetensors": "c32cc5175d36b0b0859bf4ac352fd9e9ad93acd7eec2fbd97ff3c0979c87dab4", + "weights-00017.safetensors": "84c01b46dd6d270a63cb196e7087aea7517f1ef50ae63b53c32a05bac96db491", + "weights-00018.safetensors": "1bddb82b58ca68b8fe1ab3b6b80d075e8448c490b875cb3d467d43f424f46691", + "weights-00019.safetensors": "acdbc7deb40d4531f84d152123f9576404d86b2e1d7bfa3cafa1c0a96f1f03b8", + "weights-00020.safetensors": "0e445e246c80f155ce69607b3a059570d2e9fac25ea4efa8aba5c2f08e5879e1", + "weights-00021.safetensors": "963d81d031ebdc3d7a5a7bd1deadde304277aa1535572c1b6d0798f5627b39f7", + "weights-00022.safetensors": "4885961239eca9c5401df714cdb6ee8b8a13847008bb6c267ba580db687ca07b", + "weights-00023.safetensors": "be9dd7f9f2c4f1bc3c56058b621bbf7a35ee98cc54f015ed8107bff71fa78a18", + "weights-00024.safetensors": "9dbca4e475876710c379444db361237f8979020c6d53683cda87c172acc579a1", + "weights-00025.safetensors": "e69947511c289753954b8ea6df1afc5203b17b497b318716197cce5d11974d72", + "weights-00026.safetensors": "e8e812ab12fad20719bb6ee0910e965f3040d3b0f0d17e900f03e2f0bb3ce0ce", + "weights-00027.safetensors": "227727f2eebcc4405d49b839a38aec3ccbee6ee9fe83064f1d4b3dc4f1d92cdb", + "weights-00028.safetensors": "9a6ff661bd9ed52bd884a9208dba967e82dde2e5df4f9e8c5b6c8466e8bc737e", + "weights-00029.safetensors": "10708bd4cd01dc55b6cebadc6eecaa283bbacb0c510fed170a1c1607c0c1c53e", + "weights-00030.safetensors": "e6bbca526ddc6c43272b5b92a47db4d4708d0b1036c365964f4539fe9889fbd5", + "weights-00031.safetensors": "81b99aa517ca1adaa0ab882652a65bfb7a82ebfee9097a6f989bff6755704e8e", + "weights-00032.safetensors": "989fc3c8d855825f3c03cec7514add17deabca842324742ecbbf22176455b33a", + "weights-00033.safetensors": "209cc26228ff503e55f9c0b972e2489484415310be38ffa9726d434eb444504b", + "weights-00034.safetensors": "da2e3a8671576003e2529c3a19f6dcc46992c506c7901a28f38e592118679a96", + "weights-00035.safetensors": "c3d349caa5a426c82b5a5954f0d42436e66e1432976ca5268dd3ebbce1345696", + "weights-00036.safetensors": "9e202bdf591c2c21baf79b7bc866abba5bf45b17f0ac8011b6a9a6b626464838", + "weights-00037.safetensors": "4d3050762f3e3713ee31a9237a748dd98ee695dc825ba8ecb79bf4c2ef5e75e8", + "weights-00038.safetensors": "ecc36799702faec22ac03d75422daffd99a498ee0ae5a23b6dc0fea54520febc", + "weights-00039.safetensors": "3941a69aabfa2c60b8bbe0f7044f064c34569473ff0f257bd6cbef284f7a773d", + "weights-00040.safetensors": "65fd7d5a9038d4d74350c36a7511a4aa5737e5ee8e4fa65b77b81093cf17ea9e", + "weights-00041.safetensors": "00f3ce1f2733dfb5c1d36ce34d863e78a700dfee86755c75d5be292a08ac4aad", + "weights-00042.safetensors": "7a60c4a349644deea3af6df02c98a5461865be4306234b5bf38abe9b6a815636", + "weights-00043.safetensors": "370a4a6684286d888261f9853d1c1ae56308f259f6703df0855c68e6717540be", + "weights-00044.safetensors": "a497c46aff7c3e2d3c070d3e10adcdbaff20764810e4b85afa33449929b07936", + "weights-00045.safetensors": "9aff32ff1548e7367e48f7b62aabe16d368a5e2a1c22e81e5bb9394ebfebfc50", + "weights-00046.safetensors": "76d3bd4f6bed7df13aeef2f4c6475cbaa9fc26a44c3c38c4dc92837a4fda99fd", + "weights-00047.safetensors": "e08bbcb46e51e880002465a1bddfde3dbcd62474747fdfe58773c64d90dd5a36", + "weights-00048.safetensors": "ca21051e5bc9fee81f9a203f4b6fc027a3a87adb6214f8e57670b27f93095c03", + "weights-00049.safetensors": "5612ca11160465952d086a48a0c71981e0fca492db6fab7c594ea2038c4fa864", + "weights-00050.safetensors": "71556a8a8d3472fb3d1126e6a8b85042520673444975aea025a047bf7d1d3c05", + "weights-00051.safetensors": "26e21ab0210c1bd663a25a4f46d57aacc7b0348f181298d8d15977c2a443ed91", + "weights-00052.safetensors": "b6e9c4311f9b02e4c66c2939e51fea4333b974958b6b65424431c6ee90a8b435", + "weights-00053.safetensors": "c05f757c68ca5395669f677ded2c4939eae567db79cab332e71a09f20b281df5", + "weights-00054.safetensors": "10e6242c8951fc02604d174451b66d73cfacbd79763080ef5c7ede9ef914acd2", + "weights-00055.safetensors": "a0dae8f5b7cce1ddc70dd423eb94ef95fee0dbaa5dc9b6f3fe1c91b9cc280293", + "weights-00056.safetensors": "dd84bd3ebcd6ddbb7383dc1b649654d4757b29d72ce8c363b37a30a2f03df5f8", + "weights-00057.safetensors": "6198d9da85f94cfa6ac89d9f945cdbd6f4680fb63ede4c12e0c1c67a0bdd00d1", + "weights-00058.safetensors": "72b7c2e11ab7e72d076c3cc82fd78d2393e8c26f9db0adc6448931484a3a4608", + "weights-00059.safetensors": "b62c92c5c219d53a49ff71a10410db74ed5a306f6c53351c889a39fb2d9bf647", + "weights-00060.safetensors": "5ae0ae4c2c5470827524fa9e5012f145f28fc036ebcf8e676005bcaf68a397f2", + "weights-00061.safetensors": "9bd0db270e4105394522f4ee18fc8f58c6326572ed0413716ea8e780fb2bc7c3", + "weights-00062.safetensors": "98e7c921e9033d275e6153b433c2c2d9abde476c514a125bdeb5eea7840407be", + "weights-00063.safetensors": "c6971724293d6f4578a4206ae23c7cdfa247588aaee1ea2690bb347b59c4a8e2", + "weights-00064.safetensors": "00a9776c83c1f7e6e150896eab599ff878605b8a349cdc8e7a22b36fb7e72aea", + "weights-00065.safetensors": "8572e9dd67eedd722e808779d403df9ef0bc0db942fb3bd1c0376af718279e26", + "weights-00066.safetensors": "29c9c8a9c5d36ad3a46dff3ab7aa001bf9282266d279d09fe223003da404c0ba", + "weights-00067.safetensors": "91a71683f5f2ad5b9e0816de0a0383309e7fb0534bf9cac488198ffa46fcb45b", + "weights-00068.safetensors": "23419898d8a0c1e505c98958d982c9d102d1809c1dc3d7868deb267a34deffa6", + "weights-00069.safetensors": "1afef6601c2c633c4137782c5291b150965b1e2b65dfbcdfa13d4de116a2ab5f", + "weights-00070.safetensors": "7b49e1afc881199bdfa656c53543a9892c73cd87556e5c28a4edc502e5f13dd9", + "weights-00071.safetensors": "f9142fa06f739b555d0695acf297d3f3882bef0d4ce782c9a24da15f64c5b8f5", + "weights-00072.safetensors": "69ab49dacc9338d9a609ba4592ceb95e34a558c06d22b3d7ac696d041b3b8634", + "weights-00073.safetensors": "e989306aff0076b3cfcb7992eff794165e9b5d14117acda0fcf85123e2097fe5", + "weights-00074.safetensors": "234dd5b5e343a6a85b85abcd74b0ba5aa32960a26f0c41cd9aa221a24e867bc2", + "weights-00075.safetensors": "a277999a33688a7399d373d6d168b987ba58caa8bfdcb9cdc9335b92031362a4", + "weights-00076.safetensors": "0c902e09de22654a7c41aa84148b0705e82f457fb7f66fce19aca082c369c7c2", + "weights-00077.safetensors": "af02dd51f0af8ab35654f6c5444e857648717d623b922a412c31ad1aa67157cc", + "weights-00078.safetensors": "e6ca7fb497f1eeac3616b4da7e285306a5bcc8e621d59c94faeb2e6cc31670b6", + "weights-00079.safetensors": "b9ac63873c4d28b8db0a377bb884aaa5ad5ba5a767a4b965590b4a04aea15c35", + "weights-00080.safetensors": "ded4f2342e48a81c217529358187150de1bdf4375950bdb1b5264c1cd4550654" + }, + "weight_map": { + "native.backbone.language_model.embed_tokens.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.input_layernorm.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.A_log": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.conv1d.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.dt_bias": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_a.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_b.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_qkv.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_z.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.norm.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.linear_attn.out_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.mlp.experts.down_proj": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.mlp.experts.gate_up_proj": "weights-00003.safetensors", + "native.backbone.language_model.layers.0.mlp.gate.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.0.mlp.shared_expert.down_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.0.mlp.shared_expert.gate_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.0.mlp.shared_expert.up_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.0.mlp.shared_expert_gate.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.0.post_attention_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.input_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.A_log": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.conv1d.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.dt_bias": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_a.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_b.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_qkv.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_z.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.norm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.linear_attn.out_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.mlp.experts.down_proj": "weights-00004.safetensors", + "native.backbone.language_model.layers.1.mlp.experts.gate_up_proj": "weights-00005.safetensors", + "native.backbone.language_model.layers.1.mlp.gate.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.1.mlp.shared_expert.down_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.1.mlp.shared_expert.gate_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.1.mlp.shared_expert.up_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.1.mlp.shared_expert_gate.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.1.post_attention_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.input_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.A_log": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.conv1d.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.dt_bias": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_a.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_b.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_qkv.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_z.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.linear_attn.out_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.mlp.experts.down_proj": "weights-00006.safetensors", + "native.backbone.language_model.layers.10.mlp.experts.gate_up_proj": "weights-00007.safetensors", + "native.backbone.language_model.layers.10.mlp.gate.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.10.mlp.shared_expert.down_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.10.mlp.shared_expert.gate_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.10.mlp.shared_expert.up_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.10.mlp.shared_expert_gate.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.10.post_attention_layernorm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.11.input_layernorm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.11.mlp.experts.down_proj": "weights-00008.safetensors", + "native.backbone.language_model.layers.11.mlp.experts.gate_up_proj": "weights-00009.safetensors", + "native.backbone.language_model.layers.11.mlp.gate.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.mlp.shared_expert.down_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.mlp.shared_expert.gate_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.mlp.shared_expert.up_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.mlp.shared_expert_gate.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.post_attention_layernorm.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.self_attn.k_norm.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.self_attn.k_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.self_attn.o_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.self_attn.q_norm.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.self_attn.q_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.11.self_attn.v_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.input_layernorm.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.A_log": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.conv1d.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.dt_bias": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_a.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_b.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_qkv.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_z.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.norm.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.linear_attn.out_proj.weight": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.mlp.experts.down_proj": "weights-00010.safetensors", + "native.backbone.language_model.layers.12.mlp.experts.gate_up_proj": "weights-00011.safetensors", + "native.backbone.language_model.layers.12.mlp.gate.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.12.mlp.shared_expert.down_proj.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.12.mlp.shared_expert.gate_proj.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.12.mlp.shared_expert.up_proj.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.12.mlp.shared_expert_gate.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.12.post_attention_layernorm.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.input_layernorm.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.A_log": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.conv1d.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.dt_bias": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_a.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_b.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_qkv.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_z.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.norm.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.linear_attn.out_proj.weight": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.mlp.experts.down_proj": "weights-00012.safetensors", + "native.backbone.language_model.layers.13.mlp.experts.gate_up_proj": "weights-00013.safetensors", + "native.backbone.language_model.layers.13.mlp.gate.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.13.mlp.shared_expert.down_proj.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.13.mlp.shared_expert.gate_proj.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.13.mlp.shared_expert.up_proj.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.13.mlp.shared_expert_gate.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.13.post_attention_layernorm.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.input_layernorm.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.A_log": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.conv1d.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.dt_bias": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_a.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_b.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_qkv.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_z.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.norm.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.linear_attn.out_proj.weight": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.mlp.experts.down_proj": "weights-00014.safetensors", + "native.backbone.language_model.layers.14.mlp.experts.gate_up_proj": "weights-00015.safetensors", + "native.backbone.language_model.layers.14.mlp.gate.weight": "weights-00016.safetensors", + "native.backbone.language_model.layers.14.mlp.shared_expert.down_proj.weight": "weights-00016.safetensors", + "native.backbone.language_model.layers.14.mlp.shared_expert.gate_proj.weight": "weights-00016.safetensors", + "native.backbone.language_model.layers.14.mlp.shared_expert.up_proj.weight": "weights-00016.safetensors", + "native.backbone.language_model.layers.14.mlp.shared_expert_gate.weight": "weights-00016.safetensors", + "native.backbone.language_model.layers.14.post_attention_layernorm.weight": "weights-00016.safetensors", + "native.backbone.language_model.layers.15.input_layernorm.weight": "weights-00016.safetensors", + "native.backbone.language_model.layers.15.mlp.experts.down_proj": "weights-00016.safetensors", + "native.backbone.language_model.layers.15.mlp.experts.gate_up_proj": "weights-00017.safetensors", + "native.backbone.language_model.layers.15.mlp.gate.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.mlp.shared_expert.down_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.mlp.shared_expert.gate_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.mlp.shared_expert.up_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.mlp.shared_expert_gate.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.post_attention_layernorm.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.self_attn.k_norm.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.self_attn.k_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.self_attn.o_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.self_attn.q_norm.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.self_attn.q_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.15.self_attn.v_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.input_layernorm.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.A_log": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.conv1d.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.dt_bias": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_a.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_b.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_qkv.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_z.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.norm.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.linear_attn.out_proj.weight": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.mlp.experts.down_proj": "weights-00018.safetensors", + "native.backbone.language_model.layers.16.mlp.experts.gate_up_proj": "weights-00019.safetensors", + "native.backbone.language_model.layers.16.mlp.gate.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.16.mlp.shared_expert.down_proj.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.16.mlp.shared_expert.gate_proj.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.16.mlp.shared_expert.up_proj.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.16.mlp.shared_expert_gate.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.16.post_attention_layernorm.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.input_layernorm.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.A_log": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.conv1d.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.dt_bias": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_a.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_b.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_qkv.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_z.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.norm.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.linear_attn.out_proj.weight": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.mlp.experts.down_proj": "weights-00020.safetensors", + "native.backbone.language_model.layers.17.mlp.experts.gate_up_proj": "weights-00021.safetensors", + "native.backbone.language_model.layers.17.mlp.gate.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.17.mlp.shared_expert.down_proj.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.17.mlp.shared_expert.gate_proj.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.17.mlp.shared_expert.up_proj.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.17.mlp.shared_expert_gate.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.17.post_attention_layernorm.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.input_layernorm.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.A_log": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.conv1d.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.dt_bias": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_a.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_b.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_qkv.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_z.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.norm.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.linear_attn.out_proj.weight": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.mlp.experts.down_proj": "weights-00022.safetensors", + "native.backbone.language_model.layers.18.mlp.experts.gate_up_proj": "weights-00023.safetensors", + "native.backbone.language_model.layers.18.mlp.gate.weight": "weights-00024.safetensors", + "native.backbone.language_model.layers.18.mlp.shared_expert.down_proj.weight": "weights-00024.safetensors", + "native.backbone.language_model.layers.18.mlp.shared_expert.gate_proj.weight": "weights-00024.safetensors", + "native.backbone.language_model.layers.18.mlp.shared_expert.up_proj.weight": "weights-00024.safetensors", + "native.backbone.language_model.layers.18.mlp.shared_expert_gate.weight": "weights-00024.safetensors", + "native.backbone.language_model.layers.18.post_attention_layernorm.weight": "weights-00024.safetensors", + "native.backbone.language_model.layers.19.input_layernorm.weight": "weights-00024.safetensors", + "native.backbone.language_model.layers.19.mlp.experts.down_proj": "weights-00024.safetensors", + "native.backbone.language_model.layers.19.mlp.experts.gate_up_proj": "weights-00025.safetensors", + "native.backbone.language_model.layers.19.mlp.gate.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.mlp.shared_expert.down_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.mlp.shared_expert.gate_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.mlp.shared_expert.up_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.mlp.shared_expert_gate.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.post_attention_layernorm.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.self_attn.k_norm.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.self_attn.k_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.self_attn.o_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.self_attn.q_norm.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.self_attn.q_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.19.self_attn.v_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.input_layernorm.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.A_log": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.conv1d.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.dt_bias": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_a.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_b.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_qkv.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_z.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.norm.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.linear_attn.out_proj.weight": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.mlp.experts.down_proj": "weights-00026.safetensors", + "native.backbone.language_model.layers.2.mlp.experts.gate_up_proj": "weights-00027.safetensors", + "native.backbone.language_model.layers.2.mlp.gate.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.2.mlp.shared_expert.down_proj.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.2.mlp.shared_expert.gate_proj.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.2.mlp.shared_expert.up_proj.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.2.mlp.shared_expert_gate.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.2.post_attention_layernorm.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.input_layernorm.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.A_log": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.conv1d.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.dt_bias": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_a.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_b.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_qkv.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_z.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.norm.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.linear_attn.out_proj.weight": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.mlp.experts.down_proj": "weights-00028.safetensors", + "native.backbone.language_model.layers.20.mlp.experts.gate_up_proj": "weights-00029.safetensors", + "native.backbone.language_model.layers.20.mlp.gate.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.20.mlp.shared_expert.down_proj.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.20.mlp.shared_expert.gate_proj.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.20.mlp.shared_expert.up_proj.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.20.mlp.shared_expert_gate.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.20.post_attention_layernorm.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.input_layernorm.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.A_log": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.conv1d.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.dt_bias": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_a.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_b.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_qkv.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_z.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.norm.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.linear_attn.out_proj.weight": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.mlp.experts.down_proj": "weights-00030.safetensors", + "native.backbone.language_model.layers.21.mlp.experts.gate_up_proj": "weights-00031.safetensors", + "native.backbone.language_model.layers.21.mlp.gate.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.21.mlp.shared_expert.down_proj.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.21.mlp.shared_expert.gate_proj.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.21.mlp.shared_expert.up_proj.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.21.mlp.shared_expert_gate.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.21.post_attention_layernorm.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.input_layernorm.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.A_log": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.conv1d.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.dt_bias": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_a.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_b.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_qkv.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_z.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.norm.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.linear_attn.out_proj.weight": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.mlp.experts.down_proj": "weights-00032.safetensors", + "native.backbone.language_model.layers.22.mlp.experts.gate_up_proj": "weights-00033.safetensors", + "native.backbone.language_model.layers.22.mlp.gate.weight": "weights-00034.safetensors", + "native.backbone.language_model.layers.22.mlp.shared_expert.down_proj.weight": "weights-00034.safetensors", + "native.backbone.language_model.layers.22.mlp.shared_expert.gate_proj.weight": "weights-00034.safetensors", + "native.backbone.language_model.layers.22.mlp.shared_expert.up_proj.weight": "weights-00034.safetensors", + "native.backbone.language_model.layers.22.mlp.shared_expert_gate.weight": "weights-00034.safetensors", + "native.backbone.language_model.layers.22.post_attention_layernorm.weight": "weights-00034.safetensors", + "native.backbone.language_model.layers.23.input_layernorm.weight": "weights-00034.safetensors", + "native.backbone.language_model.layers.23.mlp.experts.down_proj": "weights-00034.safetensors", + "native.backbone.language_model.layers.23.mlp.experts.gate_up_proj": "weights-00035.safetensors", + "native.backbone.language_model.layers.23.mlp.gate.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.mlp.shared_expert.down_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.mlp.shared_expert.gate_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.mlp.shared_expert.up_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.mlp.shared_expert_gate.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.post_attention_layernorm.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.self_attn.k_norm.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.self_attn.k_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.self_attn.o_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.self_attn.q_norm.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.self_attn.q_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.23.self_attn.v_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.input_layernorm.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.A_log": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.conv1d.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.dt_bias": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_a.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_b.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_qkv.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_z.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.norm.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.linear_attn.out_proj.weight": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.mlp.experts.down_proj": "weights-00036.safetensors", + "native.backbone.language_model.layers.24.mlp.experts.gate_up_proj": "weights-00037.safetensors", + "native.backbone.language_model.layers.24.mlp.gate.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.24.mlp.shared_expert.down_proj.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.24.mlp.shared_expert.gate_proj.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.24.mlp.shared_expert.up_proj.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.24.mlp.shared_expert_gate.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.24.post_attention_layernorm.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.input_layernorm.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.A_log": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.conv1d.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.dt_bias": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_a.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_b.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_qkv.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_z.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.norm.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.linear_attn.out_proj.weight": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.mlp.experts.down_proj": "weights-00038.safetensors", + "native.backbone.language_model.layers.25.mlp.experts.gate_up_proj": "weights-00039.safetensors", + "native.backbone.language_model.layers.25.mlp.gate.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.25.mlp.shared_expert.down_proj.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.25.mlp.shared_expert.gate_proj.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.25.mlp.shared_expert.up_proj.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.25.mlp.shared_expert_gate.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.25.post_attention_layernorm.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.input_layernorm.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.A_log": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.conv1d.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.dt_bias": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_a.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_b.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_qkv.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_z.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.norm.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.linear_attn.out_proj.weight": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.mlp.experts.down_proj": "weights-00040.safetensors", + "native.backbone.language_model.layers.26.mlp.experts.gate_up_proj": "weights-00041.safetensors", + "native.backbone.language_model.layers.26.mlp.gate.weight": "weights-00042.safetensors", + "native.backbone.language_model.layers.26.mlp.shared_expert.down_proj.weight": "weights-00042.safetensors", + "native.backbone.language_model.layers.26.mlp.shared_expert.gate_proj.weight": "weights-00042.safetensors", + "native.backbone.language_model.layers.26.mlp.shared_expert.up_proj.weight": "weights-00042.safetensors", + "native.backbone.language_model.layers.26.mlp.shared_expert_gate.weight": "weights-00042.safetensors", + "native.backbone.language_model.layers.26.post_attention_layernorm.weight": "weights-00042.safetensors", + "native.backbone.language_model.layers.27.input_layernorm.weight": "weights-00042.safetensors", + "native.backbone.language_model.layers.27.mlp.experts.down_proj": "weights-00042.safetensors", + "native.backbone.language_model.layers.27.mlp.experts.gate_up_proj": "weights-00043.safetensors", + "native.backbone.language_model.layers.27.mlp.gate.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.mlp.shared_expert.down_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.mlp.shared_expert.gate_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.mlp.shared_expert.up_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.mlp.shared_expert_gate.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.post_attention_layernorm.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.self_attn.k_norm.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.self_attn.k_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.self_attn.o_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.self_attn.q_norm.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.self_attn.q_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.27.self_attn.v_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.input_layernorm.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.A_log": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.conv1d.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.dt_bias": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_a.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_b.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_qkv.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_z.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.norm.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.linear_attn.out_proj.weight": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.mlp.experts.down_proj": "weights-00044.safetensors", + "native.backbone.language_model.layers.28.mlp.experts.gate_up_proj": "weights-00045.safetensors", + "native.backbone.language_model.layers.28.mlp.gate.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.28.mlp.shared_expert.down_proj.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.28.mlp.shared_expert.gate_proj.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.28.mlp.shared_expert.up_proj.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.28.mlp.shared_expert_gate.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.28.post_attention_layernorm.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.input_layernorm.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.A_log": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.conv1d.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.dt_bias": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_a.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_b.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_qkv.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_z.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.norm.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.linear_attn.out_proj.weight": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.mlp.experts.down_proj": "weights-00046.safetensors", + "native.backbone.language_model.layers.29.mlp.experts.gate_up_proj": "weights-00047.safetensors", + "native.backbone.language_model.layers.29.mlp.gate.weight": "weights-00048.safetensors", + "native.backbone.language_model.layers.29.mlp.shared_expert.down_proj.weight": "weights-00048.safetensors", + "native.backbone.language_model.layers.29.mlp.shared_expert.gate_proj.weight": "weights-00048.safetensors", + "native.backbone.language_model.layers.29.mlp.shared_expert.up_proj.weight": "weights-00048.safetensors", + "native.backbone.language_model.layers.29.mlp.shared_expert_gate.weight": "weights-00048.safetensors", + "native.backbone.language_model.layers.29.post_attention_layernorm.weight": "weights-00048.safetensors", + "native.backbone.language_model.layers.3.input_layernorm.weight": "weights-00048.safetensors", + "native.backbone.language_model.layers.3.mlp.experts.down_proj": "weights-00048.safetensors", + "native.backbone.language_model.layers.3.mlp.experts.gate_up_proj": "weights-00049.safetensors", + "native.backbone.language_model.layers.3.mlp.gate.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.mlp.shared_expert.down_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.mlp.shared_expert.gate_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.mlp.shared_expert.up_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.mlp.shared_expert_gate.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.post_attention_layernorm.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.self_attn.k_norm.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.self_attn.k_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.self_attn.o_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.self_attn.q_norm.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.self_attn.q_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.3.self_attn.v_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.input_layernorm.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.A_log": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.conv1d.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.dt_bias": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_a.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_b.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_qkv.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_z.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.norm.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.linear_attn.out_proj.weight": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.mlp.experts.down_proj": "weights-00050.safetensors", + "native.backbone.language_model.layers.30.mlp.experts.gate_up_proj": "weights-00051.safetensors", + "native.backbone.language_model.layers.30.mlp.gate.weight": "weights-00052.safetensors", + "native.backbone.language_model.layers.30.mlp.shared_expert.down_proj.weight": "weights-00052.safetensors", + "native.backbone.language_model.layers.30.mlp.shared_expert.gate_proj.weight": "weights-00052.safetensors", + "native.backbone.language_model.layers.30.mlp.shared_expert.up_proj.weight": "weights-00052.safetensors", + "native.backbone.language_model.layers.30.mlp.shared_expert_gate.weight": "weights-00052.safetensors", + "native.backbone.language_model.layers.30.post_attention_layernorm.weight": "weights-00052.safetensors", + "native.backbone.language_model.layers.31.input_layernorm.weight": "weights-00052.safetensors", + "native.backbone.language_model.layers.31.mlp.experts.down_proj": "weights-00052.safetensors", + "native.backbone.language_model.layers.31.mlp.experts.gate_up_proj": "weights-00053.safetensors", + "native.backbone.language_model.layers.31.mlp.gate.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.mlp.shared_expert.down_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.mlp.shared_expert.gate_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.mlp.shared_expert.up_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.mlp.shared_expert_gate.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.post_attention_layernorm.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.self_attn.k_norm.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.self_attn.k_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.self_attn.o_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.self_attn.q_norm.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.self_attn.q_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.31.self_attn.v_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.input_layernorm.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.A_log": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.conv1d.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.dt_bias": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.in_proj_a.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.in_proj_b.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.in_proj_qkv.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.in_proj_z.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.norm.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.linear_attn.out_proj.weight": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.mlp.experts.down_proj": "weights-00054.safetensors", + "native.backbone.language_model.layers.32.mlp.experts.gate_up_proj": "weights-00055.safetensors", + "native.backbone.language_model.layers.32.mlp.gate.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.32.mlp.shared_expert.down_proj.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.32.mlp.shared_expert.gate_proj.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.32.mlp.shared_expert.up_proj.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.32.mlp.shared_expert_gate.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.32.post_attention_layernorm.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.input_layernorm.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.A_log": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.conv1d.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.dt_bias": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.in_proj_a.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.in_proj_b.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.in_proj_qkv.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.in_proj_z.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.norm.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.linear_attn.out_proj.weight": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.mlp.experts.down_proj": "weights-00056.safetensors", + "native.backbone.language_model.layers.33.mlp.experts.gate_up_proj": "weights-00057.safetensors", + "native.backbone.language_model.layers.33.mlp.gate.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.33.mlp.shared_expert.down_proj.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.33.mlp.shared_expert.gate_proj.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.33.mlp.shared_expert.up_proj.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.33.mlp.shared_expert_gate.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.33.post_attention_layernorm.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.input_layernorm.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.A_log": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.conv1d.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.dt_bias": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.in_proj_a.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.in_proj_b.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.in_proj_qkv.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.in_proj_z.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.norm.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.linear_attn.out_proj.weight": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.mlp.experts.down_proj": "weights-00058.safetensors", + "native.backbone.language_model.layers.34.mlp.experts.gate_up_proj": "weights-00059.safetensors", + "native.backbone.language_model.layers.34.mlp.gate.weight": "weights-00060.safetensors", + "native.backbone.language_model.layers.34.mlp.shared_expert.down_proj.weight": "weights-00060.safetensors", + "native.backbone.language_model.layers.34.mlp.shared_expert.gate_proj.weight": "weights-00060.safetensors", + "native.backbone.language_model.layers.34.mlp.shared_expert.up_proj.weight": "weights-00060.safetensors", + "native.backbone.language_model.layers.34.mlp.shared_expert_gate.weight": "weights-00060.safetensors", + "native.backbone.language_model.layers.34.post_attention_layernorm.weight": "weights-00060.safetensors", + "native.backbone.language_model.layers.35.input_layernorm.weight": "weights-00060.safetensors", + "native.backbone.language_model.layers.35.mlp.experts.down_proj": "weights-00060.safetensors", + "native.backbone.language_model.layers.35.mlp.experts.gate_up_proj": "weights-00061.safetensors", + "native.backbone.language_model.layers.35.mlp.gate.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.mlp.shared_expert.down_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.mlp.shared_expert.gate_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.mlp.shared_expert.up_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.mlp.shared_expert_gate.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.post_attention_layernorm.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.self_attn.k_norm.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.self_attn.k_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.self_attn.o_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.self_attn.q_norm.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.self_attn.q_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.35.self_attn.v_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.input_layernorm.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.A_log": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.conv1d.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.dt_bias": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.in_proj_a.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.in_proj_b.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.in_proj_qkv.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.in_proj_z.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.norm.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.linear_attn.out_proj.weight": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.mlp.experts.down_proj": "weights-00062.safetensors", + "native.backbone.language_model.layers.36.mlp.experts.gate_up_proj": "weights-00063.safetensors", + "native.backbone.language_model.layers.36.mlp.gate.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.36.mlp.shared_expert.down_proj.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.36.mlp.shared_expert.gate_proj.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.36.mlp.shared_expert.up_proj.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.36.mlp.shared_expert_gate.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.36.post_attention_layernorm.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.input_layernorm.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.A_log": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.conv1d.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.dt_bias": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.in_proj_a.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.in_proj_b.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.in_proj_qkv.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.in_proj_z.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.norm.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.linear_attn.out_proj.weight": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.mlp.experts.down_proj": "weights-00064.safetensors", + "native.backbone.language_model.layers.37.mlp.experts.gate_up_proj": "weights-00065.safetensors", + "native.backbone.language_model.layers.37.mlp.gate.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.37.mlp.shared_expert.down_proj.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.37.mlp.shared_expert.gate_proj.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.37.mlp.shared_expert.up_proj.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.37.mlp.shared_expert_gate.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.37.post_attention_layernorm.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.input_layernorm.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.A_log": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.conv1d.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.dt_bias": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.in_proj_a.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.in_proj_b.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.in_proj_qkv.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.in_proj_z.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.norm.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.linear_attn.out_proj.weight": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.mlp.experts.down_proj": "weights-00066.safetensors", + "native.backbone.language_model.layers.38.mlp.experts.gate_up_proj": "weights-00067.safetensors", + "native.backbone.language_model.layers.38.mlp.gate.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.38.mlp.shared_expert.down_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.38.mlp.shared_expert.gate_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.38.mlp.shared_expert.up_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.38.mlp.shared_expert_gate.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.38.post_attention_layernorm.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.39.input_layernorm.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.39.self_attn.k_norm.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.39.self_attn.k_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.39.self_attn.o_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.39.self_attn.q_norm.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.39.self_attn.q_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.39.self_attn.v_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.input_layernorm.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.A_log": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.conv1d.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.dt_bias": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_a.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_b.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_qkv.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_z.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.norm.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.linear_attn.out_proj.weight": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.mlp.experts.down_proj": "weights-00068.safetensors", + "native.backbone.language_model.layers.4.mlp.experts.gate_up_proj": "weights-00069.safetensors", + "native.backbone.language_model.layers.4.mlp.gate.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.4.mlp.shared_expert.down_proj.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.4.mlp.shared_expert.gate_proj.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.4.mlp.shared_expert.up_proj.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.4.mlp.shared_expert_gate.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.4.post_attention_layernorm.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.input_layernorm.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.A_log": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.conv1d.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.dt_bias": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_a.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_b.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_qkv.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_z.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.norm.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.linear_attn.out_proj.weight": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.mlp.experts.down_proj": "weights-00070.safetensors", + "native.backbone.language_model.layers.5.mlp.experts.gate_up_proj": "weights-00071.safetensors", + "native.backbone.language_model.layers.5.mlp.gate.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.5.mlp.shared_expert.down_proj.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.5.mlp.shared_expert.gate_proj.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.5.mlp.shared_expert.up_proj.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.5.mlp.shared_expert_gate.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.5.post_attention_layernorm.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.input_layernorm.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.A_log": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.conv1d.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.dt_bias": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_a.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_b.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_qkv.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_z.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.norm.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.linear_attn.out_proj.weight": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.mlp.experts.down_proj": "weights-00072.safetensors", + "native.backbone.language_model.layers.6.mlp.experts.gate_up_proj": "weights-00073.safetensors", + "native.backbone.language_model.layers.6.mlp.gate.weight": "weights-00074.safetensors", + "native.backbone.language_model.layers.6.mlp.shared_expert.down_proj.weight": "weights-00074.safetensors", + "native.backbone.language_model.layers.6.mlp.shared_expert.gate_proj.weight": "weights-00074.safetensors", + "native.backbone.language_model.layers.6.mlp.shared_expert.up_proj.weight": "weights-00074.safetensors", + "native.backbone.language_model.layers.6.mlp.shared_expert_gate.weight": "weights-00074.safetensors", + "native.backbone.language_model.layers.6.post_attention_layernorm.weight": "weights-00074.safetensors", + "native.backbone.language_model.layers.7.input_layernorm.weight": "weights-00074.safetensors", + "native.backbone.language_model.layers.7.mlp.experts.down_proj": "weights-00074.safetensors", + "native.backbone.language_model.layers.7.mlp.experts.gate_up_proj": "weights-00075.safetensors", + "native.backbone.language_model.layers.7.mlp.gate.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.mlp.shared_expert.down_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.mlp.shared_expert.gate_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.mlp.shared_expert.up_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.mlp.shared_expert_gate.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.post_attention_layernorm.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.self_attn.k_norm.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.self_attn.k_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.self_attn.o_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.self_attn.q_norm.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.self_attn.q_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.7.self_attn.v_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.input_layernorm.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.A_log": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.conv1d.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.dt_bias": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_a.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_b.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_qkv.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_z.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.norm.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.linear_attn.out_proj.weight": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.mlp.experts.down_proj": "weights-00076.safetensors", + "native.backbone.language_model.layers.8.mlp.experts.gate_up_proj": "weights-00077.safetensors", + "native.backbone.language_model.layers.8.mlp.gate.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.8.mlp.shared_expert.down_proj.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.8.mlp.shared_expert.gate_proj.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.8.mlp.shared_expert.up_proj.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.8.mlp.shared_expert_gate.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.8.post_attention_layernorm.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.input_layernorm.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.A_log": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.conv1d.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.dt_bias": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_a.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_b.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_qkv.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_z.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.norm.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.linear_attn.out_proj.weight": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.mlp.experts.down_proj": "weights-00078.safetensors", + "native.backbone.language_model.layers.9.mlp.experts.gate_up_proj": "weights-00079.safetensors", + "native.backbone.language_model.layers.9.mlp.gate.weight": "weights-00080.safetensors", + "native.backbone.language_model.layers.9.mlp.shared_expert.down_proj.weight": "weights-00080.safetensors", + "native.backbone.language_model.layers.9.mlp.shared_expert.gate_proj.weight": "weights-00080.safetensors", + "native.backbone.language_model.layers.9.mlp.shared_expert.up_proj.weight": "weights-00080.safetensors", + "native.backbone.language_model.layers.9.mlp.shared_expert_gate.weight": "weights-00080.safetensors", + "native.backbone.language_model.layers.9.post_attention_layernorm.weight": "weights-00080.safetensors", + "native.backbone.language_model.norm.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.0.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.1.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.10.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.11.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.12.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.13.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.14.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.15.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.16.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.17.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.18.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.19.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.2.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.20.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.21.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.22.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.23.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.24.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.25.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.26.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.3.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.4.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.5.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.6.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.7.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.8.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.attn.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.attn.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.attn.qkv.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.attn.qkv.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.norm1.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.norm1.weight": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.norm2.bias": "weights-00080.safetensors", + "native.backbone.visual.blocks.9.norm2.weight": "weights-00080.safetensors", + "native.backbone.visual.merger.linear_fc1.bias": "weights-00080.safetensors", + "native.backbone.visual.merger.linear_fc1.weight": "weights-00080.safetensors", + "native.backbone.visual.merger.linear_fc2.bias": "weights-00080.safetensors", + "native.backbone.visual.merger.linear_fc2.weight": "weights-00080.safetensors", + "native.backbone.visual.merger.norm.bias": "weights-00080.safetensors", + "native.backbone.visual.merger.norm.weight": "weights-00080.safetensors", + "native.backbone.visual.patch_embed.proj.bias": "weights-00080.safetensors", + "native.backbone.visual.patch_embed.proj.weight": "weights-00080.safetensors", + "native.backbone.visual.pos_embed.weight": "weights-00080.safetensors", + "native.head.bias": "weights-00080.safetensors", + "native.head.k.bias": "weights-00080.safetensors", + "native.head.k.weight": "weights-00080.safetensors", + "native.head.q.bias": "weights-00080.safetensors", + "native.head.q.weight": "weights-00080.safetensors", + "spatial.local.bias": "weights-00080.safetensors", + "spatial.local.weight": "weights-00080.safetensors", + "spatial.mix.0.bias": "weights-00080.safetensors", + "spatial.mix.0.weight": "weights-00080.safetensors", + "spatial.mix.2.bias": "weights-00080.safetensors", + "spatial.mix.2.weight": "weights-00080.safetensors", + "spatial.norm.bias": "weights-00080.safetensors", + "spatial.norm.weight": "weights-00080.safetensors", + "spatial.query.bias": "weights-00080.safetensors", + "spatial.query.weight": "weights-00080.safetensors", + "spatial.visual.bias": "weights-00080.safetensors", + "spatial.visual.weight": "weights-00080.safetensors" + }, + "tensors": { + "native.backbone.language_model.embed_tokens.weight": { + "dtype": "torch.float32", + "shape": [ + 248320, + 2048 + ] + }, + "native.backbone.language_model.layers.0.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.0.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.0.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.0.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.0.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.0.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.0.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.0.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.0.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.1.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.1.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.1.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.1.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.1.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.1.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.1.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.1.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.1.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.10.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.10.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.10.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.10.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.10.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.10.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.10.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.10.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.10.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.11.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.11.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.11.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.11.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.11.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.11.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.11.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.11.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.11.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.11.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.11.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.11.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.11.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.11.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.11.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.12.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.12.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.12.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.12.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.12.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.12.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.12.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.12.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.12.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.13.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.13.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.13.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.13.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.13.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.13.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.13.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.13.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.13.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.14.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.14.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.14.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.14.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.14.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.14.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.14.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.14.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.14.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.15.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.15.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.15.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.15.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.15.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.15.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.15.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.15.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.15.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.15.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.15.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.15.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.15.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.15.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.15.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.16.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.16.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.16.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.16.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.16.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.16.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.16.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.16.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.16.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.17.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.17.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.17.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.17.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.17.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.17.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.17.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.17.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.17.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.18.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.18.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.18.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.18.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.18.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.18.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.18.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.18.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.18.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.19.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.19.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.19.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.19.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.19.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.19.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.19.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.19.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.19.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.19.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.19.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.19.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.19.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.19.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.19.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.2.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.2.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.2.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.2.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.2.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.2.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.2.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.2.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.2.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.20.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.20.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.20.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.20.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.20.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.20.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.20.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.20.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.20.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.21.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.21.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.21.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.21.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.21.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.21.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.21.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.21.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.21.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.22.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.22.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.22.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.22.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.22.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.22.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.22.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.22.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.22.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.23.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.23.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.23.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.23.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.23.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.23.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.23.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.23.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.23.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.23.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.23.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.23.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.23.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.23.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.23.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.24.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.24.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.24.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.24.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.24.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.24.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.24.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.24.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.24.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.25.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.25.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.25.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.25.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.25.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.25.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.25.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.25.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.25.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.26.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.26.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.26.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.26.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.26.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.26.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.26.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.26.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.26.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.27.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.27.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.27.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.27.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.27.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.27.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.27.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.27.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.27.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.27.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.27.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.27.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.27.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.27.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.27.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.28.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.28.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.28.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.28.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.28.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.28.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.28.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.28.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.28.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.29.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.29.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.29.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.29.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.29.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.29.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.29.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.29.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.29.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.3.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.3.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.3.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.3.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.3.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.3.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.3.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.3.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.3.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.3.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.3.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.3.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.3.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.3.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.3.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.30.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.30.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.30.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.30.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.30.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.30.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.30.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.30.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.30.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.31.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.31.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.31.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.31.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.31.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.31.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.31.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.31.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.31.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.31.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.31.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.31.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.31.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.31.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.31.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.32.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.32.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.32.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.32.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.32.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.32.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.32.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.32.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.32.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.32.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.32.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.32.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.32.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.32.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.32.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.32.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.32.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.32.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.33.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.33.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.33.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.33.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.33.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.33.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.33.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.33.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.33.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.33.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.33.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.33.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.33.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.33.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.33.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.33.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.33.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.33.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.34.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.34.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.34.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.34.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.34.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.34.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.34.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.34.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.34.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.34.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.34.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.34.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.34.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.34.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.34.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.34.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.34.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.34.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.35.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.35.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.35.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.35.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.35.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.35.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.35.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.35.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.35.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.35.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.35.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.35.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.35.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.35.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.35.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.36.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.36.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.36.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.36.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.36.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.36.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.36.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.36.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.36.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.36.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.36.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.36.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.36.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.36.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.36.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.36.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.36.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.36.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.37.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.37.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.37.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.37.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.37.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.37.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.37.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.37.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.37.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.37.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.37.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.37.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.37.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.37.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.37.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.37.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.37.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.37.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.38.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.38.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.38.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.38.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.38.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.38.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.38.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.38.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.38.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.38.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.38.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.38.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.38.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.38.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.38.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.38.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.38.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.38.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.39.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.39.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.39.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.39.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.39.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.39.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.39.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.4.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.4.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.4.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.4.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.4.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.4.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.4.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.4.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.4.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.5.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.5.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.5.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.5.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.5.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.5.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.5.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.5.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.5.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.6.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.6.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.6.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.6.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.6.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.6.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.6.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.6.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.6.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.7.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.7.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.7.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.7.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.7.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.7.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.7.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.7.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.7.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.7.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.7.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.7.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.7.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.7.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.7.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.8.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.8.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.8.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.8.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.8.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.8.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.8.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.8.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.8.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.9.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2048 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2048 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2048 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 4096 + ] + }, + "native.backbone.language_model.layers.9.mlp.experts.down_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.9.mlp.experts.gate_up_proj": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 1024, + 2048 + ] + }, + "native.backbone.language_model.layers.9.mlp.gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256, + 2048 + ] + }, + "native.backbone.language_model.layers.9.mlp.shared_expert.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048, + 512 + ] + }, + "native.backbone.language_model.layers.9.mlp.shared_expert.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.9.mlp.shared_expert.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 512, + 2048 + ] + }, + "native.backbone.language_model.layers.9.mlp.shared_expert_gate.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1, + 2048 + ] + }, + "native.backbone.language_model.layers.9.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2048 + ] + }, + "native.backbone.language_model.norm.weight": { + "dtype": "torch.float32", + "shape": [ + 2048 + ] + }, + "native.backbone.visual.blocks.0.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.0.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.0.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.0.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.0.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.0.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.0.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.0.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.0.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.0.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.0.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.0.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.1.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.1.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.1.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.1.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.1.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.1.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.1.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.1.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.1.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.1.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.1.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.1.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.10.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.10.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.10.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.10.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.10.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.10.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.10.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.10.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.10.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.10.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.10.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.10.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.11.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.11.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.11.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.11.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.11.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.11.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.11.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.11.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.11.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.11.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.11.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.11.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.12.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.12.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.12.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.12.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.12.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.12.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.12.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.12.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.12.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.12.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.12.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.12.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.13.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.13.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.13.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.13.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.13.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.13.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.13.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.13.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.13.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.13.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.13.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.13.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.14.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.14.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.14.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.14.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.14.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.14.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.14.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.14.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.14.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.14.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.14.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.14.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.15.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.15.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.15.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.15.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.15.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.15.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.15.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.15.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.15.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.15.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.15.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.15.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.16.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.16.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.16.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.16.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.16.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.16.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.16.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.16.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.16.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.16.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.16.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.16.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.17.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.17.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.17.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.17.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.17.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.17.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.17.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.17.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.17.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.17.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.17.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.17.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.18.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.18.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.18.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.18.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.18.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.18.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.18.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.18.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.18.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.18.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.18.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.18.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.19.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.19.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.19.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.19.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.19.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.19.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.19.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.19.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.19.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.19.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.19.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.19.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.2.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.2.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.2.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.2.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.2.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.2.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.2.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.2.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.2.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.2.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.2.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.2.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.20.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.20.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.20.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.20.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.20.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.20.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.20.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.20.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.20.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.20.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.20.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.20.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.21.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.21.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.21.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.21.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.21.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.21.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.21.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.21.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.21.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.21.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.21.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.21.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.22.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.22.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.22.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.22.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.22.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.22.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.22.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.22.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.22.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.22.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.22.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.22.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.23.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.23.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.23.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.23.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.23.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.23.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.23.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.23.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.23.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.23.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.23.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.23.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.24.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.24.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.24.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.24.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.24.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.24.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.24.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.24.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.24.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.24.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.24.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.24.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.25.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.25.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.25.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.25.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.25.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.25.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.25.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.25.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.25.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.25.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.25.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.25.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.26.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.26.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.26.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.26.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.26.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.26.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.26.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.26.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.26.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.26.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.26.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.26.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.3.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.3.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.3.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.3.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.3.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.3.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.3.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.3.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.3.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.3.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.3.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.3.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.4.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.4.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.4.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.4.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.4.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.4.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.4.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.4.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.4.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.4.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.4.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.4.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.5.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.5.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.5.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.5.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.5.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.5.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.5.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.5.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.5.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.5.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.5.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.5.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.6.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.6.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.6.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.6.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.6.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.6.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.6.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.6.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.6.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.6.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.6.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.6.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.7.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.7.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.7.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.7.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.7.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.7.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.7.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.7.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.7.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.7.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.7.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.7.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.8.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.8.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.8.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.8.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.8.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.8.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.8.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.8.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.8.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.8.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.8.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.8.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.9.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.9.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 1152 + ] + }, + "native.backbone.visual.blocks.9.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3456 + ] + }, + "native.backbone.visual.blocks.9.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3456, + 1152 + ] + }, + "native.backbone.visual.blocks.9.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4304 + ] + }, + "native.backbone.visual.blocks.9.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4304, + 1152 + ] + }, + "native.backbone.visual.blocks.9.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.9.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152, + 4304 + ] + }, + "native.backbone.visual.blocks.9.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.9.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.9.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.blocks.9.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.merger.linear_fc1.bias": { + "dtype": "torch.float32", + "shape": [ + 4608 + ] + }, + "native.backbone.visual.merger.linear_fc1.weight": { + "dtype": "torch.float32", + "shape": [ + 4608, + 4608 + ] + }, + "native.backbone.visual.merger.linear_fc2.bias": { + "dtype": "torch.float32", + "shape": [ + 2048 + ] + }, + "native.backbone.visual.merger.linear_fc2.weight": { + "dtype": "torch.float32", + "shape": [ + 2048, + 4608 + ] + }, + "native.backbone.visual.merger.norm.bias": { + "dtype": "torch.float32", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.merger.norm.weight": { + "dtype": "torch.float32", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.patch_embed.proj.bias": { + "dtype": "torch.float32", + "shape": [ + 1152 + ] + }, + "native.backbone.visual.patch_embed.proj.weight": { + "dtype": "torch.float32", + "shape": [ + 1152, + 3, + 2, + 16, + 16 + ] + }, + "native.backbone.visual.pos_embed.weight": { + "dtype": "torch.float32", + "shape": [ + 2304, + 1152 + ] + }, + "native.head.bias": { + "dtype": "torch.float32", + "shape": [ + 1 + ] + }, + "native.head.k.bias": { + "dtype": "torch.float32", + "shape": [ + 512 + ] + }, + "native.head.k.weight": { + "dtype": "torch.float32", + "shape": [ + 512, + 2048 + ] + }, + "native.head.q.bias": { + "dtype": "torch.float32", + "shape": [ + 512 + ] + }, + "native.head.q.weight": { + "dtype": "torch.float32", + "shape": [ + 512, + 2048 + ] + }, + "spatial.local.bias": { + "dtype": "torch.float32", + "shape": [ + 128 + ] + }, + "spatial.local.weight": { + "dtype": "torch.float32", + "shape": [ + 128, + 1, + 3, + 3 + ] + }, + "spatial.mix.0.bias": { + "dtype": "torch.float32", + "shape": [ + 128 + ] + }, + "spatial.mix.0.weight": { + "dtype": "torch.float32", + "shape": [ + 128, + 128 + ] + }, + "spatial.mix.2.bias": { + "dtype": "torch.float32", + "shape": [ + 1024 + ] + }, + "spatial.mix.2.weight": { + "dtype": "torch.float32", + "shape": [ + 1024, + 128 + ] + }, + "spatial.norm.bias": { + "dtype": "torch.float32", + "shape": [ + 2048 + ] + }, + "spatial.norm.weight": { + "dtype": "torch.float32", + "shape": [ + 2048 + ] + }, + "spatial.query.bias": { + "dtype": "torch.float32", + "shape": [ + 256 + ] + }, + "spatial.query.weight": { + "dtype": "torch.float32", + "shape": [ + 256, + 2048 + ] + }, + "spatial.visual.bias": { + "dtype": "torch.float32", + "shape": [ + 128 + ] + }, + "spatial.visual.weight": { + "dtype": "torch.float32", + "shape": [ + 128, + 2048 + ] + } + }, + "source_step": 1954, + "source_manifest_sha256": "dc4c9e40797eb6824a388bad1f3ac424c85641dfb0ccaa220a2e6737ec2fdd4d", + "source_checkpoint_sha256": "450d0d40ccb771a7722721733e22dec665f1b09e86b4d1f55469f69c0d6a1189", + "reference_runtime": { + "causal-conv1d": "1.7.0", + "fla-core": "0.4.2", + "flash-linear-attention": "0.4.2", + "torch": "2.11.0", + "transformers": "5.6.2", + "triton": "3.7.0" + }, + "runtime_package": "pixelone-grounding==0.1.0" +} diff --git a/PixelOne-Pro-35B-A3B/processor_config.json b/PixelOne-Pro-35B-A3B/processor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..33818c7f9e991ad735fd240209f4fa73e6c28c50 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/processor_config.json @@ -0,0 +1,60 @@ +{ + "image_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_processor_type": "Qwen2VLImageProcessor", + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "merge_size": 2, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "size": { + "longest_edge": 16777216, + "shortest_edge": 65536 + }, + "temporal_patch_size": 2 + }, + "processor_class": "Qwen3VLProcessor", + "video_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "do_sample_frames": true, + "fps": 2, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "max_frames": 768, + "merge_size": 2, + "min_frames": 4, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "return_metadata": false, + "size": { + "longest_edge": 25165824, + "shortest_edge": 4096 + }, + "temporal_patch_size": 2, + "video_processor_type": "Qwen3VLVideoProcessor" + } +} diff --git a/PixelOne-Pro-35B-A3B/runtime/THIRD_PARTY_NOTICES.md b/PixelOne-Pro-35B-A3B/runtime/THIRD_PARTY_NOTICES.md new file mode 100644 index 0000000000000000000000000000000000000000..d0ca71c491110c4d4235eb6417f7ca99786d4d82 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/THIRD_PARTY_NOTICES.md @@ -0,0 +1,9 @@ +# Third-party attribution + +- VideoJEV model code and native decision interface are retained in `src/videojev_hf/`. The supplied upstream Apache-2.0 license and notice are in `third_party/VideoJev-LICENSE` and `third_party/VideoJev-NOTICE`. +- Qwen3.5-4B and Qwen3.6-35B-A3B provide the underlying dense/MoE architectures and base weights. Their upstream licenses remain applicable to derived models. +- Transformers, PyTorch, Accelerate, safetensors and optional FLA/causal-conv1d kernels are installed dependencies, not vendored replacements. Their respective licenses apply. +- DejaVuSans is included only for the teacher's labeled-grid rendering. Its license is bundled beside the font in `src/pixelone/assets/DejaVuSans-LICENSE.txt`. +- An optional historical XTuner expert path remains in the inherited VideoJEV source. The published Pro-35B recipe uses PyTorch `grouped_mm`, not that optional XTuner path. + +The release license for new PixelOne code and derived model weights still requires maintainer confirmation. This notice preserves upstream attribution and does not itself grant a new license. diff --git a/PixelOne-Pro-35B-A3B/runtime/pyproject.toml b/PixelOne-Pro-35B-A3B/runtime/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..023995e17ba783bf628ae7a0bbba8ef123f3d40a --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/pyproject.toml @@ -0,0 +1,34 @@ +[build-system] +requires = ["setuptools>=68"] +build-backend = "setuptools.build_meta" + +[project] +name = "pixelone-grounding" +version = "0.1.0" +description = "Native-resolution GUI grounding with search distillation and direct pixel prediction" +requires-python = ">=3.10" +dependencies = [ + "torch>=2.11,<2.12", "transformers==5.6.2", "accelerate>=1.10", + "safetensors>=0.4", "huggingface-hub>=0.30", "numpy>=1.26,<3", + "Pillow>=10", "einops>=0.8", "scipy>=1.12", "packaging>=20", +] + +[project.optional-dependencies] +native = ["flash-linear-attention==0.4.2", "causal-conv1d==1.7.0"] +test = ["pytest>=8"] + +[project.scripts] +pixelone = "pixelone.cli:main" + +[project.urls] +Repository = "https://github.com/tiankanghui/PixleOne" + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.package-data] +pixelone = ["assets/*"] + +[tool.pytest.ini_options] +testpaths = ["tests"] +pythonpath = ["src"] diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_click_finetune/__init__.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_click_finetune/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_click_finetune/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_click_finetune/inputs.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_click_finetune/inputs.py new file mode 100644 index 0000000000000000000000000000000000000000..7a955da7196ff4621d44842fdf7eb4ca1590129d --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_click_finetune/inputs.py @@ -0,0 +1,62 @@ +"""One static native screenshot, one query, spatial visual-token candidates.""" + +import hashlib + +import numpy as np +import torch +from PIL import Image +from transformers.video_utils import VideoMetadata + +from jev_spatial_distill.spatial_pointer.geometry import Layout + + +def render(image, subdivisions=32): + layout = Layout(*image.size, subdivisions=subdivisions) + canvas = Image.new('RGB', layout.canvas_size, 'white') + canvas.paste(image.convert('RGB'), (0,0)) + return [canvas, canvas], layout + + +def query_group(processor, record, instruction): + from videojev_hf.processing_videojev import DECIDE + if not instruction.strip() or '<|' in instruction: + raise ValueError('Expected an instruction without model control tokens') + if record['grid_thw'][0] != 1: + raise ValueError('Spatial pointer uses exactly one static frame pair') + metadata = VideoMetadata(total_num_frames=2, fps=2., frames_indices=[0,1]) + replacement = processor.replace_video_token(dict(video_grid_thw=np.asarray([[1,2,2]]),video_metadata=[metadata]),video_idx=0) + content = [dict(type='video',video='provided_in_memory'),dict(type='text',text=( + f'Locate the UI element for this instruction: "{instruction}". ' + 'Select a valid click position inside that element in the screenshot.\n'+DECIDE))] + text = processor.apply_chat_template([dict(role='user',content=content)],tokenize=False,add_generation_prompt=False) + texts,_ = processor.get_text_with_replacements([text],[],[replacement],[]) + encoded = processor(text=texts,return_tensors='pt') + ids,types = encoded['input_ids'],encoded['mm_token_type_ids'] + slots = ids[0] == processor.video_token_id + if int(slots.sum()) != 1:raise ValueError('Expected one temporary video slot') + repeats = torch.ones(ids.shape[1],dtype=torch.long);repeats[slots] = record['tokens'] + ids = torch.repeat_interleave(ids,repeats,dim=1) + types = torch.repeat_interleave(types,repeats,dim=1) + spatial = (ids[0] == processor.video_token_id).nonzero().flatten() + query = (ids[0] == processor.tokenizer.convert_tokens_to_ids(DECIDE)).nonzero().flatten() + if query.numel() != 1 or spatial.numel() != record['tokens'] or spatial[-1] >= query[0]: + raise ValueError('Spatial/query slots are not intact') + if (ids.shape[1]+63)//64*64 > record['context']: + raise ValueError('Native image and instruction exceed context; no silent resize') + return dict(input_ids=ids,mm_token_type_ids=types,video_grid_thw=torch.tensor([record['grid_thw']]), + pair_indices=spatial[None],query_indices=query,score_mask=torch.ones((1,len(spatial)),dtype=torch.bool), + decision_tasks=torch.ones(1,dtype=torch.long)) + + +def prepare(model, processor, image, instruction, subdivisions=32): + from scripts.refine_spatial_jev import encode_views + views,layout = render(image,subdivisions) + features,record = encode_views(model.native,processor,views,'native') + if record['tokens'] != layout.count or record['grid_thw'] != [1,layout.rows*2,layout.cols*2]: + raise ValueError('Native visual grid does not match original-pixel support') + if features.is_inference() or not getattr(model.native,'train_vision',False): + with torch.inference_mode(False):features = features.detach().clone() + group = query_group(processor,record,instruction) + return group,features,layout,dict(visual_tokens=record['tokens'],input_tokens=group['input_ids'].shape[1], + frames=2,canvas_size=list(layout.canvas_size),original_size=list(image.size),padding_origin=[0,0], + frame_sha256=[hashlib.sha256(v.tobytes()).hexdigest() for v in views]) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_click_finetune/model.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_click_finetune/model.py new file mode 100644 index 0000000000000000000000000000000000000000..030b4c8e416aaffc0e10c5832097fd28826fdfc1 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_click_finetune/model.py @@ -0,0 +1,27 @@ +"""Detached region routing after one shared native LM pass; unchanged parameters.""" + +import torch +from jev_spatial_distill.spatial_pointer.model import SpatialStudent + + +def route(coarse, required=None, positive=None, topk=4): + # Inference uses only coarse logits. Training adds GT/KD support, without + # inserting GT into the image, text or language-model attention. + if required is None: + return coarse.detach().argmax().reshape(1) + values = list(required) + values += coarse.detach().topk(min(topk, len(coarse))).indices.tolist() + if positive is not None: + pos = positive.to(coarse.device).nonzero().flatten() + if not len(pos): + raise ValueError('No valid GT regions to route') + values += pos[coarse.detach()[pos].topk(min(topk, len(pos))).indices].tolist() + return torch.tensor(list(dict.fromkeys(values)), device=coarse.device, dtype=torch.long) + + +class ClickStudent(SpatialStudent): + def forward(self, group, features, layout, required=None, positive=None, topk=4): + spatial, query = self.encode_readout(group, features) + coarse = self.native.head(spatial[None], query[None])[0] + parents = route(coarse, required, positive, topk) + return dict(coarse=coarse, fine=self.spatial(spatial, query, layout, parents), parents=parents) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_click_finetune/objective.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_click_finetune/objective.py new file mode 100644 index 0000000000000000000000000000000000000000..7672b8e748c35bbaa0c0426685c8c2b7fae4e1d1 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_click_finetune/objective.py @@ -0,0 +1,39 @@ +"""Set likelihood for valid pixel-center clicks, with sparse fine supervision.""" + +import torch + + +def support(layout, box, device=None): + # Reuse strict GT validation; representability is checked against the full set. + layout.center_target(box) + xy = layout.positions(device) + valid = layout.valid(device) + positive = (valid & (xy[..., 0] >= box[0]) & (xy[..., 0] <= box[2]) + & (xy[..., 1] >= box[1]) & (xy[..., 1] <= box[3])) + if not positive.any(): + raise ValueError('GT box contains no representable pixel center') + return valid, positive + + +def set_nll(logits, valid, positive): + if logits.shape != valid.shape or valid.shape != positive.shape: + raise ValueError('Click support shapes differ') + if (positive & ~valid).any() or not positive.any(-1).all(): + raise ValueError('Positive click support must be nonempty and valid') + logits = logits.float() + return (logits.masked_fill(~valid, -torch.inf).logsumexp(-1) + - logits.masked_fill(~positive, -torch.inf).logsumexp(-1)) + + +def click_loss(output, valid, positive): + coarse = set_nll(output['coarse'], valid.any(-1), positive.any(-1)) + parents = output['parents'] + selected_positive = positive[parents] + keep = selected_positive.any(-1) + if not keep.any(): + raise ValueError('Routing omitted every valid GT region') + # Never force a point into an incorrect predicted region. Those regions are + # suppressed by the coarse objective; fine labels exist only in region ∩ GT. + fine = set_nll(output['fine'][keep], valid[parents][keep], selected_positive[keep]).mean() + return coarse + fine, dict(coarse=float(coarse.detach()), fine=float(fine.detach()), + supervised_regions=int(keep.sum())) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_fine_ablation/__init__.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_fine_ablation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_fine_ablation/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_fine_ablation/distillation.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_fine_ablation/distillation.py new file mode 100644 index 0000000000000000000000000000000000000000..d1c389359f8722bdd905013f6a588a8c3a79d5aa --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_fine_ablation/distillation.py @@ -0,0 +1,142 @@ +"""Keep teacher routing fixed; compare pixel, coarse-only and per-ROI region KD.""" + +import math +import torch +from torch.nn import functional as F +from jev_spatial_distill.spatial_pointer.supervision import kd_loss as pixel_kd_loss +from spatial_pro_experiments.fast import cell_candidates + + +def build_region_targets(prediction, layout, soft, temperature=2.): + """CPU geometry only, with the same trusted-teacher gate and parents as pixel KD. + + Each actual pixel center belongs to exactly one half-open leaf in each ROI. + Overlapping ROIs are independent observations. Empty leaves/ROIs are reported, + never assigned a fabricated student probability or treated as negative targets. + """ + if not math.isfinite(temperature) or temperature <= 0: + raise ValueError('Positive finite temperature required') + if not soft or not soft['enabled']: + return None + parents = soft['parents'].cpu() + local = torch.arange(layout.fine_count) + unit = layout.stride / layout.subdivisions + x = (parents[:, None] % layout.cols)*32 + (local % layout.subdivisions + .5)*unit + y = (parents[:, None] // layout.cols)*32 + (local // layout.subdivisions + .5)*unit + x, y = x.double(), y.double() + valid = (x < layout.width) & (y < layout.height) + # Normalize fine probabilities over every valid point in a parent, not only + # the part covered by a crop, before forming the joint student point measure. + result = dict(parents=parents, valid=valid, rois=[], temperature=temperature) + stage = prediction['stages'][-1] + cells = stage['cells_per_axis'] + if not isinstance(cells, int) or cells < 1 or not stage['traces']: + raise ValueError('Invalid teacher region partition') + roi_scores = [] + for trace in stage['traces']: + bounds = trace['crop_bounds'] + left, top, right, bottom = bounds + if not all(math.isfinite(v) for v in bounds) or not (0 <= left < right <= layout.width and 0 <= top < bottom <= layout.height): + raise ValueError('Teacher ROI is outside the original image') + leaves = sorted(cell_candidates(bounds, trace['predictions'], cells, trace['parent_score']), + key=lambda c: (c['row'], c['column'])) + scores = torch.tensor([c['score'] for c in leaves], dtype=torch.float64) + if not torch.isfinite(scores).all(): + raise ValueError('Invalid teacher leaf scores') + q = (scores / temperature).softmax(0) + present = valid & (x >= left) & (x < right) & (y >= top) & (y < bottom) + flat = torch.nonzero(present.flatten(), as_tuple=False).flatten() + xx, yy = x.flatten()[flat], y.flatten()[flat] + edges_x = torch.tensor([left+(right-left)*k/cells for k in range(1, cells)], dtype=torch.float64) + edges_y = torch.tensor([top+(bottom-top)*k/cells for k in range(1, cells)], dtype=torch.float64) + leaf_ids = torch.bucketize(yy.contiguous(), edges_y, right=True)*cells + torch.bucketize(xx.contiguous(), edges_x, right=True) + # Independent geometric count catches missing parents in the retained + # original routing. No silent clipping of teacher support is allowed. + nx = max(0, min(layout.width, math.ceil(right/unit-.5))-max(0, math.ceil(left/unit-.5))) + ny = max(0, min(layout.height, math.ceil(bottom/unit-.5))-max(0, math.ceil(top/unit-.5))) + if flat.numel() != nx*ny: + raise ValueError('Original teacher routing omits representable ROI pixel centers') + represented = torch.bincount(leaf_ids, minlength=cells*cells) > 0 + dropped = float(q[~represented].sum()) + if represented.any(): + truth = q[represented] / q[represented].sum() + else: + truth = torch.empty(0, dtype=torch.float64) + roi_scores.append(trace['parent_score'] + math.log(max(leaves[0]['presence_probability'], 1e-12))) + result['rois'].append(dict(flat=flat, leaf_ids=leaf_ids, represented=represented, + truth=truth.float(), cells=cells*cells, point_count=len(flat), + unrepresented_teacher_mass=dropped, bounds=list(bounds))) + weights = torch.tensor(roi_scores, dtype=torch.float64).softmax(0) + nonempty = torch.tensor([bool(r['point_count']) for r in result['rois']]) + result['dropped_roi_weight'] = float(weights[~nonempty].sum()) + result['unrepresented_teacher_mass'] = sum(float(w)*r['unrepresented_teacher_mass'] for w,r in zip(weights,result['rois'])) + for i, roi in enumerate(result['rois']): + roi['weight'] = float(weights[i]/weights[nonempty].sum()) if nonempty[i] else 0. + return result + + +def segment_logsumexp(values, indices, size): + """Stable grouped sum; absent cells remain -inf and never enter KL.""" + peak = torch.full((size,), -torch.inf, dtype=values.dtype, device=values.device) + peak.scatter_reduce_(0, indices, values.detach(), reduce='amax', include_self=True) + sums = torch.zeros_like(peak).scatter_add(0, indices, (values-peak[indices]).exp()) + return peak + sums.clamp_min(torch.finfo(values.dtype).tiny).log() + + +def region_fine_kd(output, target, parent_order, temperature): + zero = output['fine'].float().sum()*0 + if target is None: + return zero, dict(region_rois=0, region_points=0, region_cells=0, + unrepresented_teacher_mass=0., dropped_roi_weight=0.) + if target['temperature'] != temperature: + raise ValueError('Teacher and student KD temperatures differ') + lookup = {int(p):i for i,p in enumerate(parent_order)} + if len(lookup) != len(parent_order) or any(int(p) not in lookup for p in target['parents']): + raise ValueError('Region KD teacher parents were not routed exactly') + device = output['fine'].device + rows = torch.tensor([lookup[int(p)] for p in target['parents']], device=device) + parents = target['parents'].to(device) + valid = target['valid'].to(device) + log_fine = (output['fine'][rows].float()/temperature).masked_fill(~valid, -torch.inf).log_softmax(-1) + log_joint = (output['coarse'][parents].float()/temperature)[:, None] + log_fine + loss = zero + for roi in target['rois']: + if not roi['point_count']: + continue + values = log_joint.flatten()[roi['flat'].to(device)] + log_mass = segment_logsumexp(values, roi['leaf_ids'].to(device), roi['cells']) + log_probs = log_mass[roi['represented'].to(device)].log_softmax(0) + loss = loss + roi['weight']*F.kl_div(log_probs, roi['truth'].to(device), reduction='sum')*temperature**2 + return loss, dict(region_rois=sum(r['point_count'] > 0 for r in target['rois']), + region_points=sum(r['point_count'] for r in target['rois']), + region_cells=sum(int(r['represented'].sum()) for r in target['rois']), + unrepresented_teacher_mass=target['unrepresented_teacher_mass'], dropped_roi_weight=target['dropped_roi_weight']) + + +def distillation_loss(output, soft, parent_order, mode, temperature=2., region_target=None): + if mode not in ('no_fine_kd', 'region_kd', 'interior'): + raise ValueError('Unknown fine KD ablation') + coarse, fine = output['coarse'].float(), output['fine'].float() + zero = coarse.sum()*0 + fine.sum()*0 + if not soft or not soft['enabled']: + return zero, dict(kd_enabled=0, observed_parents=0, observed_pixels=0), dict(mode=mode, coarse=0., fine=0.) + parents = soft['parents'].to(coarse.device) + mass = soft['mass'].to(coarse.device) + coarse_mass = mass.sum(-1) + truth = coarse_mass.pow(1/temperature);truth = truth/truth.sum() + rank = F.kl_div(F.log_softmax(coarse[parents]/temperature, -1), truth, reduction='sum')*temperature**2 + terms = dict(kd_enabled=1, observed_parents=len(parents), observed_pixels=int((mass > 0).sum())) + extra = {} + if mode == 'interior': + total, original_terms = pixel_kd_loss(output, soft, parent_order, temperature) + if original_terms != terms: + raise ValueError('Original KD support changed') + conditional = total-rank + elif mode == 'no_fine_kd': + conditional = zero;total = rank+zero + else: + if region_target is None: + raise ValueError('Enabled teacher requires region geometry') + conditional, extra = region_fine_kd(output, region_target, parent_order, temperature) + total = rank+conditional + return total, terms, dict(mode=mode, coarse=float(rank.detach()), fine=float(conditional.detach()), **extra) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_fine_refine/__init__.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_fine_refine/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_fine_refine/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_fine_refine/objective.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_fine_refine/objective.py new file mode 100644 index 0000000000000000000000000000000000000000..1db6dff4d4f68bbd931a33edc3411292372da85c --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_fine_refine/objective.py @@ -0,0 +1,31 @@ +"""A GT-valid maximum must beat outside candidates; padding is never negative.""" + +import torch +from torch.nn import functional as F +from jev_click_finetune.objective import set_nll + + +def winner_loss(logits,valid,positive): + if logits.ndim!=2 or logits.shape!=valid.shape or valid.shape!=positive.shape or valid.dtype!=torch.bool or positive.dtype!=torch.bool: + raise ValueError('Winner support shapes/types differ') + if not positive.any(-1).all() or (positive & ~valid).any(): + raise ValueError('Every fine row needs nonempty valid GT support') + z=logits.float();negative=valid & ~positive;active=negative.any(-1) + # Fully GT-covered rows need no point constraint. Do not differentiate an + # all--inf logsumexp: it can create NaNs even when multiplied by zero. + zero=z.sum()*0 + if not active.any():return zero + selected=z[active];pos=positive[active];neg=negative[active] + indices=selected.detach().masked_fill(~pos,-torch.inf).argmax(-1) + best=selected.gather(-1,indices[:,None]).squeeze(-1) + wrong=selected.masked_fill(~neg,-torch.inf).logsumexp(-1) + # Same denominator as the set-loss control, including zero-loss full rows. + return F.softplus(wrong-best).sum()/len(z)+zero + + +def fine_objective(output,valid,positive): + coarse=set_nll(output['coarse'],valid.any(-1),positive.any(-1)) + parents=output['parents'];truth=positive[parents];keep=truth.any(-1) + if not keep.any():raise ValueError('No supervised positive region was routed') + fine=winner_loss(output['fine'][keep],valid[parents][keep],truth[keep]) + return coarse+fine,dict(coarse=float(coarse.detach()),fine=float(fine.detach()),supervised_regions=int(keep.sum())) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/__init__.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/spatial_pointer/__init__.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/spatial_pointer/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/spatial_pointer/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/spatial_pointer/data.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/spatial_pointer/data.py new file mode 100644 index 0000000000000000000000000000000000000000..f530e2d274fa9506f4e9d0b1a1e963a15a70d9aa --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/spatial_pointer/data.py @@ -0,0 +1 @@ +from pixelone.io import file_sha256 as sha diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/spatial_pointer/geometry.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/spatial_pointer/geometry.py new file mode 100644 index 0000000000000000000000000000000000000000..ea43c8e19bf70c3ab22ddb0ebf359007df3c0280 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/spatial_pointer/geometry.py @@ -0,0 +1,84 @@ +"""Explicit original-pixel support, including padded-border masks.""" + +from dataclasses import dataclass +import math + +import torch + + +@dataclass(frozen=True) +class Layout: + width: int + height: int + stride: int = 32 + subdivisions: int = 32 + + def __post_init__(self): + if min(self.width, self.height) < 1 or self.stride != 32: + raise ValueError('Positive image dimensions and the native 32-pixel stride required') + if self.subdivisions < 1 or self.stride % self.subdivisions: + raise ValueError('Subdivisions must divide the native stride') + + @property + def cols(self):return math.ceil(self.width / self.stride) + + @property + def rows(self):return math.ceil(self.height / self.stride) + + @property + def count(self):return self.rows * self.cols + + @property + def canvas_size(self):return self.cols*self.stride, self.rows*self.stride + + @property + def fine_count(self):return self.subdivisions**2 + + def positions(self, device=None): + parent = torch.arange(self.count, device=device) + fine = torch.arange(self.fine_count, device=device) + unit = self.stride / self.subdivisions + x = (parent[:, None] % self.cols)*self.stride + (fine[None] % self.subdivisions + .5)*unit + y = (parent[:, None] // self.cols)*self.stride + (fine[None] // self.subdivisions + .5)*unit + return torch.stack((x, y), -1) + + def valid(self, device=None): + xy = self.positions(device) + return (xy[..., 0] < self.width) & (xy[..., 1] < self.height) + + def center_target(self, box): + if len(box) != 4 or not all(math.isfinite(v) for v in box) or not ( + 0 <= box[0] < box[2] <= self.width and 0 <= box[1] < box[3] <= self.height): + raise ValueError('Invalid original-pixel GT box') + x, y = (box[0]+box[2])/2, (box[1]+box[3])/2 + col, row = int(x/self.stride), int(y/self.stride) + unit = self.stride/self.subdivisions + u, v = int((x-col*self.stride)/unit), int((y-row*self.stride)/unit) + parent, fine = row*self.cols+col, v*self.subdivisions+u + point = [(col*self.stride+(u+.5)*unit), (row*self.stride+(v+.5)*unit)] + representable = box[0] <= point[0] <= box[2] and box[1] <= point[1] <= box[3] + return dict(parent=parent, fine=fine, center=[x,y], quantized_point=point, representable=representable) + + +def joint_log_probs(coarse, fine, valid): + if fine.shape != valid.shape or coarse.shape != fine.shape[:1] or valid.dtype != torch.bool: + raise ValueError('Hierarchical readout shapes differ') + parents = valid.any(-1) + if not parents.any():raise ValueError('Empty spatial support') + # All-invalid padding parents would otherwise produce NaN in log_softmax. + safe_fine = fine.float().masked_fill(~valid, -torch.inf) + safe_fine = torch.where(parents[:,None], safe_fine, torch.zeros_like(safe_fine)) + return (coarse.float().masked_fill(~parents, -torch.inf).log_softmax(-1)[:,None] + + safe_fine.log_softmax(-1)).masked_fill(~valid, -torch.inf) + + +def decode(coarse, fine, layout): + scores = joint_log_probs(coarse, fine, layout.valid(coarse.device)) + flat = int(scores.flatten().argmax()) + parent, local = divmod(flat, layout.fine_count) + point = layout.positions(coarse.device)[parent,local].tolist() + return dict(predicted_xy=point, parent=parent, fine=local) + + +def inside(point, box): + return box[0] <= point[0] <= box[2] and box[1] <= point[1] <= box[3] diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/spatial_pointer/model.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/spatial_pointer/model.py new file mode 100644 index 0000000000000000000000000000000000000000..47069137d66063a9910f4a87ac384d0417aec45f --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/spatial_pointer/model.py @@ -0,0 +1,80 @@ +"""Native JEV query/key spatial pointer and a query-conditioned 2D fine head.""" + +import torch +from torch import nn +from torch.nn import functional as F + +from jev_spatial_distill.t3.model import Teacher + + +class FineReadout(nn.Module): + def __init__(self, hidden, width=128, subdivisions=32): + super().__init__() + self.norm = nn.LayerNorm(hidden) + self.visual = nn.Linear(hidden,width) + self.query = nn.Linear(hidden,2*width) + self.local = nn.Conv2d(width,width,3,padding=1,groups=width) + self.mix = nn.Sequential(nn.Linear(width,width),nn.GELU(),nn.Linear(width,subdivisions**2)) + + def forward(self, spatial, query, layout, parents=None): + if spatial.shape[0] != layout.count:raise ValueError('Lost visual spatial layout') + v = self.visual(self.norm(spatial.float())) + scale,bias = self.query(self.norm(query.float())).chunk(2,-1) + v = v*(1+scale.tanh())+bias + image = v.T.reshape(1,-1,layout.rows,layout.cols) + v = v+self.local(image).reshape(v.shape[1],-1).T + if parents is not None:v = v[parents] + return self.mix(v) + + +class SpatialStudent(Teacher): + def __init__(self,native,recipe): + super().__init__(native,recipe) + self.spatial = FineReadout(native.head.q.in_features,recipe.get('readout_width',128), + recipe.get('subdivisions',32)).to(device=native.head.q.weight.device,dtype=torch.float32) + + def encode_readout(self,group,features): + captured=[] + hook=self.native.head.register_forward_pre_hook(lambda _m,args:captured.append(args)) + try:super().forward(group,features) + finally:hook.remove() + if len(captured)!=1:raise ValueError('Expected one native readout / LM forward') + pairs,query=captured[0] + if pairs.shape[0]!=1 or query.shape[0]!=1:raise ValueError('One target per native group required') + return pairs[0],query[0] + + def readout(self,spatial,query,layout,parents=None): + coarse=self.native.head(spatial[None],query[None])[0] + fine=self.spatial(spatial,query,layout,parents) + return dict(coarse=coarse,fine=fine) + + def forward(self,group,features,layout,parents=None,detach_backbone=False): + if detach_backbone: + with torch.no_grad():spatial,query=self.encode_readout(group,features) + else:spatial,query=self.encode_readout(group,features) + return self.readout(spatial,query,layout,parents) + + def adapter_state(self): + return {n:p.detach().cpu().contiguous() for n,p in self.named_parameters() + if '.lora_' in n or n.startswith(('native.head.','spatial.'))} + + def load_adapter(self,state): + if not any(n.startswith('spatial.') for n in state):return super().load_adapter(state) + expected={n:p for n,p in self.named_parameters() if '.lora_' in n or n.startswith(('native.head.','spatial.'))} + if expected.keys()!=state.keys():raise ValueError('Spatial student adapter keys differ') + with torch.no_grad(): + for name,value in state.items(): + if value.shape!=expected[name].shape or not torch.isfinite(value).all():raise ValueError('Invalid adapter tensor') + expected[name].copy_(value.to(expected[name])) + + +def gt_loss(output,target,layout,*,selected_parent=False): + if not target['representable']:raise ValueError('GT center is not represented inside its box at this resolution') + coarse,fine=output['coarse'].float(),output['fine'].float() + mask=layout.valid(coarse.device) + label=torch.tensor([target['parent']],device=coarse.device) + coarse_loss=F.cross_entropy(coarse.masked_fill(~mask.any(-1),-torch.inf)[None],label) + local=fine[0] if selected_parent else fine[target['parent']] + fine_loss=F.cross_entropy(local.masked_fill(~mask[target['parent']],-torch.inf)[None], + torch.tensor([target['fine']],device=coarse.device)) + return coarse_loss+fine_loss,dict(coarse=float(coarse_loss.detach()),fine=float(fine_loss.detach())) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/spatial_pointer/supervision.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/spatial_pointer/supervision.py new file mode 100644 index 0000000000000000000000000000000000000000..3c444af3542441c3b2e092542e31cbcff8b1f055 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/spatial_pointer/supervision.py @@ -0,0 +1,99 @@ +"""Sparse projection of existing T3 traces and support-masked hierarchical KD.""" + +from functools import lru_cache +import json +import math +from pathlib import Path + +import torch +from torch.nn import functional as F + +from .data import sha +from .geometry import inside + + +def regions(prediction): + from spatial_pro_experiments.fast import cell_candidates + final=prediction['stages'][-1];leaves=[] + for trace in final['traces']: + leaves.extend(cell_candidates(trace['crop_bounds'],trace['predictions'],final['cells_per_axis'],trace['parent_score'])) + if not leaves:raise ValueError('Teacher has no observed leaf cells') + peak=max(x['score'] for x in leaves) + return [(r['bounds'],math.exp(r['score']-peak)) for r in leaves] + + +def project_regions(bounds_and_weights,point,box,layout): + if not inside(point,box):return dict(enabled=False,parents=torch.empty(0,dtype=torch.long),mass=torch.empty(0,layout.fine_count)) + unit=layout.stride/layout.subdivisions;indices=[];weights=[] + for bounds,weight in bounds_and_weights: + l,t,r,b=bounds + if not all(math.isfinite(v) for v in (*bounds,weight)) or r<=l or b<=t or weight<0: + raise ValueError('Invalid teacher leaf') + if weight==0:continue + x=torch.arange(max(0,math.floor(l/unit)),min(layout.cols*layout.subdivisions,math.ceil(r/unit))) + y=torch.arange(max(0,math.floor(t/unit)),min(layout.rows*layout.subdivisions,math.ceil(b/unit))) + x=x[(x+.5)*unit0;indices.append((parent*layout.fine_count+fine)[keep]);weights.append((area*weight/((r-l)*(b-t)))[keep]) + if not indices:raise ValueError('Teacher support is not represented at this pixel resolution') + flat=torch.cat(indices);values=torch.cat(weights).double() + parents,inverse=torch.unique(flat//layout.fine_count,sorted=True,return_inverse=True) + mass=torch.zeros(len(parents)*layout.fine_count,dtype=torch.float64) + mass.scatter_add_(0,inverse*layout.fine_count+flat%layout.fine_count,values) + mass=mass.reshape(len(parents),layout.fine_count);mass=mass/mass.sum() + if not torch.isfinite(mass).all():raise ValueError('Nonfinite projected teacher mass') + return dict(enabled=True,parents=parents,mass=mass.float(),point=list(point)) + + +def project(prediction,box,layout): + return project_regions(regions(prediction),prediction['predicted_xy'],box,layout) + + +def selected_parents(target,soft): + return [target['parent']]+([int(v) for v in soft['parents'] if int(v)!=target['parent']] if soft and soft['enabled'] else []) + + +def kd_loss(output,soft,parent_order,temperature=2.): + coarse,fine=output['coarse'].float(),output['fine'].float() + zero=coarse.sum()*0+fine.sum()*0 + if not soft or not soft['enabled']:return zero,dict(kd_enabled=0,observed_parents=0,observed_pixels=0) + parents=soft['parents'].to(coarse.device);mass=soft['mass'].to(coarse.device) + coarse_mass=mass.sum(-1);soft_coarse=coarse_mass.pow(1/temperature);soft_coarse/=soft_coarse.sum() + rank=F.kl_div(F.log_softmax(coarse[parents]/temperature,-1),soft_coarse,reduction='sum')*temperature**2 + conditional=zero + lookup={int(p):i for i,p in enumerate(parent_order)} + for i,parent in enumerate(parents.tolist()): + mask=mass[i]>0;truth=mass[i,mask].pow(1/temperature);truth/=truth.sum() + values=fine[lookup[parent],mask] + conditional=conditional+coarse_mass[i]*F.kl_div(F.log_softmax(values/temperature,-1),truth,reduction='sum')*temperature**2 + return rank+conditional,dict(kd_enabled=1,observed_parents=len(parents),observed_pixels=int((mass>0).sum())) + + +class TeacherCache: + """Byte index into an immutable existing cache; never materialize a pixel cache on disk.""" + def __init__(self,path,expected_sha,targets): + self.path=Path(path) + if sha(self.path)!=expected_sha:raise ValueError('Teacher cache hash changed') + expected={str(r['id']):r for r in targets};self.offsets={} + with self.path.open('rb') as stream: + while True: + offset=stream.tell();line=stream.readline() + if not line:break + row=json.loads(line);ident=str(row['id']) + if ident in self.offsets:raise ValueError('Duplicate teacher target ID') + if ident not in expected:raise ValueError('Teacher cache contains a non-training target') + target=expected[ident] + if any(row[k]!=target[k] for k in ('instruction','bbox_xyxy','image_size')) or row['source_image_sha256']!=target['image_sha256']: + raise ValueError('Teacher and training input identity differ') + self.offsets[ident]=offset + if self.offsets.keys()!=expected.keys():raise ValueError('Teacher cache does not cover the training set') + + @lru_cache(maxsize=128) + def get(self,ident): + with self.path.open('rb') as f: + f.seek(self.offsets[str(ident)]);return json.loads(f.readline()) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/t3/__init__.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/t3/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/t3/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/t3/batching.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/t3/batching.py new file mode 100644 index 0000000000000000000000000000000000000000..068734863f3f2c4900226e3270c48bfbb3376140 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/t3/batching.py @@ -0,0 +1,58 @@ +"""Differentiable padded native JEV scoring; each ROI keeps equal loss weight.""" + +from contextlib import nullcontext + +import torch + +from scripts.batch_spatial_jev import collate_query_groups + + +def forward_states(native, groups, features, labels=None): + from .model import choice_loss + if not groups or len(groups)!=len(features) or (labels is not None and len(labels)!=len(groups)): + raise ValueError('Each training state needs its own group, features and labels') + if any(value.is_inference() for value in features): + raise ValueError('Clone frozen visual features outside inference_mode before backward') + # Padding tokens never attend to or supply supervision for valid states. + batch=collate_query_groups(groups,0) + device=native.get_input_embeddings().weight.device + batch={key:value.to(device) for key,value in batch.items()} + amp=torch.autocast('cuda',dtype=torch.bfloat16) if device.type=='cuda' else nullcontext() + with amp: + embeds=native.get_input_embeddings()(batch['input_ids']) + if getattr(native,'full_parameter_training',False) and device.type=='cuda':embeds=embeds.to(torch.bfloat16) + video_token=native.config.backbone_config.video_token_id + all_slots=batch['input_ids']==video_token + for index,value in enumerate(features): + slots=all_slots[index] + if int(slots.sum())!=len(value):raise ValueError('Visual feature count differs from state tokens') + # Checkpointing can mark embedding outputs as leaf tensors requiring grad. + # Use the native out-of-place scatter, never mutate those leaves. + embeds=embeds.masked_scatter(all_slots[...,None].expand_as(embeds),torch.cat(features).to(embeds)) + if native.is_moe: + positions,_=native.backbone.get_rope_index(input_ids=batch['input_ids'], + mm_token_type_ids=batch['mm_token_type_ids'],video_grid_thw=batch['video_grid_thw'], + attention_mask=batch['attention_mask']) + else: + positions=native.backbone.compute_3d_position_ids(input_ids=batch['input_ids'],inputs_embeds=embeds, + video_grid_thw=batch['video_grid_thw'],attention_mask=batch['attention_mask'], + mm_token_type_ids=batch['mm_token_type_ids']) + hidden=native.backbone.language_model(inputs_embeds=embeds,position_ids=positions, + attention_mask=batch['attention_mask'],use_cache=False).last_hidden_state + with torch.autocast(device_type=device.type,enabled=False): + indices=batch['sample_indices'] + logits=native.head(hidden[indices[:,None],batch['pair_indices']],hidden[indices,batch['query_indices']]) + mask=batch['score_mask'] + probs=torch.where((batch['decision_tasks']==1)[:,None], + logits.masked_fill(~mask,-torch.inf).softmax(-1),logits.sigmoid())*mask + items=[];losses=[];offset=0 + for index,group in enumerate(groups): + count=len(group['query_indices']);options=group['pair_indices'].shape[1] + item=dict(logits=logits[offset:offset+count,:options], + probabilities=probs[offset:offset+count,:options],score_mask=mask[offset:offset+count,:options]) + if labels is not None: + losses.append(choice_loss(item['logits'],item['score_mask'],labels[index].to(device))) + items.append(item);offset+=count + result=dict(items=items) + if losses:result['loss']=torch.stack(losses).mean() + return result diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/t3/common.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/t3/common.py new file mode 100644 index 0000000000000000000000000000000000000000..aff2dfae29d230bd978bb4695a1db1c474e491a7 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/t3/common.py @@ -0,0 +1,2 @@ +from pixelone.sampling import SampleStream +from pixelone.io import stable_hash diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/t3/model.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/t3/model.py new file mode 100644 index 0000000000000000000000000000000000000000..67a74eda7eaff68929021dcde5ad13671f87e24f --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/t3/model.py @@ -0,0 +1,142 @@ +"""Keep the released JEV head and expose a tested differentiable training path.""" + +import hashlib +import math +from contextlib import ExitStack,contextmanager +from importlib import import_module +from pathlib import Path + +import torch +from torch import nn +from torch.nn import functional as F + + +@contextmanager +def native_runtime(backend='torch', required_model=None, attention_mode='causal'): + from qwen_spatial.kernels import qwen_kernel_backend + from jev_unified_student.attention import full_layer_attention + with ExitStack() as stack: + for name in ('qwen3_5','qwen3_5_moe'): + module=import_module(f'transformers.models.{name}.modeling_{name}') + stack.enter_context(full_layer_attention(module,attention_mode)) + runtime=stack.enter_context(qwen_kernel_backend(backend,module)) + if backend=='native' and (required_model is None or name==required_model): + missing=[key for key,enabled in runtime['optional_kernels_enabled'].items() if not enabled] + if missing: + raise RuntimeError('Native Qwen kernels unavailable: '+', '.join(missing)+ + '. Install compatible flash-linear-attention and causal-conv1d in the active Python environment; ' + 'use kernel_backend=torch only for an explicitly labelled baseline.') + cls=getattr(module,'Qwen3_5DecoderLayer' if name=='qwen3_5' else 'Qwen3_5MoeDecoderLayer') + if not hasattr(cls,'block_type'):cls.block_type=property(lambda layer:layer.layer_type) + yield + + +class LoRALinear(nn.Module): + def __init__(self,base,rank,alpha): + super().__init__();self.base=base.requires_grad_(False) + self.in_features,self.out_features=base.in_features,base.out_features;self.scale=alpha/rank + self.lora_A=nn.Parameter(torch.empty(rank,self.in_features,device=base.weight.device,dtype=torch.float32)) + self.lora_B=nn.Parameter(torch.zeros(self.out_features,rank,device=base.weight.device,dtype=torch.float32)) + nn.init.kaiming_uniform_(self.lora_A,a=math.sqrt(5)) + + @property + def weight(self):return self.base.weight + + @property + def bias(self):return self.base.bias + + def forward(self,x): + value=self.base(x) + delta=F.linear(F.linear(x.to(self.lora_A.dtype),self.lora_A),self.lora_B) + return value+self.scale*delta.to(value.dtype) + + +def install_lora(native,rank,alpha): + targets={'q_proj','k_proj','v_proj','o_proj','in_proj_qkv','in_proj_z','in_proj_b','in_proj_a','out_proj'} + language=native.backbone.language_model;names=[] + for name,module in list(language.named_modules()): + if isinstance(module,nn.Linear) and name.rsplit('.',1)[-1] in targets: + parent,leaf=name.rsplit('.',1) + language.get_submodule(parent).__setattr__(leaf,LoRALinear(module,rank,alpha));names.append(name) + for index,layer in enumerate(language.layers): + selected=[n.rsplit('.',1)[-1] for n in names if n.startswith(f'layers.{index}.')] + expected={'q_proj','k_proj','v_proj','o_proj'} if layer.layer_type=='full_attention' else targets-{'q_proj','k_proj','v_proj','o_proj'} + if set(selected)!=expected:raise ValueError(f'Incomplete LoRA coverage in {layer.layer_type} layer {index}: {selected}') + return names + + +def tensor_hash(values): + sha=hashlib.sha256() + for name,value in sorted(values.items()): + value=value.detach().float().cpu().contiguous();sha.update(name.encode());sha.update(str(list(value.shape)).encode()) + sha.update(value.numpy().tobytes()) + return sha.hexdigest() + + +def choice_loss(logits,mask,labels): + if logits.shape!=mask.shape or labels.shape!=(logits.shape[0],):raise ValueError('Choice loss shapes differ') + active=labels!=-100 + if not active.any():raise ValueError('Training state has no unambiguous supervised question') + if not torch.isfinite(logits[mask]).all():raise ValueError('Nonfinite native JEV logits') + chosen=labels[active] + if (chosen<0).any() or (chosen>=logits.shape[1]).any() or not mask[active].gather(1,chosen[:,None]).all(): + raise ValueError('Target refers to an invalid option') + return F.cross_entropy(logits.float()[active].masked_fill(~mask[active],-torch.inf),chosen) + + +class Teacher(nn.Module): + def __init__(self,native,recipe): + super().__init__();self.native=native;self.recipe=recipe + from scripts.smoke_videojev import legacy_unpadded_mask + native.prepare_for_inference() + self.initial_head_sha256=tensor_hash(native.head.state_dict()) + ids=[native.config.decide_token_id,native.config.option_end_token_id] + embedding=native.get_input_embeddings() + self.initial_special_embeddings_sha256=tensor_hash({'special':embedding.weight[ids]}) + self.lora_names=install_lora(native,recipe['lora_rank'],recipe['lora_alpha']) + native.head.requires_grad_(True) + # A shared additive bias cancels in categorical CE; preserve its grounding calibration. + native.head.bias.requires_grad_(False) + if recipe.get('gradient_checkpointing',True): + native.backbone.language_model.gradient_checkpointing_enable(gradient_checkpointing_kwargs={'use_reentrant':False}) + self.mask_hook=native.backbone.language_model.register_forward_pre_hook(legacy_unpadded_mask,with_kwargs=True) + + def train(self,mode=True): + super().train(mode) + if not self.recipe.get('train_vision',False):self.native.backbone.visual.eval() + return self + + def forward(self,group,features,labels=None): + if isinstance(group,(list,tuple)): + from .batching import forward_states + return forward_states(self.native,group,features,labels) + if features.is_inference():raise ValueError('Clone frozen visual features outside inference_mode before backward') + output=self.native(**group,visual_features=features) + result=dict(logits=output.logits,probabilities=output.probabilities,score_mask=output.score_mask) + if labels is not None:result['loss']=choice_loss(output.logits,output.score_mask,labels.to(output.logits.device)) + return result + + def adapter_state(self): + return {n:p.detach().cpu().contiguous() for n,p in self.named_parameters() if '.lora_' in n or n.startswith('native.head.')} + + def load_adapter(self,state): + expected={n:p for n,p in self.named_parameters() if '.lora_' in n or n.startswith('native.head.')} + if set(state)!=set(expected):raise ValueError('Adapter keys differ from native JEV head/LoRA') + with torch.no_grad(): + for name,value in state.items(): + if value.shape!=expected[name].shape or not torch.isfinite(value).all():raise ValueError('Invalid adapter tensor') + expected[name].copy_(value.to(expected[name])) + + def close(self):self.mask_hook.remove() + + +def load_teacher(checkpoint,recipe,device): + from transformers import AutoProcessor + from videojev_hf.modeling_videojev import VideoJevForVideoUnderstanding + from scripts.smoke_videojev import LegacyProcessorAdapter + native=VideoJevForVideoUnderstanding.from_pretrained(str(checkpoint),local_files_only=True, + dtype=torch.bfloat16,device_map={'':str(device)},attn_implementation='sdpa') + processor=LegacyProcessorAdapter(AutoProcessor.from_pretrained(str(checkpoint),local_files_only=True,trust_remote_code=True)) + for token,expected in [('<|decide|>',native.config.decide_token_id),('<|option_end|>',native.config.option_end_token_id)]: + if processor.tokenizer.convert_tokens_to_ids(token)!=expected:raise ValueError('Native decision token IDs changed') + return Teacher(native,recipe),processor diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/t3/states.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/t3/states.py new file mode 100644 index 0000000000000000000000000000000000000000..1a35ba586819b00cf4ac1661fe26ce41c621410c --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/t3/states.py @@ -0,0 +1,101 @@ +"""Deterministic multi-scale states and the exact existing rendering protocol.""" + +import hashlib +import io +import math +import random +from pathlib import Path + +from PIL import Image + +from jev_spatial_distill.teacher_targets import labels_for_roi +from .common import SampleStream,stable_hash + + +def read_image(row): + path=Path(row['image'][0]);raw=path.read_bytes() + if hashlib.sha256(raw).hexdigest()!=row['image_sha256']:raise ValueError('Prepared image changed') + with Image.open(io.BytesIO(raw)) as source:image=source.convert('RGB') + if list(image.size)!=row['image_size']:raise ValueError('Prepared image dimensions changed') + return image + + +def cell_for(box,roi,cells): + x,y=[(box[i]+box[i+2])/2 for i in (0,1)] + col=min(cells-1,max(0,int((x-roi[0])/(roi[2]-roi[0])*cells))) + row=min(cells-1,max(0,int((y-roi[1])/(roi[3]-roi[1])*cells))) + dx=(roi[2]-roi[0])/cells;dy=(roi[3]-roi[1])/cells + return [roi[0]+col*dx,roi[1]+row*dy,roi[0]+(col+1)*dx,roi[1]+(row+1)*dy] + + +def make_state(row,roi,depth,source,**extra): + roi=[int(v) for v in roi] + width,height=row['image_size'] + if not (0<=roi[0]0) + return dict(target_id=row['id'],roi=roi,depth=depth,source=source,cells=cells,labels=labels,**extra) + + +def synthetic_state(row,position,seed): + from spatial_pro_experiments.core import expanded + rng=random.Random(int(stable_hash([seed,position,'roi'])[:16],16));width,height=row['image_size'] + full=[0,0,width,height];kind=position%5 + if kind==0:return make_state(row,full,0,'synthetic',sampling_kind='global') + first=expanded(cell_for(row['bbox_xyxy'],full,4),row['image_size']) + depth=1 if kind in (1,3) else 2 + roi=first if depth==1 else expanded(cell_for(row['bbox_xyxy'],first,8),row['image_size']) + rw,rh=roi[2]-roi[0],roi[3]-roi[1] + if kind in (3,4): + for _ in range(32): + x=rng.randint(0,width-rw);y=rng.randint(0,height-rh) + trial=make_state(row,[x,y,x+rw,y+rh],depth,'synthetic',sampling_kind='negative') + if trial['labels']['visibility_status']=='absent':return trial + return make_state(row,roi,depth,'synthetic',sampling_kind='negative_unavailable_positive_fallback') + for _ in range(16): + x=max(0,min(width-rw,roi[0]+round(rng.uniform(-.12,.12)*rw))) + y=max(0,min(height-rh,roi[1]+round(rng.uniform(-.12,.12)*rh))) + trial=make_state(row,[x,y,x+rw,y+rh],depth,'synthetic',sampling_kind='positive_jitter') + if trial['labels']['center_inside_roi']:return trial + return make_state(row,roi,depth,'synthetic',sampling_kind='positive_unjittered') + + +class StateSampler: + def __init__(self,rows,recipe,rollout=None): + self.rows=rows;self.by_id={r['id']:r for r in rows};self.recipe=recipe + self.synthetic=SampleStream(len(rows),recipe['seed']);self.rollout=rollout or {} + self.rollout_ids=sorted(self.rollout) + self.real=SampleStream(len(self.rollout_ids),recipe['seed']) if self.rollout_ids else None + + def at(self,position): + r=self.recipe + use_real=self.real is not None and int(stable_hash([r['seed'],position,'mix'])[:16],16)/16**160;size=recipe['crop_view_size'] if local else recipe['full_view_size'] + views=(contextual_views(geometry,image,state['roi'],state['cells'],size) if local + else geometry.contextual_views(image,view_size=size)) + # Encoding is frozen. Explicitly leave inference_mode and clone for autograd consumers. + features,record=geometry.encode_views(model.native,processor,views,view_size=size) + with torch.inference_mode(False):features=features.detach().clone() + questions=grid_questions(geometry,instruction,state['cells'],local=local) + groups=list(prepare_query_groups(processor,record,questions,record['context'])) + if len(groups)!=1:raise ValueError('All state questions must share exactly one native forward') + group,actual=groups[0] + target_questions=state['labels']['questions'] + if [q['id'] for q in actual]!=[q['id'] for q in target_questions]:raise ValueError('Labels do not match native question order') + labels=torch.tensor([q['label_index'] if q['enabled'] else -100 for q in target_questions],dtype=torch.long) + if not (labels!=-100).any():raise ValueError('Unsuitable training state; no supervised question') + frames=[hashlib.sha256(str(v.size).encode()+v.tobytes()).hexdigest() for v in views] + return group,features,labels,dict(frame_sha256=frames,visual_tokens=record['tokens'],input_tokens=group['input_ids'].shape[1]) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/teacher_targets.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/teacher_targets.py new file mode 100644 index 0000000000000000000000000000000000000000..7b040b77c4525c4a92e34d5166171dfd66d6a68e --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_spatial_distill/teacher_targets.py @@ -0,0 +1,42 @@ +"""GT geometry for the current JEV center-choice prompts; no model execution. + +ROI coordinates must describe the actual rendered crop in original pixels. +These labels belong to the loss, not to the model's input questions. +""" + +import math + + +def xyxy(values): + if len(values)!=4 or any(type(v) not in (int,float) or not math.isfinite(v) for v in values): + raise ValueError('Expected four finite xyxy coordinates') + if values[0]>=values[2] or values[1]>=values[3]:raise ValueError('Degenerate box/ROI') + return [float(v) for v in values] + + +def labels_for_roi(box,roi,cells,*,local=True): + """Match CENTER questions and conservatively label geometric visibility. + + Truncated boxes mask visibility: intersection alone does not establish + recognizability. Location is supervised only when the center is in the ROI. + """ + if cells not in (4,8) or type(cells) is not int:raise ValueError('Current T3 uses 4/8 grids') + box,roi=xyxy(box),xyxy(roi) + overlap=[max(0.,min(box[i+2],roi[i+2])-max(box[i],roi[i])) for i in (0,1)] + overlap_area=overlap[0]*overlap[1] + coverage=overlap_area/((box[2]-box[0])*(box[3]-box[1])) + contained=all(roi[i]<=box[i] and box[i+2]<=roi[i+2] for i in (0,1)) + visibility='inside' if contained else 'absent' if overlap_area==0 else 'truncated' + center=[(box[i]+box[i+2])/2 for i in (0,1)] + center_inside=all(roi[i]<=center[i] 1: + arguments['sharding_strategy'] = ShardingStrategy.HYBRID_SHARD + arguments['device_mesh'] = init_device_mesh('cuda', (topology['nodes'], topology['processes']), + mesh_dim_names=('replicate', 'shard')) + elif mode in ('full_shard', 'hybrid_shard'): + arguments['sharding_strategy'] = ShardingStrategy.FULL_SHARD + else: + raise ValueError('Unknown full-parameter sharding strategy') + precision = MixedPrecision(param_dtype=torch.bfloat16, reduce_dtype=torch.float32, + buffer_dtype=torch.bfloat16, cast_forward_inputs=True) + language = model.native.backbone.language_model + for index, layer in enumerate(language.layers): + language.layers[index] = FSDP(layer.float(), mixed_precision=precision, **arguments) + visual = model.native.backbone.visual + if recipe['train_vision']: + for index, block in enumerate(visual.blocks): + visual.blocks[index] = FSDP(block.float(), mixed_precision=precision, **arguments) + for module in model.modules(): + if not isinstance(module, FSDP): + for parameter in module.parameters(recurse=False): + if parameter.dtype == torch.bfloat16: + parameter.data = parameter.data.float() + return FSDP(batch_model, **arguments) + + +def parameter_groups(model, recipe): + groups = [] + for name, prefix, learning_rate in [('language', 'native.backbone.language_model.', recipe['full_lr']), + ('vision', 'native.backbone.visual.', recipe['vision_lr']), + ('head', 'native.head.', recipe['head_lr']), + ('spatial', 'spatial.', recipe['spatial_lr'])]: + parameters = [parameter for key, parameter in model.named_parameters() if key.startswith(prefix) and parameter.requires_grad] + if parameters: + groups.append(dict(name=name, params=parameters, lr=learning_rate, base_lr=learning_rate)) + selected = {id(parameter) for group in groups for parameter in group['params']} + expected = {id(parameter) for parameter in model.parameters() if parameter.requires_grad} + if selected != expected: + raise ValueError('Full optimizer groups do not cover every trainable parameter') + return groups + + +def clip_full_gradients(wrapped, parameters, clip): + from torch.distributed.fsdp import FullyShardedDataParallel as FSDP + if isinstance(wrapped, FSDP): + norm = wrapped.clip_grad_norm_(clip) + else: + norm = torch.nn.utils.clip_grad_norm_(parameters, clip, error_if_nonfinite=True) + if not bool(torch.isfinite(norm)): + raise ValueError('Nonfinite full-model gradient norm') + return float(norm), {} diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/methods.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/methods.py new file mode 100644 index 0000000000000000000000000000000000000000..5dfc1594ee15d7872b42a9258ae360763475d5c6 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/methods.py @@ -0,0 +1,3 @@ +"""Methods that must never read teacher predictions or use teacher KD support.""" + +GT_METHODS = ('gt', 'gt_set', 'gt_top20') diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/model.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/model.py new file mode 100644 index 0000000000000000000000000000000000000000..43826098586839af99f503969854b5ff6dbf8c83 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/model.py @@ -0,0 +1,73 @@ +"""Identical teacher shared weights and independently seeded fine head in every arm.""" +import torch +from jev_click_finetune.model import ClickStudent as SingleClickStudent,route +from jev_spatial_distill.spatial_pointer.model import FineReadout +from jev_spatial_distill.t3.model import tensor_hash,Teacher + + +class ClickStudent(SingleClickStudent): + """Keep single-image inference and support a real padded LM training batch.""" + def forward(self,group,features,layout,required=None,positive=None,topk=4): + if not isinstance(group,(list,tuple)): + return super().forward(group,features,layout,required,positive,topk) + count=len(group) + if (not count or len(features)!=count or len(layout)!=count or + any(len(g['query_indices'])!=1 for g in group)): + raise ValueError('Each batch item requires one screenshot and one query') + required=[None]*count if required is None else required + positive=[None]*count if positive is None else positive + if len(required)!=count or len(positive)!=count:raise ValueError('Batched routes differ from targets') + captured=[] + hook=self.native.head.register_forward_pre_hook(lambda _m,args:captured.append(args)) + try:Teacher.forward(self,group,features) + finally:hook.remove() + if len(captured)!=1:raise ValueError('Expected one batched native readout') + pairs,queries=captured[0] + if pairs.shape[0]!=count or queries.shape[0]!=count:raise ValueError('Lost batched sample identities') + result=[] + for i,current in enumerate(layout): + spatial=pairs[i,:current.count];query=queries[i] + if len(features[i])!=current.count:raise ValueError('Visual grid differs from spatial layout') + coarse=self.native.head(spatial[None],query[None])[0] + parents=route(coarse,required[i],positive[i],topk) + result.append(dict(coarse=coarse,fine=self.spatial(spatial,query,current,parents),parents=parents)) + return result + + +def fresh_head(hidden,recipe): + with torch.random.fork_rng(devices=[]),torch.device('cpu'): + torch.random.default_generator.manual_seed(recipe['head_seed']) + return FineReadout(hidden,recipe['readout_width'],recipe['subdivisions']) + + +def initialize_student(native,recipe,teacher_state): + if any(n.startswith('spatial.') for n in teacher_state):raise ValueError('Initialization requires T3, not an already trained S1 checkpoint') + model=ClickStudent(native,recipe);model.load_adapter(teacher_state) + head=fresh_head(native.head.q.in_features,recipe) + model.spatial.load_state_dict(head.state_dict()) + state=model.adapter_state();shared={n:v for n,v in state.items() if not n.startswith('spatial.')} + if tensor_hash(shared)!=tensor_hash(teacher_state):raise ValueError('Teacher shared initialization changed') + expected={n for n,p in model.named_parameters() if '.lora_' in n or n.startswith(('native.head.','spatial.'))} + for n,p in model.named_parameters(): + should_train=n in expected and n!='native.head.bias' + if p.requires_grad!=should_train:raise ValueError('Unexpected frozen/trainable parameter: '+n) + initial=dict(shared_sha256=tensor_hash(shared),spatial_sha256=tensor_hash(head.state_dict()), + adapter_tensor_sha256=tensor_hash(state),head_seed=recipe['head_seed'], + scope='fresh T3 shared adapter plus fixed CPU-seeded fine head; no prior S1 checkpoint') + model.unified_initialization=initial + return model,initial + + +def initialize_continued_student(native,recipe,state,expected): + """Retain the trained pixel head; this is not a fresh-head teacher initialization.""" + if not any(n.startswith('spatial.') for n in state): + raise ValueError('Continuation requires a trained pixel head') + model=ClickStudent(native,recipe);model.load_adapter(state) + loaded=model.adapter_state() + if tensor_hash(loaded)!=expected['adapter_tensor_sha256'] or tensor_hash(loaded)!=tensor_hash(state): + raise ValueError('Continued student weights were not loaded exactly') + fine={k.removeprefix('spatial.'):v for k,v in loaded.items() if k.startswith('spatial.')} + if tensor_hash(fine)!=expected['spatial_sha256']: + raise ValueError('Trained pixel head was reset') + model.unified_initialization=dict(expected) + return model,model.unified_initialization diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/objective.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/objective.py new file mode 100644 index 0000000000000000000000000000000000000000..e51015f1d90f7fd399b6a493433ffed45fd63a97 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/objective.py @@ -0,0 +1,88 @@ +"""Matched GT routing with method-specific fine losses and optional teacher KD.""" +import math +import torch +from torch.nn import functional as F +from jev_click_finetune.model import route +from jev_click_finetune.objective import set_nll +from jev_fine_refine.objective import fine_objective +from jev_spatial_distill.spatial_pointer.supervision import kd_loss +from jev_fine_ablation.distillation import distillation_loss +from .top20 import top20_winner_loss +from .top100 import top100_winner_loss +from .methods import GT_METHODS + +TEACHER_METHODS=('pixel_kd','region_kd','hard_kd','pixel_kd_top20','pixel_kd_top100') + + +def gt_objective(output,valid,positive,target,layout,topk,fine_rule='winner'): + # KD reads additional teacher regions, but those regions must not silently + # add GT supervision or change the fine-GT mean denominator. + parents=route(output['coarse'],[target['parent']],positive.any(-1),topk) + lookup={int(p):i for i,p in enumerate(output['parents'].tolist())} + if any(int(p) not in lookup for p in parents):raise ValueError('GT routing is absent from the shared forward') + indices=torch.tensor([lookup[int(p)] for p in parents],device=output['fine'].device) + view=dict(coarse=output['coarse'],fine=output['fine'][indices],parents=parents) + if fine_rule=='winner':gt,terms=fine_objective(view,valid,positive) + elif fine_rule in ('set','top20','top100'): + # Same routed GT-valid rows and mean denominator as the winner rule. + coarse=set_nll(view['coarse'],valid.any(-1),positive.any(-1)) + truth=positive[parents];keep=truth.any(-1) + if not keep.any():raise ValueError('No supervised positive region was routed') + if fine_rule=='set': + fine=set_nll(view['fine'][keep],valid[parents][keep],truth[keep]).mean() + elif fine_rule=='top20': + fine=top20_winner_loss(view['fine'][keep],valid[parents][keep],truth[keep]) + else: + fine=top100_winner_loss(view['fine'][keep],valid[parents][keep],truth[keep]) + gt=coarse+fine;terms=dict(coarse=float(coarse.detach()),fine=float(fine.detach()),supervised_regions=int(keep.sum())) + else:raise ValueError('Unknown fine GT rule') + return gt,terms,parents.tolist() + + +def hard_target(prediction,box,layout): + """Teacher final point as a one-pixel label, under the same hit gate as soft KD.""" + x,y=prediction['predicted_xy'] + if not (math.isfinite(x) and math.isfinite(y)):raise ValueError('Nonfinite teacher point') + if not (box[0]<=x<=box[2] and box[1]<=y<=box[3]):return dict(enabled=False,parents=torch.empty(0,dtype=torch.long)) + unit=layout.stride/layout.subdivisions + gx=min(max(int(x/unit),0),math.ceil(layout.width/unit)-1) + gy=min(max(int(y/unit),0),math.ceil(layout.height/unit)-1) + parent=(gy//layout.subdivisions)*layout.cols+gx//layout.subdivisions + fine=(gy%layout.subdivisions)*layout.subdivisions+gx%layout.subdivisions + if not bool(layout.valid()[parent,fine]):raise ValueError('Teacher point maps to a padded pixel') + return dict(enabled=True,parents=torch.tensor([parent]),fine=fine,point=[x,y]) + + +def hard_kd_loss(output,hard,valid): + coarse,fine=output['coarse'].float(),output['fine'].float() + zero=coarse.sum()*0+fine.sum()*0 + if not hard['enabled']:return zero,dict(kd_enabled=0,observed_parents=0,observed_pixels=0) + parent=int(hard['parents'][0]);index=output['parents'].tolist().index(parent) + c=-coarse.masked_fill(~valid.any(-1),-torch.inf).log_softmax(-1)[parent] + f=F.cross_entropy(fine[index].masked_fill(~valid[parent],-torch.inf)[None], + torch.tensor([hard['fine']],device=fine.device)) + return c+f+zero,dict(kd_enabled=1,observed_parents=1,observed_pixels=1) + + +def unified_loss(output,valid,positive,target,layout,method,soft,region,recipe,hard=None): + fine_rule={'gt_set':'set','gt_top20':'top20','pixel_kd_top20':'top20','pixel_kd_top100':'top100'}.get(method,'winner') + gt,terms,gt_parents=gt_objective(output,valid,positive,target,layout,recipe['routing_topk'], + fine_rule) + parents=output['parents'].tolist() + if method in GT_METHODS: + if soft is not None or region is not None or hard is not None:raise ValueError('GT-only must not use teacher prediction/support') + kd=output['coarse'].float().sum()*0+output['fine'].float().sum()*0 + kd_terms=dict(kd_enabled=0,observed_parents=0,observed_pixels=0);details=dict(method=method,coarse=0.,fine=0.) + elif method in ('pixel_kd','pixel_kd_top20','pixel_kd_top100'): + implementation=kd_loss + if recipe.get('speed',{}).get('vectorized_kd',False): + from .speed_loss import pixel_kd_loss + implementation=pixel_kd_loss + kd,kd_terms=implementation(output,soft,parents,recipe['temperature']);details=dict(method='pixel_kd') + elif method=='region_kd': + kd,kd_terms,details=distillation_loss(output,soft,parents,'region_kd',recipe['temperature'],region) + elif method=='hard_kd': + kd,kd_terms=hard_kd_loss(output,hard,valid);details=dict(method='hard_kd') + else:raise ValueError('Unknown unified method') + loss=gt+recipe['kd_weight']*kd + return loss,gt,terms,kd,kd_terms,details,gt_parents diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/portable_full.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/portable_full.py new file mode 100644 index 0000000000000000000000000000000000000000..b9cd74fae41f5c81b95c2e7e4ff1d087b38f2d89 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/portable_full.py @@ -0,0 +1,41 @@ +import torch +from jev_unified_student.model import ClickStudent +from jev_spatial_distill.spatial_pointer.model import FineReadout + +def cast_training_inputs(module, args, kwargs): + from torch.utils._pytree import tree_map + def cast(value): + return value.to(torch.bfloat16) if isinstance(value, torch.Tensor) and value.is_floating_point() else value + return tree_map(cast, args), tree_map(cast, kwargs) + + +def inference_precision(model, recipe, precision): + if precision != 'training_cuda': + return + blocks = list(model.native.backbone.language_model.layers) + if recipe['train_vision']: + blocks += list(model.native.backbone.visual.blocks) + for block in blocks: + block.register_forward_pre_hook(cast_training_inputs, with_kwargs=True) + for module in block.modules(): + for name, buffer in module.named_buffers(recurse=False): + if buffer.is_floating_point(): + setattr(module, name, buffer.to(torch.bfloat16)) + + +class FullWeightStudent(ClickStudent): + def __init__(self, native, recipe): + torch.nn.Module.__init__(self) + self.native, self.recipe = native, recipe + self.native.head.bias = torch.nn.Parameter(torch.zeros(1)) + self.spatial = FineReadout(native.head.q.in_features, recipe['readout_width'], recipe['subdivisions']) + self.native.full_parameter_training = True + self.native.train_vision = recipe['train_vision'] + + def forward(self, groups, features, layouts, required=None, positive=None, topk=4): + if not isinstance(groups, (tuple, list)): + raise ValueError('Full inference always uses the same batched path as training') + return super().forward(groups, features, layouts, required, positive, topk) + + def close(self): + pass diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/speed_loss.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/speed_loss.py new file mode 100644 index 0000000000000000000000000000000000000000..86316ce9a80a3837971b6f8790ae7efc3b205303 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/speed_loss.py @@ -0,0 +1,29 @@ +"""Vectorized observed-support pixel KD with the original teacher gate.""" + +import torch +from torch.nn import functional as functional + + +def pixel_kd_loss(output, soft, parent_order, temperature=2.): + coarse, fine = output['coarse'].float(), output['fine'].float() + zero = coarse.sum() * 0 + fine.sum() * 0 + if not soft or not soft['enabled']: + return zero, dict(kd_enabled=0, observed_parents=0, observed_pixels=0) + parent_ids = soft['parents'].tolist() + lookup = {parent: index for index, parent in enumerate(parent_order)} + selected = torch.tensor([lookup[parent] for parent in parent_ids], device=fine.device) + parents = soft['parents'].to(coarse.device) + mass = soft['mass'].to(coarse.device) + coarse_mass = mass.sum(-1) + soft_coarse = coarse_mass.pow(1 / temperature) + soft_coarse = soft_coarse / soft_coarse.sum() + rank = functional.kl_div(functional.log_softmax(coarse[parents] / temperature, -1), + soft_coarse, reduction='sum') * temperature ** 2 + mask = mass > 0 + truth = mass.pow(1 / temperature) + truth = truth / truth.sum(-1, keepdim=True) + log_student = functional.log_softmax((fine[selected] / temperature).masked_fill(~mask, -torch.inf), -1) + terms = functional.kl_div(log_student.masked_fill(~mask, 0.), truth, reduction='none') + conditional = (terms.sum(-1) * coarse_mass).sum() * temperature ** 2 + return rank + conditional + zero, dict(kd_enabled=1, observed_parents=len(parent_ids), + observed_pixels=int((soft['mass'] > 0).sum())) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/top100.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/top100.py new file mode 100644 index 0000000000000000000000000000000000000000..5a516df59e31147235d36d44d888e3db2d1be8ad --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/top100.py @@ -0,0 +1,42 @@ +"""Equal-weight winner losses for all GT-valid pixels within each routed token.""" + +import torch +from torch.nn import functional as F + + +TOP100_SPEC = dict( + name='all_positive_winners', + fraction=1.0, + selection='all GT-valid pixels of each routed GT-valid token', + count='number of positive pixels; 100 percent, not a fixed count of 100', + negatives='all original-image pixels outside GT in the same token; padding excluded', + reduction='mean over all positives, then mean over the original GT-valid routed tokens', + full_positive_token='zero loss, included in the token mean denominator', + spatial_weighting='uniform; no center or interior preference', +) + + +def top100_winner_loss(logits, valid, positive): + """Every positive competes separately against the shared negative pool. + + This averages per-positive classification losses; it does not collapse the + positive logits into a set likelihood or select only the weakest positive. + """ + if (logits.ndim != 2 or logits.shape != valid.shape or valid.shape != positive.shape + or valid.dtype != torch.bool or positive.dtype != torch.bool): + raise ValueError('Top100 support shapes/types differ') + if not positive.any(-1).all() or (positive & ~valid).any(): + raise ValueError('Every fine row needs nonempty valid GT support') + z = logits.float() + negative = valid & ~positive + active = negative.any(-1) + zero = z.sum() * 0 + if not active.any(): + return zero + + selected, pos, neg = z[active], positive[active], negative[active] + wrong = selected.masked_fill(~neg, -torch.inf).logsumexp(-1) + positive_scores = selected.masked_fill(~pos, 0.) + per_positive = F.softplus(wrong[:, None] - positive_scores).masked_fill(~pos, 0.) + per_token = per_positive.sum(-1) / pos.sum(-1) + return per_token.sum() / len(z) + zero diff --git a/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/top20.py b/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/top20.py new file mode 100644 index 0000000000000000000000000000000000000000..4c78cfdab4710e51b46fe1c11439799b5278cf2c --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/jev_unified_student/top20.py @@ -0,0 +1,51 @@ +"""Equal-weight winner losses for the highest-scoring 20% of GT-valid pixels.""" + +import torch +from torch.nn import functional as F + + +TOP20_SPEC = dict( + name='top20_positive_winners', + fraction=0.2, + selection='detached scores within GT-valid pixels of each routed GT-valid token', + count='ceil(number of positive pixels / 5), at least one', + ties='ascending original within-token pixel index', + negatives='all original-image pixels outside GT in the same token; padding excluded', + reduction='mean over selected positives, then mean over the original GT-valid routed tokens', + full_positive_token='zero loss, included in the token mean denominator', + spatial_weighting='uniform; no center or interior preference', +) + + +def top20_winner_loss(logits, valid, positive): + """Keep the original negative pool and token weighting; expand positive winners. + + Each selected positive competes separately against every negative. Selection + is detached, but gradients flow through every gathered positive score. The + final decoder remains the original token-first, one-pixel argmax. + """ + if (logits.ndim != 2 or logits.shape != valid.shape or valid.shape != positive.shape + or valid.dtype != torch.bool or positive.dtype != torch.bool): + raise ValueError('Top20 support shapes/types differ') + if not positive.any(-1).all() or (positive & ~valid).any(): + raise ValueError('Every fine row needs nonempty valid GT support') + z = logits.float() + negative = valid & ~positive + active = negative.any(-1) + zero = z.sum() * 0 + if not active.any(): + return zero + + selected, pos, neg = z[active], positive[active], negative[active] + # Integer arithmetic gives exact ceil(20% * n_positive), including n < 5. + counts = (pos.sum(-1) + 4) // 5 + max_count = int(counts.max()) + order = selected.detach().masked_fill(~pos, -torch.inf).argsort( + dim=-1, descending=True, stable=True)[:, :max_count] + keep = torch.arange(max_count, device=z.device)[None] < counts[:, None] + best = selected.gather(-1, order).masked_fill(~keep, 0.) + wrong = selected.masked_fill(~neg, -torch.inf).logsumexp(-1) + per_positive = F.softplus(wrong[:, None] - best).masked_fill(~keep, 0.) + per_token = per_positive.sum(-1) / counts + # Fully GT-covered tokens retain their original zero-loss contribution. + return per_token.sum() / len(z) + zero diff --git a/PixelOne-Pro-35B-A3B/runtime/src/pixelone/__init__.py b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..65d03b13315de2a303dcbf470464f3ce9a0bfcb4 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/__init__.py @@ -0,0 +1,8 @@ +__version__ = '0.1.0' + + +def __getattr__(name): + if name == 'PixelOnePredictor': + from .inference import PixelOnePredictor + return PixelOnePredictor + raise AttributeError(name) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/pixelone/assets/DejaVuSans-LICENSE.txt b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/assets/DejaVuSans-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..d1fcfc8e8f2b035d70c60707b4550a7c17078743 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/assets/DejaVuSans-LICENSE.txt @@ -0,0 +1,78 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: DejaVu fonts +Upstream-Author: Stepan Roh (original author), + see /usr/share/doc/fonts-dejavu-core/AUTHORS for full list +Source: https://dejavu-fonts.github.io/ + +Files: * +Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. + Bitstream Vera is a trademark of Bitstream, Inc. + DejaVu changes are in public domain. +License: bitstream-vera + Permission is hereby granted, free of charge, to any person obtaining a copy + of the fonts accompanying this license ("Fonts") and associated + documentation files (the "Font Software"), to reproduce and distribute the + Font Software, including without limitation the rights to use, copy, merge, + publish, distribute, and/or sell copies of the Font Software, and to permit + persons to whom the Font Software is furnished to do so, subject to the + following conditions: + . + The above copyright and trademark notices and this permission notice shall + be included in all copies of one or more of the Font Software typefaces. + . + The Font Software may be modified, altered, or added to, and in particular + the designs of glyphs or characters in the Fonts may be modified and + additional glyphs or characters may be added to the Fonts, only if the fonts + are renamed to names not containing either the words "Bitstream" or the word + "Vera". + . + This License becomes null and void to the extent applicable to Fonts or Font + Software that has been modified and is distributed under the "Bitstream + Vera" names. + . + The Font Software may be sold as part of a larger software package but no + copy of one or more of the Font Software typefaces may be sold by itself. + . + THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, + TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME + FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING + ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE + FONT SOFTWARE. + . + Except as contained in this notice, the names of Gnome, the Gnome + Foundation, and Bitstream Inc., shall not be used in advertising or + otherwise to promote the sale, use or other dealings in this Font Software + without prior written authorization from the Gnome Foundation or Bitstream + Inc., respectively. For further information, contact: fonts at gnome dot + org. + +Files: debian/* +Copyright: (C) 2005-2006 Peter Cernak + (C) 2006-2011 Davide Viti + (C) 2011-2013 Christian Perrier + (C) 2013 Fabian Greffrath +License: GPL-2+ + This program is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later + version. + . + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more + details. + . + You should have received a copy of the GNU General Public + License along with this package; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file + /usr/share/common-licenses/GPL-2'. diff --git a/PixelOne-Pro-35B-A3B/runtime/src/pixelone/assets/DejaVuSans.ttf b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/assets/DejaVuSans.ttf new file mode 100644 index 0000000000000000000000000000000000000000..c6e19bb61692c7347365b0d3e60c17f6c8980fa8 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/assets/DejaVuSans.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae7b7855e115a5966d8b1b3f80f254ccc117ec86f9965e202ee2940453837280 +size 759720 diff --git a/PixelOne-Pro-35B-A3B/runtime/src/pixelone/checkpoint.py b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/checkpoint.py new file mode 100644 index 0000000000000000000000000000000000000000..9a26934fe8195dc14a385971d9f41f5d8be6890e --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/checkpoint.py @@ -0,0 +1,54 @@ +from pathlib import Path + +import torch +import torch.distributed as distributed +import torch.distributed.checkpoint as checkpoint +from torch.distributed.checkpoint.state_dict import StateDictOptions, get_state_dict, set_state_dict + +from pixelone.io import atomic_json, stable_hash + + +def initialized(): + return distributed.is_available() and distributed.is_initialized() + + +def save_checkpoint(directory, model, optimizer, step, identity): + directory = Path(directory) + rank = distributed.get_rank() if initialized() else 0 + if rank == 0: + if directory.exists(): + raise ValueError('Checkpoint destination already exists') + directory.mkdir(parents=True) + if initialized(): + distributed.barrier() + model_state, optimizer_state = get_state_dict(model, optimizer, options=StateDictOptions(cpu_offload=True)) + checkpoint.save({'model': model_state, 'optimizer': optimizer_state}, checkpoint_id=directory / 'state') + random_state = {'cpu': torch.get_rng_state()} + if torch.cuda.is_available(): + random_state['cuda'] = torch.cuda.get_rng_state() + torch.save(random_state, directory / f'rng_rank_{rank:04d}.pt') + if initialized(): + distributed.barrier() + if rank == 0: + atomic_json(directory / 'training.json', {'schema': 'pixelone-training-v1', 'step': step, + 'identity': identity, 'identity_sha256': stable_hash(identity), 'state': 'complete'}) + + +def load_checkpoint(directory, model, optimizer, identity): + import json + directory = Path(directory) + metadata = json.loads((directory / 'training.json').read_text()) + if metadata.get('state') != 'complete' or metadata['identity_sha256'] != stable_hash(identity): + raise ValueError('Checkpoint is incomplete or belongs to another training recipe/data/world size') + options = StateDictOptions(cpu_offload=True) + model_state, optimizer_state = get_state_dict(model, optimizer, options=options) + state = {'model': model_state, 'optimizer': optimizer_state} + checkpoint.load(state, checkpoint_id=directory / 'state') + set_state_dict(model, optimizer, model_state_dict=state['model'], + optim_state_dict=state['optimizer'], options=options) + rank = distributed.get_rank() if initialized() else 0 + random_state = torch.load(directory / f'rng_rank_{rank:04d}.pt', map_location='cpu', weights_only=True) + torch.set_rng_state(random_state['cpu']) + if 'cuda' in random_state and torch.cuda.is_available(): + torch.cuda.set_rng_state(random_state['cuda']) + return metadata['step'] diff --git a/PixelOne-Pro-35B-A3B/runtime/src/pixelone/cli.py b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/cli.py new file mode 100644 index 0000000000000000000000000000000000000000..6ea4c04e0bc3bbeb1534cbccce0078f8e209cbf0 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/cli.py @@ -0,0 +1,74 @@ +import argparse +import json + + +def main(): + parser = argparse.ArgumentParser(prog='pixelone') + commands = parser.add_subparsers(dest='command', required=True) + inference = commands.add_parser('infer', help='Predict an original-image click') + inference.add_argument('--model', required=True) + inference.add_argument('--image', required=True) + inference.add_argument('--instruction', required=True) + inference.add_argument('--device', default='cuda:0') + inference.add_argument('--revision') + inference.add_argument('--subfolder', help='Model directory within a Hugging Face collection or local path') + inference.add_argument('--kernel-backend', choices=['native', 'torch']) + training = commands.add_parser('train', help='Train a search teacher or a direct student') + training.add_argument('--config', required=True) + training.add_argument('--resume') + data = commands.add_parser('prepare-data', help='Validate original-pixel box annotations') + data.add_argument('--input', required=True) + data.add_argument('--output', required=True) + data.add_argument('--image-root') + cache = commands.add_parser('cache-teacher', help='Run T3 and cache teacher distributions') + cache.add_argument('--config', required=True) + cache.add_argument('--adapter', required=True) + cache.add_argument('--output', required=True) + export = commands.add_parser('export', help='Export a full student checkpoint without optimizer state') + export.add_argument('--checkpoint', required=True) + export.add_argument('--output', required=True) + export.add_argument('--precision', choices=['training_cuda', 'float32'], default='training_cuda') + arguments = parser.parse_args() + if arguments.command == 'infer': + from PIL import Image + from pixelone.inference import PixelOnePredictor + predictor = PixelOnePredictor.from_pretrained(arguments.model, device=arguments.device, + revision=arguments.revision, subfolder=arguments.subfolder, kernel_backend=arguments.kernel_backend) + with Image.open(arguments.image) as image: + result = predictor.predict(image, arguments.instruction) + print(json.dumps(result, ensure_ascii=False)) + elif arguments.command == 'train': + from pathlib import Path + from pixelone.training import run_training + result = run_training(json.loads(Path(arguments.config).read_text()), resume=arguments.resume) + print(json.dumps(result)) + elif arguments.command == 'prepare-data': + from pixelone.data import prepare_dataset + print(json.dumps(prepare_dataset(arguments.input, arguments.output, arguments.image_root))) + elif arguments.command == 'export': + from pixelone.export import export_checkpoint + print(json.dumps(export_checkpoint(arguments.checkpoint, arguments.output, precision=arguments.precision))) + elif arguments.command == 'cache-teacher': + from pathlib import Path + import torch + from safetensors.torch import load_file + from pixelone.training import load_native + from pixelone.data import GroundingDataset + from pixelone.teacher import SearchTeacher, cache_teacher + from jev_spatial_distill.t3.model import Teacher, native_runtime + config = json.loads(Path(arguments.config).read_text()) + recipe = config['recipe'] + device = torch.device(config.get('device', 'cuda:0')) + with native_runtime(recipe['kernel_backend']): + native, processor = load_native(config['base_model'], device) + model = Teacher(native, recipe) + try: + model.load_adapter(load_file(arguments.adapter, device='cpu')) + cache_teacher(SearchTeacher(model, processor, recipe), + GroundingDataset(config['data'], config.get('image_root')), arguments.output) + finally: + model.close() + + +if __name__ == '__main__': + main() diff --git a/PixelOne-Pro-35B-A3B/runtime/src/pixelone/data.py b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/data.py new file mode 100644 index 0000000000000000000000000000000000000000..287f175ccf549b9befbc6195a76135b747de72ab --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/data.py @@ -0,0 +1,131 @@ +import json +from pathlib import Path +import sqlite3 + +from PIL import Image + +from jev_spatial_distill.spatial_pointer.geometry import Layout +from jev_click_finetune.objective import support +from pixelone.io import file_sha256 + + +def normalize_row(row, image_root, verify_image=True): + required = {'id', 'image', 'instruction', 'bbox_xyxy'} + if not required <= row.keys(): + raise ValueError('Missing fields: ' + ', '.join(sorted(required - row.keys()))) + if not isinstance(row['id'], str) or not row['id']: + raise ValueError('Target IDs must be nonempty strings') + if not isinstance(row['instruction'], str) or not row['instruction'].strip() or '<|' in row['instruction']: + raise ValueError('Expected a nonempty instruction without model control tokens') + image = row['image'] + if isinstance(image, list): + if len(image) != 1: + raise ValueError('Each target must reference one screenshot') + image = image[0] + path = Path(image_root) / image + if verify_image or 'image_size' not in row or 'image_sha256' not in row: + with Image.open(path) as source: + dimensions = list(source.size) + digest = file_sha256(path) + if row.get('image_size', dimensions) != dimensions or row.get('image_sha256', digest) != digest: + raise ValueError('Screenshot identity changed: ' + row['id']) + else: + dimensions, digest = row['image_size'], row['image_sha256'] + layout = Layout(*dimensions) + support(layout, row['bbox_xyxy']) + return {**row, 'image': [str(path)], 'image_size': dimensions, 'image_sha256': digest} + + +class GroundingDataset: + def __init__(self, path, image_root=None): + self.path = Path(path) + self.image_root = Path(image_root) if image_root else self.path.parent + self.offsets, identifiers = [], set() + with self.path.open('rb') as stream: + while True: + offset = stream.tell() + line = stream.readline() + if not line: + break + row = json.loads(line) + identifier = row['id'] + if identifier in identifiers: + raise ValueError('Duplicate target ID: ' + identifier) + identifiers.add(identifier) + self.offsets.append(offset) + if not self.offsets: + raise ValueError('Empty grounding dataset') + + def __len__(self): + return len(self.offsets) + + def __getitem__(self, index): + with self.path.open('rb') as stream: + stream.seek(self.offsets[index]) + row = json.loads(stream.readline()) + return normalize_row(row, self.image_root) + + +def prepare_dataset(source, destination, image_root=None): + source, destination = Path(source), Path(destination) + root = Path(image_root) if image_root else source.parent + if destination.exists(): + raise ValueError('Choose a new output path; datasets are not overwritten') + destination.parent.mkdir(parents=True, exist_ok=True) + identifiers = set() + with source.open() as inputs, destination.open('x') as outputs: + for line in inputs: + original = json.loads(line) + row = normalize_row(original, root) + if row['id'] in identifiers: + raise ValueError('Duplicate target ID: ' + row['id']) + identifiers.add(row['id']) + row['image'] = original['image'] + outputs.write(json.dumps(row, ensure_ascii=False, allow_nan=False) + '\n') + return {'targets': len(identifiers), 'sha256': file_sha256(destination)} + + +def index_teacher_cache(path, destination): + path, destination = Path(path), Path(destination) + if destination.exists(): + raise ValueError('Choose a new index path') + connection = sqlite3.connect(destination) + try: + connection.execute('CREATE TABLE records (id TEXT PRIMARY KEY, offset INTEGER, length INTEGER)') + connection.execute('CREATE TABLE metadata (key TEXT PRIMARY KEY, value TEXT)') + with path.open('rb') as stream: + while True: + offset = stream.tell() + line = stream.readline() + if not line: + break + row = json.loads(line) + connection.execute('INSERT INTO records VALUES (?, ?, ?)', (row['id'], offset, len(line))) + connection.execute('INSERT INTO metadata VALUES (?, ?)', ('sha256', file_sha256(path))) + connection.commit() + finally: + connection.close() + + +class IndexedTeacherCache: + def __init__(self, path, index): + self.path = Path(path) + self.connection = sqlite3.connect(Path(index).resolve().as_uri() + '?mode=ro', uri=True) + expected = self.connection.execute('SELECT value FROM metadata WHERE key="sha256"').fetchone() + if expected is None or file_sha256(self.path) != expected[0]: + raise ValueError('Teacher cache does not match its index') + + def get(self, target): + offset = self.connection.execute('SELECT offset, length FROM records WHERE id=?', (target['id'],)).fetchone() + if offset is None: + raise ValueError('No teacher trace for target: ' + target['id']) + with self.path.open('rb') as stream: + stream.seek(offset[0]) + row = json.loads(stream.read(offset[1])) + if (any(row[key] != target[key] for key in ['id', 'instruction', 'bbox_xyxy', 'image_size']) + or row['source_image_sha256'] != target['image_sha256']): + raise ValueError('Teacher trace and training input identities differ') + return row + + def close(self): + self.connection.close() diff --git a/PixelOne-Pro-35B-A3B/runtime/src/pixelone/export.py b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/export.py new file mode 100644 index 0000000000000000000000000000000000000000..43637a39bb36e79f289980ef97c71234f7e759a4 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/export.py @@ -0,0 +1,85 @@ +import json +import os +from pathlib import Path +import shutil +import tempfile + +import torch +import torch.distributed.checkpoint as checkpoint +from safetensors.torch import save_file + +from pixelone.io import atomic_json, bundle_member, file_sha256 + + +def export_checkpoint(source, destination, *, precision='training_cuda', shard_bytes=2 * 1024**3): + source, destination = Path(source), Path(destination) + metadata = json.loads((source / 'training.json').read_text()) + identity = metadata['identity'] + recipe = identity['recipe'] + if metadata.get('state') != 'complete' or recipe.get('train_mode') != 'full': + raise ValueError('Export requires a complete full-parameter student checkpoint') + if precision not in ('training_cuda', 'float32') or shard_bytes < 1: + raise ValueError('Invalid export precision or shard budget') + if destination.exists(): + raise ValueError('Choose a new model destination') + assets = source.parent / 'assets' + for name, expected in identity['assets'].items(): + if file_sha256(bundle_member(assets, name)) != expected: + raise ValueError('Training processor/model configuration changed: ' + name) + destination.parent.mkdir(parents=True, exist_ok=True) + staging = Path(tempfile.mkdtemp(prefix='.' + destination.name + '-', dir=destination.parent)) + reader = checkpoint.FileSystemReader(source / 'state') + entries = sorted((name, item) for name, item in reader.read_metadata().state_dict_metadata.items() + if name.startswith('model.student.')) + if not entries or any('.lora_' in name for name, item in entries): + raise ValueError('Expected merged full-student checkpoint tensors') + files, weight_map, tensors, pending = {}, {}, {}, {} + shard_number, pending_bytes, total_size = 0, 0, 0 + + def flush(): + nonlocal shard_number, pending_bytes, total_size + if not pending: + return + values = {name.removeprefix('model.'): torch.empty(item.size, dtype=item.properties.dtype) + for name, item in pending.items()} + checkpoint.load({'model': values}, storage_reader=reader, no_dist=True) + exported = {} + for name, value in values.items(): + name = name.removeprefix('student.') + if not bool(torch.isfinite(value).all()): + raise ValueError('Nonfinite model tensor: ' + name) + dtype = torch.float32 + if precision == 'training_cuda' and (name.startswith('native.backbone.language_model.layers.') + or (recipe['train_vision'] and name.startswith('native.backbone.visual.blocks.'))): + dtype = torch.bfloat16 + exported[name] = value.to(dtype).contiguous() + tensors[name] = {'shape': list(value.shape), 'dtype': str(dtype)} + total_size += exported[name].numel() * exported[name].element_size() + shard_number += 1 + filename = f'weights-{shard_number:05d}.safetensors' + save_file(exported, str(staging / filename)) + files[filename] = file_sha256(staging / filename) + weight_map.update({name: filename for name in exported}) + pending.clear() + pending_bytes = 0 + + for name, item in entries: + if not isinstance(item, checkpoint.metadata.TensorStorageMetadata): + raise ValueError('Expected tensor-only model state') + size = torch.Size(item.size).numel() * torch.empty((), dtype=item.properties.dtype).element_size() + if pending and pending_bytes + size > shard_bytes: + flush() + pending[name] = item + pending_bytes += size + flush() + for name, expected in identity['assets'].items(): + shutil.copyfile(bundle_member(assets, name), staging / name) + files[name] = expected + manifest = {'schema': 'pixelone-pro-v1', 'use_cache': False, 'precision': precision, + 'recipe': recipe, 'files': files, 'weight_map': weight_map, 'tensors': tensors, + 'source_step': metadata['step'], 'source_checkpoint_sha256': file_sha256(source / 'training.json'), + 'runtime_package': 'pixelone-grounding==0.1.0'} + atomic_json(staging / 'pixelone.json', manifest) + atomic_json(staging / 'model.safetensors.index.json', {'metadata': {'total_size': total_size}, 'weight_map': weight_map}) + os.rename(staging, destination) + return {'destination': str(destination), 'shards': shard_number, 'tensor_bytes': total_size} diff --git a/PixelOne-Pro-35B-A3B/runtime/src/pixelone/inference.py b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/inference.py new file mode 100644 index 0000000000000000000000000000000000000000..8a93231e1d613cd46653037e420f17706dadcdd3 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/inference.py @@ -0,0 +1,170 @@ +from contextlib import contextmanager +import json +from pathlib import Path +import threading + +import torch + +from jev_click_finetune.inputs import prepare +from jev_spatial_distill.t3.model import native_runtime +from jev_unified_student.portable_full import FullWeightStudent, inference_precision +from pixelone.io import bundle_member, file_sha256 + + +RUNTIME_LOCK = threading.RLock() +BUNDLE_SCHEMA = 'pixelone-pro-v1' + + +def resolve_model_path(model_path, *, subfolder=None, revision=None): + folder = str(subfolder) if subfolder else '' + if folder: + folder = str(bundle_member(Path('.'), folder)) + if folder == '.': + raise ValueError('Select a model subfolder, not the current directory') + root = Path(model_path).expanduser() + if root.is_dir(): + selected = root / folder + if not selected.is_dir(): + raise FileNotFoundError('Model subfolder not found: ' + str(selected)) + return selected + from huggingface_hub import hf_hub_download, snapshot_download + from huggingface_hub.errors import EntryNotFoundError + prefix = folder.rstrip('/') + '/' if folder else '' + try: + manifest_path = hf_hub_download(str(model_path), filename=prefix + 'pixelone.json', revision=revision) + except EntryNotFoundError as error: + raise ValueError('No PixelOne manifest at this location; select a model subfolder for a collection repository') from error + manifest = json.loads(Path(manifest_path).read_text()) + members = list(manifest['files']) + for name in members: + bundle_member(Path('.'), name) + root = Path(snapshot_download(str(model_path), revision=revision, + allow_patterns=[prefix + 'pixelone.json', *[prefix + name for name in members]])) + return root / folder + + +def inspect_bundle(root, verify_weights=True): + root = Path(root) + manifest = json.loads((root / 'pixelone.json').read_text()) + if manifest.get('schema') != BUNDLE_SCHEMA or manifest.get('use_cache') is not False: + raise ValueError('Expected a PixelOne Pro bundle with KV caching disabled') + recipe = manifest['recipe'] + if (recipe.get('train_mode') != 'full' or recipe.get('decoder') != 'coarse_first' + or recipe.get('subdivisions') != 32 or recipe.get('prompt') != 'valid_click_v1' + or recipe.get('attention_mode') != 'bidirectional_full_layers' + or recipe.get('train_vision') is not True): + raise ValueError('Unsupported Pro readout, input, or attention contract') + if recipe.get('kernel_backend') not in ('torch', 'native'): + raise ValueError('Unknown kernel backend') + if manifest.get('precision') not in ('training_cuda', 'float32'): + raise ValueError('Unknown tensor precision contract') + weights = manifest['weight_map'] + if not weights or set(weights) != set(manifest['tensors']): + raise ValueError('Incomplete tensor index') + if not set(weights.values()) <= manifest['files'].keys(): + raise ValueError('Weight index contains an unhashed shard') + for name, expected in manifest['files'].items(): + path = bundle_member(root, name) + if not path.is_file(): + raise FileNotFoundError(path) + if (verify_weights or not name.endswith('.safetensors')) and file_sha256(path) != expected: + raise ValueError('Bundle checksum mismatch: ' + name) + return manifest + + +def decode_click(output, layout): + parent = int(output['coarse'].detach().argmax()) + parents = output['parents'].tolist() + if parent not in parents: + raise ValueError('Selected token was not read by the pixel head') + row = parents.index(parent) + logits = output['fine'][row].float() + valid = layout.valid(logits.device)[parent] + if not bool(valid.any()): + raise ValueError('Selected token contains no image pixel') + pixel = int(logits.masked_fill(~valid, -torch.inf).argmax()) + point = layout.positions(logits.device)[parent, pixel].tolist() + return {'point': point, 'token_index': parent, 'pixel_index': pixel} + + +class PixelOnePredictor: + def __init__(self, model, processor, manifest, device, kernel_backend=None): + self.model, self.processor, self.manifest = model, processor, manifest + self.device = torch.device(device) + self.recipe = dict(manifest['recipe']) + self.kernel_backend = kernel_backend or self.recipe['kernel_backend'] + + @classmethod + def from_pretrained(cls, model_path, *, device='cuda:0', revision=None, subfolder=None, + verify_weights=True, kernel_backend=None): + from accelerate import init_empty_weights + from safetensors.torch import load_file + from transformers import AutoProcessor + from scripts.smoke_videojev import LegacyProcessorAdapter + from videojev_hf.configuration_videojev import VideoJevConfig + from videojev_hf.modeling_videojev import VideoJevForVideoUnderstanding + + root = resolve_model_path(model_path, subfolder=subfolder, revision=revision) + manifest = inspect_bundle(root, verify_weights) + device = torch.device(device) + if manifest['precision'] == 'training_cuda' and device.type != 'cuda': + raise ValueError('Released mixed-precision Pro weights require CUDA') + recipe = manifest['recipe'] + backend = kernel_backend or recipe['kernel_backend'] + with RUNTIME_LOCK, native_runtime(backend, attention_mode=recipe['attention_mode']): + config = VideoJevConfig.from_dict(json.loads((root / 'config.json').read_text())) + config._attn_implementation = recipe.get('attention', 'sdpa') + with init_empty_weights(include_buffers=False): + model = FullWeightStudent(VideoJevForVideoUnderstanding(config), recipe) + expected = model.state_dict() + if set(expected) != set(manifest['weight_map']): + raise ValueError('Model structure differs from the weight index') + loaded = set() + for filename in sorted(set(manifest['weight_map'].values())): + values = load_file(str(bundle_member(root, filename)), device='cpu') + for name, tensor in values.items(): + specification = manifest['tensors'].get(name) + if (name in loaded or manifest['weight_map'].get(name) != filename + or specification is None or tensor.shape != expected[name].shape + or list(tensor.shape) != specification['shape'] + or str(tensor.dtype) != specification['dtype']): + raise ValueError('Tensor shape, dtype or shard mismatch: ' + name) + loaded.add(name) + model.load_state_dict({name: tensor.to(device) for name, tensor in values.items()}, + strict=False, assign=True) + del values + if loaded != set(expected) or any(parameter.is_meta for parameter in model.parameters()): + raise ValueError('Some model parameters were not loaded') + model.to(device).eval().requires_grad_(False) + inference_precision(model, recipe, manifest['precision']) + if recipe.get('experts_backend') == 'grouped_mm' and model.native.is_moe: + for module in model.native.backbone.language_model.modules(): + if type(module).__name__ == 'Qwen3_5MoeExperts': + module.config._experts_implementation = 'grouped_mm' + processor = LegacyProcessorAdapter(AutoProcessor.from_pretrained( + root, local_files_only=True, trust_remote_code=False)) + for token, expected_id in [('<|decide|>', config.decide_token_id), + ('<|option_end|>', config.option_end_token_id)]: + if processor.tokenizer.convert_tokens_to_ids(token) != expected_id: + raise ValueError('Native decision token identity differs') + return cls(model, processor, manifest, device, backend) + + @contextmanager + def activated(self): + with RUNTIME_LOCK, native_runtime(self.kernel_backend, attention_mode=self.recipe['attention_mode']), torch.no_grad(): + yield + + def predict_outputs(self, images, instructions): + if not images or len(images) != len(instructions): + raise ValueError('Each screenshot requires one instruction') + with self.activated(): + prepared = [prepare(self.model, self.processor, image, instruction) + for image, instruction in zip(images, instructions, strict=True)] + outputs = self.model([value[0] for value in prepared], [value[1] for value in prepared], + [value[2] for value in prepared]) + return outputs, [value[2] for value in prepared], [value[3] for value in prepared] + + def predict(self, image, instruction): + outputs, layouts, metadata = self.predict_outputs([image.convert('RGB')], [instruction]) + return {**decode_click(outputs[0], layouts[0]), 'image_size': list(image.size), + 'kernel_backend': self.kernel_backend, **metadata[0]} diff --git a/PixelOne-Pro-35B-A3B/runtime/src/pixelone/io.py b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/io.py new file mode 100644 index 0000000000000000000000000000000000000000..516e55d8776dacb551940175daad669b41ec049c --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/io.py @@ -0,0 +1,41 @@ +import hashlib +import json +import os +from pathlib import Path +import tempfile + + +def file_sha256(path): + digest = hashlib.sha256() + with Path(path).open('rb') as stream: + for block in iter(lambda: stream.read(8 * 1024 * 1024), b''): + digest.update(block) + return digest.hexdigest() + + +def stable_hash(value): + return hashlib.sha256(json.dumps(value, sort_keys=True, separators=(',', ':'), + ensure_ascii=False).encode()).hexdigest() + + +def atomic_json(path, value): + path = Path(path) + path.parent.mkdir(parents=True, exist_ok=True) + descriptor, temporary = tempfile.mkstemp(dir=path.parent, prefix='.' + path.name) + try: + with os.fdopen(descriptor, 'w') as stream: + json.dump(value, stream, ensure_ascii=False, indent=2, allow_nan=False) + stream.write('\n') + stream.flush() + os.fsync(stream.fileno()) + os.replace(temporary, path) + finally: + if os.path.exists(temporary): + os.unlink(temporary) + + +def bundle_member(root, name): + relative = Path(name) + if not name or relative.is_absolute() or '..' in relative.parts or '\\' in name: + raise ValueError('Unsafe bundle member: ' + name) + return Path(root) / relative diff --git a/PixelOne-Pro-35B-A3B/runtime/src/pixelone/resources.py b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/resources.py new file mode 100644 index 0000000000000000000000000000000000000000..67f979ba82a3664fb4b505a0560ac6dcf061bd0c --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/resources.py @@ -0,0 +1,4 @@ +from pathlib import Path + + +FONT_PATH = str(Path(__file__).resolve().parent / 'assets' / 'DejaVuSans.ttf') diff --git a/PixelOne-Pro-35B-A3B/runtime/src/pixelone/sampling.py b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/sampling.py new file mode 100644 index 0000000000000000000000000000000000000000..8e78df9912125a16af822c1e111f4617bba4c3c2 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/sampling.py @@ -0,0 +1,15 @@ + + +class SampleStream: + """The same global stream across methods; warmup/joint occupy disjoint step ranges.""" + def __init__(self,count,seed): + if count<1:raise ValueError('Empty training dataset') + self.count=count;self.seed=seed;self.epoch=None;self.order=None + + def index(self,global_position): + import numpy as np + epoch,position=divmod(global_position,self.count) + if epoch!=self.epoch: + self.order=np.random.default_rng(self.seed+epoch).permutation(self.count) + self.epoch=epoch + return int(self.order[position]) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/pixelone/teacher.py b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/teacher.py new file mode 100644 index 0000000000000000000000000000000000000000..c493c5708651a2385b73ca8af04e78862f91cab2 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/teacher.py @@ -0,0 +1,78 @@ +import json +from pathlib import Path + +import torch + +from jev_spatial_distill.t3.model import native_runtime +from jev_spatial_distill.t3.states import make_state, read_image +from spatial_pro_experiments.fast import FAST_STRATEGIES, refine_batch +from videojev_hf.processing_videojev import prepare_query_groups + + +class SearchTeacher: + def __init__(self, model, processor, recipe): + from scripts import refine_spatial_jev + self.model, self.processor, self.recipe = model, processor, recipe + self.geometry = refine_spatial_jev + + def encode(self, views, view_size): + features, record = self.geometry.encode_views(self.model.native, self.processor, views, view_size) + with torch.inference_mode(False): + features = features.detach().clone() + return features, record + + def describe(self, encoded): + return encoded[1] + + def score_many(self, requests): + groups, features, questions = [], [], [] + for encoded, requested in requests: + feature, record = encoded + prepared = list(prepare_query_groups(self.processor, record, requested, record['context'])) + if len(prepared) != 1: + raise ValueError('A search state must fit in one model call') + group, actual = prepared[0] + groups.append(group) + features.append(feature) + questions.append(actual) + outputs = self.model(groups, features)['items'] + return [[{'id': question['id'], 'probabilities': output['probabilities'][index, :len(question['options'])].float().cpu().tolist()} + for index, question in enumerate(actual)] + for output, actual in zip(outputs, questions, strict=True)] + + def predict(self, image, instruction): + previous = self.model.training + self.model.eval() + try: + with native_runtime(self.recipe['kernel_backend']), torch.no_grad(): + full = self.encode(self.geometry.contextual_views(image, view_size=self.recipe['full_view_size']), + self.recipe['full_view_size']) + return refine_batch(self, [image], [instruction], [full], [[]], FAST_STRATEGIES['packed3-488'], + self.recipe['crop_view_size'], 0.)[0] + finally: + self.model.train(previous) + + +def visited_states(row, prediction): + result = [make_state(row, [0, 0, *row['image_size']], 0, 'visited')] + for stage in prediction['stages'][1:]: + for trace in stage['traces']: + state = make_state(row, trace['crop_bounds'], stage['depth'], 'visited') + if any(question['enabled'] for question in state['labels']['questions']): + result.append(state) + return result + + +def cache_teacher(teacher, rows, destination): + from pixelone.data import index_teacher_cache + destination = Path(destination) + if destination.exists(): + raise ValueError('Choose a new teacher-cache path') + destination.parent.mkdir(parents=True, exist_ok=True) + with destination.open('x') as stream: + for row in rows: + prediction = teacher.predict(read_image(row), row['instruction']) + record = {**prediction, **{key: row[key] for key in ['id', 'instruction', 'bbox_xyxy', 'image_size']}, + 'source_image_sha256': row['image_sha256']} + stream.write(json.dumps(record, ensure_ascii=False, allow_nan=False) + '\n') + index_teacher_cache(destination, destination.with_suffix('.sqlite')) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/pixelone/training.py b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/training.py new file mode 100644 index 0000000000000000000000000000000000000000..50c2a8410144f32bca7a197a2f35dd822cc4acdf --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/pixelone/training.py @@ -0,0 +1,262 @@ +import copy +import json +import math +import os +from pathlib import Path +import random +import shutil + +import numpy as np +import torch +import torch.distributed as distributed + +from jev_spatial_distill.t3.model import Teacher, native_runtime, tensor_hash +from jev_spatial_distill.t3.states import StateSampler, prepare_state, read_image +from jev_spatial_distill.spatial_pointer.geometry import Layout +from jev_spatial_distill.spatial_pointer.supervision import project, selected_parents +from jev_unified_student.full_training import ( + BatchPayload, FullBatchStudent, clip_full_gradients, enable_full_training, + parameter_groups, wrap_full_training, +) +from jev_unified_student.model import ClickStudent, fresh_head, initialize_continued_student, initialize_student +from jev_unified_student.objective import unified_loss +from pixelone.checkpoint import load_checkpoint, save_checkpoint +from pixelone.data import GroundingDataset, IndexedTeacherCache +from pixelone.io import atomic_json, file_sha256 +from pixelone.sampling import SampleStream +from pixelone.teacher import SearchTeacher, visited_states + + +def load_native(path, device): + from transformers import AutoProcessor + from scripts.smoke_videojev import LegacyProcessorAdapter + from videojev_hf.modeling_videojev import VideoJevForVideoUnderstanding + native = VideoJevForVideoUnderstanding.from_pretrained(path, + dtype=torch.bfloat16 if device.type == 'cuda' else torch.float32, + device_map={'': str(device)}, attn_implementation='sdpa') + processor = LegacyProcessorAdapter(AutoProcessor.from_pretrained(path, trust_remote_code=False)) + return native, processor + + +def initialize_training_student(native, recipe, initialization, adapter=None): + from safetensors.torch import load_file + if initialization == 'base': + if adapter: + raise ValueError('Base initialization must not load a trained adapter') + student = ClickStudent(native, recipe) + student.spatial.load_state_dict(fresh_head(native.head.q.in_features, recipe).state_dict()) + student.unified_initialization = {'kind': 'base'} + return student + if not adapter: + raise ValueError('Teacher/student initialization requires an adapter file') + state = load_file(adapter, device='cpu') + if initialization == 'teacher': + return initialize_student(native, recipe, state)[0] + if initialization != 'student': + raise ValueError('Initialization must be base, teacher or student') + spatial = {key.removeprefix('spatial.'): value for key, value in state.items() if key.startswith('spatial.')} + expected = {'adapter_tensor_sha256': tensor_hash(state), 'spatial_sha256': tensor_hash(spatial)} + return initialize_continued_student(native, recipe, state, expected)[0] + + +def adapter_parameter_groups(model, recipe): + groups = [] + for label, rate in [('lora', recipe['lora_lr']), ('head', recipe['head_lr']), + ('spatial', recipe.get('spatial_lr', recipe['head_lr']))]: + parameters = [parameter for name, parameter in model.named_parameters() + if parameter.requires_grad and (('.lora_' in name and label == 'lora') + or (name.startswith('native.head.') and label == 'head') + or (name.startswith('spatial.') and label == 'spatial'))] + if parameters: + groups.append({'params': parameters, 'lr': rate, 'base_lr': rate, 'name': label}) + if {id(parameter) for group in groups for parameter in group['params']} != { + id(parameter) for parameter in model.parameters() if parameter.requires_grad}: + raise ValueError('Optimizer does not cover the trainable adapter parameters') + return groups + + +def schedule_rate(step, steps, recipe): + warmup = recipe.get('lr_warmup_steps', 0) + if step < warmup: + return (step + 1) / max(1, warmup) + if recipe.get('lr_schedule', 'constant') == 'constant': + return 1. + if recipe['lr_schedule'] != 'cosine': + raise ValueError('Unsupported learning-rate schedule') + progress = (step - warmup) / max(1, steps - warmup - 1) + minimum = recipe.get('min_lr_ratio', 0.1) + return minimum + (1 - minimum) * 0.5 * (1 + math.cos(math.pi * progress)) + + +def student_batch(student, rows, stream, positions, teacher_cache): + payload = [] + for position in positions: + row = rows[stream.index(position)] + layout = Layout(*row['image_size']) + target = layout.center_target(row['bbox_xyxy']) + soft = project(teacher_cache.get(row), row['bbox_xyxy'], layout) if teacher_cache else None + payload.append({'row': row, 'layout': layout, 'target': target, 'soft': soft, + 'required': selected_parents(target, soft), 'image': read_image(row)}) + return BatchPayload(payload) + + +def run_training(configuration, *, resume=None): + config = copy.deepcopy(configuration) + recipe = config['recipe'] + stage = config['stage'] + if stage not in ('teacher', 'student'): + raise ValueError('Stage must be teacher or student') + world = int(os.environ.get('WORLD_SIZE', '1')) + rank = int(os.environ.get('RANK', '0')) + local_rank = int(os.environ.get('LOCAL_RANK', '0')) + device = torch.device(config.get('device', 'cuda' if torch.cuda.is_available() else 'cpu')) + if device.type == 'cuda': + device = torch.device('cuda', local_rank) + torch.cuda.set_device(device) + if world > 1: + distributed.init_process_group('nccl' if device.type == 'cuda' else 'gloo') + seed = recipe['seed'] + torch.manual_seed(seed) + random.seed(seed) + np.random.seed(seed) + rows = GroundingDataset(config['data'], config.get('image_root')) + if config.get('expected_targets') is not None and len(rows) != config['expected_targets']: + raise ValueError('Training target count differs from the configured dataset') + full = stage == 'student' and recipe.get('train_mode') == 'full' + if full and config['initialization'] != 'student': + raise ValueError('Pro continuation must retain a trained student pixel head') + batch, micro = recipe['global_batch'], recipe['micro_batch'] + if batch <= 0 or micro <= 0 or batch % (world * micro): + raise ValueError('Global batch must be divisible by world size times micro batch') + steps = (recipe['supervised_steps'] + recipe['mixed_steps'] if stage == 'teacher' + else config.get('steps') or math.ceil(len(rows) * config.get('epochs', 1) / batch)) + root = Path(config['output']) + if rank == 0: + if root.exists() and any(root.iterdir()) and not resume: + raise ValueError('Nonempty output directory requires an explicit resume checkpoint') + root.mkdir(parents=True, exist_ok=True) + atomic_json(root / 'configuration.json', config) + if world > 1: + distributed.barrier() + cache = None + model = None + try: + with native_runtime(recipe['kernel_backend'], attention_mode=recipe.get('attention_mode', 'causal')): + native, processor = load_native(config['base_model'], device) + assets = root / 'assets' + if rank == 0: + processor.processor.save_pretrained(assets) + native.config.to_json_file(assets / 'config.json', use_diff=False) + if world > 1: + distributed.barrier() + asset_hashes = {path.name: file_sha256(path) for path in sorted(assets.iterdir()) if path.is_file()} + if stage == 'teacher': + model = Teacher(native, recipe) + sampler = StateSampler(list(rows), recipe) + else: + model = initialize_training_student(native, recipe, config['initialization'], config.get('adapter')) + if full: + enable_full_training(model, recipe) + if config.get('method', 'pixel_kd_top20') == 'pixel_kd_top20': + cache = IndexedTeacherCache(config['teacher_cache'], config['teacher_index']) + elif config['method'] != 'gt_top20': + raise ValueError('Public training supports Top20 with spatial KD or GT only') + if full: + local_world = int(os.environ.get('LOCAL_WORLD_SIZE', str(world))) + wrapped = wrap_full_training(model, processor, device, recipe, + {'nodes': world // local_world, 'processes': local_world}) + else: + wrapped = model if stage == 'teacher' else FullBatchStudent(model, processor, device) + if world > 1: + wrapped = torch.nn.parallel.DistributedDataParallel(wrapped, + device_ids=[local_rank] if device.type == 'cuda' else None) + groups = parameter_groups(model, recipe) if full else adapter_parameter_groups(model, recipe) + optimizer = torch.optim.AdamW(groups, weight_decay=recipe['weight_decay']) + identity = {'recipe': recipe, 'stage': stage, 'world_size': world, 'steps': steps, 'assets': asset_hashes, + 'data_sha256': file_sha256(config['data']), 'base_model': config['base_model'], + 'initialization': config.get('initialization'), 'method': config.get('method'), + 'adapter_sha256': file_sha256(config['adapter']) if config.get('adapter') else None, + 'teacher_sha256': file_sha256(config['teacher_cache']) if cache else None} + if resume and stage == 'teacher': + previous = json.loads((Path(resume) / 'training.json').read_text()) + expected_rollout = previous['identity'].get('rollout_sha256') + if expected_rollout: + source_rollout = Path(resume).parent / 'visited_states.json' + target_rollout = root / 'visited_states.json' + chosen = target_rollout if target_rollout.exists() else source_rollout + if not chosen.is_file() or file_sha256(chosen) != expected_rollout: + raise ValueError('Mixed-phase resume requires the original visited search states') + if rank == 0 and not target_rollout.exists(): + shutil.copyfile(chosen, target_rollout) + if world > 1: + distributed.barrier() + identity['rollout_sha256'] = expected_rollout + elif previous['step'] > recipe['supervised_steps']: + raise ValueError('Mixed-phase checkpoint is missing its visited-state identity') + first = load_checkpoint(resume, wrapped, optimizer, identity) if resume else 0 + stream = SampleStream(len(rows), seed) + rollout_ready = False + for step in range(first, steps): + if stage == 'teacher' and step >= recipe['supervised_steps'] and not rollout_ready: + rollout_file = root / 'visited_states.json' + if rank == 0 and not rollout_file.exists(): + search = SearchTeacher(model, processor, recipe) + visited = {} + for index in range(min(len(rows), recipe['rollout_limit'])): + row = rows[index] + visited[row['id']] = visited_states(row, search.predict(read_image(row), row['instruction'])) + atomic_json(rollout_file, visited) + if world > 1: + distributed.barrier() + sampler = StateSampler(list(rows), recipe, json.loads(rollout_file.read_text())) + identity['rollout_sha256'] = file_sha256(rollout_file) + rollout_ready = True + model.train() + optimizer.zero_grad(set_to_none=True) + for group in optimizer.param_groups: + group['lr'] = group['base_lr'] * schedule_rate(step, steps, recipe) + accumulated = 0. + per_rank = batch // world + for start in range(0, per_rank, micro): + positions = range(step * batch + rank * per_rank + start, + step * batch + rank * per_rank + start + micro) + if stage == 'teacher': + prepared = [] + for position in positions: + row, state = sampler.at(position) + prepared.append(prepare_state(model, processor, read_image(row), row['instruction'], state, recipe)) + loss = wrapped([value[0] for value in prepared], [value[1] for value in prepared], + [value[2] for value in prepared])['loss'] + else: + outputs, prepared = wrapped(student_batch(model, rows, stream, positions, cache)) + losses = [unified_loss(output, value['valid'], value['positive'], value['target'], + value['layout'], config.get('method', 'pixel_kd_top20'), value['soft'], None, recipe)[0] + for output, value in zip(outputs, prepared, strict=True)] + loss = torch.stack(losses).mean() + if not bool(torch.isfinite(loss)): + raise ValueError('Nonfinite training loss') + (loss * micro / per_rank).backward() + accumulated += float(loss.detach()) * micro / per_rank + if full: + clip_full_gradients(wrapped, list(model.parameters()), recipe['gradient_clip']) + else: + torch.nn.utils.clip_grad_norm_(model.parameters(), recipe['gradient_clip'], error_if_nonfinite=True) + optimizer.step() + if rank == 0: + with (root / 'metrics.jsonl').open('a') as metrics: + metrics.write(json.dumps({'step': step + 1, 'rank0_loss': accumulated}) + '\n') + if ((step + 1) % recipe['checkpoint_every'] == 0 or step + 1 == steps + or (stage == 'teacher' and step + 1 == recipe['supervised_steps'])): + output = root / f'step_{step + 1:06d}' + save_checkpoint(output, wrapped, optimizer, step + 1, identity) + if not full and rank == 0: + from safetensors.torch import save_file + save_file(model.adapter_state(), str(output / 'adapter.safetensors')) + return {'steps': steps, 'output': str(root)} + finally: + if cache: + cache.close() + if model: + model.close() + if world > 1 and distributed.is_initialized(): + distributed.destroy_process_group() diff --git a/PixelOne-Pro-35B-A3B/runtime/src/qwen_spatial/__init__.py b/PixelOne-Pro-35B-A3B/runtime/src/qwen_spatial/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/qwen_spatial/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-35B-A3B/runtime/src/qwen_spatial/common.py b/PixelOne-Pro-35B-A3B/runtime/src/qwen_spatial/common.py new file mode 100644 index 0000000000000000000000000000000000000000..dfdb06e23cdee2fde4599da3b6adde2eb45a5c7e --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/qwen_spatial/common.py @@ -0,0 +1,2 @@ +def inside_box(point, box): + return point is not None and box[0] <= point[0] <= box[2] and box[1] <= point[1] <= box[3] diff --git a/PixelOne-Pro-35B-A3B/runtime/src/qwen_spatial/kernels.py b/PixelOne-Pro-35B-A3B/runtime/src/qwen_spatial/kernels.py new file mode 100644 index 0000000000000000000000000000000000000000..d4c6f99583d7ba298279eb9567b9d5fd90f88e3f --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/qwen_spatial/kernels.py @@ -0,0 +1,27 @@ +from contextlib import contextmanager +from importlib import import_module + +OPTIONAL_KERNELS = ('FusedRMSNormGated', 'causal_conv1d_fn', 'causal_conv1d_update', 'chunk_gated_delta_rule', 'fused_recurrent_gated_delta_rule') + +@contextmanager +def qwen_kernel_backend(backend='torch', module=None): + if backend not in ('torch', 'native'): + raise ValueError('Choose torch or native Qwen kernels') + module = module or import_module('transformers.models.qwen3_5.modeling_qwen3_5') + original = {name: getattr(module, name) for name in OPTIONAL_KERNELS} + runtime = dict(backend=backend, optional_kernels_available={ + name: value is not None for name, value in original.items()}, + optional_kernels_enabled={name: backend == 'native' and value is not None + for name, value in original.items()}) + if backend == 'native': + yield runtime + return + original['is_fast_path_available'] = module.is_fast_path_available + try: + for name in OPTIONAL_KERNELS: + setattr(module, name, None) + module.is_fast_path_available = False + yield runtime + finally: + for name, value in original.items(): + setattr(module, name, value) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/scripts/__init__.py b/PixelOne-Pro-35B-A3B/runtime/src/scripts/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/scripts/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-35B-A3B/runtime/src/scripts/batch_spatial_jev.py b/PixelOne-Pro-35B-A3B/runtime/src/scripts/batch_spatial_jev.py new file mode 100644 index 0000000000000000000000000000000000000000..fcb7f2f365592452c265fb828eb95cd1d7ae9406 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/scripts/batch_spatial_jev.py @@ -0,0 +1,29 @@ +import torch + +def collate_query_groups(groups, pad_token_id): + if not groups: + raise ValueError('Provide at least one query group') + max_length = max(group['input_ids'].shape[1] for group in groups) + max_options = max(group['pair_indices'].shape[1] for group in groups) + input_ids = torch.full((len(groups), max_length), pad_token_id, dtype=torch.long) + token_types = torch.zeros_like(input_ids) + attention_mask = torch.zeros_like(input_ids, dtype=torch.bool) + pairs, masks, queries, tasks, sample_indices = [], [], [], [], [] + for sample_index, group in enumerate(groups): + if group['input_ids'].shape[0] != 1 or group['video_grid_thw'].shape[0] != 1: + raise ValueError('Each input group must contain exactly one video') + length = group['input_ids'].shape[1] + input_ids[sample_index, :length] = group['input_ids'][0] + token_types[sample_index, :length] = group['mm_token_type_ids'][0] + attention_mask[sample_index, :length] = True + padding = max_options - group['pair_indices'].shape[1] + pairs.append(torch.nn.functional.pad(group['pair_indices'], (0, padding))) + masks.append(torch.nn.functional.pad(group['score_mask'], (0, padding))) + queries.append(group['query_indices']) + tasks.append(group['decision_tasks']) + sample_indices.extend([sample_index] * len(group['query_indices'])) + return dict(input_ids=input_ids, mm_token_type_ids=token_types, attention_mask=attention_mask, + video_grid_thw=torch.cat([group['video_grid_thw'] for group in groups]), + pair_indices=torch.cat(pairs), query_indices=torch.cat(queries), + score_mask=torch.cat(masks), decision_tasks=torch.cat(tasks), + sample_indices=torch.tensor(sample_indices)) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/scripts/refine_spatial_jev.py b/PixelOne-Pro-35B-A3B/runtime/src/scripts/refine_spatial_jev.py new file mode 100644 index 0000000000000000000000000000000000000000..cb6f97f06db42ad98fc33e7c0347c37f28effda0 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/scripts/refine_spatial_jev.py @@ -0,0 +1,135 @@ +import math +import numpy as np +import torch +from PIL import Image, ImageDraw, ImageFont +from transformers.video_utils import VideoMetadata +from videojev_hf.videojev_temporal import pair_timeline +from pixelone.resources import FONT_PATH + +VIEW_SIZE = 768 + +def view_canvas(image, bounds=None, marked=False, title='FULL SCREEN', view_size=VIEW_SIZE): + if view_size != 'native' and (not isinstance(view_size, int) or view_size < 128): + raise ValueError('View size must be an integer >= 128') + if view_size == 'native': + if bounds is not None: + raise ValueError('Native resolution is only supported for the initial full screenshot') + from scripts.spatial_view_sizes import native_canvas_size + + content = image.copy() + scale, left, top = 1, 36, 58 + canvas_size = native_canvas_size(image.size) + else: + scale = view_size / VIEW_SIZE + source = image if bounds is None else image.crop(tuple(round(value) for value in bounds)) + content = source.copy() + content.thumbnail((VIEW_SIZE - 48, VIEW_SIZE - 76), Image.Resampling.LANCZOS) + if bounds is not None: + crop_scale = min((VIEW_SIZE - 48) / content.width, (VIEW_SIZE - 76) / content.height) + if crop_scale > 1: + content = content.resize((round(content.width * crop_scale), round(content.height * crop_scale)), + Image.Resampling.LANCZOS) + left, top = round((36 + (VIEW_SIZE - 48 - content.width) // 2) * scale), round(58 * scale) + if view_size != VIEW_SIZE: + content = source.resize((max(1, round(content.width * scale)), max(1, round(content.height * scale))), + Image.Resampling.LANCZOS) + canvas_size = (view_size, view_size) + canvas = Image.new('RGB', canvas_size, 'white') + canvas.paste(content, (left, top)) + draw = ImageDraw.Draw(canvas) + font = ImageFont.truetype(FONT_PATH, round(21 * scale)) + draw.text((round(20 * scale), round(7 * scale)), title, fill='#142c48', font=font) + if marked: + overlay = Image.new('RGBA', canvas.size) + grid_draw = ImageDraw.Draw(overlay) + for divider in range(1, 4): + horizontal = left + content.width * divider / 4 + vertical = top + content.height * divider / 4 + grid_draw.line((horizontal, top, horizontal, top + content.height), fill=(126, 52, 191, 155), + width=max(1, round(2 * scale))) + grid_draw.line((left, vertical, left + content.width, vertical), fill=(0, 145, 168, 155), + width=max(1, round(2 * scale))) + canvas = Image.alpha_composite(canvas.convert('RGBA'), overlay).convert('RGB') + draw = ImageDraw.Draw(canvas) + for index in range(4): + horizontal = left + content.width * (index + .5) / 4 + vertical = top + content.height * (index + .5) / 4 + draw.text((horizontal - 8 * scale, top - 27 * scale), 'ABCD'[index], fill='#7135b0', font=font) + draw.text((left - 24 * scale, vertical - 11 * scale), str(index + 1), fill='#007f98', font=font) + draw.rectangle((left, top, left + content.width, top + content.height), outline='#738090', + width=max(1, round(scale))) + return canvas + + +def contextual_views(image, bounds=None, view_size=VIEW_SIZE): + if bounds is None: + view = view_canvas(image, marked=True, title='FULL SCREEN - labeled grid', view_size=view_size) + return [view, view] + if view_size == 'native': + raise ValueError('Native resolution is only supported for the initial full screenshot') + overview = image.copy() + draw = ImageDraw.Draw(overview) + draw.rectangle(bounds, outline='#f38d16', width=max(3, image.width // 180)) + full = view_canvas(overview, title='FULL SCREEN - orange box is the crop', view_size=view_size) + local = view_canvas(image, bounds, marked=True, title='ENLARGED CROP - answer for this grid', view_size=view_size) + return [full, full, local, local] + + +def grid_questions(instruction, local=False): + description = ('The first view is the full screenshot for context. The last view is an enlarged crop. ' + 'Answer about the labeled grid in the LAST enlarged crop, not the full screenshot. ' + if local else 'The frames show one GUI screenshot with a labeled grid. ') + prefix = description + f'Locate the UI element to click for this instruction: "{instruction}". ' + questions = [ + dict(id='horizontal', task='choice', + query=prefix + 'Which labeled COLUMN contains the center of the target?', + options=['A. Column A, the leftmost column.', 'B. Column B, the middle-left column.', + 'C. Column C, the middle-right column.', 'D. Column D, the rightmost column.']), + dict(id='vertical', task='choice', + query=prefix + 'Which labeled ROW contains the center of the target?', + options=['A. Row 1, the topmost row.', 'B. Row 2, the upper-middle row.', + 'C. Row 3, the lower-middle row.', 'D. Row 4, the bottommost row.']), + ] + if local: + questions.insert(0, dict(id='presence', task='choice', + query=prefix + 'Is the target UI element visible inside the LAST enlarged crop?', + options=['A. Yes, the target is visible in the enlarged crop.', + 'B. No, the target is not visible in the enlarged crop.'])) + return questions + + +def encode_views(model, processor, views, view_size=VIEW_SIZE): + from scripts.spatial_view_sizes import NATIVE_ALIGNMENT, NATIVE_QUERY_CONTEXT, QUERY_CONTEXT + + if view_size != 'native' and (not isinstance(view_size, int) or view_size < 1): + raise ValueError('View size must be a positive integer') + count = len(views) + options = dict(size=dict(shortest_edge=4096, longest_edge=count * view_size**2)) if view_size != 'native' else {} + if view_size == 'native': + if not views or len({view.size for view in views}) != 1: + raise ValueError('Native frames must have one matching nonempty canvas size') + width, height = views[0].size + video_processor = processor.video_processor + if (video_processor.patch_size * video_processor.merge_size != NATIVE_ALIGNMENT or + width % NATIVE_ALIGNMENT or height % NATIVE_ALIGNMENT): + raise ValueError('Native canvases must be padded to the checkpoint\'s 32-pixel alignment') + options = dict(do_resize=False, size=dict(shortest_edge=4096, longest_edge=count * width * height)) + metadata = VideoMetadata(total_num_frames=count, fps=2., frames_indices=list(range(count))) + native = processor.video_processor( + videos=[np.stack([np.asarray(view) for view in views])], video_metadata=[metadata], + do_sample_frames=False, return_tensors='pt', **options) + grid = native['video_grid_thw'][0].tolist() + if view_size == 'native': + expected = [math.ceil(count / video_processor.temporal_patch_size), + height // video_processor.patch_size, width // video_processor.patch_size] + if grid != expected: + raise ValueError(f'Native full resolution was changed by the processor: {grid} != {expected}') + times, bounds = pair_timeline(np.arange(count) / 2., count / 2.) + record = dict(frames=count, fps=2., grid_thw=grid, tokens=int(np.prod(grid)) // 4, + view_size=view_size, canvas_size=list(views[0].size), processor_resize=view_size != 'native', + context=NATIVE_QUERY_CONTEXT if view_size == 'native' else QUERY_CONTEXT, + score_times=times.tolist(), score_bounds=bounds.tolist(), sampled_duration=count / 2.) + if record['tokens'] >= record['context']: + raise ValueError('Visual tokens leave no room for questions; no automatic downscaling is allowed') + features = model.encode_video(native['pixel_values_videos'], torch.tensor([grid])) + return features, record diff --git a/PixelOne-Pro-35B-A3B/runtime/src/scripts/smoke_videojev.py b/PixelOne-Pro-35B-A3B/runtime/src/scripts/smoke_videojev.py new file mode 100644 index 0000000000000000000000000000000000000000..92f7d8e01165bd92011ad9d652f6599798efcbc5 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/scripts/smoke_videojev.py @@ -0,0 +1,45 @@ +import numpy as np +import torch + +class LegacyProcessorAdapter: + """Expose refactored prompt helpers using the native 5.6.2 formatting.""" + + def __init__(self, processor): + self.processor = processor + + def __getattr__(self, name): + return getattr(self.processor, name) + + def __call__(self, *args, **kwargs): + return self.processor(*args, **kwargs) + + def replace_video_token(self, video_inputs, *, video_idx): + grid = video_inputs['video_grid_thw'][video_idx] + metadata = video_inputs['video_metadata'][video_idx] + timestamps = self._calculate_timestamps( + list(metadata.frames_indices), metadata.fps, self.video_processor.temporal_patch_size) + spatial = int(np.prod(grid[1:])) // self.video_processor.merge_size**2 + return ''.join( + f'<{timestamp:.1f} seconds>{self.vision_start_token}' + f'{self.video_token * spatial}{self.vision_end_token}' + for timestamp in timestamps[:int(grid[0])]) + + def get_text_with_replacements(self, texts, images, videos, audio): + if len(texts) != 1 or len(videos) != 1 or images or audio: + raise ValueError('This compatibility adapter supports one video-only prompt') + placeholder = self.vision_start_token + self.video_token + self.vision_end_token + if placeholder not in texts[0]: + placeholder = self.video_token + if placeholder not in texts[0]: + raise ValueError('No native video placeholder in the prompt') + return [texts[0].replace(placeholder, videos[0], 1)], None + + +def legacy_unpadded_mask(_module, positional_args, keyword_args): + """Let 5.6.2 build its native causal mask for a single unpadded sequence.""" + mask = keyword_args.get('attention_mask') + if isinstance(mask, dict): + if any(value is not None for value in mask.values()): + raise ValueError('The legacy adapter only supports an unpadded attention mask') + keyword_args['attention_mask'] = None + return positional_args, keyword_args diff --git a/PixelOne-Pro-35B-A3B/runtime/src/scripts/spatial_view_sizes.py b/PixelOne-Pro-35B-A3B/runtime/src/scripts/spatial_view_sizes.py new file mode 100644 index 0000000000000000000000000000000000000000..7245556d91074fcf972459119dfd18f7e27c74ef --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/scripts/spatial_view_sizes.py @@ -0,0 +1,64 @@ +"""Resolution settings shared by the crop runner and its lightweight launcher.""" + +import argparse +import math + + +VIEW_SIZES = (768, 1024, 1536) +NATIVE_ALIGNMENT = 32 +QUERY_CONTEXT = 8192 +NATIVE_QUERY_CONTEXT = 32768 + + +def parse_full_view_size(value): + if value == 'native': + return value + try: + size = int(value) + except (TypeError, ValueError) as error: + raise argparse.ArgumentTypeError('Use 768, 1024, 1536, or native') from error + if size not in VIEW_SIZES: + raise argparse.ArgumentTypeError('Use 768, 1024, 1536, or native') + return size + + +def resolve_view_sizes(view_size=768, full_view_size=None, crop_view_size=None): + full_size = view_size if full_view_size is None else full_view_size + crop_size = view_size if crop_view_size is None else crop_view_size + if full_size != 'native' and full_size not in VIEW_SIZES: + raise ValueError('full-view-size must be 768, 1024, 1536, or native') + if crop_size not in VIEW_SIZES: + raise ValueError('crop-view-size must be 768, 1024, or 1536') + return full_size, crop_size + + +def crop_settings(view_size=768, full_view_size=None, crop_view_size=None): + full_size, crop_size = resolve_view_sizes(view_size, full_view_size, crop_view_size) + settings = dict(steps=2, beam_width=2, crop_padding=.12, view_size=view_size) + if full_view_size is not None or crop_view_size is not None: + settings.update(full_view_size=full_size, crop_view_size=crop_size, + full_view_scope='initial_coarse_forward', crop_context_view_size=crop_size, + full_view_context=NATIVE_QUERY_CONTEXT if full_size == 'native' else QUERY_CONTEXT) + return settings + + +def native_canvas_size(image_size): + if len(image_size) != 2 or any(not isinstance(size, int) or size < 1 for size in image_size): + raise ValueError('Provide positive integer image width and height') + width, height = image_size + return (math.ceil((width + 48) / NATIVE_ALIGNMENT) * NATIVE_ALIGNMENT, + math.ceil((height + 76) / NATIVE_ALIGNMENT) * NATIVE_ALIGNMENT) + + +def native_full_view_plan(rows): + sizes = [native_canvas_size(row['image_size']) for row in rows] + tokens = [width * height // NATIVE_ALIGNMENT**2 for width, height in sizes] + if not tokens: + raise ValueError('Provide nonempty annotations for native full views') + if max(tokens) >= NATIVE_QUERY_CONTEXT: + raise ValueError(f'Native full view needs {max(tokens)} visual tokens before questions; ' + f'context is {NATIVE_QUERY_CONTEXT}. No automatic downscaling is allowed.') + return dict(source_resolution='preserved', processor_resize=False, padding_alignment=NATIVE_ALIGNMENT, + full_view_scope='initial_coarse_forward', context_tokens=NATIVE_QUERY_CONTEXT, + min_visual_tokens=min(tokens), max_visual_tokens=max(tokens), + mean_visual_tokens=round(sum(tokens) / len(tokens), 2), full_feature_cache=False) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/spatial_pro_experiments/__init__.py b/PixelOne-Pro-35B-A3B/runtime/src/spatial_pro_experiments/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/spatial_pro_experiments/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-35B-A3B/runtime/src/spatial_pro_experiments/core.py b/PixelOne-Pro-35B-A3B/runtime/src/spatial_pro_experiments/core.py new file mode 100644 index 0000000000000000000000000000000000000000..40307804940aa4dbbbda601e8e3b63f04beb6c8a --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/spatial_pro_experiments/core.py @@ -0,0 +1,250 @@ +"""Budget-matched search schedules and independent, CPU-only result audits.""" + +import math +from dataclasses import dataclass + +from qwen_spatial.common import inside_box + + +COUNTER_KEYS = ('language_forward_calls', 'model_forward_calls', 'visual_encoder_calls', + 'language_sequences', 'questions_scored') + + +@dataclass(frozen=True) +class Strategy: + name: str + beam_widths: tuple + + @property + def groups(self): + return 1 + sum(self.beam_widths[:-1]) + + @property + def questions(self): + return 2 + 3 * (self.groups - 1) + + def settings(self): + return dict(name=self.name, beam_widths=list(self.beam_widths), + parents_per_round=list(self.beam_widths[:-1]), + refinement_rounds=len(self.beam_widths) - 1, + cells_per_axis=4, crop_padding=.12) + + +STRATEGIES = { + 'precision7': Strategy('precision7', (2, 2, 2, 2)), + 'recall7': Strategy('recall7', (4, 2, 2)), +} + + +def language_sequence(backend, strategy, batch_size): + if backend not in ('videojev', 'qwen') or batch_size < 1: + raise ValueError('Require videojev/qwen and a positive target batch size') + if backend == 'videojev': + return [batch_size] * strategy.groups + return [2 * batch_size] + [3 * batch_size] * (strategy.groups - 1) + + +def forward_protocol(backend, strategy, batch_size): + protocol = dict(execution='rank_serial_batched_targets' if batch_size > 1 else 'serial_per_target', + target_batch_size=batch_size, language_groups_per_target=strategy.groups, + questions_per_target=strategy.questions, + language_forward_calls_per_batch=strategy.groups, + language_batch_sequence=language_sequence(backend, strategy, batch_size), + autoregressive_generation=False, visual_features_shared_between_questions=True, + counters_scope='one ledger record per target batch; do not sum shared counters per row') + if batch_size == 1: + protocol['language_forward_calls_per_target'] = strategy.groups + return protocol + + +def refine_batch(backend, images, instructions, full_views, strategy, crop_size): + count = len(images) + if not count or len(instructions) != count or len(full_views) != count: + raise ValueError('Provide matching nonempty images, instructions, and full views') + geometry = backend.geometry + choices = backend.score_many([(full, geometry.grid_questions(instruction)) + for full, instruction in zip(full_views, instructions, strict=True)]) + beams = [geometry.cell_candidates([0, 0, *image.size], predictions)[:strategy.beam_widths[0]] + for image, predictions in zip(images, choices, strict=True)] + stages = [[dict(depth=0, predicted_xy=geometry.center_of(beam[0]['bounds']), + candidates=beam, predictions=predictions)] + for beam, predictions in zip(beams, choices, strict=True)] + for depth, (parent_count, next_width) in enumerate( + zip(strategy.beam_widths[:-1], strategy.beam_widths[1:], strict=True), start=1): + children, traces = [[] for _image in images], [[] for _image in images] + for rank in range(parent_count): + crops = [geometry.expand_bounds(beam[rank]['bounds'], image.size) + for image, beam in zip(images, beams, strict=True)] + encoded = [backend.encode(geometry.contextual_views(image, bounds, view_size=crop_size), crop_size) + for image, bounds in zip(images, crops, strict=True)] + choices = backend.score_many([(view, geometry.grid_questions(instruction, local=True)) + for view, instruction in zip(encoded, instructions, strict=True)]) + for index, (beam, bounds, view, predictions) in enumerate( + zip(beams, crops, encoded, choices, strict=True)): + parent = beam[rank] + children[index].extend(geometry.cell_candidates(bounds, predictions, parent['score'])) + traces[index].append(dict(parent_rank=rank, parent_bounds=parent['bounds'], + parent_score=parent['score'], crop_bounds=bounds, + predictions=predictions, encoding=backend.describe(view))) + beams = [sorted(candidates, key=lambda candidate: candidate['score'], reverse=True)[:next_width] + for candidates in children] + for target_stages, beam, target_traces in zip(stages, beams, traces, strict=True): + target_stages.append(dict(depth=depth, predicted_xy=geometry.center_of(beam[0]['bounds']), + candidates=beam, traces=target_traces)) + return [dict(predicted_xy=target_stages[-1]['predicted_xy'], stages=target_stages, + final_presence_probability=beam[0]['presence_probability'], + logical_language_groups=strategy.groups, logical_questions=strategy.questions) + for target_stages, beam in zip(stages, beams, strict=True)] + + +def expanded(bounds, image_size): + left, top, right, bottom = bounds + horizontal, vertical = (right - left) * .12, (bottom - top) * .12 + return [max(0, math.floor(left - horizontal)), max(0, math.floor(top - vertical)), + min(image_size[0], math.ceil(right + horizontal)), min(image_size[1], math.ceil(bottom + vertical))] + + +def center(bounds): + return [(bounds[0] + bounds[2]) / 2, (bounds[1] + bounds[3]) / 2] + + +def stage_diagnostics(stage, target): + point, bounds = target['center_xy'], stage['candidates'][0]['bounds'] + hit = inside_box(stage['predicted_xy'], target['bbox_xyxy']) + return dict(gt_center_in_best_cell=inside_box(point, bounds), + gt_center_in_beam=any(inside_box(point, cell['bounds']) for cell in stage['candidates']), + gt_center_in_expanded_beam=any(inside_box(point, expanded(cell['bounds'], target['image_size'])) + for cell in stage['candidates']), + gt_center_in_seen_crops=any(inside_box(point, trace['crop_bounds']) + for trace in stage.get('traces', [])), + cell_center_miss=inside_box(point, bounds) and not hit) + + +def evaluate(result, target): + for stage in result['stages']: + stage['error_px'] = math.dist(stage['predicted_xy'], target['center_xy']) + stage['point_inside_gt_box'] = inside_box(stage['predicted_xy'], target['bbox_xyxy']) + stage['diagnostics'] = stage_diagnostics(stage, target) + result['error_px'] = result['stages'][-1]['error_px'] + result['point_inside_gt_box'] = result['stages'][-1]['point_inside_gt_box'] + return result + + +def stage_metrics(rows): + return [dict(depth=depth, hits=sum(row['stages'][depth]['point_inside_gt_box'] for row in rows), + **{key: sum(row['stages'][depth]['diagnostics'][key] for row in rows) + for key in rows[0]['stages'][depth]['diagnostics']}) + for depth in range(len(rows[0]['stages']))] + + +def reconstructed_candidates(bounds, predictions, parent_score=0.): + if len(predictions) not in (2, 3): + raise ValueError('Expected two coarse or three crop questions') + for prediction, options in zip(predictions, [2, 4, 4] if len(predictions) == 3 else [4, 4], strict=True): + probabilities = prediction['probabilities'] + if (len(probabilities) != options or + any(not math.isfinite(value) or not 0 <= value <= 1 for value in probabilities) or + not math.isclose(sum(probabilities), 1., abs_tol=1e-4)): + raise ValueError('Invalid choice probabilities') + horizontal, vertical = predictions[-2:] + presence = predictions[0]['probabilities'][0] if len(predictions) == 3 else 1. + left, top, right, bottom = bounds + candidates = [] + for row in range(4): + for column in range(4): + probability = horizontal['probabilities'][column] * vertical['probabilities'][row] + cell = [left + (right - left) * column / 4, top + (bottom - top) * row / 4, + left + (right - left) * (column + 1) / 4, top + (bottom - top) * (row + 1) / 4] + candidates.append(dict(bounds=cell, column=column, row=row, + score=parent_score + math.log(max(probability, 1e-12)) + + math.log(max(presence, 1e-12)), presence_probability=presence)) + return sorted(candidates, key=lambda candidate: candidate['score'], reverse=True) + + +def close_values(actual, expected): + return len(actual) == len(expected) and all(math.isclose(value, reference, abs_tol=1e-6) + for value, reference in zip(actual, expected, strict=True)) + + +def audit_search(row, target, strategy): + stages = row['stages'] + if len(stages) != len(strategy.beam_widths): + raise ValueError(f'Wrong refinement depth: {row["id"]}') + beam = reconstructed_candidates([0, 0, *target['image_size']], stages[0]['predictions']) + for depth, (stage, width) in enumerate(zip(stages, strategy.beam_widths, strict=True)): + if depth: + traces = stage['traces'] + if len(traces) != len(previous): + raise ValueError(f'Wrong number of scored parents: {row["id"]}') + children = [] + for rank, (trace, parent) in enumerate(zip(traces, previous, strict=True)): + crop = expanded(parent['bounds'], target['image_size']) + if (trace['parent_rank'] != rank or not close_values(trace['parent_bounds'], parent['bounds']) or + not close_values(trace['crop_bounds'], crop) or + not math.isclose(trace['parent_score'], parent['score'], abs_tol=1e-6)): + raise ValueError(f'Crop mapping or parent score mismatch: {row["id"]}') + children.extend(reconstructed_candidates(crop, trace['predictions'], parent['score'])) + beam = sorted(children, key=lambda candidate: candidate['score'], reverse=True) + beam = beam[:width] + if stage['depth'] != depth or len(stage['candidates']) != width: + raise ValueError(f'Wrong stage width: {row["id"]}') + for actual, expected in zip(stage['candidates'], beam, strict=True): + if (actual['column'] != expected['column'] or actual['row'] != expected['row'] or + not close_values(actual['bounds'], expected['bounds']) or + not math.isclose(actual['score'], expected['score'], abs_tol=1e-6) or + not math.isclose(actual['presence_probability'], expected['presence_probability'], abs_tol=1e-6)): + raise ValueError(f'Beam ranking does not match saved probabilities: {row["id"]}') + point = center(beam[0]['bounds']) + if (not close_values(stage['predicted_xy'], point) or + stage['point_inside_gt_box'] != inside_box(point, target['bbox_xyxy']) or + not math.isclose(stage['error_px'], math.dist(point, target['center_xy']), abs_tol=1e-6) or + stage['diagnostics'] != stage_diagnostics(stage, target)): + raise ValueError(f'Stage coordinates or metrics mismatch: {row["id"]}') + previous = beam + if (not close_values(row['predicted_xy'], stages[-1]['predicted_xy']) or + not math.isclose(row['final_presence_probability'], previous[0]['presence_probability'], abs_tol=1e-6)): + raise ValueError(f'Final prediction does not match winning cell: {row["id"]}') + + +def audit_batches(rows, targets, batches, settings, summary): + strategy = STRATEGIES[settings['strategy']] + batch_size, backend = settings['batch_size'], settings['backend'] + expected_batches = [targets[offset:offset + batch_size] for offset in range(0, len(targets), batch_size)] + if len(batches) != len(expected_batches): + raise ValueError('Missing or duplicated batch ledger records') + by_id, totals = {row['id']: row for row in rows}, dict.fromkeys(COUNTER_KEYS, 0) + for index, (batch, selected) in enumerate(zip(batches, expected_batches, strict=True)): + sequence = language_sequence(backend, strategy, len(selected)) + if (batch['batch_index'] != index or batch['target_ids'] != [target['id'] for target in selected] or + batch['target_batch_size'] != len(selected) or batch['language_batch_sequence'] != sequence): + raise ValueError('Batch ledger ordering or tail size mismatch') + counters = batch['counters'] + for key in COUNTER_KEYS: + if type(counters[key]) is not int or counters[key] < 0: + raise ValueError('Invalid native forward counter') + totals[key] += counters[key] + selected_rows = [by_id[target['id']] for target in selected] + full_encodes = sum(not row['full_view_cache_hit'] and not row['full_view_reused_in_batch'] + for row in selected_rows) + expected_model = strategy.groups if backend == 'qwen' or len(selected) == 1 else 0 + if (counters['language_forward_calls'] != strategy.groups or + counters['model_forward_calls'] != expected_model or + counters['language_sequences'] != sum(sequence) or + counters['questions_scored'] != strategy.questions * len(selected) or + counters['visual_encoder_calls'] != full_encodes + (strategy.groups - 1) * len(selected)): + raise ValueError('Native forward counters do not match the experiment protocol') + for row, target in zip(selected_rows, selected, strict=True): + if (row['target_batch_index'] != index or row['target_batch_size'] != len(selected) or + row['counter_scope'] != 'target_batch_ledger' or + row['logical_language_groups'] != strategy.groups or row['logical_questions'] != strategy.questions): + raise ValueError('Invalid row-to-batch counter mapping') + if any(row.get(key) != value for key, value in target.items()): + raise ValueError(f'Prediction metadata differs from annotations: {target["id"]}') + if any(row[key] != settings[key] for key in ('backend', 'strategy', 'full_view_size', 'crop_view_size')): + raise ValueError('Prediction experiment configuration mismatch') + audit_search(row, target, strategy) + if any(summary[key] != value for key, value in totals.items()) or summary['batch_count'] != len(batches): + raise ValueError('Summary duplicated or omitted shared batch counters') + if summary['stage_metrics'] != stage_metrics(rows): + raise ValueError('Stage summary does not match independently recomputed metrics') + return totals diff --git a/PixelOne-Pro-35B-A3B/runtime/src/spatial_pro_experiments/fast.py b/PixelOne-Pro-35B-A3B/runtime/src/spatial_pro_experiments/fast.py new file mode 100644 index 0000000000000000000000000000000000000000..797531bb6cf1bcbe42002a525ffbaf4ef38caaec --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/spatial_pro_experiments/fast.py @@ -0,0 +1,289 @@ +"""Three native LM calls with packed Top-2 crops and image-only snapping.""" + +import copy +import math +from dataclasses import dataclass + +from PIL import Image, ImageDraw, ImageFont + +from qwen_spatial.common import inside_box +from spatial_pro_experiments.core import (COUNTER_KEYS, center, close_values, expanded, + stage_diagnostics, stage_metrics) + + +@dataclass(frozen=True) +class FastStrategy: + name: str + cells: tuple + groups: int = 5 + questions: int = 14 + calls: int = 3 + + def settings(self): + return dict(name=self.name, cells_per_axis=list(self.cells), beam_widths=[2, 2, 2], + parents_per_call=[1, 2, 2], refinement_rounds=2, crop_padding=.12, + nominal_axis_bins=math.prod(self.cells), snap_rule='nearest_anchor_inside_winning_cell') + + +FAST_STRATEGIES = {'packed3-444': FastStrategy('packed3-444', (4, 4, 4)), + 'packed3-488': FastStrategy('packed3-488', (4, 8, 8))} + + +def language_sequence(backend, size): + if backend not in ('videojev', 'qwen') or size < 1: + raise ValueError('Require videojev/qwen and a positive target batch size') + return [size, 2 * size, 2 * size] if backend == 'videojev' else [2 * size, 6 * size, 6 * size] + + +def grid_questions(geometry, instruction, cells, local=False): + questions = copy.deepcopy(geometry.grid_questions(instruction, local=local)) + if cells == 4: + return questions + if cells != 8: + raise ValueError('Only four/eight-way local choices are supported') + letters = 'ABCDEFGH' + questions[-2]['options'] = [f'{letter}. Column {letter}, column {index + 1} of {cells} from the left.' + for index, letter in enumerate(letters)] + questions[-1]['options'] = [f'{letter}. Row {index + 1}, row {index + 1} of {cells} from the top.' + for index, letter in enumerate(letters)] + return questions + + +def crop_canvas(image, bounds, cells, view_size, font_path): + if cells != 8 or type(view_size) is not int or view_size < 128: + raise ValueError('Eight-way grids require a fixed-size crop canvas') + source = image.crop(tuple(round(value) for value in bounds)) + scale = view_size / 768 + factor = min(720 / source.width, 692 / source.height) + size = (max(1, round(source.width * factor)), max(1, round(source.height * factor))) + content = source.resize(size, Image.Resampling.LANCZOS) + left, top = round((36 + (720 - content.width) // 2) * scale), round(58 * scale) + if view_size != 768: + content = source.resize((max(1, round(content.width * scale)), max(1, round(content.height * scale))), + Image.Resampling.LANCZOS) + canvas = Image.new('RGB', (view_size, view_size), 'white') + canvas.paste(content, (left, top)) + font = ImageFont.truetype(str(font_path), round(21 * scale)) + ImageDraw.Draw(canvas).text((round(20 * scale), round(7 * scale)), + 'ENLARGED CROP - answer for this 8x8 grid', fill='#142c48', font=font) + overlay = Image.new('RGBA', canvas.size) + draw = ImageDraw.Draw(overlay) + for divider in range(1, cells): + horizontal, vertical = left + content.width * divider / cells, top + content.height * divider / cells + draw.line((horizontal, top, horizontal, top + content.height), fill=(126, 52, 191, 155), + width=max(1, round(2 * scale))) + draw.line((left, vertical, left + content.width, vertical), fill=(0, 145, 168, 155), + width=max(1, round(2 * scale))) + canvas = Image.alpha_composite(canvas.convert('RGBA'), overlay).convert('RGB') + draw = ImageDraw.Draw(canvas) + for index, letter in enumerate('ABCDEFGH'): + horizontal = left + content.width * (index + .5) / cells + vertical = top + content.height * (index + .5) / cells + draw.text((horizontal - 8 * scale, top - 27 * scale), letter, fill='#7135b0', font=font) + draw.text((left - 24 * scale, vertical - 11 * scale), str(index + 1), fill='#007f98', font=font) + draw.rectangle((left, top, left + content.width, top + content.height), outline='#738090', + width=max(1, round(scale))) + return canvas + + +def contextual_views(geometry, image, bounds, cells, view_size): + if cells == 4: + return geometry.contextual_views(image, bounds, view_size=view_size) + renderer = getattr(geometry, 'view_canvas', None) or geometry.render_view + font_path = getattr(geometry, 'FONT_PATH', None) or geometry.FONT + overview = image.copy() + ImageDraw.Draw(overview).rectangle(bounds, outline='#f38d16', width=max(3, image.width // 180)) + full = renderer(overview, title='FULL SCREEN - orange box is the crop', view_size=view_size) + local = crop_canvas(image, bounds, cells, view_size, font_path) + return [full, full, local, local] + + +def cell_candidates(bounds, predictions, cells, parent_score=0.): + expected = [2, cells, cells] if len(predictions) == 3 else [cells, cells] + if len(predictions) not in (2, 3): + raise ValueError('Expected two coarse or three crop questions') + for prediction, count in zip(predictions, expected, strict=True): + values = prediction['probabilities'] + if (len(values) != count or any(not math.isfinite(value) or not 0 <= value <= 1 for value in values) or + not math.isclose(sum(values), 1., abs_tol=1e-4)): + raise ValueError('Invalid choice probabilities or grid size') + horizontal, vertical = predictions[-2:] + presence = predictions[0]['probabilities'][0] if len(predictions) == 3 else 1. + left, top, right, bottom = bounds + result = [] + for row_index in range(cells): + for column in range(cells): + probability = horizontal['probabilities'][column] * vertical['probabilities'][row_index] + cell = [left + (right - left) * column / cells, top + (bottom - top) * row_index / cells, + left + (right - left) * (column + 1) / cells, top + (bottom - top) * (row_index + 1) / cells] + result.append(dict(bounds=cell, column=column, row=row_index, presence_probability=presence, + score=parent_score + math.log(max(probability, 1e-12)) + + math.log(max(presence, 1e-12)))) + return sorted(result, key=lambda candidate: candidate['score'], reverse=True) + + +def snap(point, cell, candidates, fraction): + if not math.isfinite(fraction) or not 0 <= fraction <= .5: + raise ValueError('Snap radius must be between zero and half the cell diagonal') + selected = [] + for index, candidate in enumerate(candidates): + anchor = center(candidate['bounds']) + if inside_box(anchor, cell): + selected.append((math.dist(point, anchor), index, anchor)) + radius = fraction * math.hypot(cell[2] - cell[0], cell[3] - cell[1]) + if selected: + distance, index, anchor = min(selected, key=lambda item: (item[0], item[1])) + if distance <= radius: + return dict(predicted_xy=anchor, snap_candidate_index=index, snap_distance_px=distance, + snap_changed=not close_values(point, anchor), snap_max_fraction=fraction) + return dict(predicted_xy=list(point), snap_candidate_index=None, snap_distance_px=0., + snap_changed=False, snap_max_fraction=fraction) + + +def refine_batch(backend, images, instructions, full_views, candidates, strategy, crop_size, fraction): + count = len(images) + if not count or any(len(values) != count for values in (instructions, full_views, candidates)): + raise ValueError('Provide matching nonempty images, instructions, views and candidates') + geometry = backend.geometry + predictions = backend.score_many([(view, grid_questions(geometry, instruction, strategy.cells[0])) + for view, instruction in zip(full_views, instructions, strict=True)]) + beams = [cell_candidates([0, 0, *image.size], choices, strategy.cells[0])[:2] + for image, choices in zip(images, predictions, strict=True)] + stages = [[dict(depth=0, cells_per_axis=strategy.cells[0], predicted_xy=center(beam[0]['bounds']), + candidates=beam, predictions=choices)] + for beam, choices in zip(beams, predictions, strict=True)] + for depth, cells in enumerate(strategy.cells[1:], start=1): + requests, records = [], [] + for rank in range(2): + for index, (image, instruction, beam) in enumerate(zip(images, instructions, beams, strict=True)): + parent = beam[rank] + bounds = expanded(parent['bounds'], image.size) + encoded = backend.encode(contextual_views(geometry, image, bounds, cells, crop_size), crop_size) + requests.append((encoded, grid_questions(geometry, instruction, cells, local=True))) + records.append((index, dict(parent_rank=rank, parent_bounds=parent['bounds'], + parent_score=parent['score'], crop_bounds=bounds, + encoding=backend.describe(encoded)))) + choices = backend.score_many(requests) + children, traces = [[] for _image in images], [[] for _image in images] + for (index, trace), predictions in zip(records, choices, strict=True): + trace['predictions'] = predictions + children[index].extend(cell_candidates(trace['crop_bounds'], predictions, cells, trace['parent_score'])) + traces[index].append(trace) + beams = [sorted(items, key=lambda candidate: candidate['score'], reverse=True)[:2] for items in children] + for target_stages, beam, trace in zip(stages, beams, traces, strict=True): + target_stages.append(dict(depth=depth, cells_per_axis=cells, predicted_xy=center(beam[0]['bounds']), + candidates=beam, traces=trace)) + results = [] + for target_stages, beam, proposals in zip(stages, beams, candidates, strict=True): + point = target_stages[-1]['predicted_xy'] + results.append(dict(stages=target_stages, unsnapped_xy=point, + final_presence_probability=beam[0]['presence_probability'], + logical_language_groups=strategy.groups, logical_questions=strategy.questions, + **snap(point, beam[0]['bounds'], proposals, fraction))) + return results + + +def evaluate(row, target): + for stage in row['stages']: + stage['error_px'] = math.dist(stage['predicted_xy'], target['center_xy']) + stage['point_inside_gt_box'] = inside_box(stage['predicted_xy'], target['bbox_xyxy']) + stage['diagnostics'] = stage_diagnostics(stage, target) + row['unsnapped_point_inside_gt_box'] = inside_box(row['unsnapped_xy'], target['bbox_xyxy']) + row['error_px'] = math.dist(row['predicted_xy'], target['center_xy']) + row['point_inside_gt_box'] = inside_box(row['predicted_xy'], target['bbox_xyxy']) + return row + + +def audit_search(row, target, settings, proposals): + strategy = FAST_STRATEGIES[settings['strategy']] + if len(row['stages']) != strategy.calls: + raise ValueError('Wrong search depth') + previous = None + for depth, (stage, cells) in enumerate(zip(row['stages'], strategy.cells, strict=True)): + if not depth: + beam = cell_candidates([0, 0, *target['image_size']], stage['predictions'], cells)[:2] + else: + if len(stage['traces']) != 2: + raise ValueError('Both packed Top-2 parents must be scored') + children = [] + for rank, (trace, parent) in enumerate(zip(stage['traces'], previous, strict=True)): + bounds = expanded(parent['bounds'], target['image_size']) + if (trace['parent_rank'] != rank or not close_values(trace['parent_bounds'], parent['bounds']) or + not close_values(trace['crop_bounds'], bounds) or + not math.isclose(trace['parent_score'], parent['score'], abs_tol=1e-6)): + raise ValueError('Packed crop mapping mismatch') + children.extend(cell_candidates(bounds, trace['predictions'], cells, parent['score'])) + beam = sorted(children, key=lambda candidate: candidate['score'], reverse=True)[:2] + if stage['depth'] != depth or stage['cells_per_axis'] != cells or len(stage['candidates']) != 2: + raise ValueError('Wrong stage grid or beam width') + for actual, expected in zip(stage['candidates'], beam, strict=True): + if (actual['column'] != expected['column'] or actual['row'] != expected['row'] or + not close_values(actual['bounds'], expected['bounds']) or + not math.isclose(actual['score'], expected['score'], abs_tol=1e-6) or + not math.isclose(actual['presence_probability'], expected['presence_probability'], abs_tol=1e-6)): + raise ValueError('Beam winner does not match saved probabilities') + point = center(beam[0]['bounds']) + if (not close_values(stage['predicted_xy'], point) or + stage['point_inside_gt_box'] != inside_box(point, target['bbox_xyxy']) or + not math.isclose(stage['error_px'], math.dist(point, target['center_xy']), abs_tol=1e-6) or + stage['diagnostics'] != stage_diagnostics(stage, target)): + raise ValueError('Stage coordinates or metrics mismatch') + previous = beam + point = center(previous[0]['bounds']) + if (not close_values(row['unsnapped_xy'], point) or + not math.isclose(row['final_presence_probability'], previous[0]['presence_probability'], abs_tol=1e-6)): + raise ValueError('Unsnapped winner mismatch') + expected = snap(point, previous[0]['bounds'], proposals, settings['snap_max_fraction']) + for key, value in expected.items(): + if key == 'predicted_xy': + if not close_values(row[key], value): + raise ValueError('Snapped click differs from the image-only rule') + elif row[key] != value: + raise ValueError('Snap provenance mismatch') + if row['unsnapped_point_inside_gt_box'] != inside_box(point, target['bbox_xyxy']): + raise ValueError('Unsnapped click metric mismatch') + + +def audit_batches(rows, targets, batches, settings, summary, proposals): + strategy = FAST_STRATEGIES[settings['strategy']] + size, backend = settings['batch_size'], settings['backend'] + selected_batches = [targets[offset:offset + size] for offset in range(0, len(targets), size)] + if len(batches) != len(selected_batches): + raise ValueError('Missing or duplicated batch ledger') + by_id, totals = {row['id']: row for row in rows}, dict.fromkeys(COUNTER_KEYS, 0) + for index, (batch, selected) in enumerate(zip(batches, selected_batches, strict=True)): + sequence = language_sequence(backend, len(selected)) + if (batch['batch_index'] != index or batch['target_ids'] != [target['id'] for target in selected] or + batch['target_batch_size'] != len(selected) or batch['language_batch_sequence'] != sequence): + raise ValueError('Packed forward sequence or tail size mismatch') + counters = batch['counters'] + selected_rows = [by_id[target['id']] for target in selected] + full_encodes = sum(not row['full_view_cache_hit'] and not row['full_view_reused_in_batch'] + for row in selected_rows) + model_calls = strategy.calls if backend == 'qwen' else int(len(selected) == 1) + expected = dict(language_forward_calls=strategy.calls, model_forward_calls=model_calls, + visual_encoder_calls=full_encodes + 4 * len(selected), + language_sequences=sum(sequence), questions_scored=strategy.questions * len(selected)) + if counters != expected: + raise ValueError('Native hooks disagree with the three-call/five-group protocol') + for key in COUNTER_KEYS: + if type(counters[key]) is not int or counters[key] < 0: + raise ValueError('Invalid native counter') + totals[key] += counters[key] + for row, target in zip(selected_rows, selected, strict=True): + if (row['target_batch_index'] != index or row['target_batch_size'] != len(selected) or + row['counter_scope'] != 'target_batch_ledger' or row['logical_language_groups'] != 5 or + row['logical_questions'] != 14): + raise ValueError('Invalid row-to-batch mapping') + if any(row.get(key) != value for key, value in target.items()): + raise ValueError('Prediction metadata differs from annotations') + if any(row[key] != settings[key] for key in ('backend', 'strategy', 'full_view_size', 'crop_view_size')): + raise ValueError('Prediction configuration mismatch') + audit_search(row, target, settings, proposals[target['id']]['candidates']) + if any(summary[key] != value for key, value in totals.items()) or summary['batch_count'] != len(batches): + raise ValueError('Summary duplicated or omitted native calls') + if summary['stage_metrics'] != stage_metrics(rows): + raise ValueError('Stage summary mismatch') + if summary['unsnapped_hits'] != sum(row['unsnapped_point_inside_gt_box'] for row in rows): + raise ValueError('Unsnapped summary mismatch') + return totals diff --git a/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/__init__.py b/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e8341ed33aa2ce62e1e277060ae135795a65c73 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/__init__.py @@ -0,0 +1 @@ +"""Hugging Face configuration, inference runtime and portable checkpoint files.""" diff --git a/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/configuration_videojev.py b/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/configuration_videojev.py new file mode 100644 index 0000000000000000000000000000000000000000..a1636d85103c78ab2f8537be9a20e70b866a81dd --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/configuration_videojev.py @@ -0,0 +1,35 @@ +"""VideoJev configuration with the complete native Qwen backbone configuration.""" +from transformers import AutoConfig, PreTrainedConfig + + +class VideoJevConfig(PreTrainedConfig): + model_type = 'videojev' + sub_configs = {'backbone_config': AutoConfig} + + def __init__(self, backbone_config=None, head_dim=512, head_logit_scale=10., + decide_token_id=None, option_end_token_id=None, decoder=None, + checkpoint_id=None, **kwargs): + native = (backbone_config.to_dict() if isinstance(backbone_config, PreTrainedConfig) + else dict(backbone_config or {'model_type': 'qwen3_5'})) + model_type = native.pop('model_type') + if model_type not in ('qwen3_5', 'qwen3_5_moe'): + raise ValueError('VideoJev requires a native Qwen3.5 dense or MoE backbone') + self.backbone_config = AutoConfig.for_model(model_type, **native) + super().__init__(**kwargs) + self.head_dim = head_dim + self.head_logit_scale = head_logit_scale + self.decide_token_id = decide_token_id + self.option_end_token_id = option_end_token_id + self.decoder = dict(threshold=.25, smooth=1, postprocess='round_repair_clamp_v1') + if decoder is not None: + self.decoder.update(decoder) + if not 0 < self.decoder['threshold'] < 1: + raise ValueError('threshold must be between 0 and 1') + self.checkpoint_id = checkpoint_id + self.architectures = ['VideoJevForVideoUnderstanding'] + self.auto_map = {'AutoConfig': 'configuration_videojev.VideoJevConfig', + 'AutoModel': 'modeling_videojev.VideoJevForVideoUnderstanding'} + self.tie_word_embeddings = False + + def get_text_config(self, decoder=False, encoder=False): + return self.backbone_config.get_text_config(decoder=decoder, encoder=encoder) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/modeling_videojev.py b/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/modeling_videojev.py new file mode 100644 index 0000000000000000000000000000000000000000..63fceada17c80bb4cc9ba2f4290ce448e1c06f37 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/modeling_videojev.py @@ -0,0 +1,198 @@ +"""Native causal Qwen video features with the trained VideoJev decision head.""" +import contextlib +import os +from functools import wraps +from dataclasses import dataclass + +import torch +from torch import nn +from torch.nn import functional as F +from transformers import PreTrainedModel +from transformers.utils import ModelOutput +from transformers.models.qwen3_5.modeling_qwen3_5 import Qwen3_5Model, Qwen3_5DecoderLayer +from transformers.models.qwen3_5_moe.modeling_qwen3_5_moe import Qwen3_5MoeModel, Qwen3_5MoeDecoderLayer + +from .configuration_videojev import VideoJevConfig +from .processing_videojev import prepare_query_groups, prepare_video, format_predictions +from .videojev_moe import install_fp32_routers, install_xtuner_grouped_experts + + +def visual_grad_context(function): + @wraps(function) + def wrapped(self,*args,**kwargs): + enabled=getattr(self,'train_vision',False) and torch.is_grad_enabled() + with torch.inference_mode(not enabled): + return function(self,*args,**kwargs) + return wrapped + + +class AttentionOnlyDecoderLayer(Qwen3_5DecoderLayer): + def forward(self, hidden_states, position_embeddings, attention_mask=None, + position_ids=None, past_key_values=None, **kwargs): + residual = hidden_states + hidden_states, _ = self.self_attn(hidden_states=self.input_layernorm(hidden_states), + position_embeddings=position_embeddings, attention_mask=attention_mask, + position_ids=position_ids, past_key_values=past_key_values, **kwargs) + return residual + hidden_states + + +class AttentionOnlyMoeDecoderLayer(Qwen3_5MoeDecoderLayer): + forward = AttentionOnlyDecoderLayer.forward + + +class CosineDecisionHead(nn.Module): + def __init__(self, hidden, dimension, scale): + super().__init__() + self.q = nn.Linear(hidden, dimension) + self.k = nn.Linear(hidden, dimension) + self.bias = nn.Parameter(torch.zeros(())) + self.scale = float(scale) + + def forward(self, pairs, queries): + keys = F.linear(pairs.float(), self.k.weight.float(), self.k.bias.float()) + query = F.linear(queries.float(), self.q.weight.float(), self.q.bias.float()) + keys = F.normalize(keys, dim=-1, eps=1e-6) + query = F.normalize(query, dim=-1, eps=1e-6) + return torch.einsum('qkd,qd->qk', keys, query) * self.scale + self.bias.float() + + +@dataclass +class VideoJevOutput(ModelOutput): + logits: torch.Tensor | None = None + probabilities: torch.Tensor | None = None + score_mask: torch.Tensor | None = None + + +class VideoJevForVideoUnderstanding(PreTrainedModel): + config_class = VideoJevConfig + base_model_prefix = 'backbone' + supports_gradient_checkpointing = True + _supports_flash_attn = True + _supports_sdpa = True + _no_split_modules = ['Qwen3_5DecoderLayer', 'Qwen3_5MoeDecoderLayer', + 'AttentionOnlyDecoderLayer', 'AttentionOnlyMoeDecoderLayer', + 'Qwen3_5VisionBlock', 'Qwen3_5MoeVisionBlock'] + _keep_in_fp32_modules = ['head'] + _is_stateful = True + + def __init__(self, config): + super().__init__(config) + os.environ['FLA_INTRACARD_CP'] = '0' + native = config.backbone_config + native._attn_implementation = config._attn_implementation + native.text_config._attn_implementation = config._attn_implementation + native.vision_config._attn_implementation = config._attn_implementation + self.is_moe = native.model_type == 'qwen3_5_moe' + self.backbone = (Qwen3_5MoeModel if self.is_moe else Qwen3_5Model)(native) + last = self.backbone.language_model.layers[-1] + if last.block_type != 'full_attention': + raise ValueError('Expected a final full-attention decoder layer') + last.__class__ = AttentionOnlyMoeDecoderLayer if self.is_moe else AttentionOnlyDecoderLayer + del last.mlp + del last.post_attention_layernorm + self.head = CosineDecisionHead(native.text_config.hidden_size, config.head_dim, config.head_logit_scale) + if self.is_moe: + install_fp32_routers(self.backbone.language_model) + self.post_init() + + def prepare_for_inference(self, *, xtuner_experts=False): + """Keep native BF16 language weights and perform sensitive scoring in FP32.""" + self.head.float() + self.backbone.visual.float() + if self.is_moe: + for module in self.backbone.language_model.modules(): + if getattr(module, 'timejev_router_compute_dtype', None) == 'float32': + module.float() + if xtuner_experts: + install_xtuner_grouped_experts(self.backbone.language_model) + return self.eval().requires_grad_(False) + + def get_input_embeddings(self): + return self.backbone.get_input_embeddings() + + @visual_grad_context + def encode_video(self, pixel_values_videos, video_grid_thw, groups_per_chunk=16): + visual = self.backbone.visual + device = next(visual.parameters()).device + if video_grid_thw.shape[0] != 1: + raise ValueError('Encode one complete video at a time') + t, h, w = video_grid_thw[0].tolist() + if len(pixel_values_videos) != t*h*w: + raise ValueError('Video grid and native pixel patches disagree') + output = [] + amp = torch.autocast('cuda', dtype=torch.bfloat16) if device.type == 'cuda' else contextlib.nullcontext() + with amp: + for start in range(0, t, groups_per_chunk): + count = min(groups_per_chunk, t-start) + pixels = pixel_values_videos[start*h*w:(start+count)*h*w].to(device) + grid = torch.tensor([[count, h, w]], device=device) + output.append(visual(pixels, grid_thw=grid, return_dict=True).pooler_output) + return torch.cat(output) + + def forward(self, input_ids, mm_token_type_ids, video_grid_thw, pair_indices, + query_indices, score_mask, decision_tasks, visual_features=None, + pixel_values_videos=None, attention_mask=None, **kwargs): + if input_ids.shape[0] != 1 or video_grid_thw.shape[0] != 1: + raise ValueError('Each call owns one complete video and its query group') + if attention_mask is not None and not attention_mask.bool().all(): + raise ValueError('Pass an unpadded query group') + if visual_features is None: + if pixel_values_videos is None: + raise ValueError('Supply native visual features or native pixel patches') + visual_features = self.encode_video(pixel_values_videos, video_grid_thw) + device = self.get_input_embeddings().weight.device + input_ids, mm_token_type_ids = input_ids.to(device), mm_token_type_ids.to(device) + grid = video_grid_thw.to(device) + pairs, queries, mask = pair_indices.to(device), query_indices.to(device), score_mask.to(device) + tasks = torch.as_tensor(decision_tasks, device=device) + if tasks.shape != queries.shape or not ((tasks == 0) | (tasks == 1)).all(): + raise ValueError('decision_tasks must contain one grounding(0)/choice(1) value per question') + amp = torch.autocast('cuda', dtype=torch.bfloat16) if device.type == 'cuda' else contextlib.nullcontext() + with amp: + embeds = self.get_input_embeddings()(input_ids) + slots = input_ids == self.config.backbone_config.video_token_id + if int(slots.sum()) != len(visual_features): + raise ValueError('Every native video token needs exactly one feature') + embeds = embeds.masked_scatter(slots[..., None].expand_as(embeds), visual_features.to(embeds)) + if self.is_moe: + positions, _ = self.backbone.get_rope_index(input_ids, mm_token_type_ids, video_grid_thw=grid) + else: + positions = self.backbone.compute_3d_position_ids(input_ids=input_ids, + inputs_embeds=embeds, video_grid_thw=grid, attention_mask=None, + mm_token_type_ids=mm_token_type_ids) + n = input_ids.shape[1] + native = dict(inputs_embeds=embeds, position_ids=positions, use_cache=False) + if device.type == 'cuda': + cu = torch.tensor([0, n], device=device, dtype=torch.int32) + native.update(attention_mask={'full_attention': None, 'linear_attention': None}, + cu_seq_lens_q=cu, cu_seq_lens_k=cu, max_length_q=n, max_length_k=n, + seq_idx=torch.zeros((1, n), device=device, dtype=torch.int32)) + hidden = self.backbone.language_model(**native).last_hidden_state[0] + with torch.autocast(device_type=device.type, enabled=False): + logits = self.head(hidden[pairs], hidden[queries]) + valid = logits.masked_fill(~mask, -torch.inf) + probabilities = torch.where((tasks == 1)[:, None], valid.softmax(-1), logits.sigmoid()) * mask + return VideoJevOutput(logits=logits, probabilities=probabilities, score_mask=mask) + + @torch.inference_mode() + def predict_video(self, processor, video, questions, *, fps=2., max_frames=2048, context=262144, threshold=None): + """Return ordered QA answers / grounding intervals from an original video file.""" + if threshold is not None and not 0 < threshold < 1: + raise ValueError('threshold must be between 0 and 1') + pixels, record = prepare_video(processor, video, fps=fps, max_frames=max_frames, context=context) + features = self.encode_video(pixels, torch.tensor([record['grid_thw']])) + return self.predict_features(processor, features, record, questions, context=context, threshold=threshold) + + @torch.inference_mode() + def predict_features(self, processor, features, record, questions, *, context=262144, threshold=None): + """Use the configured grounding threshold unless this call overrides it.""" + decoder = dict(self.config.decoder) + if threshold is not None: + decoder['threshold'] = threshold + if not 0 < decoder['threshold'] < 1: + raise ValueError('threshold must be between 0 and 1') + results = [] + for batch, rows in prepare_query_groups(processor, record, questions, context): + output = self(**batch, visual_features=features) + results.extend(format_predictions(output, rows, record, decoder)) + return results diff --git a/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/processing_videojev.py b/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/processing_videojev.py new file mode 100644 index 0000000000000000000000000000000000000000..46cc1989f34bbfad78ea36b3ec52334ffc8c257f --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/processing_videojev.py @@ -0,0 +1,156 @@ +"""Canonical VideoJev prompts, intact query groups, and video preprocessing.""" +import math +import re + +import numpy as np +import torch +from transformers.video_utils import VideoMetadata + +from .videojev_temporal import pair_timeline, decode +from .videojev_video import read_video + +DECIDE = '<|decide|>' +OPTION_END = '<|option_end|>' + + +def suffix(row, stamps): + task = row.get('task', 'grounding') + if task not in ('grounding', 'choice'): + raise ValueError('task must be grounding or choice') + for text in [row['query'], *row.get('options', [])]: + if not isinstance(text, str) or not text.strip() or '<|' in text: + raise ValueError('Questions/options must be nonempty text without control tokens') + if task == 'choice' and len(row.get('options', [])) < 2: + raise ValueError('Choice questions need at least two options') + instruction = 'temporal grounding' if task == 'grounding' else 'single-choice video question answering' + text = f'\nTask: {instruction}\nQuestion: {row["query"]}\nOptions:\n' + candidates = stamps if task == 'grounding' else row['options'] + return text + ''.join(value + OPTION_END + '\n' for value in candidates) + DECIDE + + +def native_inputs(processor, record, rows): + grid = record['grid_thw'] + meta = VideoMetadata(total_num_frames=record['frames'], + fps=record.get('effective_fps', record['fps']), frames_indices=list(range(record['frames']))) + replacement = processor.replace_video_token(dict(video_grid_thw=np.asarray([[grid[0], 2, 2]]), + video_metadata=[meta]), video_idx=0) + stamps = re.findall(r'<[0-9]+\.[0-9] seconds>', replacement) + raw_times = processor._calculate_timestamps(list(range(record['frames'])), meta.fps, 2) + if len(stamps) != grid[0] or not np.allclose(raw_times, record['score_times'], rtol=1e-10, atol=1e-8): + raise ValueError('Timestamp candidates do not match native video midpoints') + texts = [] + for i, row in enumerate(rows): + content = ([dict(type='video', video='provided_in_memory')] if i == 0 else []) + content += [dict(type='text', text=suffix(row, stamps))] + text = processor.apply_chat_template([dict(role='user', content=content)], + tokenize=False, add_generation_prompt=False) + if i == 0: + replaced, _ = processor.get_text_with_replacements([text], [], [replacement], []) + value = processor(text=replaced, return_tensors='pt') + spatial = grid[1] * grid[2] // 4 + slots = value['input_ids'][0] == processor.video_token_id + if int(slots.sum()) != grid[0] or record['tokens'] != grid[0]*spatial: + raise ValueError('Native grid/token count mismatch') + repeats = torch.ones(value['input_ids'].shape[1], dtype=torch.long) + repeats[slots] = spatial + first_ids = torch.repeat_interleave(value['input_ids'], repeats, dim=1) + first_types = torch.repeat_interleave(value['mm_token_type_ids'], repeats, dim=1) + else: + texts.append(torch.tensor([processor.tokenizer.encode(text, add_special_tokens=False)])) + return torch.cat([first_ids, *texts], dim=1), torch.cat([first_types, *[torch.zeros_like(t) for t in texts]], dim=1) + + +def prepare_query_groups(processor, record, questions, context): + if not questions or context < 64: + raise ValueError('Provide questions and a context of at least 64 tokens') + if len({q.get('id', i) for i, q in enumerate(questions)}) != len(questions): + raise ValueError('Question IDs must be unique') + # Query lengths are computed with the exact native tokenizer. No labels enter + # this function, and no answer history is carried from one group to the next. + start = 0 + decide_id = processor.tokenizer.convert_tokens_to_ids(DECIDE) + option_id = processor.tokenizer.convert_tokens_to_ids(OPTION_END) + while start < len(questions): + end = start + 1 + ids, types = native_inputs(processor, record, questions[start:end]) + if (ids.shape[1]+63)//64*64 > context: + raise ValueError(f'A complete query exceeds context; no question was skipped: {start}') + while end < len(questions): + candidate_ids, candidate_types = native_inputs(processor, record, questions[start:end+1]) + if (candidate_ids.shape[1]+63)//64*64 > context: + break + ids, types = candidate_ids, candidate_types + end += 1 + rows = questions[start:end] + query_indices = (ids[0] == decide_id).nonzero().flatten() + option_indices = (ids[0] == option_id).nonzero().flatten() + counts = [len(row['options']) if row.get('task') == 'choice' else record['grid_thw'][0] for row in rows] + if len(query_indices) != len(rows) or len(option_indices) != sum(counts): + raise ValueError('Incomplete decision/candidate markers') + pairs = torch.zeros((len(rows), max(counts)), dtype=torch.long) + mask = torch.zeros_like(pairs, dtype=torch.bool) + offset, previous = 0, -1 + for i, count in enumerate(counts): + selected = option_indices[offset:offset+count] + if not ((selected > previous) & (selected < query_indices[i])).all(): + raise ValueError('Candidate readouts cross query boundaries') + pairs[i, :count], mask[i, :count] = selected, True + previous = query_indices[i] + offset += count + yield dict(input_ids=ids, mm_token_type_ids=types, + video_grid_thw=torch.tensor([record['grid_thw']]), pair_indices=pairs, + query_indices=query_indices, score_mask=mask, + decision_tasks=torch.tensor([int(row.get('task') == 'choice') for row in rows])), rows + start = end + + +def prepare_video(processor, path, *, fps=2., max_frames=2048, context=262144): + import av + from transformers.models.qwen3_vl.video_processing_qwen3_vl import smart_resize + with av.open(str(path)) as container: + stream = container.streams.video[0] + duration = float(stream.duration * stream.time_base) if stream.duration is not None else container.duration/1e6 + sample = read_video(dict(video_path=str(path), duration=duration), fps, max_frames=max_frames) + n, height, width, _ = sample['video'].shape + vp = processor.video_processor + budget = context * 4 // 5 + def geometry(cap): + h, w = smart_resize(n, height, width, temporal_factor=vp.temporal_patch_size, + factor=vp.patch_size*vp.merge_size, min_pixels=vp.size['shortest_edge'], max_pixels=n*cap) + return h, w, (n+1)//2*(h//32)*(w//32) + low, high = max(1024, math.ceil(vp.size['shortest_edge']/n)), 640*640 + if geometry(low)[2] > budget: + raise ValueError('Complete video cannot fit the context at minimum native resolution') + while low < high: + mid = (low+high+1)//2 + if geometry(mid)[2] <= budget: + low = mid + else: + high = mid-1 + meta = VideoMetadata(total_num_frames=n, fps=sample['fps'], frames_indices=list(range(n))) + native = vp(videos=[sample['video']], video_metadata=[meta], do_sample_frames=False, + size=dict(shortest_edge=vp.size['shortest_edge'], longest_edge=n*low), return_tensors='pt') + grid = native['video_grid_thw'][0].tolist() + times, bounds = pair_timeline(sample['times'], sample['sampled_duration']) + record = dict(frames=n, fps=sample['fps'], grid_thw=grid, tokens=int(np.prod(grid))//4, + score_times=times.tolist(), score_bounds=bounds.tolist(), sampled_duration=sample['sampled_duration']) + return native['pixel_values_videos'], record + + +def format_predictions(output, rows, record, decoder): + results = [] + for i, row in enumerate(rows): + count = int(output.score_mask[i].sum()) + logits = output.logits[i, :count].float().cpu().tolist() + probabilities = output.probabilities[i, :count].float().cpu().tolist() + value = dict(id=row.get('id', i), task=row.get('task', 'grounding'), + probabilities=probabilities) + if row.get('task') == 'choice': + answer = int(np.argmax(probabilities)) + value.update(answer_index=answer, answer=row['options'][answer]) + else: + value['interval'] = decode(logits, record['score_times'], record['sampled_duration'], + decoder['threshold'], decoder['smooth'], bounds=record['score_bounds'], + postprocess=decoder['postprocess']) + results.append(value) + return results diff --git a/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/videojev_moe.py b/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/videojev_moe.py new file mode 100644 index 0000000000000000000000000000000000000000..e49dd5cc44de7ba708ca6a9202c8fa2d15da4e2d --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/videojev_moe.py @@ -0,0 +1,148 @@ +"""Instance-local XTuner grouped experts for the Qwen3.6 RGB experiment. + +Qwen3.6-35B-A3B uses the official ``Qwen3_5Moe`` architecture. Its +router math, shared expert and parameter names are deliberately preserved. +Routed experts use XTuner's training grouped GEMMs, including input/weight +backward kernels. Router matmul and probabilities follow XTuner's FP32 policy. +Importing this module never patches Transformers or the existing dense 4B model. +""" +from __future__ import annotations + +from functools import lru_cache +from types import MethodType + +import torch +from torch.nn import functional as F + + +def fp32_router_forward(self, hidden_states): + """HF top-k math with XTuner FP32 routing, even inside outer BF16 AMP. + + Converting inputs with .float() alone would still let autocast downcast + F.linear. Both logits and normalized top-k weights must retain FP32; + expert matmuls remain BF16 and no capacity or routing objective is added. + """ + hidden_states = hidden_states.reshape(-1, self.hidden_dim) + with torch.autocast(device_type=hidden_states.device.type, enabled=False): + logits = F.linear(hidden_states.float(), self.weight.float()) + probabilities = F.softmax(logits, dtype=torch.float32, dim=-1) + weights, indices = torch.topk(probabilities, self.top_k, dim=-1) + weights = weights / weights.sum(dim=-1, keepdim=True) + return logits, weights, indices + + +def install_fp32_routers(model): + """Change only this model's native routed-expert gate instances.""" + from transformers.models.qwen3_5_moe.modeling_qwen3_5_moe import Qwen3_5MoeTopKRouter + routers = [module for module in model.modules() if isinstance(module, Qwen3_5MoeTopKRouter)] + if not routers: + raise ValueError('No Qwen3_5MoeTopKRouter found in the selected model') + for index, module in enumerate(routers): + module.forward = MethodType(fp32_router_forward, module) + module.timejev_router_compute_dtype = 'float32' + return len(routers) + + +@lru_cache(maxsize=1) +def _xtuner_ops(): + try: + from xtuner.v1.ops.moe.cuda import ( + cuda_token_permute, + cuda_token_unpermute, + triton_group_gemm, + ) + except (ImportError, OSError) as exc: + raise RuntimeError( + 'Qwen3.6 MoE requires the XTuner CUDA grouped-GEMM backend. ' + 'Source scripts/env_qwen36.sh and expose the tested XTuner checkout ' + '(set XTUNER_ROOT) with Torch 2.8/CUDA 12.8 and ' + 'Triton 3.4. This experiment never falls back to an expert loop.' + ) from exc + if (getattr(cuda_token_permute, '__name__', None) != 'cuda_token_permute' + or getattr(cuda_token_unpermute, '__name__', None) != 'cuda_token_unpermute'): + raise RuntimeError( + 'XTuner selected its torch token-permute fallback because the compiled ' + 'grouped_gemm CUDA extension is unavailable. Install the pinned Qwen3.6 ' + 'extension in .deps-qwen36 and source scripts/env_qwen36.sh; this training ' + 'path requires the fast CUDA permute/unpermute backend.' + ) + return triton_group_gemm, cuda_token_permute, cuda_token_unpermute + + + + + + + + +def xtuner_experts_forward(self, hidden_states, top_k_index, top_k_weights): + """HF expert interface, using two grouped GEMMs instead of E Python GEMMs. + + FP32 master parameters are allowed under CUDA BF16/FP16 autocast. Explicit + casts are differentiable, since custom Triton GEMMs do not implement + PyTorch's automatic autocast rules. Direct BF16 parameters need no copies. + No expert-capacity limit, token dropping, or extra routing loss is added. + """ + if hidden_states.device.type != 'cuda': + raise RuntimeError('XTuner grouped Qwen3.6 experts require CUDA; CPU fallback is disabled') + if hidden_states.ndim != 2 or top_k_index.ndim != 2: + raise ValueError('Expected flattened [tokens, hidden] and [tokens, top_k] expert inputs') + if top_k_index.shape != top_k_weights.shape or top_k_index.shape[0] != hidden_states.shape[0]: + raise ValueError('Routed indices, probabilities and token counts disagree') + if torch.is_autocast_enabled('cuda'): + compute_dtype = torch.get_autocast_dtype('cuda') + else: + compute_dtype = hidden_states.dtype + if compute_dtype not in (torch.bfloat16, torch.float16): + raise RuntimeError('XTuner TMA grouped GEMM requires BF16/FP16 tensors or CUDA autocast') + # ZeRO-3 gathers the direct fused Parameters at this module's pre-forward + # hook. Never access sliced per-expert Parameters from a different module. + x = hidden_states.to(compute_dtype).contiguous() + gate_up = self.gate_up_proj.to(compute_dtype).contiguous() + down = self.down_proj.to(compute_dtype).contiguous() + grouped_gemm, permute, unpermute = _xtuner_ops() + indices = top_k_index.contiguous() + counts = torch.zeros(self.num_experts, dtype=torch.int64, device=x.device) + flat_indices = indices.reshape(-1).to(torch.int64) + counts.scatter_add_(0, flat_indices, torch.ones_like(flat_indices)) + if not x.shape[0]: + # Keep both fused Parameters and router weights in autograd for an + # empty diagnostic batch without launching zero-row TMA descriptors. + return x + (gate_up.sum() + down.sum() + top_k_weights.sum()) * 0 + dispatched, row_map = permute(x, indices) + gate, up = grouped_gemm(dispatched, gate_up, counts).chunk(2, dim=-1) + activated = (self.act_fn(gate) * up).contiguous() + routed_output = grouped_gemm(activated, down, counts) + return unpermute(routed_output, row_map, top_k_weights).to(hidden_states.dtype) + + +def install_xtuner_grouped_experts(model, *, mark_zero3_leaf=True): + """Patch only this model's Qwen3.5-MoE expert instances, return the count. + + This keeps HF tensor names/shapes intact for pretrained/resume/export. + The explicit ZeRO-3 leaf flag is attached to each fused expert module; + all expert parameters are then gathered together on every participating + rank irrespective of that rank's selected routes. + """ + from transformers.models.qwen3_5_moe.modeling_qwen3_5_moe import Qwen3_5MoeExperts + + _xtuner_ops() # Report missing dependencies before allocating model activations. + modules = [module for module in model.modules() if isinstance(module, Qwen3_5MoeExperts)] + if not modules: + raise ValueError('No Qwen3_5MoeExperts found: this backend is only for the Qwen3.6 MoE experiment') + for module in modules: + module.forward = MethodType(xtuner_experts_forward, module) + module.timejev_experts_backend = 'xtuner_triton_grouped_gemm' + if mark_zero3_leaf: + module._z3_leaf = True + return len(modules) + + +def grouped_expert_inventory(model): + return { + name: {'backend': module.timejev_experts_backend, + 'zero3_leaf': bool(getattr(module, '_z3_leaf', False)), + 'num_experts': module.num_experts} + for name, module in model.named_modules() + if hasattr(module, 'timejev_experts_backend') + } diff --git a/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/videojev_temporal.py b/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/videojev_temporal.py new file mode 100644 index 0000000000000000000000000000000000000000..89f20dab8967dc4296e2d33bf126829614b77334 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/videojev_temporal.py @@ -0,0 +1,132 @@ +"""Time grids, Bernoulli labels, interval decoding, and TimeLens metrics.""" +import numpy as np + +POSTPROCESS_VERSION = 'round_repair_clamp_v1' + + +def postprocess_interval(prediction, shifted_logits, bounds, duration, + method=POSTPROCESS_VERSION): + """Round seconds, repair collapsed intervals using evidence, then clamp. + + Evidence must already have the decoder's smoothing and threshold shift. + No ground truth is used. Python round() uses ties-to-even; the final clamp + may leave a fractional video endpoint. 'none' preserves legacy intervals. + """ + if method == 'none': + return [float(value) for value in prediction] + if method != POSTPROCESS_VERSION: + raise ValueError(f'Unknown interval postprocessing: {method}') + bounds = np.asarray(bounds, dtype=np.float64) + evidence = np.asarray(shifted_logits, dtype=np.float64) + rounded = [float(round(float(value))) for value in prediction] + if rounded[1] <= rounded[0]: + second = rounded[0] + candidates = [[second - 1, second], [second, second + 1]] + candidates = [span for span in candidates + if span[0] >= 0 and span[0] < bounds[-1, 1] + and span[1] > bounds[0, 0]] + original_midpoint = sum(prediction) / 2 + + def score(span): + overlap = np.maximum(0, np.minimum(bounds[:, 1], span[1]) + - np.maximum(bounds[:, 0], span[0])) + return (float(np.dot(evidence, overlap)), + -abs(sum(span) / 2 - original_midpoint), -span[0]) + + if candidates: + rounded = list(max(candidates, key=score)) + return [min(float(duration), max(0., value)) for value in rounded] + + +def time_grid(duration, fps=2.): + if duration <= 0 or fps <= 0: + raise ValueError('duration and fps must be positive') + # Fixed-rate grid, never linspace (which silently changes fps). + return np.arange(int(np.ceil(duration * fps)), dtype=np.float64) / fps + + +def frame_labels(times, spans): + times = np.asarray(times) + labels = np.zeros(len(times), dtype=np.float32) + for start, end in spans: + labels[(times >= start) & (times <= end)] = 1 + return labels + + +def pair_timeline(frame_times, duration): + """Native temporal patch=2: one score at each pair's midpoint. + + The official odd-frame duplicate gives the last group its real frame time. + Interval cell boundaries lie halfway between adjacent original frame times; + the outer cells extend to the observed video's endpoints. + """ + t = np.asarray(frame_times, dtype=np.float64) + if t.ndim != 1 or not len(t) or not np.isfinite(t).all() or np.any(np.diff(t) <= 0): + raise ValueError('Expected a nonempty strictly increasing frame time grid') + if t[0] < 0 or t[-1] >= duration: + raise ValueError('Frame timestamps must lie within the sampled video') + first = t[::2] + second = t[np.minimum(np.arange(0, len(t), 2) + 1, len(t) - 1)] + centers = (first + second) / 2 + internal = (t[1:-1:2] + t[2::2]) / 2 + edges = np.concatenate(([0.], internal, [float(duration)])) + return centers, np.stack((edges[:-1], edges[1:]), axis=1) + + +def interval_iou(a, b): + # Identical to TimeLens utils.iou for valid, single intervals. + if a[1] <= a[0] or b[1] <= b[0]: + return 0. + return max(0., min(a[1], b[1]) - max(a[0], b[0])) / (max(a[1], b[1]) - min(a[0], b[0])) + + +def decode(logits, times, duration, threshold=.25, smooth=1, *, bounds, + postprocess=POSTPROCESS_VERSION, return_raw=False): + """Maximum Bernoulli-likelihood nonempty contiguous segment (Kadane, O(T)). + + Relative to predicting background everywhere, assigning a frame foreground + contributes log(p/(1-p)) - log(threshold/(1-threshold)). A calibrated .5 + threshold is exactly the constrained independent-Bernoulli MAP segment. + All-negative sequences return their strongest single frame, without using GT. + Each timestamp is a pair midpoint, with explicit temporal cell bounds. + The resulting segment receives the default round/repair/clamp protocol; + postprocess='none' returns the original continuous MAP interval. + return_raw=True also returns that continuous interval for export provenance. + """ + z = np.asarray(logits, dtype=np.float64) + times = np.asarray(times, dtype=np.float64) + bounds = np.asarray(bounds, dtype=np.float64) + if len(z) == 0 or len(z) != len(times) or not np.isfinite(z).all(): + raise ValueError('nonempty finite scores must match timestamps') + if (bounds.shape != (len(z), 2) or not np.isfinite(bounds).all() + or np.any(bounds[:, 0] > times) or np.any(bounds[:, 1] < times) + or np.any(bounds[:, 1] <= bounds[:, 0]) or bounds[0, 0] != 0 + or bounds[-1, 1] != duration + or not np.array_equal(bounds[1:, 0], bounds[:-1, 1])): + raise ValueError('Invalid pair score interval bounds') + if not 0 < threshold < 1 or smooth < 1 or smooth % 2 != 1: + raise ValueError('threshold in (0,1); smoothing width must be positive and odd') + if smooth > 1: + z = np.convolve(np.pad(z, (smooth // 2, smooth // 2), mode='edge'), + np.ones(smooth) / smooth, mode='valid') + z = z - np.log(threshold / (1 - threshold)) + best = current = float(z[0]) + start = best_start = best_end = 0 + for i in range(1, len(z)): + if current <= 0: + start, current = i, float(z[i]) + else: + current += float(z[i]) + if current > best: + best, best_start, best_end = current, start, i + prediction = [float(bounds[best_start, 0]), float(bounds[best_end, 1])] + processed = postprocess_interval(prediction, z, bounds, duration, method=postprocess) + return (processed, prediction) if return_raw else processed + + +def metrics(predictions, rows): + if len(predictions) != len(rows): + raise ValueError('coverage mismatch') + ious = [max(interval_iou(p, s) for s in r['spans']) for p, r in zip(predictions, rows)] + return dict(n=len(rows), **{f'R1@{t}': float(100 * np.mean(np.asarray(ious) >= t)) for t in [.3, .5, .7]}, + mIoU=float(100 * np.mean(ious))) diff --git a/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/videojev_video.py b/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/videojev_video.py new file mode 100644 index 0000000000000000000000000000000000000000..5d384290da6058185a32e1ab9034abf115f51d29 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/src/videojev_hf/videojev_video.py @@ -0,0 +1,75 @@ +"""Decode original-resolution RGB frames on an exact fps grid; never resize here.""" +import numpy as np +import torch +from .videojev_temporal import time_grid + + +def sampling_grid(duration, fps=2., max_frames=None): + """Keep the requested fps unless the explicit full-video frame cap applies.""" + requested=time_grid(duration,fps) + if max_frames is not None: + if not isinstance(max_frames,int) or max_frames<1:raise ValueError('max_frames must be a positive integer') + requested=requested[requestedmax_frames: + effective_fps=max_frames/float(duration) + return np.arange(max_frames,dtype=np.float64)/effective_fps,effective_fps,'uniform_full_video' + return requested,float(fps),'fixed_fps' + + +def read_video(row, fps=2., *, max_frames=None): + import av + requested,effective_fps,sampling_mode = sampling_grid(row['duration'],fps,max_frames) + frames, actual = [], [] + previous, previous_time, origin, index, end_time = None, 0., None, 0, 0. + duplicate_pts = 0 + with av.open(row['video_path']) as container: + stream = container.streams.video[0] + stream.thread_type = 'AUTO' + stream.thread_count = 2 + for frame in container.decode(stream): + if frame.pts is None: + raise ValueError(f"Missing video PTS: {row['video_path']}") + stamp = float(frame.pts * frame.time_base) + if origin is None: + origin = stamp + now = stamp - origin + if previous is not None and now < previous_time: + if previous_time - now <= 1e-4: + duplicate_pts += 1 + continue + raise ValueError(f"Nonmonotonic PTS: {row['video_path']}") + while index < len(requested) and requested[index] <= now: + chosen, chosen_time = (previous, previous_time) if previous is not None and abs(previous_time - requested[index]) <= abs(now - requested[index]) else (frame, now) + frames.append(chosen.to_ndarray(format='rgb24')) + actual.append(chosen_time) + index += 1 + previous, previous_time = frame, now + frame_duration = float(frame.duration * frame.time_base) if frame.duration else 1 / float(stream.average_rate or 30) + end_time = now + frame_duration + if previous is None: + raise ValueError(f"Empty video: {row['video_path']}") + # Sample only the media's actual supported time range. Do not fabricate + # repeated frames to fill an annotation duration longer than the video. + sampled_duration = min(float(row['duration']), end_time) + times = requested[requested < sampled_duration] + while index < len(times): + frames.append(previous.to_ndarray(format='rgb24')) + actual.append(previous_time) + index += 1 + if not len(times) or len(frames) < len(times): + raise ValueError('Video does not cover any requested sample') + # NumPy's large contig-to-contig copy is exceptionally slow on this host. + # ATen stacking preserves every uint8 pixel exactly and avoids that path. + if max_frames is not None and len(times)!=len(requested): + # A wrong header must not leave a uniform sample covering a fictitious tail. + if sampled_duration>=float(row['duration']):raise ValueError('Sampling grid extends beyond unchanged media duration') + return read_video(dict(row,duration=sampled_duration),fps,max_frames=max_frames) + video = torch.stack([torch.from_numpy(frame) for frame in frames[:len(times)]]).numpy() + result = dict(video=video, times=times, fps=effective_fps, input_source='video', + decoded_times=np.asarray(actual[:len(times)], dtype=np.float64), + media_duration=end_time, sampled_duration=sampled_duration, + ignored_duplicate_pts=duplicate_pts) + if max_frames is not None: + result.update(requested_fps=float(fps),max_frames=max_frames,sampling_mode=sampling_mode, + sampling_duration=float(row['duration'])) + return result diff --git a/PixelOne-Pro-35B-A3B/runtime/third_party/VideoJev-LICENSE b/PixelOne-Pro-35B-A3B/runtime/third_party/VideoJev-LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..1d5180a42f1c3383ba7c7bd0a50f0837ef0168df --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/third_party/VideoJev-LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2026 Alibaba Cloud + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/PixelOne-Pro-35B-A3B/runtime/third_party/VideoJev-NOTICE b/PixelOne-Pro-35B-A3B/runtime/third_party/VideoJev-NOTICE new file mode 100644 index 0000000000000000000000000000000000000000..799a6d414711ec67ec86bba8f7ff4a59c8023f83 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime/third_party/VideoJev-NOTICE @@ -0,0 +1,4 @@ +VideoJev uses native Qwen3.5 and Qwen3.5-MoE modules from Hugging Face Transformers. +Qwen3.5-4B and Qwen3.6-35B-A3B are provided by the Qwen team under Apache-2.0. +Training and optional grouped MoE inference use XTuner (InternLM), Apache-2.0. +VideoJev modifies the language readout and adds a trained cosine decision head. diff --git a/PixelOne-Pro-35B-A3B/runtime_manifest.json b/PixelOne-Pro-35B-A3B/runtime_manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..18adf95cb7fd6b9a4260e3edc383d987876d0b03 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/runtime_manifest.json @@ -0,0 +1,67 @@ +{ + "pyproject.toml": "5f3b9d91f4a1b2b9a62103aac61b8f248657774fc483d7e4ee91a4eb837bdc0c", + "THIRD_PARTY_NOTICES.md": "7aa2bf0d5645313a5c2db2284f4680e51951cc3fba130fd69eeced7b231e1228", + "third_party/VideoJev-LICENSE": "50cbab8a892c5f2993b8c7351a99182507472def3b1374558308605d99b86b32", + "third_party/VideoJev-NOTICE": "042c0685fb7c35b9cd947c8b514513948323f376d7b93eb74d0d3430b084eadf", + "src/videojev_hf/__init__.py": "9b289dc25ec93434ed4ad962f47482d7ee1656f8a7f1b38fd11e9c7c4a342624", + "src/videojev_hf/configuration_videojev.py": "b91c4bc181fe31b8297a80429f036782dc3331a3da84f1fca1203b6bf1413127", + "src/videojev_hf/modeling_videojev.py": "48ae0b7d9d724c6fb7ad1355ca5fe9dadd494acf0f09b28635d4a160c88d5b40", + "src/videojev_hf/processing_videojev.py": "001281d45e61db9baa31bd3be210969f35bf2735773f1819195a2b1a6e70227f", + "src/videojev_hf/videojev_moe.py": "6421edb75def784c77e08f61a04ce4d3beed0bfcae000256cb9c074d515c80db", + "src/videojev_hf/videojev_temporal.py": "68b19275ef5657e54188d782c6531f466681d3b3fa8b77329e5c20a1631decab", + "src/videojev_hf/videojev_video.py": "0c5f93f7ac4e7da402217491e000d7b6b2f36fa8b010462f4e0bc63ef87c8c3a", + "src/jev_spatial_distill/teacher_targets.py": "718a667aa2f6352542a99284c8268200e46e1fb697ee068c110e29191cab7a9f", + "src/jev_spatial_distill/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/jev_click_finetune/model.py": "b41a3a09ab906258786e628f96bc662e9d2d4ab847034febd9801317bf90eb39", + "src/jev_click_finetune/inputs.py": "6e912d6c720c4a860a6f7ec215b178c2d6a922e5c01739833b6f18c360e1ea33", + "src/jev_click_finetune/objective.py": "f98a0c6836d45250c020eaa2943648c401cffa6ba2d0fd14139cdba41463fa79", + "src/jev_click_finetune/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/jev_unified_student/model.py": "7e8bdc5ce146dc0d63b9cab10a9c2b3a6d46d19467a22e8363692fade2e4f1f8", + "src/jev_unified_student/objective.py": "48504301ae8c02711e5a7e764b81dac1e0a21e234a11b98d1b47d3d9c375d4f6", + "src/jev_unified_student/top20.py": "8596f728107ee3e7384ccfc991c23acde9bd8438cf2c670fd221f22736116978", + "src/jev_unified_student/top100.py": "6486852b198183859684377697be9b30d53e86429cdb0417de552bfa1adcb5ea", + "src/jev_unified_student/methods.py": "298e0fe7ba89c23aaf3e7a01d8b2728cda9d3c9744e570a47c8548e05ab246a9", + "src/jev_unified_student/attention.py": "bcad90f833a5d2431c896f641073a67f4366c3513089f189065e9f11c66686ac", + "src/jev_unified_student/full_training.py": "38c3dc17bd66ddc853b9896f0e68819f1b385a48e46806379f14af5763027d15", + "src/jev_unified_student/portable_full.py": "a7d976e47a17013bd1004c86621f6ec84a0027cb30e5d3d9e3d7df56b3b81013", + "src/jev_unified_student/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/jev_unified_student/speed_loss.py": "221bbc825efaf55898ccaa34bdc60e590cdbc609fa3c815b4065c9148644c99d", + "src/jev_fine_ablation/distillation.py": "74b45681d0694ff73e82e44b7dea864f434a3081de0cf3f37d6775e149e3d64c", + "src/jev_fine_ablation/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/jev_fine_refine/objective.py": "8eb841871e35fe347051b4e7c2b851cb0ecb23b51fd58da1beb10facb3d7b453", + "src/jev_fine_refine/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/spatial_pro_experiments/core.py": "c28d3cf4dd6f84df00f5447809387facfbde01c5e365f3c6e63a6bf03a6f2579", + "src/spatial_pro_experiments/fast.py": "a76a08bfcd402e097c6bce18e06d23be210de266cebf4f93d28803fdcedcbffd", + "src/spatial_pro_experiments/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/scripts/spatial_view_sizes.py": "970aea9118e500325b06731c59802f6a6e4e61d37248ecafa87314a5b2799677", + "src/scripts/smoke_videojev.py": "734387e304d86fc5b5975d0e3be3db4fd2c11d058f4d07faae72c502b90a595e", + "src/scripts/batch_spatial_jev.py": "7729a47bc0b3b4ecb4b23faa2665d2658b535249781779e9bcd107eeb0816343", + "src/scripts/refine_spatial_jev.py": "305360bde641c4964f2f7c15406190c1cb31cc2b4fa33939221ef88430d84948", + "src/scripts/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/qwen_spatial/kernels.py": "23f03637185a8c18ab7573d3703b31a6252638d59d619b32c55b278c7eb60fb3", + "src/qwen_spatial/common.py": "812f73c41fbc960f2ced3f3bb0d676b3c3b9fe8dbf2b728bccbca9a083f72c96", + "src/qwen_spatial/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/pixelone/sampling.py": "ec0b32523e0230484af2f509b16e8878a0fec805831a363363cb22b4251bc39c", + "src/pixelone/__init__.py": "fbd113aba5dd529bb7a4dfa5b0a8f53756539a33e24246b84ca216c0a355e829", + "src/pixelone/io.py": "5c2a25774e311f39cac44de6245514226048b0c7264af53dbcfa0c8399c1b6c6", + "src/pixelone/resources.py": "1e57d070a504974d29d3b58cc85f176d6575543918bc6ab8e327146485aa06d9", + "src/pixelone/inference.py": "879c4ffae1f5c485917368a64e26e4a6abee87636d520205d3d1617248895482", + "src/pixelone/cli.py": "a2f1d8ffb6e463a9d2388d28be292c252562c234c5e1b8bedc224b1c6d452886", + "src/pixelone/data.py": "bbac25ece191dd7761797ba5cabab1f8526f9c9d05d579d29d272f54b16ed8c1", + "src/pixelone/teacher.py": "391fa31dd1f3051a7b5c110b3268a2028e2e046586451222a4b6982f7c9894ec", + "src/pixelone/checkpoint.py": "ba659771265ca4274788cae4c03d8ccf5070738913309c3a4cc3066705554a79", + "src/pixelone/training.py": "1280beabda8a6c2f21bbd186c85189daf84f09237889a9a012355a4d1b0d6be2", + "src/pixelone/export.py": "445850ae70c1559e90ce781d3aeda8e37a2724595d90774a1091f14560a7cba8", + "src/jev_spatial_distill/t3/model.py": "5f64ea8422dd31afd074b6f653e8dfbd075b0aa7933f8437a5bf1888a9f10c16", + "src/jev_spatial_distill/t3/batching.py": "23342e01e13b5edc71b8a2d8771de8720807b6d9ce0668ed21702763ec629aea", + "src/jev_spatial_distill/t3/states.py": "5430737b9af6a33456af343944c33e6b3242cf3bd2c30a71ec68c504d2cf5a0a", + "src/jev_spatial_distill/t3/common.py": "a6ad70427920e58014b1b71efe66bf8189ed2f971c8accfae9243330b1f291e0", + "src/jev_spatial_distill/t3/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/jev_spatial_distill/spatial_pointer/geometry.py": "75aa1c6b53e7677a4c935a3b2c25deb495c1796ea5b26925b3c22d9997ebb398", + "src/jev_spatial_distill/spatial_pointer/model.py": "5e3686589398f1776a07ab7de482f07e8a73bf8d3ca666672b78bbd47618cef0", + "src/jev_spatial_distill/spatial_pointer/supervision.py": "f6d8b270e011d180755b4fc0920267e38cceab9fbf4e8e7d07bf4d39c6a2505a", + "src/jev_spatial_distill/spatial_pointer/data.py": "fb873e8566f5176ea60cbf7b3ed3f768436adcabc2278e3413a29954a00946e8", + "src/jev_spatial_distill/spatial_pointer/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/pixelone/assets/DejaVuSans.ttf": "ae7b7855e115a5966d8b1b3f80f254ccc117ec86f9965e202ee2940453837280", + "src/pixelone/assets/DejaVuSans-LICENSE.txt": "e81d9dced49fea2a7d576cbea283873de58563c5d488f954deb282843c3ea79c" +} diff --git a/PixelOne-Pro-35B-A3B/tokenizer.json b/PixelOne-Pro-35B-A3B/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..8cd72f2eec488230a80033061d5f18510d7a744a --- /dev/null +++ b/PixelOne-Pro-35B-A3B/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b16fb8cbf388f6af8691645a17c909c01e536b4eb1bad865ed05fb6ef4a642a +size 19989703 diff --git a/PixelOne-Pro-35B-A3B/tokenizer_config.json b/PixelOne-Pro-35B-A3B/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..05c0cc7f302a4585cc28a253ec59d6e1dfc7f738 --- /dev/null +++ b/PixelOne-Pro-35B-A3B/tokenizer_config.json @@ -0,0 +1,37 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|decide|>", + "<|option_end|>" + ], + "image_token": "<|image_pad|>", + "is_local": true, + "local_files_only": true, + "model_max_length": 262144, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "processor_class": "Qwen3VLProcessor", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/PixelOne-Pro-4B/.gitattributes b/PixelOne-Pro-4B/.gitattributes new file mode 100644 index 0000000000000000000000000000000000000000..580d310c2d211aca166288a207e972ced9bb0100 --- /dev/null +++ b/PixelOne-Pro-4B/.gitattributes @@ -0,0 +1 @@ +*.safetensors filter=lfs diff=lfs merge=lfs -text diff --git a/PixelOne-Pro-4B/README.md b/PixelOne-Pro-4B/README.md new file mode 100644 index 0000000000000000000000000000000000000000..73ef52bfa1334beacba548fce2ba3e9d7598234b --- /dev/null +++ b/PixelOne-Pro-4B/README.md @@ -0,0 +1,71 @@ +--- +license: mit +language: +- en +tags: +- gui-grounding +- pixelone +- computer-use +- custom-code +- safetensors +--- + +# PixelOne-Pro-4B + +PixelOne-Pro-4B predicts an original-image click from a screenshot and an instruction in one visual encoding and one language-model forward. This is the final full-parameter 500K continuation from the PixelOne paper, with a trained visual encoder, native decision head and lightweight pixel head. + +## Use + +This model is stored in the `PixelOne-Pro-4B` subfolder of [KangHui2200/PixleOne](https://huggingface.co/KangHui2200/PixleOne). The local-directory commands below remain supported. To load by repository ID, use `PixelOnePredictor.from_pretrained("KangHui2200/PixleOne", subfolder="PixelOne-Pro-4B", device="cuda:0")`, or add `--subfolder PixelOne-Pro-4B` to the CLI. Only the selected model is downloaded. Authenticate with Hugging Face if the repository is private. + +The package is self-contained: all model weights and processor assets are included. No separate base-model weights, LoRA adapter or search teacher is needed at inference. + +```bash +python -m pip install ./runtime +python -m pip install flash-linear-attention==0.4.2 causal-conv1d==1.7.0 --no-build-isolation +pixelone infer --model . --image screenshot.png --instruction "Click the search button" --device cuda:0 +``` + +```python +from PIL import Image +from pixelone import PixelOnePredictor + +predictor = PixelOnePredictor.from_pretrained(".", device="cuda:0") +result = predictor.predict(Image.open("screenshot.png"), "Click the search button") +print(result["point"]) +``` + +Use the bundled `PixelOnePredictor`, not `AutoModelForCausalLM.generate` or a generic VideoJEV loader. The direct click head and its coarse-first decoder are essential parts of this checkpoint. `config.json` describes the native backbone; `pixelone.json` specifies the complete PixelOne inference contract and weight index. + +## Input and runtime + +- Output: `[x, y]` in original screenshot pixels, with half-pixel centers. +- Image policy: pad to stride 32 without resizing; exclude padding from pixel selection. Inputs beyond the context budget fail rather than silently downsample. +- Attention: bidirectional masks in existing full-attention layers; native linear-attention computation; no autoregressive KV cache. +- Reference software: Python 3.12, PyTorch 2.11.0, Transformers 5.6.2, Triton 3.7.0, FLA 0.4.2 and causal-conv1d 1.7.0. +- Weights: approximately 10.3 GB across 9 safetensors shards, with the original BF16/FP32 partition. Activations require additional resolution-dependent memory. Do not cast the whole model to BF16/FP16. +- CUDA is required for the released mixed-precision weights. `kernel_backend="torch"` is an explicit diagnostic alternative, not the reported native-kernel latency configuration. + +## Evaluation + +| Benchmark | Correct / targets | Accuracy (%) | +| --- | ---: | ---: | +| screenspot | 1149 / 1272 | 90.33 | +| screenspot-v2 | 1181 / 1272 | 92.85 | +| screenspot-pro | 1077 / 1581 | 68.12 | +| osworld-g | 363 / 510 | 71.18 | +| Equal-weight mean | — | 80.62 | + +Scores use complete benchmark sets and original-image point-in-box correctness. `evaluation.json` retains the hit counts and unrounded accuracies. Weights come from update 1954; they were not reconstructed from adapters or quantized during packaging. + +## Training and limitations + +The model inherits a 22K Top20+KD student, retains its learned pixel head, and continues on 500K targets. Full-parameter updates include the visual encoder. Spatial KD uses a frozen teacher's observed regions and is gated by teacher click correctness; every target still receives box supervision. The 200K PixelOne branch is separate and is not an intermediate stage of this Pro checkpoint. + +This release includes weights, processor assets and executable source, but not upstream training screenshots, sampled target manifests, optimizer states or cached teacher traces. Native-resolution grounding remains limited by context length and available device memory. Applications must validate predicted actions and enforce user permissions before execution. + +## Verification and release status + +All weight files were verified against the final research export, and the source evaluation matches the paper. Tiny dense/MoE CPU tests check the numerical readout, model round trip, training resume and export path. The packaging host has no working NVIDIA driver; full-scale CUDA smoke tests and latency have not been rerun there. + +The model repository retains its existing MIT license metadata. Upstream Qwen/VideoJEV licenses and notices are retained in `UPSTREAM_LICENSE` and `UPSTREAM_NOTICE`; the bundled runtime and font include their upstream attribution. Repository visibility is controlled by the owner and was not changed during upload. diff --git a/PixelOne-Pro-4B/UPSTREAM_LICENSE b/PixelOne-Pro-4B/UPSTREAM_LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..1d5180a42f1c3383ba7c7bd0a50f0837ef0168df --- /dev/null +++ b/PixelOne-Pro-4B/UPSTREAM_LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2026 Alibaba Cloud + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/PixelOne-Pro-4B/UPSTREAM_NOTICE b/PixelOne-Pro-4B/UPSTREAM_NOTICE new file mode 100644 index 0000000000000000000000000000000000000000..799a6d414711ec67ec86bba8f7ff4a59c8023f83 --- /dev/null +++ b/PixelOne-Pro-4B/UPSTREAM_NOTICE @@ -0,0 +1,4 @@ +VideoJev uses native Qwen3.5 and Qwen3.5-MoE modules from Hugging Face Transformers. +Qwen3.5-4B and Qwen3.6-35B-A3B are provided by the Qwen team under Apache-2.0. +Training and optional grouped MoE inference use XTuner (InternLM), Apache-2.0. +VideoJev modifies the language readout and adds a trained cosine decision head. diff --git a/PixelOne-Pro-4B/chat_template.jinja b/PixelOne-Pro-4B/chat_template.jinja new file mode 100644 index 0000000000000000000000000000000000000000..a585dec894e63da457d9440ec6aa7caa16d20860 --- /dev/null +++ b/PixelOne-Pro-4B/chat_template.jinja @@ -0,0 +1,154 @@ +{%- set image_count = namespace(value=0) %} +{%- set video_count = namespace(value=0) %} +{%- macro render_content(content, do_vision_count, is_system_content=false) %} + {%- if content is string %} + {{- content }} + {%- elif content is iterable and content is not mapping %} + {%- for item in content %} + {%- if 'image' in item or 'image_url' in item or item.type == 'image' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain images.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set image_count.value = image_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Picture ' ~ image_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|image_pad|><|vision_end|>' }} + {%- elif 'video' in item or item.type == 'video' %} + {%- if is_system_content %} + {{- raise_exception('System message cannot contain videos.') }} + {%- endif %} + {%- if do_vision_count %} + {%- set video_count.value = video_count.value + 1 %} + {%- endif %} + {%- if add_vision_id %} + {{- 'Video ' ~ video_count.value ~ ': ' }} + {%- endif %} + {{- '<|vision_start|><|video_pad|><|vision_end|>' }} + {%- elif 'text' in item %} + {{- item.text }} + {%- else %} + {{- raise_exception('Unexpected item type in content.') }} + {%- endif %} + {%- endfor %} + {%- elif content is none or content is undefined %} + {{- '' }} + {%- else %} + {{- raise_exception('Unexpected content type.') }} + {%- endif %} +{%- endmacro %} +{%- if not messages %} + {{- raise_exception('No messages provided.') }} +{%- endif %} +{%- if tools and tools is iterable and tools is not mapping %} + {{- '<|im_start|>system\n' }} + {{- "# Tools\n\nYou have access to the following functions:\n\n" }} + {%- for tool in tools %} + {{- "\n" }} + {{- tool | tojson }} + {%- endfor %} + {{- "\n" }} + {{- '\n\nIf you choose to call a function ONLY reply in the following format with NO suffix:\n\n\n\n\nvalue_1\n\n\nThis is the value for the second parameter\nthat can span\nmultiple lines\n\n\n\n\n\nReminder:\n- Function calls MUST follow the specified format: an inner block must be nested within XML tags\n- Required parameters MUST be specified\n- You may provide optional reasoning for your function call in natural language BEFORE the function call, but NOT after\n- If there is no function call available, answer the question like normal with your current knowledge and do not tell the user about function calls\n' }} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {%- if content %} + {{- '\n\n' + content }} + {%- endif %} + {%- endif %} + {{- '<|im_end|>\n' }} +{%- else %} + {%- if messages[0].role == 'system' %} + {%- set content = render_content(messages[0].content, false, true)|trim %} + {{- '<|im_start|>system\n' + content + '<|im_end|>\n' }} + {%- endif %} +{%- endif %} +{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %} +{%- for message in messages[::-1] %} + {%- set index = (messages|length - 1) - loop.index0 %} + {%- if ns.multi_step_tool and message.role == "user" %} + {%- set content = render_content(message.content, false)|trim %} + {%- if not(content.startswith('') and content.endswith('')) %} + {%- set ns.multi_step_tool = false %} + {%- set ns.last_query_index = index %} + {%- endif %} + {%- endif %} +{%- endfor %} +{%- if ns.multi_step_tool %} + {{- raise_exception('No user query found in messages.') }} +{%- endif %} +{%- for message in messages %} + {%- set content = render_content(message.content, true)|trim %} + {%- if message.role == "system" %} + {%- if not loop.first %} + {{- raise_exception('System message must be at the beginning.') }} + {%- endif %} + {%- elif message.role == "user" %} + {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} + {%- elif message.role == "assistant" %} + {%- set reasoning_content = '' %} + {%- if message.reasoning_content is string %} + {%- set reasoning_content = message.reasoning_content %} + {%- else %} + {%- if '' in content %} + {%- set reasoning_content = content.split('')[0].rstrip('\n').split('')[-1].lstrip('\n') %} + {%- set content = content.split('')[-1].lstrip('\n') %} + {%- endif %} + {%- endif %} + {%- set reasoning_content = reasoning_content|trim %} + {%- if loop.index0 > ns.last_query_index %} + {{- '<|im_start|>' + message.role + '\n\n' + reasoning_content + '\n\n\n' + content }} + {%- else %} + {{- '<|im_start|>' + message.role + '\n' + content }} + {%- endif %} + {%- if message.tool_calls and message.tool_calls is iterable and message.tool_calls is not mapping %} + {%- for tool_call in message.tool_calls %} + {%- if tool_call.function is defined %} + {%- set tool_call = tool_call.function %} + {%- endif %} + {%- if loop.first %} + {%- if content|trim %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n\n' }} + {%- endif %} + {%- else %} + {{- '\n\n\n' }} + {%- endif %} + {%- if tool_call.arguments is defined %} + {%- for args_name, args_value in tool_call.arguments|items %} + {{- '\n' }} + {%- set args_value = args_value | tojson | safe if args_value is mapping or (args_value is sequence and args_value is not string) else args_value | string %} + {{- args_value }} + {{- '\n\n' }} + {%- endfor %} + {%- endif %} + {{- '\n' }} + {%- endfor %} + {%- endif %} + {{- '<|im_end|>\n' }} + {%- elif message.role == "tool" %} + {%- if loop.previtem and loop.previtem.role != "tool" %} + {{- '<|im_start|>user' }} + {%- endif %} + {{- '\n\n' }} + {{- content }} + {{- '\n' }} + {%- if not loop.last and loop.nextitem.role != "tool" %} + {{- '<|im_end|>\n' }} + {%- elif loop.last %} + {{- '<|im_end|>\n' }} + {%- endif %} + {%- else %} + {{- raise_exception('Unexpected message role.') }} + {%- endif %} +{%- endfor %} +{%- if add_generation_prompt %} + {{- '<|im_start|>assistant\n' }} + {%- if enable_thinking is defined and enable_thinking is false %} + {{- '\n\n\n\n' }} + {%- else %} + {{- '\n' }} + {%- endif %} +{%- endif %} \ No newline at end of file diff --git a/PixelOne-Pro-4B/config.json b/PixelOne-Pro-4B/config.json new file mode 100644 index 0000000000000000000000000000000000000000..3e84d6a34f744cc269eea9f4627ac3c4782ed7e7 --- /dev/null +++ b/PixelOne-Pro-4B/config.json @@ -0,0 +1,163 @@ +{ + "architectures": [ + "VideoJevForVideoUnderstanding" + ], + "auto_map": { + "AutoConfig": "configuration_videojev.VideoJevConfig", + "AutoModel": "modeling_videojev.VideoJevForVideoUnderstanding" + }, + "backbone_config": { + "architectures": [ + "Qwen3_5ForConditionalGeneration" + ], + "dtype": "bfloat16", + "image_token_id": 248056, + "model_type": "qwen3_5", + "text_config": { + "_name_or_path": "", + "architectures": null, + "attention_bias": false, + "attention_dropout": 0.0, + "attn_output_gate": true, + "bos_token_id": null, + "chunk_size_feed_forward": 0, + "dtype": "bfloat16", + "eos_token_id": 248044, + "full_attention_interval": 4, + "head_dim": 256, + "hidden_act": "silu", + "hidden_size": 2560, + "id2label": { + "0": "LABEL_0", + "1": "LABEL_1" + }, + "initializer_range": 0.02, + "intermediate_size": 9216, + "is_encoder_decoder": false, + "label2id": { + "LABEL_0": 0, + "LABEL_1": 1 + }, + "layer_types": [ + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention", + "linear_attention", + "linear_attention", + "linear_attention", + "full_attention" + ], + "linear_conv_kernel_dim": 4, + "linear_key_head_dim": 128, + "linear_num_key_heads": 16, + "linear_num_value_heads": 32, + "linear_value_head_dim": 128, + "mamba_ssm_dtype": "float32", + "max_position_embeddings": 262144, + "mlp_only_layers": [], + "model_type": "qwen3_5_text", + "mtp_num_hidden_layers": 1, + "mtp_use_dedicated_embeddings": false, + "num_attention_heads": 16, + "num_hidden_layers": 32, + "num_key_value_heads": 4, + "output_attentions": false, + "output_hidden_states": false, + "pad_token_id": null, + "partial_rotary_factor": 0.25, + "problem_type": null, + "return_dict": true, + "rms_norm_eps": 1e-06, + "rope_parameters": { + "mrope_interleaved": true, + "mrope_section": [ + 11, + 11, + 10 + ], + "partial_rotary_factor": 0.25, + "rope_theta": 10000000, + "rope_type": "default" + }, + "tie_word_embeddings": true, + "use_cache": true, + "vocab_size": 248320 + }, + "tie_word_embeddings": true, + "video_token_id": 248057, + "vision_config": { + "_name_or_path": "", + "architectures": null, + "chunk_size_feed_forward": 0, + "deepstack_visual_indexes": [], + "depth": 24, + "dtype": "bfloat16", + "hidden_act": "gelu_pytorch_tanh", + "hidden_size": 1024, + "id2label": { + "0": "LABEL_0", + "1": "LABEL_1" + }, + "in_channels": 3, + "initializer_range": 0.02, + "intermediate_size": 4096, + "is_encoder_decoder": false, + "label2id": { + "LABEL_0": 0, + "LABEL_1": 1 + }, + "model_type": "qwen3_5_vision", + "num_heads": 16, + "num_position_embeddings": 2304, + "out_hidden_size": 2560, + "output_attentions": false, + "output_hidden_states": false, + "patch_size": 16, + "problem_type": null, + "return_dict": true, + "spatial_merge_size": 2, + "temporal_patch_size": 2 + }, + "vision_end_token_id": 248054, + "vision_start_token_id": 248053 + }, + "checkpoint_id": "c423395c-4193-4295-bb59-64673acefb11", + "decide_token_id": 248077, + "decoder": { + "postprocess": "round_repair_clamp_v1", + "smooth": 1, + "threshold": 0.25 + }, + "dtype": "bfloat16", + "head_dim": 512, + "head_logit_scale": 10.0, + "model_type": "videojev", + "option_end_token_id": 248078, + "tie_word_embeddings": false, + "transformers_version": "5.14.1" +} diff --git a/PixelOne-Pro-4B/evaluation.json b/PixelOne-Pro-4B/evaluation.json new file mode 100644 index 0000000000000000000000000000000000000000..d62bddbd97d0ddbaab2c5fb16a6d376a86729e89 --- /dev/null +++ b/PixelOne-Pro-4B/evaluation.json @@ -0,0 +1,30 @@ +{ + "results": [ + { + "benchmark": "screenspot", + "count": 1272, + "hits": 1149, + "accuracy": 0.9033018867924528 + }, + { + "benchmark": "screenspot-v2", + "count": 1272, + "hits": 1181, + "accuracy": 0.9284591194968553 + }, + { + "benchmark": "screenspot-pro", + "count": 1581, + "hits": 1077, + "accuracy": 0.681214421252372 + }, + { + "benchmark": "osworld-g", + "count": 510, + "hits": 363, + "accuracy": 0.711764705882353 + } + ], + "mean_accuracy": 0.8061850333560083, + "aggregation": "Equal weight per benchmark, not pooled target accuracy" +} diff --git a/PixelOne-Pro-4B/model.safetensors.index.json b/PixelOne-Pro-4B/model.safetensors.index.json new file mode 100644 index 0000000000000000000000000000000000000000..bf4e3df1b7d1846561942c635ebde167e41796cc --- /dev/null +++ b/PixelOne-Pro-4B/model.safetensors.index.json @@ -0,0 +1,743 @@ +{ + "metadata": { + "total_size": 10285825028 + }, + "weight_map": { + "native.backbone.language_model.embed_tokens.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.input_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.A_log": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.conv1d.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.dt_bias": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_a.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_b.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_qkv.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_z.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.norm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.out_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.mlp.down_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.mlp.gate_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.mlp.up_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.post_attention_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.input_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.A_log": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.conv1d.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.dt_bias": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_a.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_b.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_qkv.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_z.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.norm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.out_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.mlp.down_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.mlp.gate_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.mlp.up_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.post_attention_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.input_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.A_log": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.conv1d.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.dt_bias": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_a.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_b.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_qkv.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_z.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.norm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.out_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.mlp.down_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.mlp.gate_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.mlp.up_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.post_attention_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.input_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.mlp.down_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.mlp.gate_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.mlp.up_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.post_attention_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.self_attn.k_norm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.self_attn.k_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.self_attn.o_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.self_attn.q_norm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.self_attn.q_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.self_attn.v_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.input_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.A_log": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.conv1d.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.dt_bias": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_a.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_b.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_qkv.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_z.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.norm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.out_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.mlp.down_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.mlp.gate_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.mlp.up_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.12.post_attention_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.input_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.A_log": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.conv1d.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.dt_bias": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_a.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_b.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_qkv.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_z.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.norm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.out_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.mlp.down_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.mlp.gate_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.mlp.up_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.post_attention_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.input_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.A_log": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.conv1d.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.dt_bias": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_a.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_b.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_qkv.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_z.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.norm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.out_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.mlp.down_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.mlp.gate_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.mlp.up_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.post_attention_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.input_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.mlp.down_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.mlp.gate_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.mlp.up_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.post_attention_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.self_attn.k_norm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.self_attn.k_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.self_attn.o_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.self_attn.q_norm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.self_attn.q_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.self_attn.v_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.input_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.A_log": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.conv1d.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.dt_bias": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_a.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_b.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_qkv.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_z.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.norm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.out_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.mlp.down_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.mlp.gate_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.mlp.up_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.post_attention_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.input_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.A_log": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.conv1d.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.dt_bias": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_a.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_b.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_qkv.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_z.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.norm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.out_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.mlp.down_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.mlp.gate_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.17.mlp.up_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.17.post_attention_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.input_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.A_log": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.conv1d.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.dt_bias": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_a.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_b.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_qkv.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_z.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.norm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.out_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.mlp.down_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.mlp.gate_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.mlp.up_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.post_attention_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.input_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.mlp.down_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.mlp.gate_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.mlp.up_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.post_attention_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.self_attn.k_norm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.self_attn.k_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.self_attn.o_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.self_attn.q_norm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.self_attn.q_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.self_attn.v_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.input_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.A_log": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.conv1d.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.dt_bias": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_a.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_b.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_qkv.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_z.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.norm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.out_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.mlp.down_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.mlp.gate_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.mlp.up_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.post_attention_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.input_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.A_log": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.conv1d.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.dt_bias": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_a.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_b.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_qkv.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_z.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.norm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.out_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.mlp.down_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.mlp.gate_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.mlp.up_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.post_attention_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.input_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.A_log": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.conv1d.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.dt_bias": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_a.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_b.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_qkv.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_z.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.norm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.out_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.mlp.down_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.21.mlp.gate_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.21.mlp.up_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.21.post_attention_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.input_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.A_log": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.conv1d.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.dt_bias": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_a.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_b.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_qkv.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_z.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.norm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.out_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.mlp.down_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.mlp.gate_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.mlp.up_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.post_attention_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.input_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.mlp.down_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.mlp.gate_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.mlp.up_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.post_attention_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.self_attn.k_norm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.self_attn.k_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.self_attn.o_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.self_attn.q_norm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.self_attn.q_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.self_attn.v_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.input_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.A_log": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.conv1d.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.dt_bias": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_a.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_b.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_qkv.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_z.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.norm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.out_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.mlp.down_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.mlp.gate_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.mlp.up_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.post_attention_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.input_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.A_log": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.conv1d.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.dt_bias": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_a.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_b.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_qkv.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_z.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.norm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.out_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.mlp.down_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.mlp.gate_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.mlp.up_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.post_attention_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.26.input_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.26.linear_attn.A_log": "weights-00005.safetensors", + "native.backbone.language_model.layers.26.linear_attn.conv1d.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.26.linear_attn.dt_bias": "weights-00005.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_a.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_b.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_qkv.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_z.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.26.linear_attn.norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.26.linear_attn.out_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.26.mlp.down_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.26.mlp.gate_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.26.mlp.up_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.26.post_attention_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.input_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.mlp.down_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.mlp.gate_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.mlp.up_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.post_attention_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.self_attn.k_norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.self_attn.k_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.self_attn.o_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.self_attn.q_norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.self_attn.q_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.self_attn.v_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.input_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.A_log": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.conv1d.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.dt_bias": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_a.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_b.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_qkv.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_z.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.out_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.mlp.down_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.mlp.gate_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.mlp.up_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.post_attention_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.input_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.A_log": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.conv1d.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.dt_bias": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_a.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_b.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_qkv.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_z.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.out_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.mlp.down_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.mlp.gate_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.mlp.up_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.post_attention_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.input_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.mlp.down_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.mlp.gate_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.mlp.up_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.post_attention_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.self_attn.k_norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.self_attn.k_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.self_attn.o_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.self_attn.q_norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.self_attn.q_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.3.self_attn.v_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.input_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.A_log": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.conv1d.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.dt_bias": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_a.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_b.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_qkv.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_z.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.norm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.out_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.mlp.down_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.mlp.gate_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.mlp.up_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.post_attention_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.31.input_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.31.self_attn.k_norm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.31.self_attn.k_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.31.self_attn.o_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.31.self_attn.q_norm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.31.self_attn.q_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.31.self_attn.v_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.input_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.A_log": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.conv1d.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.dt_bias": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_a.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_b.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_qkv.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_z.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.norm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.out_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.mlp.down_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.mlp.gate_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.mlp.up_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.post_attention_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.input_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.A_log": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.conv1d.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.dt_bias": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_a.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_b.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_qkv.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_z.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.norm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.out_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.mlp.down_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.mlp.gate_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.mlp.up_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.post_attention_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.input_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.A_log": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.conv1d.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.dt_bias": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_a.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_b.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_qkv.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_z.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.norm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.out_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.mlp.down_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.mlp.gate_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.mlp.up_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.post_attention_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.7.input_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.7.mlp.down_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.7.mlp.gate_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.mlp.up_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.post_attention_layernorm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.self_attn.k_norm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.self_attn.k_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.self_attn.o_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.self_attn.q_norm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.self_attn.q_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.self_attn.v_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.input_layernorm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.A_log": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.conv1d.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.dt_bias": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_a.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_b.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_qkv.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_z.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.norm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.out_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.mlp.down_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.mlp.gate_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.mlp.up_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.post_attention_layernorm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.input_layernorm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.A_log": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.conv1d.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.dt_bias": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_a.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_b.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_qkv.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_z.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.norm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.out_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.mlp.down_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.mlp.gate_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.mlp.up_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.post_attention_layernorm.weight": "weights-00008.safetensors", + "native.backbone.language_model.norm.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.4.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.4.attn.proj.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.attn.qkv.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.attn.qkv.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.norm1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.norm1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.norm2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.norm2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.attn.proj.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.attn.proj.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.attn.qkv.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.attn.qkv.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.norm1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.norm1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.norm2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.norm2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.attn.proj.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.attn.proj.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.attn.qkv.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.attn.qkv.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.norm1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.norm1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.norm2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.norm2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.attn.proj.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.attn.proj.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.attn.qkv.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.attn.qkv.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.norm1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.norm1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.norm2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.norm2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.attn.proj.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.attn.proj.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.attn.qkv.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.attn.qkv.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.norm1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.norm1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.norm2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.norm2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.attn.proj.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.attn.proj.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.attn.qkv.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.attn.qkv.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.norm1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.norm1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.norm2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.norm2.weight": "weights-00009.safetensors", + "native.backbone.visual.merger.linear_fc1.bias": "weights-00009.safetensors", + "native.backbone.visual.merger.linear_fc1.weight": "weights-00009.safetensors", + "native.backbone.visual.merger.linear_fc2.bias": "weights-00009.safetensors", + "native.backbone.visual.merger.linear_fc2.weight": "weights-00009.safetensors", + "native.backbone.visual.merger.norm.bias": "weights-00009.safetensors", + "native.backbone.visual.merger.norm.weight": "weights-00009.safetensors", + "native.backbone.visual.patch_embed.proj.bias": "weights-00009.safetensors", + "native.backbone.visual.patch_embed.proj.weight": "weights-00009.safetensors", + "native.backbone.visual.pos_embed.weight": "weights-00009.safetensors", + "native.head.bias": "weights-00009.safetensors", + "native.head.k.bias": "weights-00009.safetensors", + "native.head.k.weight": "weights-00009.safetensors", + "native.head.q.bias": "weights-00009.safetensors", + "native.head.q.weight": "weights-00009.safetensors", + "spatial.local.bias": "weights-00009.safetensors", + "spatial.local.weight": "weights-00009.safetensors", + "spatial.mix.0.bias": "weights-00009.safetensors", + "spatial.mix.0.weight": "weights-00009.safetensors", + "spatial.mix.2.bias": "weights-00009.safetensors", + "spatial.mix.2.weight": "weights-00009.safetensors", + "spatial.norm.bias": "weights-00009.safetensors", + "spatial.norm.weight": "weights-00009.safetensors", + "spatial.query.bias": "weights-00009.safetensors", + "spatial.query.weight": "weights-00009.safetensors", + "spatial.visual.bias": "weights-00009.safetensors", + "spatial.visual.weight": "weights-00009.safetensors" + } +} diff --git a/PixelOne-Pro-4B/pixelone.json b/PixelOne-Pro-4B/pixelone.json new file mode 100644 index 0000000000000000000000000000000000000000..57b8f864efd8477f97762cdea7d56f66e28e22ca --- /dev/null +++ b/PixelOne-Pro-4B/pixelone.json @@ -0,0 +1,5643 @@ +{ + "schema": "pixelone-pro-v1", + "model_name": "PixelOne-Pro-4B", + "use_cache": false, + "precision": "training_cuda", + "recipe": { + "attention": "sdpa", + "attention_mode": "bidirectional_full_layers", + "checkpoint_every": 500, + "decoder": "coarse_first", + "full_lr": 1e-06, + "global_batch": 256, + "gradient_checkpointing": true, + "gradient_clip": 1.0, + "gt_routing": "GT center + predicted topK + GT-positive topK; independent of additional KD readout support", + "head_lr": 3e-05, + "head_seed": 20261103, + "kd_weight": 0.5, + "kernel_backend": "native", + "lora_alpha": 32, + "lora_lr": 5e-06, + "lora_rank": 16, + "loss": "coarse GT set likelihood + fine Top20 + observed-support pixel KD", + "lr_schedule": "cosine", + "lr_warmup_steps": 63, + "micro_batch": 8, + "min_lr_ratio": 0.1, + "optimizer_policy": "fresh joint AdamW for weight-only Top20 continuation; trained pixel head retained", + "prompt": "valid_click_v1", + "readout_width": 128, + "routing_topk": 4, + "seed": 20261110, + "sharding": "hybrid_shard", + "spatial_lr": 0.0001, + "speed": { + "batched_gradient_checks": true, + "length_bucket_batches": 32, + "prefetch_batches": 2, + "prefetch_workers": 2, + "progress_every": 20, + "timing": true, + "timing_warmup_steps": 10, + "vectorized_kd": true + }, + "subdivisions": 32, + "temperature": 2, + "train_mode": "full", + "train_vision": true, + "version": 1, + "vision_lr": 1e-06, + "weight_decay": 0.01 + }, + "files": { + "chat_template.jinja": "a4aee8afcf2e0711942cf848899be66016f8d14a889ff9ede07bca099c28f715", + "config.json": "3405aecbcbe6fc8beefddfe9554aa0c7fa6b456ba8a292a8604f52434fbf634e", + "processor_config.json": "d89ef49ce9cd37fbf510158e13c1ef063d9286411c1ec9049932dbe0487143b1", + "tokenizer.json": "0b16fb8cbf388f6af8691645a17c909c01e536b4eb1bad865ed05fb6ef4a642a", + "tokenizer_config.json": "715960dd2b2174c1c21622efca22fde4bbf6437fac589c08ebfedda40f886750", + "weights-00001.safetensors": "b0f86ac734d927412c0693c1ca1eb734d21784da767265b02d8bd9c5c2fce640", + "weights-00002.safetensors": "38eeca12f5d0edbbeeecc477e73007d1b542fef63b32c645ef972caac8aa1ce1", + "weights-00003.safetensors": "77f490b7005eba675efeb6abeb29cce1242b6e309db1c138af24787f21cb3b77", + "weights-00004.safetensors": "63486e763227661bbb206b92f8a49262e216330c3cfa0a95afceab34b34e39dd", + "weights-00005.safetensors": "a75b4029115ee5f4c5fcb22289cfc56a4d681bf03aaec62160647c2cfbeab7c2", + "weights-00006.safetensors": "86bb7e2ed27c1927eca50cf2cfb52e08cc0e8b7880fe4627ba554c8f07065889", + "weights-00007.safetensors": "8718d2109f635d4d3ee8b39365aa48bdc007d12b19e760642646f0e3d667d892", + "weights-00008.safetensors": "b740c2553f8f281bdc5a460dfc362afcea78ee21fa7cdda6de765e6343399747", + "weights-00009.safetensors": "5699f5b515ac45ef69a7c89689e530851f0b2766d8ccd588eb7096275ee7ad0d" + }, + "weight_map": { + "native.backbone.language_model.embed_tokens.weight": "weights-00001.safetensors", + "native.backbone.language_model.layers.0.input_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.A_log": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.conv1d.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.dt_bias": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_a.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_b.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_qkv.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.in_proj_z.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.norm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.linear_attn.out_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.mlp.down_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.mlp.gate_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.mlp.up_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.0.post_attention_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.input_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.A_log": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.conv1d.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.dt_bias": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_a.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_b.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_qkv.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.in_proj_z.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.norm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.linear_attn.out_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.mlp.down_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.mlp.gate_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.mlp.up_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.1.post_attention_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.input_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.A_log": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.conv1d.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.dt_bias": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_a.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_b.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_qkv.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.in_proj_z.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.norm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.linear_attn.out_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.mlp.down_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.mlp.gate_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.mlp.up_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.10.post_attention_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.input_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.mlp.down_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.mlp.gate_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.mlp.up_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.post_attention_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.self_attn.k_norm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.self_attn.k_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.self_attn.o_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.self_attn.q_norm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.self_attn.q_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.11.self_attn.v_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.input_layernorm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.A_log": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.conv1d.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.dt_bias": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_a.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_b.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_qkv.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.in_proj_z.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.norm.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.linear_attn.out_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.mlp.down_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.mlp.gate_proj.weight": "weights-00002.safetensors", + "native.backbone.language_model.layers.12.mlp.up_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.12.post_attention_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.input_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.A_log": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.conv1d.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.dt_bias": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_a.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_b.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_qkv.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.in_proj_z.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.norm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.linear_attn.out_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.mlp.down_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.mlp.gate_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.mlp.up_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.13.post_attention_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.input_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.A_log": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.conv1d.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.dt_bias": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_a.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_b.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_qkv.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.in_proj_z.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.norm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.linear_attn.out_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.mlp.down_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.mlp.gate_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.mlp.up_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.14.post_attention_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.input_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.mlp.down_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.mlp.gate_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.mlp.up_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.post_attention_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.self_attn.k_norm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.self_attn.k_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.self_attn.o_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.self_attn.q_norm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.self_attn.q_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.15.self_attn.v_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.input_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.A_log": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.conv1d.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.dt_bias": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_a.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_b.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_qkv.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.in_proj_z.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.norm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.linear_attn.out_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.mlp.down_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.mlp.gate_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.mlp.up_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.16.post_attention_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.input_layernorm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.A_log": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.conv1d.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.dt_bias": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_a.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_b.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_qkv.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.in_proj_z.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.norm.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.linear_attn.out_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.mlp.down_proj.weight": "weights-00003.safetensors", + "native.backbone.language_model.layers.17.mlp.gate_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.17.mlp.up_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.17.post_attention_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.input_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.A_log": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.conv1d.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.dt_bias": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_a.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_b.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_qkv.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.in_proj_z.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.norm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.linear_attn.out_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.mlp.down_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.mlp.gate_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.mlp.up_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.18.post_attention_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.input_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.mlp.down_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.mlp.gate_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.mlp.up_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.post_attention_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.self_attn.k_norm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.self_attn.k_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.self_attn.o_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.self_attn.q_norm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.self_attn.q_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.19.self_attn.v_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.input_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.A_log": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.conv1d.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.dt_bias": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_a.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_b.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_qkv.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.in_proj_z.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.norm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.linear_attn.out_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.mlp.down_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.mlp.gate_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.mlp.up_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.2.post_attention_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.input_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.A_log": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.conv1d.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.dt_bias": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_a.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_b.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_qkv.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.in_proj_z.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.norm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.linear_attn.out_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.mlp.down_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.mlp.gate_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.mlp.up_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.20.post_attention_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.input_layernorm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.A_log": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.conv1d.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.dt_bias": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_a.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_b.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_qkv.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.in_proj_z.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.norm.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.linear_attn.out_proj.weight": "weights-00004.safetensors", + "native.backbone.language_model.layers.21.mlp.down_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.21.mlp.gate_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.21.mlp.up_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.21.post_attention_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.input_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.A_log": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.conv1d.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.dt_bias": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_a.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_b.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_qkv.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.in_proj_z.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.norm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.linear_attn.out_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.mlp.down_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.mlp.gate_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.mlp.up_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.22.post_attention_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.input_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.mlp.down_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.mlp.gate_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.mlp.up_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.post_attention_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.self_attn.k_norm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.self_attn.k_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.self_attn.o_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.self_attn.q_norm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.self_attn.q_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.23.self_attn.v_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.input_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.A_log": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.conv1d.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.dt_bias": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_a.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_b.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_qkv.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.in_proj_z.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.norm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.linear_attn.out_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.mlp.down_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.mlp.gate_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.mlp.up_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.24.post_attention_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.input_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.A_log": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.conv1d.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.dt_bias": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_a.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_b.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_qkv.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.in_proj_z.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.norm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.linear_attn.out_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.mlp.down_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.mlp.gate_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.mlp.up_proj.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.25.post_attention_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.26.input_layernorm.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.26.linear_attn.A_log": "weights-00005.safetensors", + "native.backbone.language_model.layers.26.linear_attn.conv1d.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.26.linear_attn.dt_bias": "weights-00005.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_a.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_b.weight": "weights-00005.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_qkv.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.26.linear_attn.in_proj_z.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.26.linear_attn.norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.26.linear_attn.out_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.26.mlp.down_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.26.mlp.gate_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.26.mlp.up_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.26.post_attention_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.input_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.mlp.down_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.mlp.gate_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.mlp.up_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.post_attention_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.self_attn.k_norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.self_attn.k_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.self_attn.o_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.self_attn.q_norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.self_attn.q_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.27.self_attn.v_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.input_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.A_log": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.conv1d.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.dt_bias": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_a.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_b.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_qkv.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.in_proj_z.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.linear_attn.out_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.mlp.down_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.mlp.gate_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.mlp.up_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.28.post_attention_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.input_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.A_log": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.conv1d.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.dt_bias": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_a.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_b.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_qkv.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.in_proj_z.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.linear_attn.out_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.mlp.down_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.mlp.gate_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.mlp.up_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.29.post_attention_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.input_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.mlp.down_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.mlp.gate_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.mlp.up_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.post_attention_layernorm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.self_attn.k_norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.self_attn.k_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.self_attn.o_proj.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.self_attn.q_norm.weight": "weights-00006.safetensors", + "native.backbone.language_model.layers.3.self_attn.q_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.3.self_attn.v_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.input_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.A_log": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.conv1d.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.dt_bias": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_a.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_b.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_qkv.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.in_proj_z.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.norm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.linear_attn.out_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.mlp.down_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.mlp.gate_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.mlp.up_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.30.post_attention_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.31.input_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.31.self_attn.k_norm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.31.self_attn.k_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.31.self_attn.o_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.31.self_attn.q_norm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.31.self_attn.q_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.31.self_attn.v_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.input_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.A_log": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.conv1d.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.dt_bias": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_a.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_b.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_qkv.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.in_proj_z.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.norm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.linear_attn.out_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.mlp.down_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.mlp.gate_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.mlp.up_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.4.post_attention_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.input_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.A_log": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.conv1d.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.dt_bias": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_a.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_b.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_qkv.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.in_proj_z.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.norm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.linear_attn.out_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.mlp.down_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.mlp.gate_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.mlp.up_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.5.post_attention_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.input_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.A_log": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.conv1d.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.dt_bias": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_a.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_b.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_qkv.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.in_proj_z.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.norm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.linear_attn.out_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.mlp.down_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.mlp.gate_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.mlp.up_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.6.post_attention_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.7.input_layernorm.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.7.mlp.down_proj.weight": "weights-00007.safetensors", + "native.backbone.language_model.layers.7.mlp.gate_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.mlp.up_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.post_attention_layernorm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.self_attn.k_norm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.self_attn.k_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.self_attn.o_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.self_attn.q_norm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.self_attn.q_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.7.self_attn.v_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.input_layernorm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.A_log": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.conv1d.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.dt_bias": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_a.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_b.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_qkv.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.in_proj_z.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.norm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.linear_attn.out_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.mlp.down_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.mlp.gate_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.mlp.up_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.8.post_attention_layernorm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.input_layernorm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.A_log": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.conv1d.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.dt_bias": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_a.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_b.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_qkv.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.in_proj_z.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.norm.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.linear_attn.out_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.mlp.down_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.mlp.gate_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.mlp.up_proj.weight": "weights-00008.safetensors", + "native.backbone.language_model.layers.9.post_attention_layernorm.weight": "weights-00008.safetensors", + "native.backbone.language_model.norm.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.0.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.1.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.10.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.11.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.12.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.13.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.14.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.15.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.16.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.17.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.18.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.19.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.2.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.20.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.21.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.22.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.23.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.attn.proj.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.attn.qkv.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.attn.qkv.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.mlp.linear_fc2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.norm1.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.norm1.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.norm2.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.3.norm2.weight": "weights-00008.safetensors", + "native.backbone.visual.blocks.4.attn.proj.bias": "weights-00008.safetensors", + "native.backbone.visual.blocks.4.attn.proj.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.attn.qkv.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.attn.qkv.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.mlp.linear_fc2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.norm1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.norm1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.norm2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.4.norm2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.attn.proj.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.attn.proj.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.attn.qkv.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.attn.qkv.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.mlp.linear_fc2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.norm1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.norm1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.norm2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.5.norm2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.attn.proj.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.attn.proj.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.attn.qkv.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.attn.qkv.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.mlp.linear_fc2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.norm1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.norm1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.norm2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.6.norm2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.attn.proj.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.attn.proj.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.attn.qkv.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.attn.qkv.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.mlp.linear_fc2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.norm1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.norm1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.norm2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.7.norm2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.attn.proj.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.attn.proj.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.attn.qkv.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.attn.qkv.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.mlp.linear_fc2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.norm1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.norm1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.norm2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.8.norm2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.attn.proj.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.attn.proj.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.attn.qkv.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.attn.qkv.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.mlp.linear_fc2.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.norm1.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.norm1.weight": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.norm2.bias": "weights-00009.safetensors", + "native.backbone.visual.blocks.9.norm2.weight": "weights-00009.safetensors", + "native.backbone.visual.merger.linear_fc1.bias": "weights-00009.safetensors", + "native.backbone.visual.merger.linear_fc1.weight": "weights-00009.safetensors", + "native.backbone.visual.merger.linear_fc2.bias": "weights-00009.safetensors", + "native.backbone.visual.merger.linear_fc2.weight": "weights-00009.safetensors", + "native.backbone.visual.merger.norm.bias": "weights-00009.safetensors", + "native.backbone.visual.merger.norm.weight": "weights-00009.safetensors", + "native.backbone.visual.patch_embed.proj.bias": "weights-00009.safetensors", + "native.backbone.visual.patch_embed.proj.weight": "weights-00009.safetensors", + "native.backbone.visual.pos_embed.weight": "weights-00009.safetensors", + "native.head.bias": "weights-00009.safetensors", + "native.head.k.bias": "weights-00009.safetensors", + "native.head.k.weight": "weights-00009.safetensors", + "native.head.q.bias": "weights-00009.safetensors", + "native.head.q.weight": "weights-00009.safetensors", + "spatial.local.bias": "weights-00009.safetensors", + "spatial.local.weight": "weights-00009.safetensors", + "spatial.mix.0.bias": "weights-00009.safetensors", + "spatial.mix.0.weight": "weights-00009.safetensors", + "spatial.mix.2.bias": "weights-00009.safetensors", + "spatial.mix.2.weight": "weights-00009.safetensors", + "spatial.norm.bias": "weights-00009.safetensors", + "spatial.norm.weight": "weights-00009.safetensors", + "spatial.query.bias": "weights-00009.safetensors", + "spatial.query.weight": "weights-00009.safetensors", + "spatial.visual.bias": "weights-00009.safetensors", + "spatial.visual.weight": "weights-00009.safetensors" + }, + "tensors": { + "native.backbone.language_model.embed_tokens.weight": { + "dtype": "torch.float32", + "shape": [ + 248320, + 2560 + ] + }, + "native.backbone.language_model.layers.0.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.0.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.0.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.0.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.0.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.0.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.1.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.1.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.1.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.1.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.1.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.1.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.10.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.10.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.10.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.10.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.10.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.10.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.11.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.11.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.11.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.11.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.11.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.11.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.11.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.11.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.11.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.11.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.11.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.12.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.12.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.12.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.12.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.12.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.12.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.13.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.13.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.13.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.13.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.13.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.13.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.14.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.14.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.14.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.14.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.14.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.14.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.15.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.15.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.15.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.15.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.15.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.15.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.15.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.15.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.15.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.15.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.15.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.16.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.16.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.16.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.16.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.16.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.16.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.17.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.17.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.17.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.17.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.17.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.17.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.18.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.18.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.18.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.18.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.18.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.18.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.19.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.19.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.19.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.19.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.19.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.19.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.19.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.19.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.19.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.19.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.19.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.2.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.2.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.2.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.2.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.2.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.2.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.20.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.20.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.20.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.20.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.20.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.20.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.21.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.21.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.21.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.21.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.21.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.21.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.22.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.22.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.22.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.22.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.22.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.22.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.23.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.23.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.23.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.23.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.23.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.23.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.23.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.23.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.23.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.23.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.23.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.24.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.24.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.24.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.24.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.24.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.24.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.25.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.25.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.25.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.25.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.25.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.25.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.26.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.26.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.26.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.26.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.26.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.26.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.27.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.27.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.27.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.27.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.27.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.27.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.27.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.27.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.27.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.27.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.27.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.28.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.28.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.28.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.28.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.28.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.28.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.29.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.29.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.29.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.29.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.29.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.29.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.3.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.3.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.3.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.3.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.3.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.3.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.3.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.3.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.3.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.3.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.3.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.30.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.30.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.30.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.30.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.30.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.30.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.31.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.31.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.31.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.31.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.31.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.31.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.31.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.4.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.4.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.4.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.4.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.4.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.4.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.5.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.5.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.5.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.5.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.5.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.5.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.6.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.6.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.6.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.6.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.6.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.6.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.7.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.7.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.7.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.7.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.7.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.7.self_attn.k_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.7.self_attn.k_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.7.self_attn.o_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.7.self_attn.q_norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 256 + ] + }, + "native.backbone.language_model.layers.7.self_attn.q_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.7.self_attn.v_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 2560 + ] + }, + "native.backbone.language_model.layers.8.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.8.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.8.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.8.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.8.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.8.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.9.input_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.A_log": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.conv1d.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 1, + 4 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.dt_bias": { + "dtype": "torch.bfloat16", + "shape": [ + 32 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.in_proj_a.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.in_proj_b.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 32, + 2560 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.in_proj_qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 8192, + 2560 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.in_proj_z.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 2560 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.norm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 128 + ] + }, + "native.backbone.language_model.layers.9.linear_attn.out_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.language_model.layers.9.mlp.down_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560, + 9216 + ] + }, + "native.backbone.language_model.layers.9.mlp.gate_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.9.mlp.up_proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 9216, + 2560 + ] + }, + "native.backbone.language_model.layers.9.post_attention_layernorm.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 2560 + ] + }, + "native.backbone.language_model.norm.weight": { + "dtype": "torch.float32", + "shape": [ + 2560 + ] + }, + "native.backbone.visual.blocks.0.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.0.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.0.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.0.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.0.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.0.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.0.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.0.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.0.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.0.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.0.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.0.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.1.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.1.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.1.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.1.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.1.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.1.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.1.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.1.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.1.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.1.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.1.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.1.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.10.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.10.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.10.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.10.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.10.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.10.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.10.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.10.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.10.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.10.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.10.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.10.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.11.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.11.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.11.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.11.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.11.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.11.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.11.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.11.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.11.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.11.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.11.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.11.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.12.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.12.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.12.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.12.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.12.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.12.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.12.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.12.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.12.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.12.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.12.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.12.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.13.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.13.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.13.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.13.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.13.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.13.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.13.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.13.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.13.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.13.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.13.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.13.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.14.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.14.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.14.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.14.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.14.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.14.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.14.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.14.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.14.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.14.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.14.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.14.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.15.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.15.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.15.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.15.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.15.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.15.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.15.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.15.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.15.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.15.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.15.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.15.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.16.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.16.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.16.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.16.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.16.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.16.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.16.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.16.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.16.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.16.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.16.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.16.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.17.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.17.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.17.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.17.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.17.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.17.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.17.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.17.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.17.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.17.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.17.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.17.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.18.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.18.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.18.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.18.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.18.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.18.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.18.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.18.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.18.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.18.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.18.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.18.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.19.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.19.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.19.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.19.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.19.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.19.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.19.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.19.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.19.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.19.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.19.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.19.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.2.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.2.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.2.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.2.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.2.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.2.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.2.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.2.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.2.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.2.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.2.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.2.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.20.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.20.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.20.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.20.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.20.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.20.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.20.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.20.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.20.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.20.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.20.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.20.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.21.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.21.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.21.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.21.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.21.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.21.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.21.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.21.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.21.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.21.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.21.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.21.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.22.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.22.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.22.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.22.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.22.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.22.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.22.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.22.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.22.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.22.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.22.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.22.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.23.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.23.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.23.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.23.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.23.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.23.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.23.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.23.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.23.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.23.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.23.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.23.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.3.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.3.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.3.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.3.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.3.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.3.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.3.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.3.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.3.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.3.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.3.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.3.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.4.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.4.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.4.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.4.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.4.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.4.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.4.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.4.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.4.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.4.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.4.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.4.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.5.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.5.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.5.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.5.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.5.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.5.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.5.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.5.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.5.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.5.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.5.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.5.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.6.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.6.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.6.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.6.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.6.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.6.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.6.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.6.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.6.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.6.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.6.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.6.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.7.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.7.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.7.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.7.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.7.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.7.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.7.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.7.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.7.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.7.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.7.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.7.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.8.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.8.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.8.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.8.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.8.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.8.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.8.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.8.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.8.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.8.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.8.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.8.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.9.attn.proj.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.9.attn.proj.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 1024 + ] + }, + "native.backbone.visual.blocks.9.attn.qkv.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 3072 + ] + }, + "native.backbone.visual.blocks.9.attn.qkv.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 3072, + 1024 + ] + }, + "native.backbone.visual.blocks.9.mlp.linear_fc1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.blocks.9.mlp.linear_fc1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 4096, + 1024 + ] + }, + "native.backbone.visual.blocks.9.mlp.linear_fc2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.9.mlp.linear_fc2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024, + 4096 + ] + }, + "native.backbone.visual.blocks.9.norm1.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.9.norm1.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.9.norm2.bias": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.blocks.9.norm2.weight": { + "dtype": "torch.bfloat16", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.merger.linear_fc1.bias": { + "dtype": "torch.float32", + "shape": [ + 4096 + ] + }, + "native.backbone.visual.merger.linear_fc1.weight": { + "dtype": "torch.float32", + "shape": [ + 4096, + 4096 + ] + }, + "native.backbone.visual.merger.linear_fc2.bias": { + "dtype": "torch.float32", + "shape": [ + 2560 + ] + }, + "native.backbone.visual.merger.linear_fc2.weight": { + "dtype": "torch.float32", + "shape": [ + 2560, + 4096 + ] + }, + "native.backbone.visual.merger.norm.bias": { + "dtype": "torch.float32", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.merger.norm.weight": { + "dtype": "torch.float32", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.patch_embed.proj.bias": { + "dtype": "torch.float32", + "shape": [ + 1024 + ] + }, + "native.backbone.visual.patch_embed.proj.weight": { + "dtype": "torch.float32", + "shape": [ + 1024, + 3, + 2, + 16, + 16 + ] + }, + "native.backbone.visual.pos_embed.weight": { + "dtype": "torch.float32", + "shape": [ + 2304, + 1024 + ] + }, + "native.head.bias": { + "dtype": "torch.float32", + "shape": [ + 1 + ] + }, + "native.head.k.bias": { + "dtype": "torch.float32", + "shape": [ + 512 + ] + }, + "native.head.k.weight": { + "dtype": "torch.float32", + "shape": [ + 512, + 2560 + ] + }, + "native.head.q.bias": { + "dtype": "torch.float32", + "shape": [ + 512 + ] + }, + "native.head.q.weight": { + "dtype": "torch.float32", + "shape": [ + 512, + 2560 + ] + }, + "spatial.local.bias": { + "dtype": "torch.float32", + "shape": [ + 128 + ] + }, + "spatial.local.weight": { + "dtype": "torch.float32", + "shape": [ + 128, + 1, + 3, + 3 + ] + }, + "spatial.mix.0.bias": { + "dtype": "torch.float32", + "shape": [ + 128 + ] + }, + "spatial.mix.0.weight": { + "dtype": "torch.float32", + "shape": [ + 128, + 128 + ] + }, + "spatial.mix.2.bias": { + "dtype": "torch.float32", + "shape": [ + 1024 + ] + }, + "spatial.mix.2.weight": { + "dtype": "torch.float32", + "shape": [ + 1024, + 128 + ] + }, + "spatial.norm.bias": { + "dtype": "torch.float32", + "shape": [ + 2560 + ] + }, + "spatial.norm.weight": { + "dtype": "torch.float32", + "shape": [ + 2560 + ] + }, + "spatial.query.bias": { + "dtype": "torch.float32", + "shape": [ + 256 + ] + }, + "spatial.query.weight": { + "dtype": "torch.float32", + "shape": [ + 256, + 2560 + ] + }, + "spatial.visual.bias": { + "dtype": "torch.float32", + "shape": [ + 128 + ] + }, + "spatial.visual.weight": { + "dtype": "torch.float32", + "shape": [ + 128, + 2560 + ] + } + }, + "source_step": 1954, + "source_manifest_sha256": "152c38d819ff9f1258e132f6d8b034112b4386da8efc94a92e3eb4a0950cfc8f", + "source_checkpoint_sha256": "1b9789d2027ac20e33a21c7b947eee8e13016a7766202b22146e266d8359189c", + "reference_runtime": { + "causal-conv1d": "1.7.0", + "fla-core": "0.4.2", + "flash-linear-attention": "0.4.2", + "torch": "2.11.0", + "transformers": "5.6.2", + "triton": "3.7.0" + }, + "runtime_package": "pixelone-grounding==0.1.0" +} diff --git a/PixelOne-Pro-4B/processor_config.json b/PixelOne-Pro-4B/processor_config.json new file mode 100644 index 0000000000000000000000000000000000000000..33818c7f9e991ad735fd240209f4fa73e6c28c50 --- /dev/null +++ b/PixelOne-Pro-4B/processor_config.json @@ -0,0 +1,60 @@ +{ + "image_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_processor_type": "Qwen2VLImageProcessor", + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "merge_size": 2, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "size": { + "longest_edge": 16777216, + "shortest_edge": 65536 + }, + "temporal_patch_size": 2 + }, + "processor_class": "Qwen3VLProcessor", + "video_processor": { + "do_convert_rgb": true, + "do_normalize": true, + "do_rescale": true, + "do_resize": true, + "do_sample_frames": true, + "fps": 2, + "image_mean": [ + 0.5, + 0.5, + 0.5 + ], + "image_std": [ + 0.5, + 0.5, + 0.5 + ], + "max_frames": 768, + "merge_size": 2, + "min_frames": 4, + "patch_size": 16, + "resample": 3, + "rescale_factor": 0.00392156862745098, + "return_metadata": false, + "size": { + "longest_edge": 25165824, + "shortest_edge": 4096 + }, + "temporal_patch_size": 2, + "video_processor_type": "Qwen3VLVideoProcessor" + } +} diff --git a/PixelOne-Pro-4B/runtime/THIRD_PARTY_NOTICES.md b/PixelOne-Pro-4B/runtime/THIRD_PARTY_NOTICES.md new file mode 100644 index 0000000000000000000000000000000000000000..d0ca71c491110c4d4235eb6417f7ca99786d4d82 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/THIRD_PARTY_NOTICES.md @@ -0,0 +1,9 @@ +# Third-party attribution + +- VideoJEV model code and native decision interface are retained in `src/videojev_hf/`. The supplied upstream Apache-2.0 license and notice are in `third_party/VideoJev-LICENSE` and `third_party/VideoJev-NOTICE`. +- Qwen3.5-4B and Qwen3.6-35B-A3B provide the underlying dense/MoE architectures and base weights. Their upstream licenses remain applicable to derived models. +- Transformers, PyTorch, Accelerate, safetensors and optional FLA/causal-conv1d kernels are installed dependencies, not vendored replacements. Their respective licenses apply. +- DejaVuSans is included only for the teacher's labeled-grid rendering. Its license is bundled beside the font in `src/pixelone/assets/DejaVuSans-LICENSE.txt`. +- An optional historical XTuner expert path remains in the inherited VideoJEV source. The published Pro-35B recipe uses PyTorch `grouped_mm`, not that optional XTuner path. + +The release license for new PixelOne code and derived model weights still requires maintainer confirmation. This notice preserves upstream attribution and does not itself grant a new license. diff --git a/PixelOne-Pro-4B/runtime/pyproject.toml b/PixelOne-Pro-4B/runtime/pyproject.toml new file mode 100644 index 0000000000000000000000000000000000000000..023995e17ba783bf628ae7a0bbba8ef123f3d40a --- /dev/null +++ b/PixelOne-Pro-4B/runtime/pyproject.toml @@ -0,0 +1,34 @@ +[build-system] +requires = ["setuptools>=68"] +build-backend = "setuptools.build_meta" + +[project] +name = "pixelone-grounding" +version = "0.1.0" +description = "Native-resolution GUI grounding with search distillation and direct pixel prediction" +requires-python = ">=3.10" +dependencies = [ + "torch>=2.11,<2.12", "transformers==5.6.2", "accelerate>=1.10", + "safetensors>=0.4", "huggingface-hub>=0.30", "numpy>=1.26,<3", + "Pillow>=10", "einops>=0.8", "scipy>=1.12", "packaging>=20", +] + +[project.optional-dependencies] +native = ["flash-linear-attention==0.4.2", "causal-conv1d==1.7.0"] +test = ["pytest>=8"] + +[project.scripts] +pixelone = "pixelone.cli:main" + +[project.urls] +Repository = "https://github.com/tiankanghui/PixleOne" + +[tool.setuptools.packages.find] +where = ["src"] + +[tool.setuptools.package-data] +pixelone = ["assets/*"] + +[tool.pytest.ini_options] +testpaths = ["tests"] +pythonpath = ["src"] diff --git a/PixelOne-Pro-4B/runtime/src/jev_click_finetune/__init__.py b/PixelOne-Pro-4B/runtime/src/jev_click_finetune/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_click_finetune/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-4B/runtime/src/jev_click_finetune/inputs.py b/PixelOne-Pro-4B/runtime/src/jev_click_finetune/inputs.py new file mode 100644 index 0000000000000000000000000000000000000000..7a955da7196ff4621d44842fdf7eb4ca1590129d --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_click_finetune/inputs.py @@ -0,0 +1,62 @@ +"""One static native screenshot, one query, spatial visual-token candidates.""" + +import hashlib + +import numpy as np +import torch +from PIL import Image +from transformers.video_utils import VideoMetadata + +from jev_spatial_distill.spatial_pointer.geometry import Layout + + +def render(image, subdivisions=32): + layout = Layout(*image.size, subdivisions=subdivisions) + canvas = Image.new('RGB', layout.canvas_size, 'white') + canvas.paste(image.convert('RGB'), (0,0)) + return [canvas, canvas], layout + + +def query_group(processor, record, instruction): + from videojev_hf.processing_videojev import DECIDE + if not instruction.strip() or '<|' in instruction: + raise ValueError('Expected an instruction without model control tokens') + if record['grid_thw'][0] != 1: + raise ValueError('Spatial pointer uses exactly one static frame pair') + metadata = VideoMetadata(total_num_frames=2, fps=2., frames_indices=[0,1]) + replacement = processor.replace_video_token(dict(video_grid_thw=np.asarray([[1,2,2]]),video_metadata=[metadata]),video_idx=0) + content = [dict(type='video',video='provided_in_memory'),dict(type='text',text=( + f'Locate the UI element for this instruction: "{instruction}". ' + 'Select a valid click position inside that element in the screenshot.\n'+DECIDE))] + text = processor.apply_chat_template([dict(role='user',content=content)],tokenize=False,add_generation_prompt=False) + texts,_ = processor.get_text_with_replacements([text],[],[replacement],[]) + encoded = processor(text=texts,return_tensors='pt') + ids,types = encoded['input_ids'],encoded['mm_token_type_ids'] + slots = ids[0] == processor.video_token_id + if int(slots.sum()) != 1:raise ValueError('Expected one temporary video slot') + repeats = torch.ones(ids.shape[1],dtype=torch.long);repeats[slots] = record['tokens'] + ids = torch.repeat_interleave(ids,repeats,dim=1) + types = torch.repeat_interleave(types,repeats,dim=1) + spatial = (ids[0] == processor.video_token_id).nonzero().flatten() + query = (ids[0] == processor.tokenizer.convert_tokens_to_ids(DECIDE)).nonzero().flatten() + if query.numel() != 1 or spatial.numel() != record['tokens'] or spatial[-1] >= query[0]: + raise ValueError('Spatial/query slots are not intact') + if (ids.shape[1]+63)//64*64 > record['context']: + raise ValueError('Native image and instruction exceed context; no silent resize') + return dict(input_ids=ids,mm_token_type_ids=types,video_grid_thw=torch.tensor([record['grid_thw']]), + pair_indices=spatial[None],query_indices=query,score_mask=torch.ones((1,len(spatial)),dtype=torch.bool), + decision_tasks=torch.ones(1,dtype=torch.long)) + + +def prepare(model, processor, image, instruction, subdivisions=32): + from scripts.refine_spatial_jev import encode_views + views,layout = render(image,subdivisions) + features,record = encode_views(model.native,processor,views,'native') + if record['tokens'] != layout.count or record['grid_thw'] != [1,layout.rows*2,layout.cols*2]: + raise ValueError('Native visual grid does not match original-pixel support') + if features.is_inference() or not getattr(model.native,'train_vision',False): + with torch.inference_mode(False):features = features.detach().clone() + group = query_group(processor,record,instruction) + return group,features,layout,dict(visual_tokens=record['tokens'],input_tokens=group['input_ids'].shape[1], + frames=2,canvas_size=list(layout.canvas_size),original_size=list(image.size),padding_origin=[0,0], + frame_sha256=[hashlib.sha256(v.tobytes()).hexdigest() for v in views]) diff --git a/PixelOne-Pro-4B/runtime/src/jev_click_finetune/model.py b/PixelOne-Pro-4B/runtime/src/jev_click_finetune/model.py new file mode 100644 index 0000000000000000000000000000000000000000..030b4c8e416aaffc0e10c5832097fd28826fdfc1 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_click_finetune/model.py @@ -0,0 +1,27 @@ +"""Detached region routing after one shared native LM pass; unchanged parameters.""" + +import torch +from jev_spatial_distill.spatial_pointer.model import SpatialStudent + + +def route(coarse, required=None, positive=None, topk=4): + # Inference uses only coarse logits. Training adds GT/KD support, without + # inserting GT into the image, text or language-model attention. + if required is None: + return coarse.detach().argmax().reshape(1) + values = list(required) + values += coarse.detach().topk(min(topk, len(coarse))).indices.tolist() + if positive is not None: + pos = positive.to(coarse.device).nonzero().flatten() + if not len(pos): + raise ValueError('No valid GT regions to route') + values += pos[coarse.detach()[pos].topk(min(topk, len(pos))).indices].tolist() + return torch.tensor(list(dict.fromkeys(values)), device=coarse.device, dtype=torch.long) + + +class ClickStudent(SpatialStudent): + def forward(self, group, features, layout, required=None, positive=None, topk=4): + spatial, query = self.encode_readout(group, features) + coarse = self.native.head(spatial[None], query[None])[0] + parents = route(coarse, required, positive, topk) + return dict(coarse=coarse, fine=self.spatial(spatial, query, layout, parents), parents=parents) diff --git a/PixelOne-Pro-4B/runtime/src/jev_click_finetune/objective.py b/PixelOne-Pro-4B/runtime/src/jev_click_finetune/objective.py new file mode 100644 index 0000000000000000000000000000000000000000..7672b8e748c35bbaa0c0426685c8c2b7fae4e1d1 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_click_finetune/objective.py @@ -0,0 +1,39 @@ +"""Set likelihood for valid pixel-center clicks, with sparse fine supervision.""" + +import torch + + +def support(layout, box, device=None): + # Reuse strict GT validation; representability is checked against the full set. + layout.center_target(box) + xy = layout.positions(device) + valid = layout.valid(device) + positive = (valid & (xy[..., 0] >= box[0]) & (xy[..., 0] <= box[2]) + & (xy[..., 1] >= box[1]) & (xy[..., 1] <= box[3])) + if not positive.any(): + raise ValueError('GT box contains no representable pixel center') + return valid, positive + + +def set_nll(logits, valid, positive): + if logits.shape != valid.shape or valid.shape != positive.shape: + raise ValueError('Click support shapes differ') + if (positive & ~valid).any() or not positive.any(-1).all(): + raise ValueError('Positive click support must be nonempty and valid') + logits = logits.float() + return (logits.masked_fill(~valid, -torch.inf).logsumexp(-1) + - logits.masked_fill(~positive, -torch.inf).logsumexp(-1)) + + +def click_loss(output, valid, positive): + coarse = set_nll(output['coarse'], valid.any(-1), positive.any(-1)) + parents = output['parents'] + selected_positive = positive[parents] + keep = selected_positive.any(-1) + if not keep.any(): + raise ValueError('Routing omitted every valid GT region') + # Never force a point into an incorrect predicted region. Those regions are + # suppressed by the coarse objective; fine labels exist only in region ∩ GT. + fine = set_nll(output['fine'][keep], valid[parents][keep], selected_positive[keep]).mean() + return coarse + fine, dict(coarse=float(coarse.detach()), fine=float(fine.detach()), + supervised_regions=int(keep.sum())) diff --git a/PixelOne-Pro-4B/runtime/src/jev_fine_ablation/__init__.py b/PixelOne-Pro-4B/runtime/src/jev_fine_ablation/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_fine_ablation/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-4B/runtime/src/jev_fine_ablation/distillation.py b/PixelOne-Pro-4B/runtime/src/jev_fine_ablation/distillation.py new file mode 100644 index 0000000000000000000000000000000000000000..d1c389359f8722bdd905013f6a588a8c3a79d5aa --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_fine_ablation/distillation.py @@ -0,0 +1,142 @@ +"""Keep teacher routing fixed; compare pixel, coarse-only and per-ROI region KD.""" + +import math +import torch +from torch.nn import functional as F +from jev_spatial_distill.spatial_pointer.supervision import kd_loss as pixel_kd_loss +from spatial_pro_experiments.fast import cell_candidates + + +def build_region_targets(prediction, layout, soft, temperature=2.): + """CPU geometry only, with the same trusted-teacher gate and parents as pixel KD. + + Each actual pixel center belongs to exactly one half-open leaf in each ROI. + Overlapping ROIs are independent observations. Empty leaves/ROIs are reported, + never assigned a fabricated student probability or treated as negative targets. + """ + if not math.isfinite(temperature) or temperature <= 0: + raise ValueError('Positive finite temperature required') + if not soft or not soft['enabled']: + return None + parents = soft['parents'].cpu() + local = torch.arange(layout.fine_count) + unit = layout.stride / layout.subdivisions + x = (parents[:, None] % layout.cols)*32 + (local % layout.subdivisions + .5)*unit + y = (parents[:, None] // layout.cols)*32 + (local // layout.subdivisions + .5)*unit + x, y = x.double(), y.double() + valid = (x < layout.width) & (y < layout.height) + # Normalize fine probabilities over every valid point in a parent, not only + # the part covered by a crop, before forming the joint student point measure. + result = dict(parents=parents, valid=valid, rois=[], temperature=temperature) + stage = prediction['stages'][-1] + cells = stage['cells_per_axis'] + if not isinstance(cells, int) or cells < 1 or not stage['traces']: + raise ValueError('Invalid teacher region partition') + roi_scores = [] + for trace in stage['traces']: + bounds = trace['crop_bounds'] + left, top, right, bottom = bounds + if not all(math.isfinite(v) for v in bounds) or not (0 <= left < right <= layout.width and 0 <= top < bottom <= layout.height): + raise ValueError('Teacher ROI is outside the original image') + leaves = sorted(cell_candidates(bounds, trace['predictions'], cells, trace['parent_score']), + key=lambda c: (c['row'], c['column'])) + scores = torch.tensor([c['score'] for c in leaves], dtype=torch.float64) + if not torch.isfinite(scores).all(): + raise ValueError('Invalid teacher leaf scores') + q = (scores / temperature).softmax(0) + present = valid & (x >= left) & (x < right) & (y >= top) & (y < bottom) + flat = torch.nonzero(present.flatten(), as_tuple=False).flatten() + xx, yy = x.flatten()[flat], y.flatten()[flat] + edges_x = torch.tensor([left+(right-left)*k/cells for k in range(1, cells)], dtype=torch.float64) + edges_y = torch.tensor([top+(bottom-top)*k/cells for k in range(1, cells)], dtype=torch.float64) + leaf_ids = torch.bucketize(yy.contiguous(), edges_y, right=True)*cells + torch.bucketize(xx.contiguous(), edges_x, right=True) + # Independent geometric count catches missing parents in the retained + # original routing. No silent clipping of teacher support is allowed. + nx = max(0, min(layout.width, math.ceil(right/unit-.5))-max(0, math.ceil(left/unit-.5))) + ny = max(0, min(layout.height, math.ceil(bottom/unit-.5))-max(0, math.ceil(top/unit-.5))) + if flat.numel() != nx*ny: + raise ValueError('Original teacher routing omits representable ROI pixel centers') + represented = torch.bincount(leaf_ids, minlength=cells*cells) > 0 + dropped = float(q[~represented].sum()) + if represented.any(): + truth = q[represented] / q[represented].sum() + else: + truth = torch.empty(0, dtype=torch.float64) + roi_scores.append(trace['parent_score'] + math.log(max(leaves[0]['presence_probability'], 1e-12))) + result['rois'].append(dict(flat=flat, leaf_ids=leaf_ids, represented=represented, + truth=truth.float(), cells=cells*cells, point_count=len(flat), + unrepresented_teacher_mass=dropped, bounds=list(bounds))) + weights = torch.tensor(roi_scores, dtype=torch.float64).softmax(0) + nonempty = torch.tensor([bool(r['point_count']) for r in result['rois']]) + result['dropped_roi_weight'] = float(weights[~nonempty].sum()) + result['unrepresented_teacher_mass'] = sum(float(w)*r['unrepresented_teacher_mass'] for w,r in zip(weights,result['rois'])) + for i, roi in enumerate(result['rois']): + roi['weight'] = float(weights[i]/weights[nonempty].sum()) if nonempty[i] else 0. + return result + + +def segment_logsumexp(values, indices, size): + """Stable grouped sum; absent cells remain -inf and never enter KL.""" + peak = torch.full((size,), -torch.inf, dtype=values.dtype, device=values.device) + peak.scatter_reduce_(0, indices, values.detach(), reduce='amax', include_self=True) + sums = torch.zeros_like(peak).scatter_add(0, indices, (values-peak[indices]).exp()) + return peak + sums.clamp_min(torch.finfo(values.dtype).tiny).log() + + +def region_fine_kd(output, target, parent_order, temperature): + zero = output['fine'].float().sum()*0 + if target is None: + return zero, dict(region_rois=0, region_points=0, region_cells=0, + unrepresented_teacher_mass=0., dropped_roi_weight=0.) + if target['temperature'] != temperature: + raise ValueError('Teacher and student KD temperatures differ') + lookup = {int(p):i for i,p in enumerate(parent_order)} + if len(lookup) != len(parent_order) or any(int(p) not in lookup for p in target['parents']): + raise ValueError('Region KD teacher parents were not routed exactly') + device = output['fine'].device + rows = torch.tensor([lookup[int(p)] for p in target['parents']], device=device) + parents = target['parents'].to(device) + valid = target['valid'].to(device) + log_fine = (output['fine'][rows].float()/temperature).masked_fill(~valid, -torch.inf).log_softmax(-1) + log_joint = (output['coarse'][parents].float()/temperature)[:, None] + log_fine + loss = zero + for roi in target['rois']: + if not roi['point_count']: + continue + values = log_joint.flatten()[roi['flat'].to(device)] + log_mass = segment_logsumexp(values, roi['leaf_ids'].to(device), roi['cells']) + log_probs = log_mass[roi['represented'].to(device)].log_softmax(0) + loss = loss + roi['weight']*F.kl_div(log_probs, roi['truth'].to(device), reduction='sum')*temperature**2 + return loss, dict(region_rois=sum(r['point_count'] > 0 for r in target['rois']), + region_points=sum(r['point_count'] for r in target['rois']), + region_cells=sum(int(r['represented'].sum()) for r in target['rois']), + unrepresented_teacher_mass=target['unrepresented_teacher_mass'], dropped_roi_weight=target['dropped_roi_weight']) + + +def distillation_loss(output, soft, parent_order, mode, temperature=2., region_target=None): + if mode not in ('no_fine_kd', 'region_kd', 'interior'): + raise ValueError('Unknown fine KD ablation') + coarse, fine = output['coarse'].float(), output['fine'].float() + zero = coarse.sum()*0 + fine.sum()*0 + if not soft or not soft['enabled']: + return zero, dict(kd_enabled=0, observed_parents=0, observed_pixels=0), dict(mode=mode, coarse=0., fine=0.) + parents = soft['parents'].to(coarse.device) + mass = soft['mass'].to(coarse.device) + coarse_mass = mass.sum(-1) + truth = coarse_mass.pow(1/temperature);truth = truth/truth.sum() + rank = F.kl_div(F.log_softmax(coarse[parents]/temperature, -1), truth, reduction='sum')*temperature**2 + terms = dict(kd_enabled=1, observed_parents=len(parents), observed_pixels=int((mass > 0).sum())) + extra = {} + if mode == 'interior': + total, original_terms = pixel_kd_loss(output, soft, parent_order, temperature) + if original_terms != terms: + raise ValueError('Original KD support changed') + conditional = total-rank + elif mode == 'no_fine_kd': + conditional = zero;total = rank+zero + else: + if region_target is None: + raise ValueError('Enabled teacher requires region geometry') + conditional, extra = region_fine_kd(output, region_target, parent_order, temperature) + total = rank+conditional + return total, terms, dict(mode=mode, coarse=float(rank.detach()), fine=float(conditional.detach()), **extra) diff --git a/PixelOne-Pro-4B/runtime/src/jev_fine_refine/__init__.py b/PixelOne-Pro-4B/runtime/src/jev_fine_refine/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_fine_refine/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-4B/runtime/src/jev_fine_refine/objective.py b/PixelOne-Pro-4B/runtime/src/jev_fine_refine/objective.py new file mode 100644 index 0000000000000000000000000000000000000000..1db6dff4d4f68bbd931a33edc3411292372da85c --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_fine_refine/objective.py @@ -0,0 +1,31 @@ +"""A GT-valid maximum must beat outside candidates; padding is never negative.""" + +import torch +from torch.nn import functional as F +from jev_click_finetune.objective import set_nll + + +def winner_loss(logits,valid,positive): + if logits.ndim!=2 or logits.shape!=valid.shape or valid.shape!=positive.shape or valid.dtype!=torch.bool or positive.dtype!=torch.bool: + raise ValueError('Winner support shapes/types differ') + if not positive.any(-1).all() or (positive & ~valid).any(): + raise ValueError('Every fine row needs nonempty valid GT support') + z=logits.float();negative=valid & ~positive;active=negative.any(-1) + # Fully GT-covered rows need no point constraint. Do not differentiate an + # all--inf logsumexp: it can create NaNs even when multiplied by zero. + zero=z.sum()*0 + if not active.any():return zero + selected=z[active];pos=positive[active];neg=negative[active] + indices=selected.detach().masked_fill(~pos,-torch.inf).argmax(-1) + best=selected.gather(-1,indices[:,None]).squeeze(-1) + wrong=selected.masked_fill(~neg,-torch.inf).logsumexp(-1) + # Same denominator as the set-loss control, including zero-loss full rows. + return F.softplus(wrong-best).sum()/len(z)+zero + + +def fine_objective(output,valid,positive): + coarse=set_nll(output['coarse'],valid.any(-1),positive.any(-1)) + parents=output['parents'];truth=positive[parents];keep=truth.any(-1) + if not keep.any():raise ValueError('No supervised positive region was routed') + fine=winner_loss(output['fine'][keep],valid[parents][keep],truth[keep]) + return coarse+fine,dict(coarse=float(coarse.detach()),fine=float(fine.detach()),supervised_regions=int(keep.sum())) diff --git a/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/__init__.py b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/spatial_pointer/__init__.py b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/spatial_pointer/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/spatial_pointer/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/spatial_pointer/data.py b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/spatial_pointer/data.py new file mode 100644 index 0000000000000000000000000000000000000000..f530e2d274fa9506f4e9d0b1a1e963a15a70d9aa --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/spatial_pointer/data.py @@ -0,0 +1 @@ +from pixelone.io import file_sha256 as sha diff --git a/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/spatial_pointer/geometry.py b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/spatial_pointer/geometry.py new file mode 100644 index 0000000000000000000000000000000000000000..ea43c8e19bf70c3ab22ddb0ebf359007df3c0280 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/spatial_pointer/geometry.py @@ -0,0 +1,84 @@ +"""Explicit original-pixel support, including padded-border masks.""" + +from dataclasses import dataclass +import math + +import torch + + +@dataclass(frozen=True) +class Layout: + width: int + height: int + stride: int = 32 + subdivisions: int = 32 + + def __post_init__(self): + if min(self.width, self.height) < 1 or self.stride != 32: + raise ValueError('Positive image dimensions and the native 32-pixel stride required') + if self.subdivisions < 1 or self.stride % self.subdivisions: + raise ValueError('Subdivisions must divide the native stride') + + @property + def cols(self):return math.ceil(self.width / self.stride) + + @property + def rows(self):return math.ceil(self.height / self.stride) + + @property + def count(self):return self.rows * self.cols + + @property + def canvas_size(self):return self.cols*self.stride, self.rows*self.stride + + @property + def fine_count(self):return self.subdivisions**2 + + def positions(self, device=None): + parent = torch.arange(self.count, device=device) + fine = torch.arange(self.fine_count, device=device) + unit = self.stride / self.subdivisions + x = (parent[:, None] % self.cols)*self.stride + (fine[None] % self.subdivisions + .5)*unit + y = (parent[:, None] // self.cols)*self.stride + (fine[None] // self.subdivisions + .5)*unit + return torch.stack((x, y), -1) + + def valid(self, device=None): + xy = self.positions(device) + return (xy[..., 0] < self.width) & (xy[..., 1] < self.height) + + def center_target(self, box): + if len(box) != 4 or not all(math.isfinite(v) for v in box) or not ( + 0 <= box[0] < box[2] <= self.width and 0 <= box[1] < box[3] <= self.height): + raise ValueError('Invalid original-pixel GT box') + x, y = (box[0]+box[2])/2, (box[1]+box[3])/2 + col, row = int(x/self.stride), int(y/self.stride) + unit = self.stride/self.subdivisions + u, v = int((x-col*self.stride)/unit), int((y-row*self.stride)/unit) + parent, fine = row*self.cols+col, v*self.subdivisions+u + point = [(col*self.stride+(u+.5)*unit), (row*self.stride+(v+.5)*unit)] + representable = box[0] <= point[0] <= box[2] and box[1] <= point[1] <= box[3] + return dict(parent=parent, fine=fine, center=[x,y], quantized_point=point, representable=representable) + + +def joint_log_probs(coarse, fine, valid): + if fine.shape != valid.shape or coarse.shape != fine.shape[:1] or valid.dtype != torch.bool: + raise ValueError('Hierarchical readout shapes differ') + parents = valid.any(-1) + if not parents.any():raise ValueError('Empty spatial support') + # All-invalid padding parents would otherwise produce NaN in log_softmax. + safe_fine = fine.float().masked_fill(~valid, -torch.inf) + safe_fine = torch.where(parents[:,None], safe_fine, torch.zeros_like(safe_fine)) + return (coarse.float().masked_fill(~parents, -torch.inf).log_softmax(-1)[:,None] + + safe_fine.log_softmax(-1)).masked_fill(~valid, -torch.inf) + + +def decode(coarse, fine, layout): + scores = joint_log_probs(coarse, fine, layout.valid(coarse.device)) + flat = int(scores.flatten().argmax()) + parent, local = divmod(flat, layout.fine_count) + point = layout.positions(coarse.device)[parent,local].tolist() + return dict(predicted_xy=point, parent=parent, fine=local) + + +def inside(point, box): + return box[0] <= point[0] <= box[2] and box[1] <= point[1] <= box[3] diff --git a/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/spatial_pointer/model.py b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/spatial_pointer/model.py new file mode 100644 index 0000000000000000000000000000000000000000..47069137d66063a9910f4a87ac384d0417aec45f --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/spatial_pointer/model.py @@ -0,0 +1,80 @@ +"""Native JEV query/key spatial pointer and a query-conditioned 2D fine head.""" + +import torch +from torch import nn +from torch.nn import functional as F + +from jev_spatial_distill.t3.model import Teacher + + +class FineReadout(nn.Module): + def __init__(self, hidden, width=128, subdivisions=32): + super().__init__() + self.norm = nn.LayerNorm(hidden) + self.visual = nn.Linear(hidden,width) + self.query = nn.Linear(hidden,2*width) + self.local = nn.Conv2d(width,width,3,padding=1,groups=width) + self.mix = nn.Sequential(nn.Linear(width,width),nn.GELU(),nn.Linear(width,subdivisions**2)) + + def forward(self, spatial, query, layout, parents=None): + if spatial.shape[0] != layout.count:raise ValueError('Lost visual spatial layout') + v = self.visual(self.norm(spatial.float())) + scale,bias = self.query(self.norm(query.float())).chunk(2,-1) + v = v*(1+scale.tanh())+bias + image = v.T.reshape(1,-1,layout.rows,layout.cols) + v = v+self.local(image).reshape(v.shape[1],-1).T + if parents is not None:v = v[parents] + return self.mix(v) + + +class SpatialStudent(Teacher): + def __init__(self,native,recipe): + super().__init__(native,recipe) + self.spatial = FineReadout(native.head.q.in_features,recipe.get('readout_width',128), + recipe.get('subdivisions',32)).to(device=native.head.q.weight.device,dtype=torch.float32) + + def encode_readout(self,group,features): + captured=[] + hook=self.native.head.register_forward_pre_hook(lambda _m,args:captured.append(args)) + try:super().forward(group,features) + finally:hook.remove() + if len(captured)!=1:raise ValueError('Expected one native readout / LM forward') + pairs,query=captured[0] + if pairs.shape[0]!=1 or query.shape[0]!=1:raise ValueError('One target per native group required') + return pairs[0],query[0] + + def readout(self,spatial,query,layout,parents=None): + coarse=self.native.head(spatial[None],query[None])[0] + fine=self.spatial(spatial,query,layout,parents) + return dict(coarse=coarse,fine=fine) + + def forward(self,group,features,layout,parents=None,detach_backbone=False): + if detach_backbone: + with torch.no_grad():spatial,query=self.encode_readout(group,features) + else:spatial,query=self.encode_readout(group,features) + return self.readout(spatial,query,layout,parents) + + def adapter_state(self): + return {n:p.detach().cpu().contiguous() for n,p in self.named_parameters() + if '.lora_' in n or n.startswith(('native.head.','spatial.'))} + + def load_adapter(self,state): + if not any(n.startswith('spatial.') for n in state):return super().load_adapter(state) + expected={n:p for n,p in self.named_parameters() if '.lora_' in n or n.startswith(('native.head.','spatial.'))} + if expected.keys()!=state.keys():raise ValueError('Spatial student adapter keys differ') + with torch.no_grad(): + for name,value in state.items(): + if value.shape!=expected[name].shape or not torch.isfinite(value).all():raise ValueError('Invalid adapter tensor') + expected[name].copy_(value.to(expected[name])) + + +def gt_loss(output,target,layout,*,selected_parent=False): + if not target['representable']:raise ValueError('GT center is not represented inside its box at this resolution') + coarse,fine=output['coarse'].float(),output['fine'].float() + mask=layout.valid(coarse.device) + label=torch.tensor([target['parent']],device=coarse.device) + coarse_loss=F.cross_entropy(coarse.masked_fill(~mask.any(-1),-torch.inf)[None],label) + local=fine[0] if selected_parent else fine[target['parent']] + fine_loss=F.cross_entropy(local.masked_fill(~mask[target['parent']],-torch.inf)[None], + torch.tensor([target['fine']],device=coarse.device)) + return coarse_loss+fine_loss,dict(coarse=float(coarse_loss.detach()),fine=float(fine_loss.detach())) diff --git a/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/spatial_pointer/supervision.py b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/spatial_pointer/supervision.py new file mode 100644 index 0000000000000000000000000000000000000000..3c444af3542441c3b2e092542e31cbcff8b1f055 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/spatial_pointer/supervision.py @@ -0,0 +1,99 @@ +"""Sparse projection of existing T3 traces and support-masked hierarchical KD.""" + +from functools import lru_cache +import json +import math +from pathlib import Path + +import torch +from torch.nn import functional as F + +from .data import sha +from .geometry import inside + + +def regions(prediction): + from spatial_pro_experiments.fast import cell_candidates + final=prediction['stages'][-1];leaves=[] + for trace in final['traces']: + leaves.extend(cell_candidates(trace['crop_bounds'],trace['predictions'],final['cells_per_axis'],trace['parent_score'])) + if not leaves:raise ValueError('Teacher has no observed leaf cells') + peak=max(x['score'] for x in leaves) + return [(r['bounds'],math.exp(r['score']-peak)) for r in leaves] + + +def project_regions(bounds_and_weights,point,box,layout): + if not inside(point,box):return dict(enabled=False,parents=torch.empty(0,dtype=torch.long),mass=torch.empty(0,layout.fine_count)) + unit=layout.stride/layout.subdivisions;indices=[];weights=[] + for bounds,weight in bounds_and_weights: + l,t,r,b=bounds + if not all(math.isfinite(v) for v in (*bounds,weight)) or r<=l or b<=t or weight<0: + raise ValueError('Invalid teacher leaf') + if weight==0:continue + x=torch.arange(max(0,math.floor(l/unit)),min(layout.cols*layout.subdivisions,math.ceil(r/unit))) + y=torch.arange(max(0,math.floor(t/unit)),min(layout.rows*layout.subdivisions,math.ceil(b/unit))) + x=x[(x+.5)*unit0;indices.append((parent*layout.fine_count+fine)[keep]);weights.append((area*weight/((r-l)*(b-t)))[keep]) + if not indices:raise ValueError('Teacher support is not represented at this pixel resolution') + flat=torch.cat(indices);values=torch.cat(weights).double() + parents,inverse=torch.unique(flat//layout.fine_count,sorted=True,return_inverse=True) + mass=torch.zeros(len(parents)*layout.fine_count,dtype=torch.float64) + mass.scatter_add_(0,inverse*layout.fine_count+flat%layout.fine_count,values) + mass=mass.reshape(len(parents),layout.fine_count);mass=mass/mass.sum() + if not torch.isfinite(mass).all():raise ValueError('Nonfinite projected teacher mass') + return dict(enabled=True,parents=parents,mass=mass.float(),point=list(point)) + + +def project(prediction,box,layout): + return project_regions(regions(prediction),prediction['predicted_xy'],box,layout) + + +def selected_parents(target,soft): + return [target['parent']]+([int(v) for v in soft['parents'] if int(v)!=target['parent']] if soft and soft['enabled'] else []) + + +def kd_loss(output,soft,parent_order,temperature=2.): + coarse,fine=output['coarse'].float(),output['fine'].float() + zero=coarse.sum()*0+fine.sum()*0 + if not soft or not soft['enabled']:return zero,dict(kd_enabled=0,observed_parents=0,observed_pixels=0) + parents=soft['parents'].to(coarse.device);mass=soft['mass'].to(coarse.device) + coarse_mass=mass.sum(-1);soft_coarse=coarse_mass.pow(1/temperature);soft_coarse/=soft_coarse.sum() + rank=F.kl_div(F.log_softmax(coarse[parents]/temperature,-1),soft_coarse,reduction='sum')*temperature**2 + conditional=zero + lookup={int(p):i for i,p in enumerate(parent_order)} + for i,parent in enumerate(parents.tolist()): + mask=mass[i]>0;truth=mass[i,mask].pow(1/temperature);truth/=truth.sum() + values=fine[lookup[parent],mask] + conditional=conditional+coarse_mass[i]*F.kl_div(F.log_softmax(values/temperature,-1),truth,reduction='sum')*temperature**2 + return rank+conditional,dict(kd_enabled=1,observed_parents=len(parents),observed_pixels=int((mass>0).sum())) + + +class TeacherCache: + """Byte index into an immutable existing cache; never materialize a pixel cache on disk.""" + def __init__(self,path,expected_sha,targets): + self.path=Path(path) + if sha(self.path)!=expected_sha:raise ValueError('Teacher cache hash changed') + expected={str(r['id']):r for r in targets};self.offsets={} + with self.path.open('rb') as stream: + while True: + offset=stream.tell();line=stream.readline() + if not line:break + row=json.loads(line);ident=str(row['id']) + if ident in self.offsets:raise ValueError('Duplicate teacher target ID') + if ident not in expected:raise ValueError('Teacher cache contains a non-training target') + target=expected[ident] + if any(row[k]!=target[k] for k in ('instruction','bbox_xyxy','image_size')) or row['source_image_sha256']!=target['image_sha256']: + raise ValueError('Teacher and training input identity differ') + self.offsets[ident]=offset + if self.offsets.keys()!=expected.keys():raise ValueError('Teacher cache does not cover the training set') + + @lru_cache(maxsize=128) + def get(self,ident): + with self.path.open('rb') as f: + f.seek(self.offsets[str(ident)]);return json.loads(f.readline()) diff --git a/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/t3/__init__.py b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/t3/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/t3/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/t3/batching.py b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/t3/batching.py new file mode 100644 index 0000000000000000000000000000000000000000..068734863f3f2c4900226e3270c48bfbb3376140 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/t3/batching.py @@ -0,0 +1,58 @@ +"""Differentiable padded native JEV scoring; each ROI keeps equal loss weight.""" + +from contextlib import nullcontext + +import torch + +from scripts.batch_spatial_jev import collate_query_groups + + +def forward_states(native, groups, features, labels=None): + from .model import choice_loss + if not groups or len(groups)!=len(features) or (labels is not None and len(labels)!=len(groups)): + raise ValueError('Each training state needs its own group, features and labels') + if any(value.is_inference() for value in features): + raise ValueError('Clone frozen visual features outside inference_mode before backward') + # Padding tokens never attend to or supply supervision for valid states. + batch=collate_query_groups(groups,0) + device=native.get_input_embeddings().weight.device + batch={key:value.to(device) for key,value in batch.items()} + amp=torch.autocast('cuda',dtype=torch.bfloat16) if device.type=='cuda' else nullcontext() + with amp: + embeds=native.get_input_embeddings()(batch['input_ids']) + if getattr(native,'full_parameter_training',False) and device.type=='cuda':embeds=embeds.to(torch.bfloat16) + video_token=native.config.backbone_config.video_token_id + all_slots=batch['input_ids']==video_token + for index,value in enumerate(features): + slots=all_slots[index] + if int(slots.sum())!=len(value):raise ValueError('Visual feature count differs from state tokens') + # Checkpointing can mark embedding outputs as leaf tensors requiring grad. + # Use the native out-of-place scatter, never mutate those leaves. + embeds=embeds.masked_scatter(all_slots[...,None].expand_as(embeds),torch.cat(features).to(embeds)) + if native.is_moe: + positions,_=native.backbone.get_rope_index(input_ids=batch['input_ids'], + mm_token_type_ids=batch['mm_token_type_ids'],video_grid_thw=batch['video_grid_thw'], + attention_mask=batch['attention_mask']) + else: + positions=native.backbone.compute_3d_position_ids(input_ids=batch['input_ids'],inputs_embeds=embeds, + video_grid_thw=batch['video_grid_thw'],attention_mask=batch['attention_mask'], + mm_token_type_ids=batch['mm_token_type_ids']) + hidden=native.backbone.language_model(inputs_embeds=embeds,position_ids=positions, + attention_mask=batch['attention_mask'],use_cache=False).last_hidden_state + with torch.autocast(device_type=device.type,enabled=False): + indices=batch['sample_indices'] + logits=native.head(hidden[indices[:,None],batch['pair_indices']],hidden[indices,batch['query_indices']]) + mask=batch['score_mask'] + probs=torch.where((batch['decision_tasks']==1)[:,None], + logits.masked_fill(~mask,-torch.inf).softmax(-1),logits.sigmoid())*mask + items=[];losses=[];offset=0 + for index,group in enumerate(groups): + count=len(group['query_indices']);options=group['pair_indices'].shape[1] + item=dict(logits=logits[offset:offset+count,:options], + probabilities=probs[offset:offset+count,:options],score_mask=mask[offset:offset+count,:options]) + if labels is not None: + losses.append(choice_loss(item['logits'],item['score_mask'],labels[index].to(device))) + items.append(item);offset+=count + result=dict(items=items) + if losses:result['loss']=torch.stack(losses).mean() + return result diff --git a/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/t3/common.py b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/t3/common.py new file mode 100644 index 0000000000000000000000000000000000000000..aff2dfae29d230bd978bb4695a1db1c474e491a7 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/t3/common.py @@ -0,0 +1,2 @@ +from pixelone.sampling import SampleStream +from pixelone.io import stable_hash diff --git a/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/t3/model.py b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/t3/model.py new file mode 100644 index 0000000000000000000000000000000000000000..67a74eda7eaff68929021dcde5ad13671f87e24f --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/t3/model.py @@ -0,0 +1,142 @@ +"""Keep the released JEV head and expose a tested differentiable training path.""" + +import hashlib +import math +from contextlib import ExitStack,contextmanager +from importlib import import_module +from pathlib import Path + +import torch +from torch import nn +from torch.nn import functional as F + + +@contextmanager +def native_runtime(backend='torch', required_model=None, attention_mode='causal'): + from qwen_spatial.kernels import qwen_kernel_backend + from jev_unified_student.attention import full_layer_attention + with ExitStack() as stack: + for name in ('qwen3_5','qwen3_5_moe'): + module=import_module(f'transformers.models.{name}.modeling_{name}') + stack.enter_context(full_layer_attention(module,attention_mode)) + runtime=stack.enter_context(qwen_kernel_backend(backend,module)) + if backend=='native' and (required_model is None or name==required_model): + missing=[key for key,enabled in runtime['optional_kernels_enabled'].items() if not enabled] + if missing: + raise RuntimeError('Native Qwen kernels unavailable: '+', '.join(missing)+ + '. Install compatible flash-linear-attention and causal-conv1d in the active Python environment; ' + 'use kernel_backend=torch only for an explicitly labelled baseline.') + cls=getattr(module,'Qwen3_5DecoderLayer' if name=='qwen3_5' else 'Qwen3_5MoeDecoderLayer') + if not hasattr(cls,'block_type'):cls.block_type=property(lambda layer:layer.layer_type) + yield + + +class LoRALinear(nn.Module): + def __init__(self,base,rank,alpha): + super().__init__();self.base=base.requires_grad_(False) + self.in_features,self.out_features=base.in_features,base.out_features;self.scale=alpha/rank + self.lora_A=nn.Parameter(torch.empty(rank,self.in_features,device=base.weight.device,dtype=torch.float32)) + self.lora_B=nn.Parameter(torch.zeros(self.out_features,rank,device=base.weight.device,dtype=torch.float32)) + nn.init.kaiming_uniform_(self.lora_A,a=math.sqrt(5)) + + @property + def weight(self):return self.base.weight + + @property + def bias(self):return self.base.bias + + def forward(self,x): + value=self.base(x) + delta=F.linear(F.linear(x.to(self.lora_A.dtype),self.lora_A),self.lora_B) + return value+self.scale*delta.to(value.dtype) + + +def install_lora(native,rank,alpha): + targets={'q_proj','k_proj','v_proj','o_proj','in_proj_qkv','in_proj_z','in_proj_b','in_proj_a','out_proj'} + language=native.backbone.language_model;names=[] + for name,module in list(language.named_modules()): + if isinstance(module,nn.Linear) and name.rsplit('.',1)[-1] in targets: + parent,leaf=name.rsplit('.',1) + language.get_submodule(parent).__setattr__(leaf,LoRALinear(module,rank,alpha));names.append(name) + for index,layer in enumerate(language.layers): + selected=[n.rsplit('.',1)[-1] for n in names if n.startswith(f'layers.{index}.')] + expected={'q_proj','k_proj','v_proj','o_proj'} if layer.layer_type=='full_attention' else targets-{'q_proj','k_proj','v_proj','o_proj'} + if set(selected)!=expected:raise ValueError(f'Incomplete LoRA coverage in {layer.layer_type} layer {index}: {selected}') + return names + + +def tensor_hash(values): + sha=hashlib.sha256() + for name,value in sorted(values.items()): + value=value.detach().float().cpu().contiguous();sha.update(name.encode());sha.update(str(list(value.shape)).encode()) + sha.update(value.numpy().tobytes()) + return sha.hexdigest() + + +def choice_loss(logits,mask,labels): + if logits.shape!=mask.shape or labels.shape!=(logits.shape[0],):raise ValueError('Choice loss shapes differ') + active=labels!=-100 + if not active.any():raise ValueError('Training state has no unambiguous supervised question') + if not torch.isfinite(logits[mask]).all():raise ValueError('Nonfinite native JEV logits') + chosen=labels[active] + if (chosen<0).any() or (chosen>=logits.shape[1]).any() or not mask[active].gather(1,chosen[:,None]).all(): + raise ValueError('Target refers to an invalid option') + return F.cross_entropy(logits.float()[active].masked_fill(~mask[active],-torch.inf),chosen) + + +class Teacher(nn.Module): + def __init__(self,native,recipe): + super().__init__();self.native=native;self.recipe=recipe + from scripts.smoke_videojev import legacy_unpadded_mask + native.prepare_for_inference() + self.initial_head_sha256=tensor_hash(native.head.state_dict()) + ids=[native.config.decide_token_id,native.config.option_end_token_id] + embedding=native.get_input_embeddings() + self.initial_special_embeddings_sha256=tensor_hash({'special':embedding.weight[ids]}) + self.lora_names=install_lora(native,recipe['lora_rank'],recipe['lora_alpha']) + native.head.requires_grad_(True) + # A shared additive bias cancels in categorical CE; preserve its grounding calibration. + native.head.bias.requires_grad_(False) + if recipe.get('gradient_checkpointing',True): + native.backbone.language_model.gradient_checkpointing_enable(gradient_checkpointing_kwargs={'use_reentrant':False}) + self.mask_hook=native.backbone.language_model.register_forward_pre_hook(legacy_unpadded_mask,with_kwargs=True) + + def train(self,mode=True): + super().train(mode) + if not self.recipe.get('train_vision',False):self.native.backbone.visual.eval() + return self + + def forward(self,group,features,labels=None): + if isinstance(group,(list,tuple)): + from .batching import forward_states + return forward_states(self.native,group,features,labels) + if features.is_inference():raise ValueError('Clone frozen visual features outside inference_mode before backward') + output=self.native(**group,visual_features=features) + result=dict(logits=output.logits,probabilities=output.probabilities,score_mask=output.score_mask) + if labels is not None:result['loss']=choice_loss(output.logits,output.score_mask,labels.to(output.logits.device)) + return result + + def adapter_state(self): + return {n:p.detach().cpu().contiguous() for n,p in self.named_parameters() if '.lora_' in n or n.startswith('native.head.')} + + def load_adapter(self,state): + expected={n:p for n,p in self.named_parameters() if '.lora_' in n or n.startswith('native.head.')} + if set(state)!=set(expected):raise ValueError('Adapter keys differ from native JEV head/LoRA') + with torch.no_grad(): + for name,value in state.items(): + if value.shape!=expected[name].shape or not torch.isfinite(value).all():raise ValueError('Invalid adapter tensor') + expected[name].copy_(value.to(expected[name])) + + def close(self):self.mask_hook.remove() + + +def load_teacher(checkpoint,recipe,device): + from transformers import AutoProcessor + from videojev_hf.modeling_videojev import VideoJevForVideoUnderstanding + from scripts.smoke_videojev import LegacyProcessorAdapter + native=VideoJevForVideoUnderstanding.from_pretrained(str(checkpoint),local_files_only=True, + dtype=torch.bfloat16,device_map={'':str(device)},attn_implementation='sdpa') + processor=LegacyProcessorAdapter(AutoProcessor.from_pretrained(str(checkpoint),local_files_only=True,trust_remote_code=True)) + for token,expected in [('<|decide|>',native.config.decide_token_id),('<|option_end|>',native.config.option_end_token_id)]: + if processor.tokenizer.convert_tokens_to_ids(token)!=expected:raise ValueError('Native decision token IDs changed') + return Teacher(native,recipe),processor diff --git a/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/t3/states.py b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/t3/states.py new file mode 100644 index 0000000000000000000000000000000000000000..1a35ba586819b00cf4ac1661fe26ce41c621410c --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/t3/states.py @@ -0,0 +1,101 @@ +"""Deterministic multi-scale states and the exact existing rendering protocol.""" + +import hashlib +import io +import math +import random +from pathlib import Path + +from PIL import Image + +from jev_spatial_distill.teacher_targets import labels_for_roi +from .common import SampleStream,stable_hash + + +def read_image(row): + path=Path(row['image'][0]);raw=path.read_bytes() + if hashlib.sha256(raw).hexdigest()!=row['image_sha256']:raise ValueError('Prepared image changed') + with Image.open(io.BytesIO(raw)) as source:image=source.convert('RGB') + if list(image.size)!=row['image_size']:raise ValueError('Prepared image dimensions changed') + return image + + +def cell_for(box,roi,cells): + x,y=[(box[i]+box[i+2])/2 for i in (0,1)] + col=min(cells-1,max(0,int((x-roi[0])/(roi[2]-roi[0])*cells))) + row=min(cells-1,max(0,int((y-roi[1])/(roi[3]-roi[1])*cells))) + dx=(roi[2]-roi[0])/cells;dy=(roi[3]-roi[1])/cells + return [roi[0]+col*dx,roi[1]+row*dy,roi[0]+(col+1)*dx,roi[1]+(row+1)*dy] + + +def make_state(row,roi,depth,source,**extra): + roi=[int(v) for v in roi] + width,height=row['image_size'] + if not (0<=roi[0]0) + return dict(target_id=row['id'],roi=roi,depth=depth,source=source,cells=cells,labels=labels,**extra) + + +def synthetic_state(row,position,seed): + from spatial_pro_experiments.core import expanded + rng=random.Random(int(stable_hash([seed,position,'roi'])[:16],16));width,height=row['image_size'] + full=[0,0,width,height];kind=position%5 + if kind==0:return make_state(row,full,0,'synthetic',sampling_kind='global') + first=expanded(cell_for(row['bbox_xyxy'],full,4),row['image_size']) + depth=1 if kind in (1,3) else 2 + roi=first if depth==1 else expanded(cell_for(row['bbox_xyxy'],first,8),row['image_size']) + rw,rh=roi[2]-roi[0],roi[3]-roi[1] + if kind in (3,4): + for _ in range(32): + x=rng.randint(0,width-rw);y=rng.randint(0,height-rh) + trial=make_state(row,[x,y,x+rw,y+rh],depth,'synthetic',sampling_kind='negative') + if trial['labels']['visibility_status']=='absent':return trial + return make_state(row,roi,depth,'synthetic',sampling_kind='negative_unavailable_positive_fallback') + for _ in range(16): + x=max(0,min(width-rw,roi[0]+round(rng.uniform(-.12,.12)*rw))) + y=max(0,min(height-rh,roi[1]+round(rng.uniform(-.12,.12)*rh))) + trial=make_state(row,[x,y,x+rw,y+rh],depth,'synthetic',sampling_kind='positive_jitter') + if trial['labels']['center_inside_roi']:return trial + return make_state(row,roi,depth,'synthetic',sampling_kind='positive_unjittered') + + +class StateSampler: + def __init__(self,rows,recipe,rollout=None): + self.rows=rows;self.by_id={r['id']:r for r in rows};self.recipe=recipe + self.synthetic=SampleStream(len(rows),recipe['seed']);self.rollout=rollout or {} + self.rollout_ids=sorted(self.rollout) + self.real=SampleStream(len(self.rollout_ids),recipe['seed']) if self.rollout_ids else None + + def at(self,position): + r=self.recipe + use_real=self.real is not None and int(stable_hash([r['seed'],position,'mix'])[:16],16)/16**160;size=recipe['crop_view_size'] if local else recipe['full_view_size'] + views=(contextual_views(geometry,image,state['roi'],state['cells'],size) if local + else geometry.contextual_views(image,view_size=size)) + # Encoding is frozen. Explicitly leave inference_mode and clone for autograd consumers. + features,record=geometry.encode_views(model.native,processor,views,view_size=size) + with torch.inference_mode(False):features=features.detach().clone() + questions=grid_questions(geometry,instruction,state['cells'],local=local) + groups=list(prepare_query_groups(processor,record,questions,record['context'])) + if len(groups)!=1:raise ValueError('All state questions must share exactly one native forward') + group,actual=groups[0] + target_questions=state['labels']['questions'] + if [q['id'] for q in actual]!=[q['id'] for q in target_questions]:raise ValueError('Labels do not match native question order') + labels=torch.tensor([q['label_index'] if q['enabled'] else -100 for q in target_questions],dtype=torch.long) + if not (labels!=-100).any():raise ValueError('Unsuitable training state; no supervised question') + frames=[hashlib.sha256(str(v.size).encode()+v.tobytes()).hexdigest() for v in views] + return group,features,labels,dict(frame_sha256=frames,visual_tokens=record['tokens'],input_tokens=group['input_ids'].shape[1]) diff --git a/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/teacher_targets.py b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/teacher_targets.py new file mode 100644 index 0000000000000000000000000000000000000000..7b040b77c4525c4a92e34d5166171dfd66d6a68e --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_spatial_distill/teacher_targets.py @@ -0,0 +1,42 @@ +"""GT geometry for the current JEV center-choice prompts; no model execution. + +ROI coordinates must describe the actual rendered crop in original pixels. +These labels belong to the loss, not to the model's input questions. +""" + +import math + + +def xyxy(values): + if len(values)!=4 or any(type(v) not in (int,float) or not math.isfinite(v) for v in values): + raise ValueError('Expected four finite xyxy coordinates') + if values[0]>=values[2] or values[1]>=values[3]:raise ValueError('Degenerate box/ROI') + return [float(v) for v in values] + + +def labels_for_roi(box,roi,cells,*,local=True): + """Match CENTER questions and conservatively label geometric visibility. + + Truncated boxes mask visibility: intersection alone does not establish + recognizability. Location is supervised only when the center is in the ROI. + """ + if cells not in (4,8) or type(cells) is not int:raise ValueError('Current T3 uses 4/8 grids') + box,roi=xyxy(box),xyxy(roi) + overlap=[max(0.,min(box[i+2],roi[i+2])-max(box[i],roi[i])) for i in (0,1)] + overlap_area=overlap[0]*overlap[1] + coverage=overlap_area/((box[2]-box[0])*(box[3]-box[1])) + contained=all(roi[i]<=box[i] and box[i+2]<=roi[i+2] for i in (0,1)) + visibility='inside' if contained else 'absent' if overlap_area==0 else 'truncated' + center=[(box[i]+box[i+2])/2 for i in (0,1)] + center_inside=all(roi[i]<=center[i] 1: + arguments['sharding_strategy'] = ShardingStrategy.HYBRID_SHARD + arguments['device_mesh'] = init_device_mesh('cuda', (topology['nodes'], topology['processes']), + mesh_dim_names=('replicate', 'shard')) + elif mode in ('full_shard', 'hybrid_shard'): + arguments['sharding_strategy'] = ShardingStrategy.FULL_SHARD + else: + raise ValueError('Unknown full-parameter sharding strategy') + precision = MixedPrecision(param_dtype=torch.bfloat16, reduce_dtype=torch.float32, + buffer_dtype=torch.bfloat16, cast_forward_inputs=True) + language = model.native.backbone.language_model + for index, layer in enumerate(language.layers): + language.layers[index] = FSDP(layer.float(), mixed_precision=precision, **arguments) + visual = model.native.backbone.visual + if recipe['train_vision']: + for index, block in enumerate(visual.blocks): + visual.blocks[index] = FSDP(block.float(), mixed_precision=precision, **arguments) + for module in model.modules(): + if not isinstance(module, FSDP): + for parameter in module.parameters(recurse=False): + if parameter.dtype == torch.bfloat16: + parameter.data = parameter.data.float() + return FSDP(batch_model, **arguments) + + +def parameter_groups(model, recipe): + groups = [] + for name, prefix, learning_rate in [('language', 'native.backbone.language_model.', recipe['full_lr']), + ('vision', 'native.backbone.visual.', recipe['vision_lr']), + ('head', 'native.head.', recipe['head_lr']), + ('spatial', 'spatial.', recipe['spatial_lr'])]: + parameters = [parameter for key, parameter in model.named_parameters() if key.startswith(prefix) and parameter.requires_grad] + if parameters: + groups.append(dict(name=name, params=parameters, lr=learning_rate, base_lr=learning_rate)) + selected = {id(parameter) for group in groups for parameter in group['params']} + expected = {id(parameter) for parameter in model.parameters() if parameter.requires_grad} + if selected != expected: + raise ValueError('Full optimizer groups do not cover every trainable parameter') + return groups + + +def clip_full_gradients(wrapped, parameters, clip): + from torch.distributed.fsdp import FullyShardedDataParallel as FSDP + if isinstance(wrapped, FSDP): + norm = wrapped.clip_grad_norm_(clip) + else: + norm = torch.nn.utils.clip_grad_norm_(parameters, clip, error_if_nonfinite=True) + if not bool(torch.isfinite(norm)): + raise ValueError('Nonfinite full-model gradient norm') + return float(norm), {} diff --git a/PixelOne-Pro-4B/runtime/src/jev_unified_student/methods.py b/PixelOne-Pro-4B/runtime/src/jev_unified_student/methods.py new file mode 100644 index 0000000000000000000000000000000000000000..5dfc1594ee15d7872b42a9258ae360763475d5c6 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_unified_student/methods.py @@ -0,0 +1,3 @@ +"""Methods that must never read teacher predictions or use teacher KD support.""" + +GT_METHODS = ('gt', 'gt_set', 'gt_top20') diff --git a/PixelOne-Pro-4B/runtime/src/jev_unified_student/model.py b/PixelOne-Pro-4B/runtime/src/jev_unified_student/model.py new file mode 100644 index 0000000000000000000000000000000000000000..43826098586839af99f503969854b5ff6dbf8c83 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_unified_student/model.py @@ -0,0 +1,73 @@ +"""Identical teacher shared weights and independently seeded fine head in every arm.""" +import torch +from jev_click_finetune.model import ClickStudent as SingleClickStudent,route +from jev_spatial_distill.spatial_pointer.model import FineReadout +from jev_spatial_distill.t3.model import tensor_hash,Teacher + + +class ClickStudent(SingleClickStudent): + """Keep single-image inference and support a real padded LM training batch.""" + def forward(self,group,features,layout,required=None,positive=None,topk=4): + if not isinstance(group,(list,tuple)): + return super().forward(group,features,layout,required,positive,topk) + count=len(group) + if (not count or len(features)!=count or len(layout)!=count or + any(len(g['query_indices'])!=1 for g in group)): + raise ValueError('Each batch item requires one screenshot and one query') + required=[None]*count if required is None else required + positive=[None]*count if positive is None else positive + if len(required)!=count or len(positive)!=count:raise ValueError('Batched routes differ from targets') + captured=[] + hook=self.native.head.register_forward_pre_hook(lambda _m,args:captured.append(args)) + try:Teacher.forward(self,group,features) + finally:hook.remove() + if len(captured)!=1:raise ValueError('Expected one batched native readout') + pairs,queries=captured[0] + if pairs.shape[0]!=count or queries.shape[0]!=count:raise ValueError('Lost batched sample identities') + result=[] + for i,current in enumerate(layout): + spatial=pairs[i,:current.count];query=queries[i] + if len(features[i])!=current.count:raise ValueError('Visual grid differs from spatial layout') + coarse=self.native.head(spatial[None],query[None])[0] + parents=route(coarse,required[i],positive[i],topk) + result.append(dict(coarse=coarse,fine=self.spatial(spatial,query,current,parents),parents=parents)) + return result + + +def fresh_head(hidden,recipe): + with torch.random.fork_rng(devices=[]),torch.device('cpu'): + torch.random.default_generator.manual_seed(recipe['head_seed']) + return FineReadout(hidden,recipe['readout_width'],recipe['subdivisions']) + + +def initialize_student(native,recipe,teacher_state): + if any(n.startswith('spatial.') for n in teacher_state):raise ValueError('Initialization requires T3, not an already trained S1 checkpoint') + model=ClickStudent(native,recipe);model.load_adapter(teacher_state) + head=fresh_head(native.head.q.in_features,recipe) + model.spatial.load_state_dict(head.state_dict()) + state=model.adapter_state();shared={n:v for n,v in state.items() if not n.startswith('spatial.')} + if tensor_hash(shared)!=tensor_hash(teacher_state):raise ValueError('Teacher shared initialization changed') + expected={n for n,p in model.named_parameters() if '.lora_' in n or n.startswith(('native.head.','spatial.'))} + for n,p in model.named_parameters(): + should_train=n in expected and n!='native.head.bias' + if p.requires_grad!=should_train:raise ValueError('Unexpected frozen/trainable parameter: '+n) + initial=dict(shared_sha256=tensor_hash(shared),spatial_sha256=tensor_hash(head.state_dict()), + adapter_tensor_sha256=tensor_hash(state),head_seed=recipe['head_seed'], + scope='fresh T3 shared adapter plus fixed CPU-seeded fine head; no prior S1 checkpoint') + model.unified_initialization=initial + return model,initial + + +def initialize_continued_student(native,recipe,state,expected): + """Retain the trained pixel head; this is not a fresh-head teacher initialization.""" + if not any(n.startswith('spatial.') for n in state): + raise ValueError('Continuation requires a trained pixel head') + model=ClickStudent(native,recipe);model.load_adapter(state) + loaded=model.adapter_state() + if tensor_hash(loaded)!=expected['adapter_tensor_sha256'] or tensor_hash(loaded)!=tensor_hash(state): + raise ValueError('Continued student weights were not loaded exactly') + fine={k.removeprefix('spatial.'):v for k,v in loaded.items() if k.startswith('spatial.')} + if tensor_hash(fine)!=expected['spatial_sha256']: + raise ValueError('Trained pixel head was reset') + model.unified_initialization=dict(expected) + return model,model.unified_initialization diff --git a/PixelOne-Pro-4B/runtime/src/jev_unified_student/objective.py b/PixelOne-Pro-4B/runtime/src/jev_unified_student/objective.py new file mode 100644 index 0000000000000000000000000000000000000000..e51015f1d90f7fd399b6a493433ffed45fd63a97 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_unified_student/objective.py @@ -0,0 +1,88 @@ +"""Matched GT routing with method-specific fine losses and optional teacher KD.""" +import math +import torch +from torch.nn import functional as F +from jev_click_finetune.model import route +from jev_click_finetune.objective import set_nll +from jev_fine_refine.objective import fine_objective +from jev_spatial_distill.spatial_pointer.supervision import kd_loss +from jev_fine_ablation.distillation import distillation_loss +from .top20 import top20_winner_loss +from .top100 import top100_winner_loss +from .methods import GT_METHODS + +TEACHER_METHODS=('pixel_kd','region_kd','hard_kd','pixel_kd_top20','pixel_kd_top100') + + +def gt_objective(output,valid,positive,target,layout,topk,fine_rule='winner'): + # KD reads additional teacher regions, but those regions must not silently + # add GT supervision or change the fine-GT mean denominator. + parents=route(output['coarse'],[target['parent']],positive.any(-1),topk) + lookup={int(p):i for i,p in enumerate(output['parents'].tolist())} + if any(int(p) not in lookup for p in parents):raise ValueError('GT routing is absent from the shared forward') + indices=torch.tensor([lookup[int(p)] for p in parents],device=output['fine'].device) + view=dict(coarse=output['coarse'],fine=output['fine'][indices],parents=parents) + if fine_rule=='winner':gt,terms=fine_objective(view,valid,positive) + elif fine_rule in ('set','top20','top100'): + # Same routed GT-valid rows and mean denominator as the winner rule. + coarse=set_nll(view['coarse'],valid.any(-1),positive.any(-1)) + truth=positive[parents];keep=truth.any(-1) + if not keep.any():raise ValueError('No supervised positive region was routed') + if fine_rule=='set': + fine=set_nll(view['fine'][keep],valid[parents][keep],truth[keep]).mean() + elif fine_rule=='top20': + fine=top20_winner_loss(view['fine'][keep],valid[parents][keep],truth[keep]) + else: + fine=top100_winner_loss(view['fine'][keep],valid[parents][keep],truth[keep]) + gt=coarse+fine;terms=dict(coarse=float(coarse.detach()),fine=float(fine.detach()),supervised_regions=int(keep.sum())) + else:raise ValueError('Unknown fine GT rule') + return gt,terms,parents.tolist() + + +def hard_target(prediction,box,layout): + """Teacher final point as a one-pixel label, under the same hit gate as soft KD.""" + x,y=prediction['predicted_xy'] + if not (math.isfinite(x) and math.isfinite(y)):raise ValueError('Nonfinite teacher point') + if not (box[0]<=x<=box[2] and box[1]<=y<=box[3]):return dict(enabled=False,parents=torch.empty(0,dtype=torch.long)) + unit=layout.stride/layout.subdivisions + gx=min(max(int(x/unit),0),math.ceil(layout.width/unit)-1) + gy=min(max(int(y/unit),0),math.ceil(layout.height/unit)-1) + parent=(gy//layout.subdivisions)*layout.cols+gx//layout.subdivisions + fine=(gy%layout.subdivisions)*layout.subdivisions+gx%layout.subdivisions + if not bool(layout.valid()[parent,fine]):raise ValueError('Teacher point maps to a padded pixel') + return dict(enabled=True,parents=torch.tensor([parent]),fine=fine,point=[x,y]) + + +def hard_kd_loss(output,hard,valid): + coarse,fine=output['coarse'].float(),output['fine'].float() + zero=coarse.sum()*0+fine.sum()*0 + if not hard['enabled']:return zero,dict(kd_enabled=0,observed_parents=0,observed_pixels=0) + parent=int(hard['parents'][0]);index=output['parents'].tolist().index(parent) + c=-coarse.masked_fill(~valid.any(-1),-torch.inf).log_softmax(-1)[parent] + f=F.cross_entropy(fine[index].masked_fill(~valid[parent],-torch.inf)[None], + torch.tensor([hard['fine']],device=fine.device)) + return c+f+zero,dict(kd_enabled=1,observed_parents=1,observed_pixels=1) + + +def unified_loss(output,valid,positive,target,layout,method,soft,region,recipe,hard=None): + fine_rule={'gt_set':'set','gt_top20':'top20','pixel_kd_top20':'top20','pixel_kd_top100':'top100'}.get(method,'winner') + gt,terms,gt_parents=gt_objective(output,valid,positive,target,layout,recipe['routing_topk'], + fine_rule) + parents=output['parents'].tolist() + if method in GT_METHODS: + if soft is not None or region is not None or hard is not None:raise ValueError('GT-only must not use teacher prediction/support') + kd=output['coarse'].float().sum()*0+output['fine'].float().sum()*0 + kd_terms=dict(kd_enabled=0,observed_parents=0,observed_pixels=0);details=dict(method=method,coarse=0.,fine=0.) + elif method in ('pixel_kd','pixel_kd_top20','pixel_kd_top100'): + implementation=kd_loss + if recipe.get('speed',{}).get('vectorized_kd',False): + from .speed_loss import pixel_kd_loss + implementation=pixel_kd_loss + kd,kd_terms=implementation(output,soft,parents,recipe['temperature']);details=dict(method='pixel_kd') + elif method=='region_kd': + kd,kd_terms,details=distillation_loss(output,soft,parents,'region_kd',recipe['temperature'],region) + elif method=='hard_kd': + kd,kd_terms=hard_kd_loss(output,hard,valid);details=dict(method='hard_kd') + else:raise ValueError('Unknown unified method') + loss=gt+recipe['kd_weight']*kd + return loss,gt,terms,kd,kd_terms,details,gt_parents diff --git a/PixelOne-Pro-4B/runtime/src/jev_unified_student/portable_full.py b/PixelOne-Pro-4B/runtime/src/jev_unified_student/portable_full.py new file mode 100644 index 0000000000000000000000000000000000000000..b9cd74fae41f5c81b95c2e7e4ff1d087b38f2d89 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_unified_student/portable_full.py @@ -0,0 +1,41 @@ +import torch +from jev_unified_student.model import ClickStudent +from jev_spatial_distill.spatial_pointer.model import FineReadout + +def cast_training_inputs(module, args, kwargs): + from torch.utils._pytree import tree_map + def cast(value): + return value.to(torch.bfloat16) if isinstance(value, torch.Tensor) and value.is_floating_point() else value + return tree_map(cast, args), tree_map(cast, kwargs) + + +def inference_precision(model, recipe, precision): + if precision != 'training_cuda': + return + blocks = list(model.native.backbone.language_model.layers) + if recipe['train_vision']: + blocks += list(model.native.backbone.visual.blocks) + for block in blocks: + block.register_forward_pre_hook(cast_training_inputs, with_kwargs=True) + for module in block.modules(): + for name, buffer in module.named_buffers(recurse=False): + if buffer.is_floating_point(): + setattr(module, name, buffer.to(torch.bfloat16)) + + +class FullWeightStudent(ClickStudent): + def __init__(self, native, recipe): + torch.nn.Module.__init__(self) + self.native, self.recipe = native, recipe + self.native.head.bias = torch.nn.Parameter(torch.zeros(1)) + self.spatial = FineReadout(native.head.q.in_features, recipe['readout_width'], recipe['subdivisions']) + self.native.full_parameter_training = True + self.native.train_vision = recipe['train_vision'] + + def forward(self, groups, features, layouts, required=None, positive=None, topk=4): + if not isinstance(groups, (tuple, list)): + raise ValueError('Full inference always uses the same batched path as training') + return super().forward(groups, features, layouts, required, positive, topk) + + def close(self): + pass diff --git a/PixelOne-Pro-4B/runtime/src/jev_unified_student/speed_loss.py b/PixelOne-Pro-4B/runtime/src/jev_unified_student/speed_loss.py new file mode 100644 index 0000000000000000000000000000000000000000..86316ce9a80a3837971b6f8790ae7efc3b205303 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_unified_student/speed_loss.py @@ -0,0 +1,29 @@ +"""Vectorized observed-support pixel KD with the original teacher gate.""" + +import torch +from torch.nn import functional as functional + + +def pixel_kd_loss(output, soft, parent_order, temperature=2.): + coarse, fine = output['coarse'].float(), output['fine'].float() + zero = coarse.sum() * 0 + fine.sum() * 0 + if not soft or not soft['enabled']: + return zero, dict(kd_enabled=0, observed_parents=0, observed_pixels=0) + parent_ids = soft['parents'].tolist() + lookup = {parent: index for index, parent in enumerate(parent_order)} + selected = torch.tensor([lookup[parent] for parent in parent_ids], device=fine.device) + parents = soft['parents'].to(coarse.device) + mass = soft['mass'].to(coarse.device) + coarse_mass = mass.sum(-1) + soft_coarse = coarse_mass.pow(1 / temperature) + soft_coarse = soft_coarse / soft_coarse.sum() + rank = functional.kl_div(functional.log_softmax(coarse[parents] / temperature, -1), + soft_coarse, reduction='sum') * temperature ** 2 + mask = mass > 0 + truth = mass.pow(1 / temperature) + truth = truth / truth.sum(-1, keepdim=True) + log_student = functional.log_softmax((fine[selected] / temperature).masked_fill(~mask, -torch.inf), -1) + terms = functional.kl_div(log_student.masked_fill(~mask, 0.), truth, reduction='none') + conditional = (terms.sum(-1) * coarse_mass).sum() * temperature ** 2 + return rank + conditional + zero, dict(kd_enabled=1, observed_parents=len(parent_ids), + observed_pixels=int((soft['mass'] > 0).sum())) diff --git a/PixelOne-Pro-4B/runtime/src/jev_unified_student/top100.py b/PixelOne-Pro-4B/runtime/src/jev_unified_student/top100.py new file mode 100644 index 0000000000000000000000000000000000000000..5a516df59e31147235d36d44d888e3db2d1be8ad --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_unified_student/top100.py @@ -0,0 +1,42 @@ +"""Equal-weight winner losses for all GT-valid pixels within each routed token.""" + +import torch +from torch.nn import functional as F + + +TOP100_SPEC = dict( + name='all_positive_winners', + fraction=1.0, + selection='all GT-valid pixels of each routed GT-valid token', + count='number of positive pixels; 100 percent, not a fixed count of 100', + negatives='all original-image pixels outside GT in the same token; padding excluded', + reduction='mean over all positives, then mean over the original GT-valid routed tokens', + full_positive_token='zero loss, included in the token mean denominator', + spatial_weighting='uniform; no center or interior preference', +) + + +def top100_winner_loss(logits, valid, positive): + """Every positive competes separately against the shared negative pool. + + This averages per-positive classification losses; it does not collapse the + positive logits into a set likelihood or select only the weakest positive. + """ + if (logits.ndim != 2 or logits.shape != valid.shape or valid.shape != positive.shape + or valid.dtype != torch.bool or positive.dtype != torch.bool): + raise ValueError('Top100 support shapes/types differ') + if not positive.any(-1).all() or (positive & ~valid).any(): + raise ValueError('Every fine row needs nonempty valid GT support') + z = logits.float() + negative = valid & ~positive + active = negative.any(-1) + zero = z.sum() * 0 + if not active.any(): + return zero + + selected, pos, neg = z[active], positive[active], negative[active] + wrong = selected.masked_fill(~neg, -torch.inf).logsumexp(-1) + positive_scores = selected.masked_fill(~pos, 0.) + per_positive = F.softplus(wrong[:, None] - positive_scores).masked_fill(~pos, 0.) + per_token = per_positive.sum(-1) / pos.sum(-1) + return per_token.sum() / len(z) + zero diff --git a/PixelOne-Pro-4B/runtime/src/jev_unified_student/top20.py b/PixelOne-Pro-4B/runtime/src/jev_unified_student/top20.py new file mode 100644 index 0000000000000000000000000000000000000000..4c78cfdab4710e51b46fe1c11439799b5278cf2c --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/jev_unified_student/top20.py @@ -0,0 +1,51 @@ +"""Equal-weight winner losses for the highest-scoring 20% of GT-valid pixels.""" + +import torch +from torch.nn import functional as F + + +TOP20_SPEC = dict( + name='top20_positive_winners', + fraction=0.2, + selection='detached scores within GT-valid pixels of each routed GT-valid token', + count='ceil(number of positive pixels / 5), at least one', + ties='ascending original within-token pixel index', + negatives='all original-image pixels outside GT in the same token; padding excluded', + reduction='mean over selected positives, then mean over the original GT-valid routed tokens', + full_positive_token='zero loss, included in the token mean denominator', + spatial_weighting='uniform; no center or interior preference', +) + + +def top20_winner_loss(logits, valid, positive): + """Keep the original negative pool and token weighting; expand positive winners. + + Each selected positive competes separately against every negative. Selection + is detached, but gradients flow through every gathered positive score. The + final decoder remains the original token-first, one-pixel argmax. + """ + if (logits.ndim != 2 or logits.shape != valid.shape or valid.shape != positive.shape + or valid.dtype != torch.bool or positive.dtype != torch.bool): + raise ValueError('Top20 support shapes/types differ') + if not positive.any(-1).all() or (positive & ~valid).any(): + raise ValueError('Every fine row needs nonempty valid GT support') + z = logits.float() + negative = valid & ~positive + active = negative.any(-1) + zero = z.sum() * 0 + if not active.any(): + return zero + + selected, pos, neg = z[active], positive[active], negative[active] + # Integer arithmetic gives exact ceil(20% * n_positive), including n < 5. + counts = (pos.sum(-1) + 4) // 5 + max_count = int(counts.max()) + order = selected.detach().masked_fill(~pos, -torch.inf).argsort( + dim=-1, descending=True, stable=True)[:, :max_count] + keep = torch.arange(max_count, device=z.device)[None] < counts[:, None] + best = selected.gather(-1, order).masked_fill(~keep, 0.) + wrong = selected.masked_fill(~neg, -torch.inf).logsumexp(-1) + per_positive = F.softplus(wrong[:, None] - best).masked_fill(~keep, 0.) + per_token = per_positive.sum(-1) / counts + # Fully GT-covered tokens retain their original zero-loss contribution. + return per_token.sum() / len(z) + zero diff --git a/PixelOne-Pro-4B/runtime/src/pixelone/__init__.py b/PixelOne-Pro-4B/runtime/src/pixelone/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..65d03b13315de2a303dcbf470464f3ce9a0bfcb4 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/pixelone/__init__.py @@ -0,0 +1,8 @@ +__version__ = '0.1.0' + + +def __getattr__(name): + if name == 'PixelOnePredictor': + from .inference import PixelOnePredictor + return PixelOnePredictor + raise AttributeError(name) diff --git a/PixelOne-Pro-4B/runtime/src/pixelone/assets/DejaVuSans-LICENSE.txt b/PixelOne-Pro-4B/runtime/src/pixelone/assets/DejaVuSans-LICENSE.txt new file mode 100644 index 0000000000000000000000000000000000000000..d1fcfc8e8f2b035d70c60707b4550a7c17078743 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/pixelone/assets/DejaVuSans-LICENSE.txt @@ -0,0 +1,78 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: DejaVu fonts +Upstream-Author: Stepan Roh (original author), + see /usr/share/doc/fonts-dejavu-core/AUTHORS for full list +Source: https://dejavu-fonts.github.io/ + +Files: * +Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. + Bitstream Vera is a trademark of Bitstream, Inc. + DejaVu changes are in public domain. +License: bitstream-vera + Permission is hereby granted, free of charge, to any person obtaining a copy + of the fonts accompanying this license ("Fonts") and associated + documentation files (the "Font Software"), to reproduce and distribute the + Font Software, including without limitation the rights to use, copy, merge, + publish, distribute, and/or sell copies of the Font Software, and to permit + persons to whom the Font Software is furnished to do so, subject to the + following conditions: + . + The above copyright and trademark notices and this permission notice shall + be included in all copies of one or more of the Font Software typefaces. + . + The Font Software may be modified, altered, or added to, and in particular + the designs of glyphs or characters in the Fonts may be modified and + additional glyphs or characters may be added to the Fonts, only if the fonts + are renamed to names not containing either the words "Bitstream" or the word + "Vera". + . + This License becomes null and void to the extent applicable to Fonts or Font + Software that has been modified and is distributed under the "Bitstream + Vera" names. + . + The Font Software may be sold as part of a larger software package but no + copy of one or more of the Font Software typefaces may be sold by itself. + . + THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, + TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME + FOUNDATION BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING + ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, + WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF + THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE + FONT SOFTWARE. + . + Except as contained in this notice, the names of Gnome, the Gnome + Foundation, and Bitstream Inc., shall not be used in advertising or + otherwise to promote the sale, use or other dealings in this Font Software + without prior written authorization from the Gnome Foundation or Bitstream + Inc., respectively. For further information, contact: fonts at gnome dot + org. + +Files: debian/* +Copyright: (C) 2005-2006 Peter Cernak + (C) 2006-2011 Davide Viti + (C) 2011-2013 Christian Perrier + (C) 2013 Fabian Greffrath +License: GPL-2+ + This program is free software; you can redistribute it + and/or modify it under the terms of the GNU General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later + version. + . + This program is distributed in the hope that it will be + useful, but WITHOUT ANY WARRANTY; without even the implied + warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the GNU General Public License for more + details. + . + You should have received a copy of the GNU General Public + License along with this package; if not, write to the Free + Software Foundation, Inc., 51 Franklin St, Fifth Floor, + Boston, MA 02110-1301 USA + . + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file + /usr/share/common-licenses/GPL-2'. diff --git a/PixelOne-Pro-4B/runtime/src/pixelone/assets/DejaVuSans.ttf b/PixelOne-Pro-4B/runtime/src/pixelone/assets/DejaVuSans.ttf new file mode 100644 index 0000000000000000000000000000000000000000..c6e19bb61692c7347365b0d3e60c17f6c8980fa8 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/pixelone/assets/DejaVuSans.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ae7b7855e115a5966d8b1b3f80f254ccc117ec86f9965e202ee2940453837280 +size 759720 diff --git a/PixelOne-Pro-4B/runtime/src/pixelone/checkpoint.py b/PixelOne-Pro-4B/runtime/src/pixelone/checkpoint.py new file mode 100644 index 0000000000000000000000000000000000000000..9a26934fe8195dc14a385971d9f41f5d8be6890e --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/pixelone/checkpoint.py @@ -0,0 +1,54 @@ +from pathlib import Path + +import torch +import torch.distributed as distributed +import torch.distributed.checkpoint as checkpoint +from torch.distributed.checkpoint.state_dict import StateDictOptions, get_state_dict, set_state_dict + +from pixelone.io import atomic_json, stable_hash + + +def initialized(): + return distributed.is_available() and distributed.is_initialized() + + +def save_checkpoint(directory, model, optimizer, step, identity): + directory = Path(directory) + rank = distributed.get_rank() if initialized() else 0 + if rank == 0: + if directory.exists(): + raise ValueError('Checkpoint destination already exists') + directory.mkdir(parents=True) + if initialized(): + distributed.barrier() + model_state, optimizer_state = get_state_dict(model, optimizer, options=StateDictOptions(cpu_offload=True)) + checkpoint.save({'model': model_state, 'optimizer': optimizer_state}, checkpoint_id=directory / 'state') + random_state = {'cpu': torch.get_rng_state()} + if torch.cuda.is_available(): + random_state['cuda'] = torch.cuda.get_rng_state() + torch.save(random_state, directory / f'rng_rank_{rank:04d}.pt') + if initialized(): + distributed.barrier() + if rank == 0: + atomic_json(directory / 'training.json', {'schema': 'pixelone-training-v1', 'step': step, + 'identity': identity, 'identity_sha256': stable_hash(identity), 'state': 'complete'}) + + +def load_checkpoint(directory, model, optimizer, identity): + import json + directory = Path(directory) + metadata = json.loads((directory / 'training.json').read_text()) + if metadata.get('state') != 'complete' or metadata['identity_sha256'] != stable_hash(identity): + raise ValueError('Checkpoint is incomplete or belongs to another training recipe/data/world size') + options = StateDictOptions(cpu_offload=True) + model_state, optimizer_state = get_state_dict(model, optimizer, options=options) + state = {'model': model_state, 'optimizer': optimizer_state} + checkpoint.load(state, checkpoint_id=directory / 'state') + set_state_dict(model, optimizer, model_state_dict=state['model'], + optim_state_dict=state['optimizer'], options=options) + rank = distributed.get_rank() if initialized() else 0 + random_state = torch.load(directory / f'rng_rank_{rank:04d}.pt', map_location='cpu', weights_only=True) + torch.set_rng_state(random_state['cpu']) + if 'cuda' in random_state and torch.cuda.is_available(): + torch.cuda.set_rng_state(random_state['cuda']) + return metadata['step'] diff --git a/PixelOne-Pro-4B/runtime/src/pixelone/cli.py b/PixelOne-Pro-4B/runtime/src/pixelone/cli.py new file mode 100644 index 0000000000000000000000000000000000000000..6ea4c04e0bc3bbeb1534cbccce0078f8e209cbf0 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/pixelone/cli.py @@ -0,0 +1,74 @@ +import argparse +import json + + +def main(): + parser = argparse.ArgumentParser(prog='pixelone') + commands = parser.add_subparsers(dest='command', required=True) + inference = commands.add_parser('infer', help='Predict an original-image click') + inference.add_argument('--model', required=True) + inference.add_argument('--image', required=True) + inference.add_argument('--instruction', required=True) + inference.add_argument('--device', default='cuda:0') + inference.add_argument('--revision') + inference.add_argument('--subfolder', help='Model directory within a Hugging Face collection or local path') + inference.add_argument('--kernel-backend', choices=['native', 'torch']) + training = commands.add_parser('train', help='Train a search teacher or a direct student') + training.add_argument('--config', required=True) + training.add_argument('--resume') + data = commands.add_parser('prepare-data', help='Validate original-pixel box annotations') + data.add_argument('--input', required=True) + data.add_argument('--output', required=True) + data.add_argument('--image-root') + cache = commands.add_parser('cache-teacher', help='Run T3 and cache teacher distributions') + cache.add_argument('--config', required=True) + cache.add_argument('--adapter', required=True) + cache.add_argument('--output', required=True) + export = commands.add_parser('export', help='Export a full student checkpoint without optimizer state') + export.add_argument('--checkpoint', required=True) + export.add_argument('--output', required=True) + export.add_argument('--precision', choices=['training_cuda', 'float32'], default='training_cuda') + arguments = parser.parse_args() + if arguments.command == 'infer': + from PIL import Image + from pixelone.inference import PixelOnePredictor + predictor = PixelOnePredictor.from_pretrained(arguments.model, device=arguments.device, + revision=arguments.revision, subfolder=arguments.subfolder, kernel_backend=arguments.kernel_backend) + with Image.open(arguments.image) as image: + result = predictor.predict(image, arguments.instruction) + print(json.dumps(result, ensure_ascii=False)) + elif arguments.command == 'train': + from pathlib import Path + from pixelone.training import run_training + result = run_training(json.loads(Path(arguments.config).read_text()), resume=arguments.resume) + print(json.dumps(result)) + elif arguments.command == 'prepare-data': + from pixelone.data import prepare_dataset + print(json.dumps(prepare_dataset(arguments.input, arguments.output, arguments.image_root))) + elif arguments.command == 'export': + from pixelone.export import export_checkpoint + print(json.dumps(export_checkpoint(arguments.checkpoint, arguments.output, precision=arguments.precision))) + elif arguments.command == 'cache-teacher': + from pathlib import Path + import torch + from safetensors.torch import load_file + from pixelone.training import load_native + from pixelone.data import GroundingDataset + from pixelone.teacher import SearchTeacher, cache_teacher + from jev_spatial_distill.t3.model import Teacher, native_runtime + config = json.loads(Path(arguments.config).read_text()) + recipe = config['recipe'] + device = torch.device(config.get('device', 'cuda:0')) + with native_runtime(recipe['kernel_backend']): + native, processor = load_native(config['base_model'], device) + model = Teacher(native, recipe) + try: + model.load_adapter(load_file(arguments.adapter, device='cpu')) + cache_teacher(SearchTeacher(model, processor, recipe), + GroundingDataset(config['data'], config.get('image_root')), arguments.output) + finally: + model.close() + + +if __name__ == '__main__': + main() diff --git a/PixelOne-Pro-4B/runtime/src/pixelone/data.py b/PixelOne-Pro-4B/runtime/src/pixelone/data.py new file mode 100644 index 0000000000000000000000000000000000000000..287f175ccf549b9befbc6195a76135b747de72ab --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/pixelone/data.py @@ -0,0 +1,131 @@ +import json +from pathlib import Path +import sqlite3 + +from PIL import Image + +from jev_spatial_distill.spatial_pointer.geometry import Layout +from jev_click_finetune.objective import support +from pixelone.io import file_sha256 + + +def normalize_row(row, image_root, verify_image=True): + required = {'id', 'image', 'instruction', 'bbox_xyxy'} + if not required <= row.keys(): + raise ValueError('Missing fields: ' + ', '.join(sorted(required - row.keys()))) + if not isinstance(row['id'], str) or not row['id']: + raise ValueError('Target IDs must be nonempty strings') + if not isinstance(row['instruction'], str) or not row['instruction'].strip() or '<|' in row['instruction']: + raise ValueError('Expected a nonempty instruction without model control tokens') + image = row['image'] + if isinstance(image, list): + if len(image) != 1: + raise ValueError('Each target must reference one screenshot') + image = image[0] + path = Path(image_root) / image + if verify_image or 'image_size' not in row or 'image_sha256' not in row: + with Image.open(path) as source: + dimensions = list(source.size) + digest = file_sha256(path) + if row.get('image_size', dimensions) != dimensions or row.get('image_sha256', digest) != digest: + raise ValueError('Screenshot identity changed: ' + row['id']) + else: + dimensions, digest = row['image_size'], row['image_sha256'] + layout = Layout(*dimensions) + support(layout, row['bbox_xyxy']) + return {**row, 'image': [str(path)], 'image_size': dimensions, 'image_sha256': digest} + + +class GroundingDataset: + def __init__(self, path, image_root=None): + self.path = Path(path) + self.image_root = Path(image_root) if image_root else self.path.parent + self.offsets, identifiers = [], set() + with self.path.open('rb') as stream: + while True: + offset = stream.tell() + line = stream.readline() + if not line: + break + row = json.loads(line) + identifier = row['id'] + if identifier in identifiers: + raise ValueError('Duplicate target ID: ' + identifier) + identifiers.add(identifier) + self.offsets.append(offset) + if not self.offsets: + raise ValueError('Empty grounding dataset') + + def __len__(self): + return len(self.offsets) + + def __getitem__(self, index): + with self.path.open('rb') as stream: + stream.seek(self.offsets[index]) + row = json.loads(stream.readline()) + return normalize_row(row, self.image_root) + + +def prepare_dataset(source, destination, image_root=None): + source, destination = Path(source), Path(destination) + root = Path(image_root) if image_root else source.parent + if destination.exists(): + raise ValueError('Choose a new output path; datasets are not overwritten') + destination.parent.mkdir(parents=True, exist_ok=True) + identifiers = set() + with source.open() as inputs, destination.open('x') as outputs: + for line in inputs: + original = json.loads(line) + row = normalize_row(original, root) + if row['id'] in identifiers: + raise ValueError('Duplicate target ID: ' + row['id']) + identifiers.add(row['id']) + row['image'] = original['image'] + outputs.write(json.dumps(row, ensure_ascii=False, allow_nan=False) + '\n') + return {'targets': len(identifiers), 'sha256': file_sha256(destination)} + + +def index_teacher_cache(path, destination): + path, destination = Path(path), Path(destination) + if destination.exists(): + raise ValueError('Choose a new index path') + connection = sqlite3.connect(destination) + try: + connection.execute('CREATE TABLE records (id TEXT PRIMARY KEY, offset INTEGER, length INTEGER)') + connection.execute('CREATE TABLE metadata (key TEXT PRIMARY KEY, value TEXT)') + with path.open('rb') as stream: + while True: + offset = stream.tell() + line = stream.readline() + if not line: + break + row = json.loads(line) + connection.execute('INSERT INTO records VALUES (?, ?, ?)', (row['id'], offset, len(line))) + connection.execute('INSERT INTO metadata VALUES (?, ?)', ('sha256', file_sha256(path))) + connection.commit() + finally: + connection.close() + + +class IndexedTeacherCache: + def __init__(self, path, index): + self.path = Path(path) + self.connection = sqlite3.connect(Path(index).resolve().as_uri() + '?mode=ro', uri=True) + expected = self.connection.execute('SELECT value FROM metadata WHERE key="sha256"').fetchone() + if expected is None or file_sha256(self.path) != expected[0]: + raise ValueError('Teacher cache does not match its index') + + def get(self, target): + offset = self.connection.execute('SELECT offset, length FROM records WHERE id=?', (target['id'],)).fetchone() + if offset is None: + raise ValueError('No teacher trace for target: ' + target['id']) + with self.path.open('rb') as stream: + stream.seek(offset[0]) + row = json.loads(stream.read(offset[1])) + if (any(row[key] != target[key] for key in ['id', 'instruction', 'bbox_xyxy', 'image_size']) + or row['source_image_sha256'] != target['image_sha256']): + raise ValueError('Teacher trace and training input identities differ') + return row + + def close(self): + self.connection.close() diff --git a/PixelOne-Pro-4B/runtime/src/pixelone/export.py b/PixelOne-Pro-4B/runtime/src/pixelone/export.py new file mode 100644 index 0000000000000000000000000000000000000000..43637a39bb36e79f289980ef97c71234f7e759a4 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/pixelone/export.py @@ -0,0 +1,85 @@ +import json +import os +from pathlib import Path +import shutil +import tempfile + +import torch +import torch.distributed.checkpoint as checkpoint +from safetensors.torch import save_file + +from pixelone.io import atomic_json, bundle_member, file_sha256 + + +def export_checkpoint(source, destination, *, precision='training_cuda', shard_bytes=2 * 1024**3): + source, destination = Path(source), Path(destination) + metadata = json.loads((source / 'training.json').read_text()) + identity = metadata['identity'] + recipe = identity['recipe'] + if metadata.get('state') != 'complete' or recipe.get('train_mode') != 'full': + raise ValueError('Export requires a complete full-parameter student checkpoint') + if precision not in ('training_cuda', 'float32') or shard_bytes < 1: + raise ValueError('Invalid export precision or shard budget') + if destination.exists(): + raise ValueError('Choose a new model destination') + assets = source.parent / 'assets' + for name, expected in identity['assets'].items(): + if file_sha256(bundle_member(assets, name)) != expected: + raise ValueError('Training processor/model configuration changed: ' + name) + destination.parent.mkdir(parents=True, exist_ok=True) + staging = Path(tempfile.mkdtemp(prefix='.' + destination.name + '-', dir=destination.parent)) + reader = checkpoint.FileSystemReader(source / 'state') + entries = sorted((name, item) for name, item in reader.read_metadata().state_dict_metadata.items() + if name.startswith('model.student.')) + if not entries or any('.lora_' in name for name, item in entries): + raise ValueError('Expected merged full-student checkpoint tensors') + files, weight_map, tensors, pending = {}, {}, {}, {} + shard_number, pending_bytes, total_size = 0, 0, 0 + + def flush(): + nonlocal shard_number, pending_bytes, total_size + if not pending: + return + values = {name.removeprefix('model.'): torch.empty(item.size, dtype=item.properties.dtype) + for name, item in pending.items()} + checkpoint.load({'model': values}, storage_reader=reader, no_dist=True) + exported = {} + for name, value in values.items(): + name = name.removeprefix('student.') + if not bool(torch.isfinite(value).all()): + raise ValueError('Nonfinite model tensor: ' + name) + dtype = torch.float32 + if precision == 'training_cuda' and (name.startswith('native.backbone.language_model.layers.') + or (recipe['train_vision'] and name.startswith('native.backbone.visual.blocks.'))): + dtype = torch.bfloat16 + exported[name] = value.to(dtype).contiguous() + tensors[name] = {'shape': list(value.shape), 'dtype': str(dtype)} + total_size += exported[name].numel() * exported[name].element_size() + shard_number += 1 + filename = f'weights-{shard_number:05d}.safetensors' + save_file(exported, str(staging / filename)) + files[filename] = file_sha256(staging / filename) + weight_map.update({name: filename for name in exported}) + pending.clear() + pending_bytes = 0 + + for name, item in entries: + if not isinstance(item, checkpoint.metadata.TensorStorageMetadata): + raise ValueError('Expected tensor-only model state') + size = torch.Size(item.size).numel() * torch.empty((), dtype=item.properties.dtype).element_size() + if pending and pending_bytes + size > shard_bytes: + flush() + pending[name] = item + pending_bytes += size + flush() + for name, expected in identity['assets'].items(): + shutil.copyfile(bundle_member(assets, name), staging / name) + files[name] = expected + manifest = {'schema': 'pixelone-pro-v1', 'use_cache': False, 'precision': precision, + 'recipe': recipe, 'files': files, 'weight_map': weight_map, 'tensors': tensors, + 'source_step': metadata['step'], 'source_checkpoint_sha256': file_sha256(source / 'training.json'), + 'runtime_package': 'pixelone-grounding==0.1.0'} + atomic_json(staging / 'pixelone.json', manifest) + atomic_json(staging / 'model.safetensors.index.json', {'metadata': {'total_size': total_size}, 'weight_map': weight_map}) + os.rename(staging, destination) + return {'destination': str(destination), 'shards': shard_number, 'tensor_bytes': total_size} diff --git a/PixelOne-Pro-4B/runtime/src/pixelone/inference.py b/PixelOne-Pro-4B/runtime/src/pixelone/inference.py new file mode 100644 index 0000000000000000000000000000000000000000..8a93231e1d613cd46653037e420f17706dadcdd3 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/pixelone/inference.py @@ -0,0 +1,170 @@ +from contextlib import contextmanager +import json +from pathlib import Path +import threading + +import torch + +from jev_click_finetune.inputs import prepare +from jev_spatial_distill.t3.model import native_runtime +from jev_unified_student.portable_full import FullWeightStudent, inference_precision +from pixelone.io import bundle_member, file_sha256 + + +RUNTIME_LOCK = threading.RLock() +BUNDLE_SCHEMA = 'pixelone-pro-v1' + + +def resolve_model_path(model_path, *, subfolder=None, revision=None): + folder = str(subfolder) if subfolder else '' + if folder: + folder = str(bundle_member(Path('.'), folder)) + if folder == '.': + raise ValueError('Select a model subfolder, not the current directory') + root = Path(model_path).expanduser() + if root.is_dir(): + selected = root / folder + if not selected.is_dir(): + raise FileNotFoundError('Model subfolder not found: ' + str(selected)) + return selected + from huggingface_hub import hf_hub_download, snapshot_download + from huggingface_hub.errors import EntryNotFoundError + prefix = folder.rstrip('/') + '/' if folder else '' + try: + manifest_path = hf_hub_download(str(model_path), filename=prefix + 'pixelone.json', revision=revision) + except EntryNotFoundError as error: + raise ValueError('No PixelOne manifest at this location; select a model subfolder for a collection repository') from error + manifest = json.loads(Path(manifest_path).read_text()) + members = list(manifest['files']) + for name in members: + bundle_member(Path('.'), name) + root = Path(snapshot_download(str(model_path), revision=revision, + allow_patterns=[prefix + 'pixelone.json', *[prefix + name for name in members]])) + return root / folder + + +def inspect_bundle(root, verify_weights=True): + root = Path(root) + manifest = json.loads((root / 'pixelone.json').read_text()) + if manifest.get('schema') != BUNDLE_SCHEMA or manifest.get('use_cache') is not False: + raise ValueError('Expected a PixelOne Pro bundle with KV caching disabled') + recipe = manifest['recipe'] + if (recipe.get('train_mode') != 'full' or recipe.get('decoder') != 'coarse_first' + or recipe.get('subdivisions') != 32 or recipe.get('prompt') != 'valid_click_v1' + or recipe.get('attention_mode') != 'bidirectional_full_layers' + or recipe.get('train_vision') is not True): + raise ValueError('Unsupported Pro readout, input, or attention contract') + if recipe.get('kernel_backend') not in ('torch', 'native'): + raise ValueError('Unknown kernel backend') + if manifest.get('precision') not in ('training_cuda', 'float32'): + raise ValueError('Unknown tensor precision contract') + weights = manifest['weight_map'] + if not weights or set(weights) != set(manifest['tensors']): + raise ValueError('Incomplete tensor index') + if not set(weights.values()) <= manifest['files'].keys(): + raise ValueError('Weight index contains an unhashed shard') + for name, expected in manifest['files'].items(): + path = bundle_member(root, name) + if not path.is_file(): + raise FileNotFoundError(path) + if (verify_weights or not name.endswith('.safetensors')) and file_sha256(path) != expected: + raise ValueError('Bundle checksum mismatch: ' + name) + return manifest + + +def decode_click(output, layout): + parent = int(output['coarse'].detach().argmax()) + parents = output['parents'].tolist() + if parent not in parents: + raise ValueError('Selected token was not read by the pixel head') + row = parents.index(parent) + logits = output['fine'][row].float() + valid = layout.valid(logits.device)[parent] + if not bool(valid.any()): + raise ValueError('Selected token contains no image pixel') + pixel = int(logits.masked_fill(~valid, -torch.inf).argmax()) + point = layout.positions(logits.device)[parent, pixel].tolist() + return {'point': point, 'token_index': parent, 'pixel_index': pixel} + + +class PixelOnePredictor: + def __init__(self, model, processor, manifest, device, kernel_backend=None): + self.model, self.processor, self.manifest = model, processor, manifest + self.device = torch.device(device) + self.recipe = dict(manifest['recipe']) + self.kernel_backend = kernel_backend or self.recipe['kernel_backend'] + + @classmethod + def from_pretrained(cls, model_path, *, device='cuda:0', revision=None, subfolder=None, + verify_weights=True, kernel_backend=None): + from accelerate import init_empty_weights + from safetensors.torch import load_file + from transformers import AutoProcessor + from scripts.smoke_videojev import LegacyProcessorAdapter + from videojev_hf.configuration_videojev import VideoJevConfig + from videojev_hf.modeling_videojev import VideoJevForVideoUnderstanding + + root = resolve_model_path(model_path, subfolder=subfolder, revision=revision) + manifest = inspect_bundle(root, verify_weights) + device = torch.device(device) + if manifest['precision'] == 'training_cuda' and device.type != 'cuda': + raise ValueError('Released mixed-precision Pro weights require CUDA') + recipe = manifest['recipe'] + backend = kernel_backend or recipe['kernel_backend'] + with RUNTIME_LOCK, native_runtime(backend, attention_mode=recipe['attention_mode']): + config = VideoJevConfig.from_dict(json.loads((root / 'config.json').read_text())) + config._attn_implementation = recipe.get('attention', 'sdpa') + with init_empty_weights(include_buffers=False): + model = FullWeightStudent(VideoJevForVideoUnderstanding(config), recipe) + expected = model.state_dict() + if set(expected) != set(manifest['weight_map']): + raise ValueError('Model structure differs from the weight index') + loaded = set() + for filename in sorted(set(manifest['weight_map'].values())): + values = load_file(str(bundle_member(root, filename)), device='cpu') + for name, tensor in values.items(): + specification = manifest['tensors'].get(name) + if (name in loaded or manifest['weight_map'].get(name) != filename + or specification is None or tensor.shape != expected[name].shape + or list(tensor.shape) != specification['shape'] + or str(tensor.dtype) != specification['dtype']): + raise ValueError('Tensor shape, dtype or shard mismatch: ' + name) + loaded.add(name) + model.load_state_dict({name: tensor.to(device) for name, tensor in values.items()}, + strict=False, assign=True) + del values + if loaded != set(expected) or any(parameter.is_meta for parameter in model.parameters()): + raise ValueError('Some model parameters were not loaded') + model.to(device).eval().requires_grad_(False) + inference_precision(model, recipe, manifest['precision']) + if recipe.get('experts_backend') == 'grouped_mm' and model.native.is_moe: + for module in model.native.backbone.language_model.modules(): + if type(module).__name__ == 'Qwen3_5MoeExperts': + module.config._experts_implementation = 'grouped_mm' + processor = LegacyProcessorAdapter(AutoProcessor.from_pretrained( + root, local_files_only=True, trust_remote_code=False)) + for token, expected_id in [('<|decide|>', config.decide_token_id), + ('<|option_end|>', config.option_end_token_id)]: + if processor.tokenizer.convert_tokens_to_ids(token) != expected_id: + raise ValueError('Native decision token identity differs') + return cls(model, processor, manifest, device, backend) + + @contextmanager + def activated(self): + with RUNTIME_LOCK, native_runtime(self.kernel_backend, attention_mode=self.recipe['attention_mode']), torch.no_grad(): + yield + + def predict_outputs(self, images, instructions): + if not images or len(images) != len(instructions): + raise ValueError('Each screenshot requires one instruction') + with self.activated(): + prepared = [prepare(self.model, self.processor, image, instruction) + for image, instruction in zip(images, instructions, strict=True)] + outputs = self.model([value[0] for value in prepared], [value[1] for value in prepared], + [value[2] for value in prepared]) + return outputs, [value[2] for value in prepared], [value[3] for value in prepared] + + def predict(self, image, instruction): + outputs, layouts, metadata = self.predict_outputs([image.convert('RGB')], [instruction]) + return {**decode_click(outputs[0], layouts[0]), 'image_size': list(image.size), + 'kernel_backend': self.kernel_backend, **metadata[0]} diff --git a/PixelOne-Pro-4B/runtime/src/pixelone/io.py b/PixelOne-Pro-4B/runtime/src/pixelone/io.py new file mode 100644 index 0000000000000000000000000000000000000000..516e55d8776dacb551940175daad669b41ec049c --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/pixelone/io.py @@ -0,0 +1,41 @@ +import hashlib +import json +import os +from pathlib import Path +import tempfile + + +def file_sha256(path): + digest = hashlib.sha256() + with Path(path).open('rb') as stream: + for block in iter(lambda: stream.read(8 * 1024 * 1024), b''): + digest.update(block) + return digest.hexdigest() + + +def stable_hash(value): + return hashlib.sha256(json.dumps(value, sort_keys=True, separators=(',', ':'), + ensure_ascii=False).encode()).hexdigest() + + +def atomic_json(path, value): + path = Path(path) + path.parent.mkdir(parents=True, exist_ok=True) + descriptor, temporary = tempfile.mkstemp(dir=path.parent, prefix='.' + path.name) + try: + with os.fdopen(descriptor, 'w') as stream: + json.dump(value, stream, ensure_ascii=False, indent=2, allow_nan=False) + stream.write('\n') + stream.flush() + os.fsync(stream.fileno()) + os.replace(temporary, path) + finally: + if os.path.exists(temporary): + os.unlink(temporary) + + +def bundle_member(root, name): + relative = Path(name) + if not name or relative.is_absolute() or '..' in relative.parts or '\\' in name: + raise ValueError('Unsafe bundle member: ' + name) + return Path(root) / relative diff --git a/PixelOne-Pro-4B/runtime/src/pixelone/resources.py b/PixelOne-Pro-4B/runtime/src/pixelone/resources.py new file mode 100644 index 0000000000000000000000000000000000000000..67f979ba82a3664fb4b505a0560ac6dcf061bd0c --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/pixelone/resources.py @@ -0,0 +1,4 @@ +from pathlib import Path + + +FONT_PATH = str(Path(__file__).resolve().parent / 'assets' / 'DejaVuSans.ttf') diff --git a/PixelOne-Pro-4B/runtime/src/pixelone/sampling.py b/PixelOne-Pro-4B/runtime/src/pixelone/sampling.py new file mode 100644 index 0000000000000000000000000000000000000000..8e78df9912125a16af822c1e111f4617bba4c3c2 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/pixelone/sampling.py @@ -0,0 +1,15 @@ + + +class SampleStream: + """The same global stream across methods; warmup/joint occupy disjoint step ranges.""" + def __init__(self,count,seed): + if count<1:raise ValueError('Empty training dataset') + self.count=count;self.seed=seed;self.epoch=None;self.order=None + + def index(self,global_position): + import numpy as np + epoch,position=divmod(global_position,self.count) + if epoch!=self.epoch: + self.order=np.random.default_rng(self.seed+epoch).permutation(self.count) + self.epoch=epoch + return int(self.order[position]) diff --git a/PixelOne-Pro-4B/runtime/src/pixelone/teacher.py b/PixelOne-Pro-4B/runtime/src/pixelone/teacher.py new file mode 100644 index 0000000000000000000000000000000000000000..c493c5708651a2385b73ca8af04e78862f91cab2 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/pixelone/teacher.py @@ -0,0 +1,78 @@ +import json +from pathlib import Path + +import torch + +from jev_spatial_distill.t3.model import native_runtime +from jev_spatial_distill.t3.states import make_state, read_image +from spatial_pro_experiments.fast import FAST_STRATEGIES, refine_batch +from videojev_hf.processing_videojev import prepare_query_groups + + +class SearchTeacher: + def __init__(self, model, processor, recipe): + from scripts import refine_spatial_jev + self.model, self.processor, self.recipe = model, processor, recipe + self.geometry = refine_spatial_jev + + def encode(self, views, view_size): + features, record = self.geometry.encode_views(self.model.native, self.processor, views, view_size) + with torch.inference_mode(False): + features = features.detach().clone() + return features, record + + def describe(self, encoded): + return encoded[1] + + def score_many(self, requests): + groups, features, questions = [], [], [] + for encoded, requested in requests: + feature, record = encoded + prepared = list(prepare_query_groups(self.processor, record, requested, record['context'])) + if len(prepared) != 1: + raise ValueError('A search state must fit in one model call') + group, actual = prepared[0] + groups.append(group) + features.append(feature) + questions.append(actual) + outputs = self.model(groups, features)['items'] + return [[{'id': question['id'], 'probabilities': output['probabilities'][index, :len(question['options'])].float().cpu().tolist()} + for index, question in enumerate(actual)] + for output, actual in zip(outputs, questions, strict=True)] + + def predict(self, image, instruction): + previous = self.model.training + self.model.eval() + try: + with native_runtime(self.recipe['kernel_backend']), torch.no_grad(): + full = self.encode(self.geometry.contextual_views(image, view_size=self.recipe['full_view_size']), + self.recipe['full_view_size']) + return refine_batch(self, [image], [instruction], [full], [[]], FAST_STRATEGIES['packed3-488'], + self.recipe['crop_view_size'], 0.)[0] + finally: + self.model.train(previous) + + +def visited_states(row, prediction): + result = [make_state(row, [0, 0, *row['image_size']], 0, 'visited')] + for stage in prediction['stages'][1:]: + for trace in stage['traces']: + state = make_state(row, trace['crop_bounds'], stage['depth'], 'visited') + if any(question['enabled'] for question in state['labels']['questions']): + result.append(state) + return result + + +def cache_teacher(teacher, rows, destination): + from pixelone.data import index_teacher_cache + destination = Path(destination) + if destination.exists(): + raise ValueError('Choose a new teacher-cache path') + destination.parent.mkdir(parents=True, exist_ok=True) + with destination.open('x') as stream: + for row in rows: + prediction = teacher.predict(read_image(row), row['instruction']) + record = {**prediction, **{key: row[key] for key in ['id', 'instruction', 'bbox_xyxy', 'image_size']}, + 'source_image_sha256': row['image_sha256']} + stream.write(json.dumps(record, ensure_ascii=False, allow_nan=False) + '\n') + index_teacher_cache(destination, destination.with_suffix('.sqlite')) diff --git a/PixelOne-Pro-4B/runtime/src/pixelone/training.py b/PixelOne-Pro-4B/runtime/src/pixelone/training.py new file mode 100644 index 0000000000000000000000000000000000000000..50c2a8410144f32bca7a197a2f35dd822cc4acdf --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/pixelone/training.py @@ -0,0 +1,262 @@ +import copy +import json +import math +import os +from pathlib import Path +import random +import shutil + +import numpy as np +import torch +import torch.distributed as distributed + +from jev_spatial_distill.t3.model import Teacher, native_runtime, tensor_hash +from jev_spatial_distill.t3.states import StateSampler, prepare_state, read_image +from jev_spatial_distill.spatial_pointer.geometry import Layout +from jev_spatial_distill.spatial_pointer.supervision import project, selected_parents +from jev_unified_student.full_training import ( + BatchPayload, FullBatchStudent, clip_full_gradients, enable_full_training, + parameter_groups, wrap_full_training, +) +from jev_unified_student.model import ClickStudent, fresh_head, initialize_continued_student, initialize_student +from jev_unified_student.objective import unified_loss +from pixelone.checkpoint import load_checkpoint, save_checkpoint +from pixelone.data import GroundingDataset, IndexedTeacherCache +from pixelone.io import atomic_json, file_sha256 +from pixelone.sampling import SampleStream +from pixelone.teacher import SearchTeacher, visited_states + + +def load_native(path, device): + from transformers import AutoProcessor + from scripts.smoke_videojev import LegacyProcessorAdapter + from videojev_hf.modeling_videojev import VideoJevForVideoUnderstanding + native = VideoJevForVideoUnderstanding.from_pretrained(path, + dtype=torch.bfloat16 if device.type == 'cuda' else torch.float32, + device_map={'': str(device)}, attn_implementation='sdpa') + processor = LegacyProcessorAdapter(AutoProcessor.from_pretrained(path, trust_remote_code=False)) + return native, processor + + +def initialize_training_student(native, recipe, initialization, adapter=None): + from safetensors.torch import load_file + if initialization == 'base': + if adapter: + raise ValueError('Base initialization must not load a trained adapter') + student = ClickStudent(native, recipe) + student.spatial.load_state_dict(fresh_head(native.head.q.in_features, recipe).state_dict()) + student.unified_initialization = {'kind': 'base'} + return student + if not adapter: + raise ValueError('Teacher/student initialization requires an adapter file') + state = load_file(adapter, device='cpu') + if initialization == 'teacher': + return initialize_student(native, recipe, state)[0] + if initialization != 'student': + raise ValueError('Initialization must be base, teacher or student') + spatial = {key.removeprefix('spatial.'): value for key, value in state.items() if key.startswith('spatial.')} + expected = {'adapter_tensor_sha256': tensor_hash(state), 'spatial_sha256': tensor_hash(spatial)} + return initialize_continued_student(native, recipe, state, expected)[0] + + +def adapter_parameter_groups(model, recipe): + groups = [] + for label, rate in [('lora', recipe['lora_lr']), ('head', recipe['head_lr']), + ('spatial', recipe.get('spatial_lr', recipe['head_lr']))]: + parameters = [parameter for name, parameter in model.named_parameters() + if parameter.requires_grad and (('.lora_' in name and label == 'lora') + or (name.startswith('native.head.') and label == 'head') + or (name.startswith('spatial.') and label == 'spatial'))] + if parameters: + groups.append({'params': parameters, 'lr': rate, 'base_lr': rate, 'name': label}) + if {id(parameter) for group in groups for parameter in group['params']} != { + id(parameter) for parameter in model.parameters() if parameter.requires_grad}: + raise ValueError('Optimizer does not cover the trainable adapter parameters') + return groups + + +def schedule_rate(step, steps, recipe): + warmup = recipe.get('lr_warmup_steps', 0) + if step < warmup: + return (step + 1) / max(1, warmup) + if recipe.get('lr_schedule', 'constant') == 'constant': + return 1. + if recipe['lr_schedule'] != 'cosine': + raise ValueError('Unsupported learning-rate schedule') + progress = (step - warmup) / max(1, steps - warmup - 1) + minimum = recipe.get('min_lr_ratio', 0.1) + return minimum + (1 - minimum) * 0.5 * (1 + math.cos(math.pi * progress)) + + +def student_batch(student, rows, stream, positions, teacher_cache): + payload = [] + for position in positions: + row = rows[stream.index(position)] + layout = Layout(*row['image_size']) + target = layout.center_target(row['bbox_xyxy']) + soft = project(teacher_cache.get(row), row['bbox_xyxy'], layout) if teacher_cache else None + payload.append({'row': row, 'layout': layout, 'target': target, 'soft': soft, + 'required': selected_parents(target, soft), 'image': read_image(row)}) + return BatchPayload(payload) + + +def run_training(configuration, *, resume=None): + config = copy.deepcopy(configuration) + recipe = config['recipe'] + stage = config['stage'] + if stage not in ('teacher', 'student'): + raise ValueError('Stage must be teacher or student') + world = int(os.environ.get('WORLD_SIZE', '1')) + rank = int(os.environ.get('RANK', '0')) + local_rank = int(os.environ.get('LOCAL_RANK', '0')) + device = torch.device(config.get('device', 'cuda' if torch.cuda.is_available() else 'cpu')) + if device.type == 'cuda': + device = torch.device('cuda', local_rank) + torch.cuda.set_device(device) + if world > 1: + distributed.init_process_group('nccl' if device.type == 'cuda' else 'gloo') + seed = recipe['seed'] + torch.manual_seed(seed) + random.seed(seed) + np.random.seed(seed) + rows = GroundingDataset(config['data'], config.get('image_root')) + if config.get('expected_targets') is not None and len(rows) != config['expected_targets']: + raise ValueError('Training target count differs from the configured dataset') + full = stage == 'student' and recipe.get('train_mode') == 'full' + if full and config['initialization'] != 'student': + raise ValueError('Pro continuation must retain a trained student pixel head') + batch, micro = recipe['global_batch'], recipe['micro_batch'] + if batch <= 0 or micro <= 0 or batch % (world * micro): + raise ValueError('Global batch must be divisible by world size times micro batch') + steps = (recipe['supervised_steps'] + recipe['mixed_steps'] if stage == 'teacher' + else config.get('steps') or math.ceil(len(rows) * config.get('epochs', 1) / batch)) + root = Path(config['output']) + if rank == 0: + if root.exists() and any(root.iterdir()) and not resume: + raise ValueError('Nonempty output directory requires an explicit resume checkpoint') + root.mkdir(parents=True, exist_ok=True) + atomic_json(root / 'configuration.json', config) + if world > 1: + distributed.barrier() + cache = None + model = None + try: + with native_runtime(recipe['kernel_backend'], attention_mode=recipe.get('attention_mode', 'causal')): + native, processor = load_native(config['base_model'], device) + assets = root / 'assets' + if rank == 0: + processor.processor.save_pretrained(assets) + native.config.to_json_file(assets / 'config.json', use_diff=False) + if world > 1: + distributed.barrier() + asset_hashes = {path.name: file_sha256(path) for path in sorted(assets.iterdir()) if path.is_file()} + if stage == 'teacher': + model = Teacher(native, recipe) + sampler = StateSampler(list(rows), recipe) + else: + model = initialize_training_student(native, recipe, config['initialization'], config.get('adapter')) + if full: + enable_full_training(model, recipe) + if config.get('method', 'pixel_kd_top20') == 'pixel_kd_top20': + cache = IndexedTeacherCache(config['teacher_cache'], config['teacher_index']) + elif config['method'] != 'gt_top20': + raise ValueError('Public training supports Top20 with spatial KD or GT only') + if full: + local_world = int(os.environ.get('LOCAL_WORLD_SIZE', str(world))) + wrapped = wrap_full_training(model, processor, device, recipe, + {'nodes': world // local_world, 'processes': local_world}) + else: + wrapped = model if stage == 'teacher' else FullBatchStudent(model, processor, device) + if world > 1: + wrapped = torch.nn.parallel.DistributedDataParallel(wrapped, + device_ids=[local_rank] if device.type == 'cuda' else None) + groups = parameter_groups(model, recipe) if full else adapter_parameter_groups(model, recipe) + optimizer = torch.optim.AdamW(groups, weight_decay=recipe['weight_decay']) + identity = {'recipe': recipe, 'stage': stage, 'world_size': world, 'steps': steps, 'assets': asset_hashes, + 'data_sha256': file_sha256(config['data']), 'base_model': config['base_model'], + 'initialization': config.get('initialization'), 'method': config.get('method'), + 'adapter_sha256': file_sha256(config['adapter']) if config.get('adapter') else None, + 'teacher_sha256': file_sha256(config['teacher_cache']) if cache else None} + if resume and stage == 'teacher': + previous = json.loads((Path(resume) / 'training.json').read_text()) + expected_rollout = previous['identity'].get('rollout_sha256') + if expected_rollout: + source_rollout = Path(resume).parent / 'visited_states.json' + target_rollout = root / 'visited_states.json' + chosen = target_rollout if target_rollout.exists() else source_rollout + if not chosen.is_file() or file_sha256(chosen) != expected_rollout: + raise ValueError('Mixed-phase resume requires the original visited search states') + if rank == 0 and not target_rollout.exists(): + shutil.copyfile(chosen, target_rollout) + if world > 1: + distributed.barrier() + identity['rollout_sha256'] = expected_rollout + elif previous['step'] > recipe['supervised_steps']: + raise ValueError('Mixed-phase checkpoint is missing its visited-state identity') + first = load_checkpoint(resume, wrapped, optimizer, identity) if resume else 0 + stream = SampleStream(len(rows), seed) + rollout_ready = False + for step in range(first, steps): + if stage == 'teacher' and step >= recipe['supervised_steps'] and not rollout_ready: + rollout_file = root / 'visited_states.json' + if rank == 0 and not rollout_file.exists(): + search = SearchTeacher(model, processor, recipe) + visited = {} + for index in range(min(len(rows), recipe['rollout_limit'])): + row = rows[index] + visited[row['id']] = visited_states(row, search.predict(read_image(row), row['instruction'])) + atomic_json(rollout_file, visited) + if world > 1: + distributed.barrier() + sampler = StateSampler(list(rows), recipe, json.loads(rollout_file.read_text())) + identity['rollout_sha256'] = file_sha256(rollout_file) + rollout_ready = True + model.train() + optimizer.zero_grad(set_to_none=True) + for group in optimizer.param_groups: + group['lr'] = group['base_lr'] * schedule_rate(step, steps, recipe) + accumulated = 0. + per_rank = batch // world + for start in range(0, per_rank, micro): + positions = range(step * batch + rank * per_rank + start, + step * batch + rank * per_rank + start + micro) + if stage == 'teacher': + prepared = [] + for position in positions: + row, state = sampler.at(position) + prepared.append(prepare_state(model, processor, read_image(row), row['instruction'], state, recipe)) + loss = wrapped([value[0] for value in prepared], [value[1] for value in prepared], + [value[2] for value in prepared])['loss'] + else: + outputs, prepared = wrapped(student_batch(model, rows, stream, positions, cache)) + losses = [unified_loss(output, value['valid'], value['positive'], value['target'], + value['layout'], config.get('method', 'pixel_kd_top20'), value['soft'], None, recipe)[0] + for output, value in zip(outputs, prepared, strict=True)] + loss = torch.stack(losses).mean() + if not bool(torch.isfinite(loss)): + raise ValueError('Nonfinite training loss') + (loss * micro / per_rank).backward() + accumulated += float(loss.detach()) * micro / per_rank + if full: + clip_full_gradients(wrapped, list(model.parameters()), recipe['gradient_clip']) + else: + torch.nn.utils.clip_grad_norm_(model.parameters(), recipe['gradient_clip'], error_if_nonfinite=True) + optimizer.step() + if rank == 0: + with (root / 'metrics.jsonl').open('a') as metrics: + metrics.write(json.dumps({'step': step + 1, 'rank0_loss': accumulated}) + '\n') + if ((step + 1) % recipe['checkpoint_every'] == 0 or step + 1 == steps + or (stage == 'teacher' and step + 1 == recipe['supervised_steps'])): + output = root / f'step_{step + 1:06d}' + save_checkpoint(output, wrapped, optimizer, step + 1, identity) + if not full and rank == 0: + from safetensors.torch import save_file + save_file(model.adapter_state(), str(output / 'adapter.safetensors')) + return {'steps': steps, 'output': str(root)} + finally: + if cache: + cache.close() + if model: + model.close() + if world > 1 and distributed.is_initialized(): + distributed.destroy_process_group() diff --git a/PixelOne-Pro-4B/runtime/src/qwen_spatial/__init__.py b/PixelOne-Pro-4B/runtime/src/qwen_spatial/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/qwen_spatial/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-4B/runtime/src/qwen_spatial/common.py b/PixelOne-Pro-4B/runtime/src/qwen_spatial/common.py new file mode 100644 index 0000000000000000000000000000000000000000..dfdb06e23cdee2fde4599da3b6adde2eb45a5c7e --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/qwen_spatial/common.py @@ -0,0 +1,2 @@ +def inside_box(point, box): + return point is not None and box[0] <= point[0] <= box[2] and box[1] <= point[1] <= box[3] diff --git a/PixelOne-Pro-4B/runtime/src/qwen_spatial/kernels.py b/PixelOne-Pro-4B/runtime/src/qwen_spatial/kernels.py new file mode 100644 index 0000000000000000000000000000000000000000..d4c6f99583d7ba298279eb9567b9d5fd90f88e3f --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/qwen_spatial/kernels.py @@ -0,0 +1,27 @@ +from contextlib import contextmanager +from importlib import import_module + +OPTIONAL_KERNELS = ('FusedRMSNormGated', 'causal_conv1d_fn', 'causal_conv1d_update', 'chunk_gated_delta_rule', 'fused_recurrent_gated_delta_rule') + +@contextmanager +def qwen_kernel_backend(backend='torch', module=None): + if backend not in ('torch', 'native'): + raise ValueError('Choose torch or native Qwen kernels') + module = module or import_module('transformers.models.qwen3_5.modeling_qwen3_5') + original = {name: getattr(module, name) for name in OPTIONAL_KERNELS} + runtime = dict(backend=backend, optional_kernels_available={ + name: value is not None for name, value in original.items()}, + optional_kernels_enabled={name: backend == 'native' and value is not None + for name, value in original.items()}) + if backend == 'native': + yield runtime + return + original['is_fast_path_available'] = module.is_fast_path_available + try: + for name in OPTIONAL_KERNELS: + setattr(module, name, None) + module.is_fast_path_available = False + yield runtime + finally: + for name, value in original.items(): + setattr(module, name, value) diff --git a/PixelOne-Pro-4B/runtime/src/scripts/__init__.py b/PixelOne-Pro-4B/runtime/src/scripts/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/scripts/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-4B/runtime/src/scripts/batch_spatial_jev.py b/PixelOne-Pro-4B/runtime/src/scripts/batch_spatial_jev.py new file mode 100644 index 0000000000000000000000000000000000000000..fcb7f2f365592452c265fb828eb95cd1d7ae9406 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/scripts/batch_spatial_jev.py @@ -0,0 +1,29 @@ +import torch + +def collate_query_groups(groups, pad_token_id): + if not groups: + raise ValueError('Provide at least one query group') + max_length = max(group['input_ids'].shape[1] for group in groups) + max_options = max(group['pair_indices'].shape[1] for group in groups) + input_ids = torch.full((len(groups), max_length), pad_token_id, dtype=torch.long) + token_types = torch.zeros_like(input_ids) + attention_mask = torch.zeros_like(input_ids, dtype=torch.bool) + pairs, masks, queries, tasks, sample_indices = [], [], [], [], [] + for sample_index, group in enumerate(groups): + if group['input_ids'].shape[0] != 1 or group['video_grid_thw'].shape[0] != 1: + raise ValueError('Each input group must contain exactly one video') + length = group['input_ids'].shape[1] + input_ids[sample_index, :length] = group['input_ids'][0] + token_types[sample_index, :length] = group['mm_token_type_ids'][0] + attention_mask[sample_index, :length] = True + padding = max_options - group['pair_indices'].shape[1] + pairs.append(torch.nn.functional.pad(group['pair_indices'], (0, padding))) + masks.append(torch.nn.functional.pad(group['score_mask'], (0, padding))) + queries.append(group['query_indices']) + tasks.append(group['decision_tasks']) + sample_indices.extend([sample_index] * len(group['query_indices'])) + return dict(input_ids=input_ids, mm_token_type_ids=token_types, attention_mask=attention_mask, + video_grid_thw=torch.cat([group['video_grid_thw'] for group in groups]), + pair_indices=torch.cat(pairs), query_indices=torch.cat(queries), + score_mask=torch.cat(masks), decision_tasks=torch.cat(tasks), + sample_indices=torch.tensor(sample_indices)) diff --git a/PixelOne-Pro-4B/runtime/src/scripts/refine_spatial_jev.py b/PixelOne-Pro-4B/runtime/src/scripts/refine_spatial_jev.py new file mode 100644 index 0000000000000000000000000000000000000000..cb6f97f06db42ad98fc33e7c0347c37f28effda0 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/scripts/refine_spatial_jev.py @@ -0,0 +1,135 @@ +import math +import numpy as np +import torch +from PIL import Image, ImageDraw, ImageFont +from transformers.video_utils import VideoMetadata +from videojev_hf.videojev_temporal import pair_timeline +from pixelone.resources import FONT_PATH + +VIEW_SIZE = 768 + +def view_canvas(image, bounds=None, marked=False, title='FULL SCREEN', view_size=VIEW_SIZE): + if view_size != 'native' and (not isinstance(view_size, int) or view_size < 128): + raise ValueError('View size must be an integer >= 128') + if view_size == 'native': + if bounds is not None: + raise ValueError('Native resolution is only supported for the initial full screenshot') + from scripts.spatial_view_sizes import native_canvas_size + + content = image.copy() + scale, left, top = 1, 36, 58 + canvas_size = native_canvas_size(image.size) + else: + scale = view_size / VIEW_SIZE + source = image if bounds is None else image.crop(tuple(round(value) for value in bounds)) + content = source.copy() + content.thumbnail((VIEW_SIZE - 48, VIEW_SIZE - 76), Image.Resampling.LANCZOS) + if bounds is not None: + crop_scale = min((VIEW_SIZE - 48) / content.width, (VIEW_SIZE - 76) / content.height) + if crop_scale > 1: + content = content.resize((round(content.width * crop_scale), round(content.height * crop_scale)), + Image.Resampling.LANCZOS) + left, top = round((36 + (VIEW_SIZE - 48 - content.width) // 2) * scale), round(58 * scale) + if view_size != VIEW_SIZE: + content = source.resize((max(1, round(content.width * scale)), max(1, round(content.height * scale))), + Image.Resampling.LANCZOS) + canvas_size = (view_size, view_size) + canvas = Image.new('RGB', canvas_size, 'white') + canvas.paste(content, (left, top)) + draw = ImageDraw.Draw(canvas) + font = ImageFont.truetype(FONT_PATH, round(21 * scale)) + draw.text((round(20 * scale), round(7 * scale)), title, fill='#142c48', font=font) + if marked: + overlay = Image.new('RGBA', canvas.size) + grid_draw = ImageDraw.Draw(overlay) + for divider in range(1, 4): + horizontal = left + content.width * divider / 4 + vertical = top + content.height * divider / 4 + grid_draw.line((horizontal, top, horizontal, top + content.height), fill=(126, 52, 191, 155), + width=max(1, round(2 * scale))) + grid_draw.line((left, vertical, left + content.width, vertical), fill=(0, 145, 168, 155), + width=max(1, round(2 * scale))) + canvas = Image.alpha_composite(canvas.convert('RGBA'), overlay).convert('RGB') + draw = ImageDraw.Draw(canvas) + for index in range(4): + horizontal = left + content.width * (index + .5) / 4 + vertical = top + content.height * (index + .5) / 4 + draw.text((horizontal - 8 * scale, top - 27 * scale), 'ABCD'[index], fill='#7135b0', font=font) + draw.text((left - 24 * scale, vertical - 11 * scale), str(index + 1), fill='#007f98', font=font) + draw.rectangle((left, top, left + content.width, top + content.height), outline='#738090', + width=max(1, round(scale))) + return canvas + + +def contextual_views(image, bounds=None, view_size=VIEW_SIZE): + if bounds is None: + view = view_canvas(image, marked=True, title='FULL SCREEN - labeled grid', view_size=view_size) + return [view, view] + if view_size == 'native': + raise ValueError('Native resolution is only supported for the initial full screenshot') + overview = image.copy() + draw = ImageDraw.Draw(overview) + draw.rectangle(bounds, outline='#f38d16', width=max(3, image.width // 180)) + full = view_canvas(overview, title='FULL SCREEN - orange box is the crop', view_size=view_size) + local = view_canvas(image, bounds, marked=True, title='ENLARGED CROP - answer for this grid', view_size=view_size) + return [full, full, local, local] + + +def grid_questions(instruction, local=False): + description = ('The first view is the full screenshot for context. The last view is an enlarged crop. ' + 'Answer about the labeled grid in the LAST enlarged crop, not the full screenshot. ' + if local else 'The frames show one GUI screenshot with a labeled grid. ') + prefix = description + f'Locate the UI element to click for this instruction: "{instruction}". ' + questions = [ + dict(id='horizontal', task='choice', + query=prefix + 'Which labeled COLUMN contains the center of the target?', + options=['A. Column A, the leftmost column.', 'B. Column B, the middle-left column.', + 'C. Column C, the middle-right column.', 'D. Column D, the rightmost column.']), + dict(id='vertical', task='choice', + query=prefix + 'Which labeled ROW contains the center of the target?', + options=['A. Row 1, the topmost row.', 'B. Row 2, the upper-middle row.', + 'C. Row 3, the lower-middle row.', 'D. Row 4, the bottommost row.']), + ] + if local: + questions.insert(0, dict(id='presence', task='choice', + query=prefix + 'Is the target UI element visible inside the LAST enlarged crop?', + options=['A. Yes, the target is visible in the enlarged crop.', + 'B. No, the target is not visible in the enlarged crop.'])) + return questions + + +def encode_views(model, processor, views, view_size=VIEW_SIZE): + from scripts.spatial_view_sizes import NATIVE_ALIGNMENT, NATIVE_QUERY_CONTEXT, QUERY_CONTEXT + + if view_size != 'native' and (not isinstance(view_size, int) or view_size < 1): + raise ValueError('View size must be a positive integer') + count = len(views) + options = dict(size=dict(shortest_edge=4096, longest_edge=count * view_size**2)) if view_size != 'native' else {} + if view_size == 'native': + if not views or len({view.size for view in views}) != 1: + raise ValueError('Native frames must have one matching nonempty canvas size') + width, height = views[0].size + video_processor = processor.video_processor + if (video_processor.patch_size * video_processor.merge_size != NATIVE_ALIGNMENT or + width % NATIVE_ALIGNMENT or height % NATIVE_ALIGNMENT): + raise ValueError('Native canvases must be padded to the checkpoint\'s 32-pixel alignment') + options = dict(do_resize=False, size=dict(shortest_edge=4096, longest_edge=count * width * height)) + metadata = VideoMetadata(total_num_frames=count, fps=2., frames_indices=list(range(count))) + native = processor.video_processor( + videos=[np.stack([np.asarray(view) for view in views])], video_metadata=[metadata], + do_sample_frames=False, return_tensors='pt', **options) + grid = native['video_grid_thw'][0].tolist() + if view_size == 'native': + expected = [math.ceil(count / video_processor.temporal_patch_size), + height // video_processor.patch_size, width // video_processor.patch_size] + if grid != expected: + raise ValueError(f'Native full resolution was changed by the processor: {grid} != {expected}') + times, bounds = pair_timeline(np.arange(count) / 2., count / 2.) + record = dict(frames=count, fps=2., grid_thw=grid, tokens=int(np.prod(grid)) // 4, + view_size=view_size, canvas_size=list(views[0].size), processor_resize=view_size != 'native', + context=NATIVE_QUERY_CONTEXT if view_size == 'native' else QUERY_CONTEXT, + score_times=times.tolist(), score_bounds=bounds.tolist(), sampled_duration=count / 2.) + if record['tokens'] >= record['context']: + raise ValueError('Visual tokens leave no room for questions; no automatic downscaling is allowed') + features = model.encode_video(native['pixel_values_videos'], torch.tensor([grid])) + return features, record diff --git a/PixelOne-Pro-4B/runtime/src/scripts/smoke_videojev.py b/PixelOne-Pro-4B/runtime/src/scripts/smoke_videojev.py new file mode 100644 index 0000000000000000000000000000000000000000..92f7d8e01165bd92011ad9d652f6599798efcbc5 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/scripts/smoke_videojev.py @@ -0,0 +1,45 @@ +import numpy as np +import torch + +class LegacyProcessorAdapter: + """Expose refactored prompt helpers using the native 5.6.2 formatting.""" + + def __init__(self, processor): + self.processor = processor + + def __getattr__(self, name): + return getattr(self.processor, name) + + def __call__(self, *args, **kwargs): + return self.processor(*args, **kwargs) + + def replace_video_token(self, video_inputs, *, video_idx): + grid = video_inputs['video_grid_thw'][video_idx] + metadata = video_inputs['video_metadata'][video_idx] + timestamps = self._calculate_timestamps( + list(metadata.frames_indices), metadata.fps, self.video_processor.temporal_patch_size) + spatial = int(np.prod(grid[1:])) // self.video_processor.merge_size**2 + return ''.join( + f'<{timestamp:.1f} seconds>{self.vision_start_token}' + f'{self.video_token * spatial}{self.vision_end_token}' + for timestamp in timestamps[:int(grid[0])]) + + def get_text_with_replacements(self, texts, images, videos, audio): + if len(texts) != 1 or len(videos) != 1 or images or audio: + raise ValueError('This compatibility adapter supports one video-only prompt') + placeholder = self.vision_start_token + self.video_token + self.vision_end_token + if placeholder not in texts[0]: + placeholder = self.video_token + if placeholder not in texts[0]: + raise ValueError('No native video placeholder in the prompt') + return [texts[0].replace(placeholder, videos[0], 1)], None + + +def legacy_unpadded_mask(_module, positional_args, keyword_args): + """Let 5.6.2 build its native causal mask for a single unpadded sequence.""" + mask = keyword_args.get('attention_mask') + if isinstance(mask, dict): + if any(value is not None for value in mask.values()): + raise ValueError('The legacy adapter only supports an unpadded attention mask') + keyword_args['attention_mask'] = None + return positional_args, keyword_args diff --git a/PixelOne-Pro-4B/runtime/src/scripts/spatial_view_sizes.py b/PixelOne-Pro-4B/runtime/src/scripts/spatial_view_sizes.py new file mode 100644 index 0000000000000000000000000000000000000000..7245556d91074fcf972459119dfd18f7e27c74ef --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/scripts/spatial_view_sizes.py @@ -0,0 +1,64 @@ +"""Resolution settings shared by the crop runner and its lightweight launcher.""" + +import argparse +import math + + +VIEW_SIZES = (768, 1024, 1536) +NATIVE_ALIGNMENT = 32 +QUERY_CONTEXT = 8192 +NATIVE_QUERY_CONTEXT = 32768 + + +def parse_full_view_size(value): + if value == 'native': + return value + try: + size = int(value) + except (TypeError, ValueError) as error: + raise argparse.ArgumentTypeError('Use 768, 1024, 1536, or native') from error + if size not in VIEW_SIZES: + raise argparse.ArgumentTypeError('Use 768, 1024, 1536, or native') + return size + + +def resolve_view_sizes(view_size=768, full_view_size=None, crop_view_size=None): + full_size = view_size if full_view_size is None else full_view_size + crop_size = view_size if crop_view_size is None else crop_view_size + if full_size != 'native' and full_size not in VIEW_SIZES: + raise ValueError('full-view-size must be 768, 1024, 1536, or native') + if crop_size not in VIEW_SIZES: + raise ValueError('crop-view-size must be 768, 1024, or 1536') + return full_size, crop_size + + +def crop_settings(view_size=768, full_view_size=None, crop_view_size=None): + full_size, crop_size = resolve_view_sizes(view_size, full_view_size, crop_view_size) + settings = dict(steps=2, beam_width=2, crop_padding=.12, view_size=view_size) + if full_view_size is not None or crop_view_size is not None: + settings.update(full_view_size=full_size, crop_view_size=crop_size, + full_view_scope='initial_coarse_forward', crop_context_view_size=crop_size, + full_view_context=NATIVE_QUERY_CONTEXT if full_size == 'native' else QUERY_CONTEXT) + return settings + + +def native_canvas_size(image_size): + if len(image_size) != 2 or any(not isinstance(size, int) or size < 1 for size in image_size): + raise ValueError('Provide positive integer image width and height') + width, height = image_size + return (math.ceil((width + 48) / NATIVE_ALIGNMENT) * NATIVE_ALIGNMENT, + math.ceil((height + 76) / NATIVE_ALIGNMENT) * NATIVE_ALIGNMENT) + + +def native_full_view_plan(rows): + sizes = [native_canvas_size(row['image_size']) for row in rows] + tokens = [width * height // NATIVE_ALIGNMENT**2 for width, height in sizes] + if not tokens: + raise ValueError('Provide nonempty annotations for native full views') + if max(tokens) >= NATIVE_QUERY_CONTEXT: + raise ValueError(f'Native full view needs {max(tokens)} visual tokens before questions; ' + f'context is {NATIVE_QUERY_CONTEXT}. No automatic downscaling is allowed.') + return dict(source_resolution='preserved', processor_resize=False, padding_alignment=NATIVE_ALIGNMENT, + full_view_scope='initial_coarse_forward', context_tokens=NATIVE_QUERY_CONTEXT, + min_visual_tokens=min(tokens), max_visual_tokens=max(tokens), + mean_visual_tokens=round(sum(tokens) / len(tokens), 2), full_feature_cache=False) diff --git a/PixelOne-Pro-4B/runtime/src/spatial_pro_experiments/__init__.py b/PixelOne-Pro-4B/runtime/src/spatial_pro_experiments/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8b137891791fe96927ad78e64b0aad7bded08bdc --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/spatial_pro_experiments/__init__.py @@ -0,0 +1 @@ + diff --git a/PixelOne-Pro-4B/runtime/src/spatial_pro_experiments/core.py b/PixelOne-Pro-4B/runtime/src/spatial_pro_experiments/core.py new file mode 100644 index 0000000000000000000000000000000000000000..40307804940aa4dbbbda601e8e3b63f04beb6c8a --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/spatial_pro_experiments/core.py @@ -0,0 +1,250 @@ +"""Budget-matched search schedules and independent, CPU-only result audits.""" + +import math +from dataclasses import dataclass + +from qwen_spatial.common import inside_box + + +COUNTER_KEYS = ('language_forward_calls', 'model_forward_calls', 'visual_encoder_calls', + 'language_sequences', 'questions_scored') + + +@dataclass(frozen=True) +class Strategy: + name: str + beam_widths: tuple + + @property + def groups(self): + return 1 + sum(self.beam_widths[:-1]) + + @property + def questions(self): + return 2 + 3 * (self.groups - 1) + + def settings(self): + return dict(name=self.name, beam_widths=list(self.beam_widths), + parents_per_round=list(self.beam_widths[:-1]), + refinement_rounds=len(self.beam_widths) - 1, + cells_per_axis=4, crop_padding=.12) + + +STRATEGIES = { + 'precision7': Strategy('precision7', (2, 2, 2, 2)), + 'recall7': Strategy('recall7', (4, 2, 2)), +} + + +def language_sequence(backend, strategy, batch_size): + if backend not in ('videojev', 'qwen') or batch_size < 1: + raise ValueError('Require videojev/qwen and a positive target batch size') + if backend == 'videojev': + return [batch_size] * strategy.groups + return [2 * batch_size] + [3 * batch_size] * (strategy.groups - 1) + + +def forward_protocol(backend, strategy, batch_size): + protocol = dict(execution='rank_serial_batched_targets' if batch_size > 1 else 'serial_per_target', + target_batch_size=batch_size, language_groups_per_target=strategy.groups, + questions_per_target=strategy.questions, + language_forward_calls_per_batch=strategy.groups, + language_batch_sequence=language_sequence(backend, strategy, batch_size), + autoregressive_generation=False, visual_features_shared_between_questions=True, + counters_scope='one ledger record per target batch; do not sum shared counters per row') + if batch_size == 1: + protocol['language_forward_calls_per_target'] = strategy.groups + return protocol + + +def refine_batch(backend, images, instructions, full_views, strategy, crop_size): + count = len(images) + if not count or len(instructions) != count or len(full_views) != count: + raise ValueError('Provide matching nonempty images, instructions, and full views') + geometry = backend.geometry + choices = backend.score_many([(full, geometry.grid_questions(instruction)) + for full, instruction in zip(full_views, instructions, strict=True)]) + beams = [geometry.cell_candidates([0, 0, *image.size], predictions)[:strategy.beam_widths[0]] + for image, predictions in zip(images, choices, strict=True)] + stages = [[dict(depth=0, predicted_xy=geometry.center_of(beam[0]['bounds']), + candidates=beam, predictions=predictions)] + for beam, predictions in zip(beams, choices, strict=True)] + for depth, (parent_count, next_width) in enumerate( + zip(strategy.beam_widths[:-1], strategy.beam_widths[1:], strict=True), start=1): + children, traces = [[] for _image in images], [[] for _image in images] + for rank in range(parent_count): + crops = [geometry.expand_bounds(beam[rank]['bounds'], image.size) + for image, beam in zip(images, beams, strict=True)] + encoded = [backend.encode(geometry.contextual_views(image, bounds, view_size=crop_size), crop_size) + for image, bounds in zip(images, crops, strict=True)] + choices = backend.score_many([(view, geometry.grid_questions(instruction, local=True)) + for view, instruction in zip(encoded, instructions, strict=True)]) + for index, (beam, bounds, view, predictions) in enumerate( + zip(beams, crops, encoded, choices, strict=True)): + parent = beam[rank] + children[index].extend(geometry.cell_candidates(bounds, predictions, parent['score'])) + traces[index].append(dict(parent_rank=rank, parent_bounds=parent['bounds'], + parent_score=parent['score'], crop_bounds=bounds, + predictions=predictions, encoding=backend.describe(view))) + beams = [sorted(candidates, key=lambda candidate: candidate['score'], reverse=True)[:next_width] + for candidates in children] + for target_stages, beam, target_traces in zip(stages, beams, traces, strict=True): + target_stages.append(dict(depth=depth, predicted_xy=geometry.center_of(beam[0]['bounds']), + candidates=beam, traces=target_traces)) + return [dict(predicted_xy=target_stages[-1]['predicted_xy'], stages=target_stages, + final_presence_probability=beam[0]['presence_probability'], + logical_language_groups=strategy.groups, logical_questions=strategy.questions) + for target_stages, beam in zip(stages, beams, strict=True)] + + +def expanded(bounds, image_size): + left, top, right, bottom = bounds + horizontal, vertical = (right - left) * .12, (bottom - top) * .12 + return [max(0, math.floor(left - horizontal)), max(0, math.floor(top - vertical)), + min(image_size[0], math.ceil(right + horizontal)), min(image_size[1], math.ceil(bottom + vertical))] + + +def center(bounds): + return [(bounds[0] + bounds[2]) / 2, (bounds[1] + bounds[3]) / 2] + + +def stage_diagnostics(stage, target): + point, bounds = target['center_xy'], stage['candidates'][0]['bounds'] + hit = inside_box(stage['predicted_xy'], target['bbox_xyxy']) + return dict(gt_center_in_best_cell=inside_box(point, bounds), + gt_center_in_beam=any(inside_box(point, cell['bounds']) for cell in stage['candidates']), + gt_center_in_expanded_beam=any(inside_box(point, expanded(cell['bounds'], target['image_size'])) + for cell in stage['candidates']), + gt_center_in_seen_crops=any(inside_box(point, trace['crop_bounds']) + for trace in stage.get('traces', [])), + cell_center_miss=inside_box(point, bounds) and not hit) + + +def evaluate(result, target): + for stage in result['stages']: + stage['error_px'] = math.dist(stage['predicted_xy'], target['center_xy']) + stage['point_inside_gt_box'] = inside_box(stage['predicted_xy'], target['bbox_xyxy']) + stage['diagnostics'] = stage_diagnostics(stage, target) + result['error_px'] = result['stages'][-1]['error_px'] + result['point_inside_gt_box'] = result['stages'][-1]['point_inside_gt_box'] + return result + + +def stage_metrics(rows): + return [dict(depth=depth, hits=sum(row['stages'][depth]['point_inside_gt_box'] for row in rows), + **{key: sum(row['stages'][depth]['diagnostics'][key] for row in rows) + for key in rows[0]['stages'][depth]['diagnostics']}) + for depth in range(len(rows[0]['stages']))] + + +def reconstructed_candidates(bounds, predictions, parent_score=0.): + if len(predictions) not in (2, 3): + raise ValueError('Expected two coarse or three crop questions') + for prediction, options in zip(predictions, [2, 4, 4] if len(predictions) == 3 else [4, 4], strict=True): + probabilities = prediction['probabilities'] + if (len(probabilities) != options or + any(not math.isfinite(value) or not 0 <= value <= 1 for value in probabilities) or + not math.isclose(sum(probabilities), 1., abs_tol=1e-4)): + raise ValueError('Invalid choice probabilities') + horizontal, vertical = predictions[-2:] + presence = predictions[0]['probabilities'][0] if len(predictions) == 3 else 1. + left, top, right, bottom = bounds + candidates = [] + for row in range(4): + for column in range(4): + probability = horizontal['probabilities'][column] * vertical['probabilities'][row] + cell = [left + (right - left) * column / 4, top + (bottom - top) * row / 4, + left + (right - left) * (column + 1) / 4, top + (bottom - top) * (row + 1) / 4] + candidates.append(dict(bounds=cell, column=column, row=row, + score=parent_score + math.log(max(probability, 1e-12)) + + math.log(max(presence, 1e-12)), presence_probability=presence)) + return sorted(candidates, key=lambda candidate: candidate['score'], reverse=True) + + +def close_values(actual, expected): + return len(actual) == len(expected) and all(math.isclose(value, reference, abs_tol=1e-6) + for value, reference in zip(actual, expected, strict=True)) + + +def audit_search(row, target, strategy): + stages = row['stages'] + if len(stages) != len(strategy.beam_widths): + raise ValueError(f'Wrong refinement depth: {row["id"]}') + beam = reconstructed_candidates([0, 0, *target['image_size']], stages[0]['predictions']) + for depth, (stage, width) in enumerate(zip(stages, strategy.beam_widths, strict=True)): + if depth: + traces = stage['traces'] + if len(traces) != len(previous): + raise ValueError(f'Wrong number of scored parents: {row["id"]}') + children = [] + for rank, (trace, parent) in enumerate(zip(traces, previous, strict=True)): + crop = expanded(parent['bounds'], target['image_size']) + if (trace['parent_rank'] != rank or not close_values(trace['parent_bounds'], parent['bounds']) or + not close_values(trace['crop_bounds'], crop) or + not math.isclose(trace['parent_score'], parent['score'], abs_tol=1e-6)): + raise ValueError(f'Crop mapping or parent score mismatch: {row["id"]}') + children.extend(reconstructed_candidates(crop, trace['predictions'], parent['score'])) + beam = sorted(children, key=lambda candidate: candidate['score'], reverse=True) + beam = beam[:width] + if stage['depth'] != depth or len(stage['candidates']) != width: + raise ValueError(f'Wrong stage width: {row["id"]}') + for actual, expected in zip(stage['candidates'], beam, strict=True): + if (actual['column'] != expected['column'] or actual['row'] != expected['row'] or + not close_values(actual['bounds'], expected['bounds']) or + not math.isclose(actual['score'], expected['score'], abs_tol=1e-6) or + not math.isclose(actual['presence_probability'], expected['presence_probability'], abs_tol=1e-6)): + raise ValueError(f'Beam ranking does not match saved probabilities: {row["id"]}') + point = center(beam[0]['bounds']) + if (not close_values(stage['predicted_xy'], point) or + stage['point_inside_gt_box'] != inside_box(point, target['bbox_xyxy']) or + not math.isclose(stage['error_px'], math.dist(point, target['center_xy']), abs_tol=1e-6) or + stage['diagnostics'] != stage_diagnostics(stage, target)): + raise ValueError(f'Stage coordinates or metrics mismatch: {row["id"]}') + previous = beam + if (not close_values(row['predicted_xy'], stages[-1]['predicted_xy']) or + not math.isclose(row['final_presence_probability'], previous[0]['presence_probability'], abs_tol=1e-6)): + raise ValueError(f'Final prediction does not match winning cell: {row["id"]}') + + +def audit_batches(rows, targets, batches, settings, summary): + strategy = STRATEGIES[settings['strategy']] + batch_size, backend = settings['batch_size'], settings['backend'] + expected_batches = [targets[offset:offset + batch_size] for offset in range(0, len(targets), batch_size)] + if len(batches) != len(expected_batches): + raise ValueError('Missing or duplicated batch ledger records') + by_id, totals = {row['id']: row for row in rows}, dict.fromkeys(COUNTER_KEYS, 0) + for index, (batch, selected) in enumerate(zip(batches, expected_batches, strict=True)): + sequence = language_sequence(backend, strategy, len(selected)) + if (batch['batch_index'] != index or batch['target_ids'] != [target['id'] for target in selected] or + batch['target_batch_size'] != len(selected) or batch['language_batch_sequence'] != sequence): + raise ValueError('Batch ledger ordering or tail size mismatch') + counters = batch['counters'] + for key in COUNTER_KEYS: + if type(counters[key]) is not int or counters[key] < 0: + raise ValueError('Invalid native forward counter') + totals[key] += counters[key] + selected_rows = [by_id[target['id']] for target in selected] + full_encodes = sum(not row['full_view_cache_hit'] and not row['full_view_reused_in_batch'] + for row in selected_rows) + expected_model = strategy.groups if backend == 'qwen' or len(selected) == 1 else 0 + if (counters['language_forward_calls'] != strategy.groups or + counters['model_forward_calls'] != expected_model or + counters['language_sequences'] != sum(sequence) or + counters['questions_scored'] != strategy.questions * len(selected) or + counters['visual_encoder_calls'] != full_encodes + (strategy.groups - 1) * len(selected)): + raise ValueError('Native forward counters do not match the experiment protocol') + for row, target in zip(selected_rows, selected, strict=True): + if (row['target_batch_index'] != index or row['target_batch_size'] != len(selected) or + row['counter_scope'] != 'target_batch_ledger' or + row['logical_language_groups'] != strategy.groups or row['logical_questions'] != strategy.questions): + raise ValueError('Invalid row-to-batch counter mapping') + if any(row.get(key) != value for key, value in target.items()): + raise ValueError(f'Prediction metadata differs from annotations: {target["id"]}') + if any(row[key] != settings[key] for key in ('backend', 'strategy', 'full_view_size', 'crop_view_size')): + raise ValueError('Prediction experiment configuration mismatch') + audit_search(row, target, strategy) + if any(summary[key] != value for key, value in totals.items()) or summary['batch_count'] != len(batches): + raise ValueError('Summary duplicated or omitted shared batch counters') + if summary['stage_metrics'] != stage_metrics(rows): + raise ValueError('Stage summary does not match independently recomputed metrics') + return totals diff --git a/PixelOne-Pro-4B/runtime/src/spatial_pro_experiments/fast.py b/PixelOne-Pro-4B/runtime/src/spatial_pro_experiments/fast.py new file mode 100644 index 0000000000000000000000000000000000000000..797531bb6cf1bcbe42002a525ffbaf4ef38caaec --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/spatial_pro_experiments/fast.py @@ -0,0 +1,289 @@ +"""Three native LM calls with packed Top-2 crops and image-only snapping.""" + +import copy +import math +from dataclasses import dataclass + +from PIL import Image, ImageDraw, ImageFont + +from qwen_spatial.common import inside_box +from spatial_pro_experiments.core import (COUNTER_KEYS, center, close_values, expanded, + stage_diagnostics, stage_metrics) + + +@dataclass(frozen=True) +class FastStrategy: + name: str + cells: tuple + groups: int = 5 + questions: int = 14 + calls: int = 3 + + def settings(self): + return dict(name=self.name, cells_per_axis=list(self.cells), beam_widths=[2, 2, 2], + parents_per_call=[1, 2, 2], refinement_rounds=2, crop_padding=.12, + nominal_axis_bins=math.prod(self.cells), snap_rule='nearest_anchor_inside_winning_cell') + + +FAST_STRATEGIES = {'packed3-444': FastStrategy('packed3-444', (4, 4, 4)), + 'packed3-488': FastStrategy('packed3-488', (4, 8, 8))} + + +def language_sequence(backend, size): + if backend not in ('videojev', 'qwen') or size < 1: + raise ValueError('Require videojev/qwen and a positive target batch size') + return [size, 2 * size, 2 * size] if backend == 'videojev' else [2 * size, 6 * size, 6 * size] + + +def grid_questions(geometry, instruction, cells, local=False): + questions = copy.deepcopy(geometry.grid_questions(instruction, local=local)) + if cells == 4: + return questions + if cells != 8: + raise ValueError('Only four/eight-way local choices are supported') + letters = 'ABCDEFGH' + questions[-2]['options'] = [f'{letter}. Column {letter}, column {index + 1} of {cells} from the left.' + for index, letter in enumerate(letters)] + questions[-1]['options'] = [f'{letter}. Row {index + 1}, row {index + 1} of {cells} from the top.' + for index, letter in enumerate(letters)] + return questions + + +def crop_canvas(image, bounds, cells, view_size, font_path): + if cells != 8 or type(view_size) is not int or view_size < 128: + raise ValueError('Eight-way grids require a fixed-size crop canvas') + source = image.crop(tuple(round(value) for value in bounds)) + scale = view_size / 768 + factor = min(720 / source.width, 692 / source.height) + size = (max(1, round(source.width * factor)), max(1, round(source.height * factor))) + content = source.resize(size, Image.Resampling.LANCZOS) + left, top = round((36 + (720 - content.width) // 2) * scale), round(58 * scale) + if view_size != 768: + content = source.resize((max(1, round(content.width * scale)), max(1, round(content.height * scale))), + Image.Resampling.LANCZOS) + canvas = Image.new('RGB', (view_size, view_size), 'white') + canvas.paste(content, (left, top)) + font = ImageFont.truetype(str(font_path), round(21 * scale)) + ImageDraw.Draw(canvas).text((round(20 * scale), round(7 * scale)), + 'ENLARGED CROP - answer for this 8x8 grid', fill='#142c48', font=font) + overlay = Image.new('RGBA', canvas.size) + draw = ImageDraw.Draw(overlay) + for divider in range(1, cells): + horizontal, vertical = left + content.width * divider / cells, top + content.height * divider / cells + draw.line((horizontal, top, horizontal, top + content.height), fill=(126, 52, 191, 155), + width=max(1, round(2 * scale))) + draw.line((left, vertical, left + content.width, vertical), fill=(0, 145, 168, 155), + width=max(1, round(2 * scale))) + canvas = Image.alpha_composite(canvas.convert('RGBA'), overlay).convert('RGB') + draw = ImageDraw.Draw(canvas) + for index, letter in enumerate('ABCDEFGH'): + horizontal = left + content.width * (index + .5) / cells + vertical = top + content.height * (index + .5) / cells + draw.text((horizontal - 8 * scale, top - 27 * scale), letter, fill='#7135b0', font=font) + draw.text((left - 24 * scale, vertical - 11 * scale), str(index + 1), fill='#007f98', font=font) + draw.rectangle((left, top, left + content.width, top + content.height), outline='#738090', + width=max(1, round(scale))) + return canvas + + +def contextual_views(geometry, image, bounds, cells, view_size): + if cells == 4: + return geometry.contextual_views(image, bounds, view_size=view_size) + renderer = getattr(geometry, 'view_canvas', None) or geometry.render_view + font_path = getattr(geometry, 'FONT_PATH', None) or geometry.FONT + overview = image.copy() + ImageDraw.Draw(overview).rectangle(bounds, outline='#f38d16', width=max(3, image.width // 180)) + full = renderer(overview, title='FULL SCREEN - orange box is the crop', view_size=view_size) + local = crop_canvas(image, bounds, cells, view_size, font_path) + return [full, full, local, local] + + +def cell_candidates(bounds, predictions, cells, parent_score=0.): + expected = [2, cells, cells] if len(predictions) == 3 else [cells, cells] + if len(predictions) not in (2, 3): + raise ValueError('Expected two coarse or three crop questions') + for prediction, count in zip(predictions, expected, strict=True): + values = prediction['probabilities'] + if (len(values) != count or any(not math.isfinite(value) or not 0 <= value <= 1 for value in values) or + not math.isclose(sum(values), 1., abs_tol=1e-4)): + raise ValueError('Invalid choice probabilities or grid size') + horizontal, vertical = predictions[-2:] + presence = predictions[0]['probabilities'][0] if len(predictions) == 3 else 1. + left, top, right, bottom = bounds + result = [] + for row_index in range(cells): + for column in range(cells): + probability = horizontal['probabilities'][column] * vertical['probabilities'][row_index] + cell = [left + (right - left) * column / cells, top + (bottom - top) * row_index / cells, + left + (right - left) * (column + 1) / cells, top + (bottom - top) * (row_index + 1) / cells] + result.append(dict(bounds=cell, column=column, row=row_index, presence_probability=presence, + score=parent_score + math.log(max(probability, 1e-12)) + + math.log(max(presence, 1e-12)))) + return sorted(result, key=lambda candidate: candidate['score'], reverse=True) + + +def snap(point, cell, candidates, fraction): + if not math.isfinite(fraction) or not 0 <= fraction <= .5: + raise ValueError('Snap radius must be between zero and half the cell diagonal') + selected = [] + for index, candidate in enumerate(candidates): + anchor = center(candidate['bounds']) + if inside_box(anchor, cell): + selected.append((math.dist(point, anchor), index, anchor)) + radius = fraction * math.hypot(cell[2] - cell[0], cell[3] - cell[1]) + if selected: + distance, index, anchor = min(selected, key=lambda item: (item[0], item[1])) + if distance <= radius: + return dict(predicted_xy=anchor, snap_candidate_index=index, snap_distance_px=distance, + snap_changed=not close_values(point, anchor), snap_max_fraction=fraction) + return dict(predicted_xy=list(point), snap_candidate_index=None, snap_distance_px=0., + snap_changed=False, snap_max_fraction=fraction) + + +def refine_batch(backend, images, instructions, full_views, candidates, strategy, crop_size, fraction): + count = len(images) + if not count or any(len(values) != count for values in (instructions, full_views, candidates)): + raise ValueError('Provide matching nonempty images, instructions, views and candidates') + geometry = backend.geometry + predictions = backend.score_many([(view, grid_questions(geometry, instruction, strategy.cells[0])) + for view, instruction in zip(full_views, instructions, strict=True)]) + beams = [cell_candidates([0, 0, *image.size], choices, strategy.cells[0])[:2] + for image, choices in zip(images, predictions, strict=True)] + stages = [[dict(depth=0, cells_per_axis=strategy.cells[0], predicted_xy=center(beam[0]['bounds']), + candidates=beam, predictions=choices)] + for beam, choices in zip(beams, predictions, strict=True)] + for depth, cells in enumerate(strategy.cells[1:], start=1): + requests, records = [], [] + for rank in range(2): + for index, (image, instruction, beam) in enumerate(zip(images, instructions, beams, strict=True)): + parent = beam[rank] + bounds = expanded(parent['bounds'], image.size) + encoded = backend.encode(contextual_views(geometry, image, bounds, cells, crop_size), crop_size) + requests.append((encoded, grid_questions(geometry, instruction, cells, local=True))) + records.append((index, dict(parent_rank=rank, parent_bounds=parent['bounds'], + parent_score=parent['score'], crop_bounds=bounds, + encoding=backend.describe(encoded)))) + choices = backend.score_many(requests) + children, traces = [[] for _image in images], [[] for _image in images] + for (index, trace), predictions in zip(records, choices, strict=True): + trace['predictions'] = predictions + children[index].extend(cell_candidates(trace['crop_bounds'], predictions, cells, trace['parent_score'])) + traces[index].append(trace) + beams = [sorted(items, key=lambda candidate: candidate['score'], reverse=True)[:2] for items in children] + for target_stages, beam, trace in zip(stages, beams, traces, strict=True): + target_stages.append(dict(depth=depth, cells_per_axis=cells, predicted_xy=center(beam[0]['bounds']), + candidates=beam, traces=trace)) + results = [] + for target_stages, beam, proposals in zip(stages, beams, candidates, strict=True): + point = target_stages[-1]['predicted_xy'] + results.append(dict(stages=target_stages, unsnapped_xy=point, + final_presence_probability=beam[0]['presence_probability'], + logical_language_groups=strategy.groups, logical_questions=strategy.questions, + **snap(point, beam[0]['bounds'], proposals, fraction))) + return results + + +def evaluate(row, target): + for stage in row['stages']: + stage['error_px'] = math.dist(stage['predicted_xy'], target['center_xy']) + stage['point_inside_gt_box'] = inside_box(stage['predicted_xy'], target['bbox_xyxy']) + stage['diagnostics'] = stage_diagnostics(stage, target) + row['unsnapped_point_inside_gt_box'] = inside_box(row['unsnapped_xy'], target['bbox_xyxy']) + row['error_px'] = math.dist(row['predicted_xy'], target['center_xy']) + row['point_inside_gt_box'] = inside_box(row['predicted_xy'], target['bbox_xyxy']) + return row + + +def audit_search(row, target, settings, proposals): + strategy = FAST_STRATEGIES[settings['strategy']] + if len(row['stages']) != strategy.calls: + raise ValueError('Wrong search depth') + previous = None + for depth, (stage, cells) in enumerate(zip(row['stages'], strategy.cells, strict=True)): + if not depth: + beam = cell_candidates([0, 0, *target['image_size']], stage['predictions'], cells)[:2] + else: + if len(stage['traces']) != 2: + raise ValueError('Both packed Top-2 parents must be scored') + children = [] + for rank, (trace, parent) in enumerate(zip(stage['traces'], previous, strict=True)): + bounds = expanded(parent['bounds'], target['image_size']) + if (trace['parent_rank'] != rank or not close_values(trace['parent_bounds'], parent['bounds']) or + not close_values(trace['crop_bounds'], bounds) or + not math.isclose(trace['parent_score'], parent['score'], abs_tol=1e-6)): + raise ValueError('Packed crop mapping mismatch') + children.extend(cell_candidates(bounds, trace['predictions'], cells, parent['score'])) + beam = sorted(children, key=lambda candidate: candidate['score'], reverse=True)[:2] + if stage['depth'] != depth or stage['cells_per_axis'] != cells or len(stage['candidates']) != 2: + raise ValueError('Wrong stage grid or beam width') + for actual, expected in zip(stage['candidates'], beam, strict=True): + if (actual['column'] != expected['column'] or actual['row'] != expected['row'] or + not close_values(actual['bounds'], expected['bounds']) or + not math.isclose(actual['score'], expected['score'], abs_tol=1e-6) or + not math.isclose(actual['presence_probability'], expected['presence_probability'], abs_tol=1e-6)): + raise ValueError('Beam winner does not match saved probabilities') + point = center(beam[0]['bounds']) + if (not close_values(stage['predicted_xy'], point) or + stage['point_inside_gt_box'] != inside_box(point, target['bbox_xyxy']) or + not math.isclose(stage['error_px'], math.dist(point, target['center_xy']), abs_tol=1e-6) or + stage['diagnostics'] != stage_diagnostics(stage, target)): + raise ValueError('Stage coordinates or metrics mismatch') + previous = beam + point = center(previous[0]['bounds']) + if (not close_values(row['unsnapped_xy'], point) or + not math.isclose(row['final_presence_probability'], previous[0]['presence_probability'], abs_tol=1e-6)): + raise ValueError('Unsnapped winner mismatch') + expected = snap(point, previous[0]['bounds'], proposals, settings['snap_max_fraction']) + for key, value in expected.items(): + if key == 'predicted_xy': + if not close_values(row[key], value): + raise ValueError('Snapped click differs from the image-only rule') + elif row[key] != value: + raise ValueError('Snap provenance mismatch') + if row['unsnapped_point_inside_gt_box'] != inside_box(point, target['bbox_xyxy']): + raise ValueError('Unsnapped click metric mismatch') + + +def audit_batches(rows, targets, batches, settings, summary, proposals): + strategy = FAST_STRATEGIES[settings['strategy']] + size, backend = settings['batch_size'], settings['backend'] + selected_batches = [targets[offset:offset + size] for offset in range(0, len(targets), size)] + if len(batches) != len(selected_batches): + raise ValueError('Missing or duplicated batch ledger') + by_id, totals = {row['id']: row for row in rows}, dict.fromkeys(COUNTER_KEYS, 0) + for index, (batch, selected) in enumerate(zip(batches, selected_batches, strict=True)): + sequence = language_sequence(backend, len(selected)) + if (batch['batch_index'] != index or batch['target_ids'] != [target['id'] for target in selected] or + batch['target_batch_size'] != len(selected) or batch['language_batch_sequence'] != sequence): + raise ValueError('Packed forward sequence or tail size mismatch') + counters = batch['counters'] + selected_rows = [by_id[target['id']] for target in selected] + full_encodes = sum(not row['full_view_cache_hit'] and not row['full_view_reused_in_batch'] + for row in selected_rows) + model_calls = strategy.calls if backend == 'qwen' else int(len(selected) == 1) + expected = dict(language_forward_calls=strategy.calls, model_forward_calls=model_calls, + visual_encoder_calls=full_encodes + 4 * len(selected), + language_sequences=sum(sequence), questions_scored=strategy.questions * len(selected)) + if counters != expected: + raise ValueError('Native hooks disagree with the three-call/five-group protocol') + for key in COUNTER_KEYS: + if type(counters[key]) is not int or counters[key] < 0: + raise ValueError('Invalid native counter') + totals[key] += counters[key] + for row, target in zip(selected_rows, selected, strict=True): + if (row['target_batch_index'] != index or row['target_batch_size'] != len(selected) or + row['counter_scope'] != 'target_batch_ledger' or row['logical_language_groups'] != 5 or + row['logical_questions'] != 14): + raise ValueError('Invalid row-to-batch mapping') + if any(row.get(key) != value for key, value in target.items()): + raise ValueError('Prediction metadata differs from annotations') + if any(row[key] != settings[key] for key in ('backend', 'strategy', 'full_view_size', 'crop_view_size')): + raise ValueError('Prediction configuration mismatch') + audit_search(row, target, settings, proposals[target['id']]['candidates']) + if any(summary[key] != value for key, value in totals.items()) or summary['batch_count'] != len(batches): + raise ValueError('Summary duplicated or omitted native calls') + if summary['stage_metrics'] != stage_metrics(rows): + raise ValueError('Stage summary mismatch') + if summary['unsnapped_hits'] != sum(row['unsnapped_point_inside_gt_box'] for row in rows): + raise ValueError('Unsnapped summary mismatch') + return totals diff --git a/PixelOne-Pro-4B/runtime/src/videojev_hf/__init__.py b/PixelOne-Pro-4B/runtime/src/videojev_hf/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..9e8341ed33aa2ce62e1e277060ae135795a65c73 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/videojev_hf/__init__.py @@ -0,0 +1 @@ +"""Hugging Face configuration, inference runtime and portable checkpoint files.""" diff --git a/PixelOne-Pro-4B/runtime/src/videojev_hf/configuration_videojev.py b/PixelOne-Pro-4B/runtime/src/videojev_hf/configuration_videojev.py new file mode 100644 index 0000000000000000000000000000000000000000..a1636d85103c78ab2f8537be9a20e70b866a81dd --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/videojev_hf/configuration_videojev.py @@ -0,0 +1,35 @@ +"""VideoJev configuration with the complete native Qwen backbone configuration.""" +from transformers import AutoConfig, PreTrainedConfig + + +class VideoJevConfig(PreTrainedConfig): + model_type = 'videojev' + sub_configs = {'backbone_config': AutoConfig} + + def __init__(self, backbone_config=None, head_dim=512, head_logit_scale=10., + decide_token_id=None, option_end_token_id=None, decoder=None, + checkpoint_id=None, **kwargs): + native = (backbone_config.to_dict() if isinstance(backbone_config, PreTrainedConfig) + else dict(backbone_config or {'model_type': 'qwen3_5'})) + model_type = native.pop('model_type') + if model_type not in ('qwen3_5', 'qwen3_5_moe'): + raise ValueError('VideoJev requires a native Qwen3.5 dense or MoE backbone') + self.backbone_config = AutoConfig.for_model(model_type, **native) + super().__init__(**kwargs) + self.head_dim = head_dim + self.head_logit_scale = head_logit_scale + self.decide_token_id = decide_token_id + self.option_end_token_id = option_end_token_id + self.decoder = dict(threshold=.25, smooth=1, postprocess='round_repair_clamp_v1') + if decoder is not None: + self.decoder.update(decoder) + if not 0 < self.decoder['threshold'] < 1: + raise ValueError('threshold must be between 0 and 1') + self.checkpoint_id = checkpoint_id + self.architectures = ['VideoJevForVideoUnderstanding'] + self.auto_map = {'AutoConfig': 'configuration_videojev.VideoJevConfig', + 'AutoModel': 'modeling_videojev.VideoJevForVideoUnderstanding'} + self.tie_word_embeddings = False + + def get_text_config(self, decoder=False, encoder=False): + return self.backbone_config.get_text_config(decoder=decoder, encoder=encoder) diff --git a/PixelOne-Pro-4B/runtime/src/videojev_hf/modeling_videojev.py b/PixelOne-Pro-4B/runtime/src/videojev_hf/modeling_videojev.py new file mode 100644 index 0000000000000000000000000000000000000000..63fceada17c80bb4cc9ba2f4290ce448e1c06f37 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/videojev_hf/modeling_videojev.py @@ -0,0 +1,198 @@ +"""Native causal Qwen video features with the trained VideoJev decision head.""" +import contextlib +import os +from functools import wraps +from dataclasses import dataclass + +import torch +from torch import nn +from torch.nn import functional as F +from transformers import PreTrainedModel +from transformers.utils import ModelOutput +from transformers.models.qwen3_5.modeling_qwen3_5 import Qwen3_5Model, Qwen3_5DecoderLayer +from transformers.models.qwen3_5_moe.modeling_qwen3_5_moe import Qwen3_5MoeModel, Qwen3_5MoeDecoderLayer + +from .configuration_videojev import VideoJevConfig +from .processing_videojev import prepare_query_groups, prepare_video, format_predictions +from .videojev_moe import install_fp32_routers, install_xtuner_grouped_experts + + +def visual_grad_context(function): + @wraps(function) + def wrapped(self,*args,**kwargs): + enabled=getattr(self,'train_vision',False) and torch.is_grad_enabled() + with torch.inference_mode(not enabled): + return function(self,*args,**kwargs) + return wrapped + + +class AttentionOnlyDecoderLayer(Qwen3_5DecoderLayer): + def forward(self, hidden_states, position_embeddings, attention_mask=None, + position_ids=None, past_key_values=None, **kwargs): + residual = hidden_states + hidden_states, _ = self.self_attn(hidden_states=self.input_layernorm(hidden_states), + position_embeddings=position_embeddings, attention_mask=attention_mask, + position_ids=position_ids, past_key_values=past_key_values, **kwargs) + return residual + hidden_states + + +class AttentionOnlyMoeDecoderLayer(Qwen3_5MoeDecoderLayer): + forward = AttentionOnlyDecoderLayer.forward + + +class CosineDecisionHead(nn.Module): + def __init__(self, hidden, dimension, scale): + super().__init__() + self.q = nn.Linear(hidden, dimension) + self.k = nn.Linear(hidden, dimension) + self.bias = nn.Parameter(torch.zeros(())) + self.scale = float(scale) + + def forward(self, pairs, queries): + keys = F.linear(pairs.float(), self.k.weight.float(), self.k.bias.float()) + query = F.linear(queries.float(), self.q.weight.float(), self.q.bias.float()) + keys = F.normalize(keys, dim=-1, eps=1e-6) + query = F.normalize(query, dim=-1, eps=1e-6) + return torch.einsum('qkd,qd->qk', keys, query) * self.scale + self.bias.float() + + +@dataclass +class VideoJevOutput(ModelOutput): + logits: torch.Tensor | None = None + probabilities: torch.Tensor | None = None + score_mask: torch.Tensor | None = None + + +class VideoJevForVideoUnderstanding(PreTrainedModel): + config_class = VideoJevConfig + base_model_prefix = 'backbone' + supports_gradient_checkpointing = True + _supports_flash_attn = True + _supports_sdpa = True + _no_split_modules = ['Qwen3_5DecoderLayer', 'Qwen3_5MoeDecoderLayer', + 'AttentionOnlyDecoderLayer', 'AttentionOnlyMoeDecoderLayer', + 'Qwen3_5VisionBlock', 'Qwen3_5MoeVisionBlock'] + _keep_in_fp32_modules = ['head'] + _is_stateful = True + + def __init__(self, config): + super().__init__(config) + os.environ['FLA_INTRACARD_CP'] = '0' + native = config.backbone_config + native._attn_implementation = config._attn_implementation + native.text_config._attn_implementation = config._attn_implementation + native.vision_config._attn_implementation = config._attn_implementation + self.is_moe = native.model_type == 'qwen3_5_moe' + self.backbone = (Qwen3_5MoeModel if self.is_moe else Qwen3_5Model)(native) + last = self.backbone.language_model.layers[-1] + if last.block_type != 'full_attention': + raise ValueError('Expected a final full-attention decoder layer') + last.__class__ = AttentionOnlyMoeDecoderLayer if self.is_moe else AttentionOnlyDecoderLayer + del last.mlp + del last.post_attention_layernorm + self.head = CosineDecisionHead(native.text_config.hidden_size, config.head_dim, config.head_logit_scale) + if self.is_moe: + install_fp32_routers(self.backbone.language_model) + self.post_init() + + def prepare_for_inference(self, *, xtuner_experts=False): + """Keep native BF16 language weights and perform sensitive scoring in FP32.""" + self.head.float() + self.backbone.visual.float() + if self.is_moe: + for module in self.backbone.language_model.modules(): + if getattr(module, 'timejev_router_compute_dtype', None) == 'float32': + module.float() + if xtuner_experts: + install_xtuner_grouped_experts(self.backbone.language_model) + return self.eval().requires_grad_(False) + + def get_input_embeddings(self): + return self.backbone.get_input_embeddings() + + @visual_grad_context + def encode_video(self, pixel_values_videos, video_grid_thw, groups_per_chunk=16): + visual = self.backbone.visual + device = next(visual.parameters()).device + if video_grid_thw.shape[0] != 1: + raise ValueError('Encode one complete video at a time') + t, h, w = video_grid_thw[0].tolist() + if len(pixel_values_videos) != t*h*w: + raise ValueError('Video grid and native pixel patches disagree') + output = [] + amp = torch.autocast('cuda', dtype=torch.bfloat16) if device.type == 'cuda' else contextlib.nullcontext() + with amp: + for start in range(0, t, groups_per_chunk): + count = min(groups_per_chunk, t-start) + pixels = pixel_values_videos[start*h*w:(start+count)*h*w].to(device) + grid = torch.tensor([[count, h, w]], device=device) + output.append(visual(pixels, grid_thw=grid, return_dict=True).pooler_output) + return torch.cat(output) + + def forward(self, input_ids, mm_token_type_ids, video_grid_thw, pair_indices, + query_indices, score_mask, decision_tasks, visual_features=None, + pixel_values_videos=None, attention_mask=None, **kwargs): + if input_ids.shape[0] != 1 or video_grid_thw.shape[0] != 1: + raise ValueError('Each call owns one complete video and its query group') + if attention_mask is not None and not attention_mask.bool().all(): + raise ValueError('Pass an unpadded query group') + if visual_features is None: + if pixel_values_videos is None: + raise ValueError('Supply native visual features or native pixel patches') + visual_features = self.encode_video(pixel_values_videos, video_grid_thw) + device = self.get_input_embeddings().weight.device + input_ids, mm_token_type_ids = input_ids.to(device), mm_token_type_ids.to(device) + grid = video_grid_thw.to(device) + pairs, queries, mask = pair_indices.to(device), query_indices.to(device), score_mask.to(device) + tasks = torch.as_tensor(decision_tasks, device=device) + if tasks.shape != queries.shape or not ((tasks == 0) | (tasks == 1)).all(): + raise ValueError('decision_tasks must contain one grounding(0)/choice(1) value per question') + amp = torch.autocast('cuda', dtype=torch.bfloat16) if device.type == 'cuda' else contextlib.nullcontext() + with amp: + embeds = self.get_input_embeddings()(input_ids) + slots = input_ids == self.config.backbone_config.video_token_id + if int(slots.sum()) != len(visual_features): + raise ValueError('Every native video token needs exactly one feature') + embeds = embeds.masked_scatter(slots[..., None].expand_as(embeds), visual_features.to(embeds)) + if self.is_moe: + positions, _ = self.backbone.get_rope_index(input_ids, mm_token_type_ids, video_grid_thw=grid) + else: + positions = self.backbone.compute_3d_position_ids(input_ids=input_ids, + inputs_embeds=embeds, video_grid_thw=grid, attention_mask=None, + mm_token_type_ids=mm_token_type_ids) + n = input_ids.shape[1] + native = dict(inputs_embeds=embeds, position_ids=positions, use_cache=False) + if device.type == 'cuda': + cu = torch.tensor([0, n], device=device, dtype=torch.int32) + native.update(attention_mask={'full_attention': None, 'linear_attention': None}, + cu_seq_lens_q=cu, cu_seq_lens_k=cu, max_length_q=n, max_length_k=n, + seq_idx=torch.zeros((1, n), device=device, dtype=torch.int32)) + hidden = self.backbone.language_model(**native).last_hidden_state[0] + with torch.autocast(device_type=device.type, enabled=False): + logits = self.head(hidden[pairs], hidden[queries]) + valid = logits.masked_fill(~mask, -torch.inf) + probabilities = torch.where((tasks == 1)[:, None], valid.softmax(-1), logits.sigmoid()) * mask + return VideoJevOutput(logits=logits, probabilities=probabilities, score_mask=mask) + + @torch.inference_mode() + def predict_video(self, processor, video, questions, *, fps=2., max_frames=2048, context=262144, threshold=None): + """Return ordered QA answers / grounding intervals from an original video file.""" + if threshold is not None and not 0 < threshold < 1: + raise ValueError('threshold must be between 0 and 1') + pixels, record = prepare_video(processor, video, fps=fps, max_frames=max_frames, context=context) + features = self.encode_video(pixels, torch.tensor([record['grid_thw']])) + return self.predict_features(processor, features, record, questions, context=context, threshold=threshold) + + @torch.inference_mode() + def predict_features(self, processor, features, record, questions, *, context=262144, threshold=None): + """Use the configured grounding threshold unless this call overrides it.""" + decoder = dict(self.config.decoder) + if threshold is not None: + decoder['threshold'] = threshold + if not 0 < decoder['threshold'] < 1: + raise ValueError('threshold must be between 0 and 1') + results = [] + for batch, rows in prepare_query_groups(processor, record, questions, context): + output = self(**batch, visual_features=features) + results.extend(format_predictions(output, rows, record, decoder)) + return results diff --git a/PixelOne-Pro-4B/runtime/src/videojev_hf/processing_videojev.py b/PixelOne-Pro-4B/runtime/src/videojev_hf/processing_videojev.py new file mode 100644 index 0000000000000000000000000000000000000000..46cc1989f34bbfad78ea36b3ec52334ffc8c257f --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/videojev_hf/processing_videojev.py @@ -0,0 +1,156 @@ +"""Canonical VideoJev prompts, intact query groups, and video preprocessing.""" +import math +import re + +import numpy as np +import torch +from transformers.video_utils import VideoMetadata + +from .videojev_temporal import pair_timeline, decode +from .videojev_video import read_video + +DECIDE = '<|decide|>' +OPTION_END = '<|option_end|>' + + +def suffix(row, stamps): + task = row.get('task', 'grounding') + if task not in ('grounding', 'choice'): + raise ValueError('task must be grounding or choice') + for text in [row['query'], *row.get('options', [])]: + if not isinstance(text, str) or not text.strip() or '<|' in text: + raise ValueError('Questions/options must be nonempty text without control tokens') + if task == 'choice' and len(row.get('options', [])) < 2: + raise ValueError('Choice questions need at least two options') + instruction = 'temporal grounding' if task == 'grounding' else 'single-choice video question answering' + text = f'\nTask: {instruction}\nQuestion: {row["query"]}\nOptions:\n' + candidates = stamps if task == 'grounding' else row['options'] + return text + ''.join(value + OPTION_END + '\n' for value in candidates) + DECIDE + + +def native_inputs(processor, record, rows): + grid = record['grid_thw'] + meta = VideoMetadata(total_num_frames=record['frames'], + fps=record.get('effective_fps', record['fps']), frames_indices=list(range(record['frames']))) + replacement = processor.replace_video_token(dict(video_grid_thw=np.asarray([[grid[0], 2, 2]]), + video_metadata=[meta]), video_idx=0) + stamps = re.findall(r'<[0-9]+\.[0-9] seconds>', replacement) + raw_times = processor._calculate_timestamps(list(range(record['frames'])), meta.fps, 2) + if len(stamps) != grid[0] or not np.allclose(raw_times, record['score_times'], rtol=1e-10, atol=1e-8): + raise ValueError('Timestamp candidates do not match native video midpoints') + texts = [] + for i, row in enumerate(rows): + content = ([dict(type='video', video='provided_in_memory')] if i == 0 else []) + content += [dict(type='text', text=suffix(row, stamps))] + text = processor.apply_chat_template([dict(role='user', content=content)], + tokenize=False, add_generation_prompt=False) + if i == 0: + replaced, _ = processor.get_text_with_replacements([text], [], [replacement], []) + value = processor(text=replaced, return_tensors='pt') + spatial = grid[1] * grid[2] // 4 + slots = value['input_ids'][0] == processor.video_token_id + if int(slots.sum()) != grid[0] or record['tokens'] != grid[0]*spatial: + raise ValueError('Native grid/token count mismatch') + repeats = torch.ones(value['input_ids'].shape[1], dtype=torch.long) + repeats[slots] = spatial + first_ids = torch.repeat_interleave(value['input_ids'], repeats, dim=1) + first_types = torch.repeat_interleave(value['mm_token_type_ids'], repeats, dim=1) + else: + texts.append(torch.tensor([processor.tokenizer.encode(text, add_special_tokens=False)])) + return torch.cat([first_ids, *texts], dim=1), torch.cat([first_types, *[torch.zeros_like(t) for t in texts]], dim=1) + + +def prepare_query_groups(processor, record, questions, context): + if not questions or context < 64: + raise ValueError('Provide questions and a context of at least 64 tokens') + if len({q.get('id', i) for i, q in enumerate(questions)}) != len(questions): + raise ValueError('Question IDs must be unique') + # Query lengths are computed with the exact native tokenizer. No labels enter + # this function, and no answer history is carried from one group to the next. + start = 0 + decide_id = processor.tokenizer.convert_tokens_to_ids(DECIDE) + option_id = processor.tokenizer.convert_tokens_to_ids(OPTION_END) + while start < len(questions): + end = start + 1 + ids, types = native_inputs(processor, record, questions[start:end]) + if (ids.shape[1]+63)//64*64 > context: + raise ValueError(f'A complete query exceeds context; no question was skipped: {start}') + while end < len(questions): + candidate_ids, candidate_types = native_inputs(processor, record, questions[start:end+1]) + if (candidate_ids.shape[1]+63)//64*64 > context: + break + ids, types = candidate_ids, candidate_types + end += 1 + rows = questions[start:end] + query_indices = (ids[0] == decide_id).nonzero().flatten() + option_indices = (ids[0] == option_id).nonzero().flatten() + counts = [len(row['options']) if row.get('task') == 'choice' else record['grid_thw'][0] for row in rows] + if len(query_indices) != len(rows) or len(option_indices) != sum(counts): + raise ValueError('Incomplete decision/candidate markers') + pairs = torch.zeros((len(rows), max(counts)), dtype=torch.long) + mask = torch.zeros_like(pairs, dtype=torch.bool) + offset, previous = 0, -1 + for i, count in enumerate(counts): + selected = option_indices[offset:offset+count] + if not ((selected > previous) & (selected < query_indices[i])).all(): + raise ValueError('Candidate readouts cross query boundaries') + pairs[i, :count], mask[i, :count] = selected, True + previous = query_indices[i] + offset += count + yield dict(input_ids=ids, mm_token_type_ids=types, + video_grid_thw=torch.tensor([record['grid_thw']]), pair_indices=pairs, + query_indices=query_indices, score_mask=mask, + decision_tasks=torch.tensor([int(row.get('task') == 'choice') for row in rows])), rows + start = end + + +def prepare_video(processor, path, *, fps=2., max_frames=2048, context=262144): + import av + from transformers.models.qwen3_vl.video_processing_qwen3_vl import smart_resize + with av.open(str(path)) as container: + stream = container.streams.video[0] + duration = float(stream.duration * stream.time_base) if stream.duration is not None else container.duration/1e6 + sample = read_video(dict(video_path=str(path), duration=duration), fps, max_frames=max_frames) + n, height, width, _ = sample['video'].shape + vp = processor.video_processor + budget = context * 4 // 5 + def geometry(cap): + h, w = smart_resize(n, height, width, temporal_factor=vp.temporal_patch_size, + factor=vp.patch_size*vp.merge_size, min_pixels=vp.size['shortest_edge'], max_pixels=n*cap) + return h, w, (n+1)//2*(h//32)*(w//32) + low, high = max(1024, math.ceil(vp.size['shortest_edge']/n)), 640*640 + if geometry(low)[2] > budget: + raise ValueError('Complete video cannot fit the context at minimum native resolution') + while low < high: + mid = (low+high+1)//2 + if geometry(mid)[2] <= budget: + low = mid + else: + high = mid-1 + meta = VideoMetadata(total_num_frames=n, fps=sample['fps'], frames_indices=list(range(n))) + native = vp(videos=[sample['video']], video_metadata=[meta], do_sample_frames=False, + size=dict(shortest_edge=vp.size['shortest_edge'], longest_edge=n*low), return_tensors='pt') + grid = native['video_grid_thw'][0].tolist() + times, bounds = pair_timeline(sample['times'], sample['sampled_duration']) + record = dict(frames=n, fps=sample['fps'], grid_thw=grid, tokens=int(np.prod(grid))//4, + score_times=times.tolist(), score_bounds=bounds.tolist(), sampled_duration=sample['sampled_duration']) + return native['pixel_values_videos'], record + + +def format_predictions(output, rows, record, decoder): + results = [] + for i, row in enumerate(rows): + count = int(output.score_mask[i].sum()) + logits = output.logits[i, :count].float().cpu().tolist() + probabilities = output.probabilities[i, :count].float().cpu().tolist() + value = dict(id=row.get('id', i), task=row.get('task', 'grounding'), + probabilities=probabilities) + if row.get('task') == 'choice': + answer = int(np.argmax(probabilities)) + value.update(answer_index=answer, answer=row['options'][answer]) + else: + value['interval'] = decode(logits, record['score_times'], record['sampled_duration'], + decoder['threshold'], decoder['smooth'], bounds=record['score_bounds'], + postprocess=decoder['postprocess']) + results.append(value) + return results diff --git a/PixelOne-Pro-4B/runtime/src/videojev_hf/videojev_moe.py b/PixelOne-Pro-4B/runtime/src/videojev_hf/videojev_moe.py new file mode 100644 index 0000000000000000000000000000000000000000..e49dd5cc44de7ba708ca6a9202c8fa2d15da4e2d --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/videojev_hf/videojev_moe.py @@ -0,0 +1,148 @@ +"""Instance-local XTuner grouped experts for the Qwen3.6 RGB experiment. + +Qwen3.6-35B-A3B uses the official ``Qwen3_5Moe`` architecture. Its +router math, shared expert and parameter names are deliberately preserved. +Routed experts use XTuner's training grouped GEMMs, including input/weight +backward kernels. Router matmul and probabilities follow XTuner's FP32 policy. +Importing this module never patches Transformers or the existing dense 4B model. +""" +from __future__ import annotations + +from functools import lru_cache +from types import MethodType + +import torch +from torch.nn import functional as F + + +def fp32_router_forward(self, hidden_states): + """HF top-k math with XTuner FP32 routing, even inside outer BF16 AMP. + + Converting inputs with .float() alone would still let autocast downcast + F.linear. Both logits and normalized top-k weights must retain FP32; + expert matmuls remain BF16 and no capacity or routing objective is added. + """ + hidden_states = hidden_states.reshape(-1, self.hidden_dim) + with torch.autocast(device_type=hidden_states.device.type, enabled=False): + logits = F.linear(hidden_states.float(), self.weight.float()) + probabilities = F.softmax(logits, dtype=torch.float32, dim=-1) + weights, indices = torch.topk(probabilities, self.top_k, dim=-1) + weights = weights / weights.sum(dim=-1, keepdim=True) + return logits, weights, indices + + +def install_fp32_routers(model): + """Change only this model's native routed-expert gate instances.""" + from transformers.models.qwen3_5_moe.modeling_qwen3_5_moe import Qwen3_5MoeTopKRouter + routers = [module for module in model.modules() if isinstance(module, Qwen3_5MoeTopKRouter)] + if not routers: + raise ValueError('No Qwen3_5MoeTopKRouter found in the selected model') + for index, module in enumerate(routers): + module.forward = MethodType(fp32_router_forward, module) + module.timejev_router_compute_dtype = 'float32' + return len(routers) + + +@lru_cache(maxsize=1) +def _xtuner_ops(): + try: + from xtuner.v1.ops.moe.cuda import ( + cuda_token_permute, + cuda_token_unpermute, + triton_group_gemm, + ) + except (ImportError, OSError) as exc: + raise RuntimeError( + 'Qwen3.6 MoE requires the XTuner CUDA grouped-GEMM backend. ' + 'Source scripts/env_qwen36.sh and expose the tested XTuner checkout ' + '(set XTUNER_ROOT) with Torch 2.8/CUDA 12.8 and ' + 'Triton 3.4. This experiment never falls back to an expert loop.' + ) from exc + if (getattr(cuda_token_permute, '__name__', None) != 'cuda_token_permute' + or getattr(cuda_token_unpermute, '__name__', None) != 'cuda_token_unpermute'): + raise RuntimeError( + 'XTuner selected its torch token-permute fallback because the compiled ' + 'grouped_gemm CUDA extension is unavailable. Install the pinned Qwen3.6 ' + 'extension in .deps-qwen36 and source scripts/env_qwen36.sh; this training ' + 'path requires the fast CUDA permute/unpermute backend.' + ) + return triton_group_gemm, cuda_token_permute, cuda_token_unpermute + + + + + + + + +def xtuner_experts_forward(self, hidden_states, top_k_index, top_k_weights): + """HF expert interface, using two grouped GEMMs instead of E Python GEMMs. + + FP32 master parameters are allowed under CUDA BF16/FP16 autocast. Explicit + casts are differentiable, since custom Triton GEMMs do not implement + PyTorch's automatic autocast rules. Direct BF16 parameters need no copies. + No expert-capacity limit, token dropping, or extra routing loss is added. + """ + if hidden_states.device.type != 'cuda': + raise RuntimeError('XTuner grouped Qwen3.6 experts require CUDA; CPU fallback is disabled') + if hidden_states.ndim != 2 or top_k_index.ndim != 2: + raise ValueError('Expected flattened [tokens, hidden] and [tokens, top_k] expert inputs') + if top_k_index.shape != top_k_weights.shape or top_k_index.shape[0] != hidden_states.shape[0]: + raise ValueError('Routed indices, probabilities and token counts disagree') + if torch.is_autocast_enabled('cuda'): + compute_dtype = torch.get_autocast_dtype('cuda') + else: + compute_dtype = hidden_states.dtype + if compute_dtype not in (torch.bfloat16, torch.float16): + raise RuntimeError('XTuner TMA grouped GEMM requires BF16/FP16 tensors or CUDA autocast') + # ZeRO-3 gathers the direct fused Parameters at this module's pre-forward + # hook. Never access sliced per-expert Parameters from a different module. + x = hidden_states.to(compute_dtype).contiguous() + gate_up = self.gate_up_proj.to(compute_dtype).contiguous() + down = self.down_proj.to(compute_dtype).contiguous() + grouped_gemm, permute, unpermute = _xtuner_ops() + indices = top_k_index.contiguous() + counts = torch.zeros(self.num_experts, dtype=torch.int64, device=x.device) + flat_indices = indices.reshape(-1).to(torch.int64) + counts.scatter_add_(0, flat_indices, torch.ones_like(flat_indices)) + if not x.shape[0]: + # Keep both fused Parameters and router weights in autograd for an + # empty diagnostic batch without launching zero-row TMA descriptors. + return x + (gate_up.sum() + down.sum() + top_k_weights.sum()) * 0 + dispatched, row_map = permute(x, indices) + gate, up = grouped_gemm(dispatched, gate_up, counts).chunk(2, dim=-1) + activated = (self.act_fn(gate) * up).contiguous() + routed_output = grouped_gemm(activated, down, counts) + return unpermute(routed_output, row_map, top_k_weights).to(hidden_states.dtype) + + +def install_xtuner_grouped_experts(model, *, mark_zero3_leaf=True): + """Patch only this model's Qwen3.5-MoE expert instances, return the count. + + This keeps HF tensor names/shapes intact for pretrained/resume/export. + The explicit ZeRO-3 leaf flag is attached to each fused expert module; + all expert parameters are then gathered together on every participating + rank irrespective of that rank's selected routes. + """ + from transformers.models.qwen3_5_moe.modeling_qwen3_5_moe import Qwen3_5MoeExperts + + _xtuner_ops() # Report missing dependencies before allocating model activations. + modules = [module for module in model.modules() if isinstance(module, Qwen3_5MoeExperts)] + if not modules: + raise ValueError('No Qwen3_5MoeExperts found: this backend is only for the Qwen3.6 MoE experiment') + for module in modules: + module.forward = MethodType(xtuner_experts_forward, module) + module.timejev_experts_backend = 'xtuner_triton_grouped_gemm' + if mark_zero3_leaf: + module._z3_leaf = True + return len(modules) + + +def grouped_expert_inventory(model): + return { + name: {'backend': module.timejev_experts_backend, + 'zero3_leaf': bool(getattr(module, '_z3_leaf', False)), + 'num_experts': module.num_experts} + for name, module in model.named_modules() + if hasattr(module, 'timejev_experts_backend') + } diff --git a/PixelOne-Pro-4B/runtime/src/videojev_hf/videojev_temporal.py b/PixelOne-Pro-4B/runtime/src/videojev_hf/videojev_temporal.py new file mode 100644 index 0000000000000000000000000000000000000000..89f20dab8967dc4296e2d33bf126829614b77334 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/videojev_hf/videojev_temporal.py @@ -0,0 +1,132 @@ +"""Time grids, Bernoulli labels, interval decoding, and TimeLens metrics.""" +import numpy as np + +POSTPROCESS_VERSION = 'round_repair_clamp_v1' + + +def postprocess_interval(prediction, shifted_logits, bounds, duration, + method=POSTPROCESS_VERSION): + """Round seconds, repair collapsed intervals using evidence, then clamp. + + Evidence must already have the decoder's smoothing and threshold shift. + No ground truth is used. Python round() uses ties-to-even; the final clamp + may leave a fractional video endpoint. 'none' preserves legacy intervals. + """ + if method == 'none': + return [float(value) for value in prediction] + if method != POSTPROCESS_VERSION: + raise ValueError(f'Unknown interval postprocessing: {method}') + bounds = np.asarray(bounds, dtype=np.float64) + evidence = np.asarray(shifted_logits, dtype=np.float64) + rounded = [float(round(float(value))) for value in prediction] + if rounded[1] <= rounded[0]: + second = rounded[0] + candidates = [[second - 1, second], [second, second + 1]] + candidates = [span for span in candidates + if span[0] >= 0 and span[0] < bounds[-1, 1] + and span[1] > bounds[0, 0]] + original_midpoint = sum(prediction) / 2 + + def score(span): + overlap = np.maximum(0, np.minimum(bounds[:, 1], span[1]) + - np.maximum(bounds[:, 0], span[0])) + return (float(np.dot(evidence, overlap)), + -abs(sum(span) / 2 - original_midpoint), -span[0]) + + if candidates: + rounded = list(max(candidates, key=score)) + return [min(float(duration), max(0., value)) for value in rounded] + + +def time_grid(duration, fps=2.): + if duration <= 0 or fps <= 0: + raise ValueError('duration and fps must be positive') + # Fixed-rate grid, never linspace (which silently changes fps). + return np.arange(int(np.ceil(duration * fps)), dtype=np.float64) / fps + + +def frame_labels(times, spans): + times = np.asarray(times) + labels = np.zeros(len(times), dtype=np.float32) + for start, end in spans: + labels[(times >= start) & (times <= end)] = 1 + return labels + + +def pair_timeline(frame_times, duration): + """Native temporal patch=2: one score at each pair's midpoint. + + The official odd-frame duplicate gives the last group its real frame time. + Interval cell boundaries lie halfway between adjacent original frame times; + the outer cells extend to the observed video's endpoints. + """ + t = np.asarray(frame_times, dtype=np.float64) + if t.ndim != 1 or not len(t) or not np.isfinite(t).all() or np.any(np.diff(t) <= 0): + raise ValueError('Expected a nonempty strictly increasing frame time grid') + if t[0] < 0 or t[-1] >= duration: + raise ValueError('Frame timestamps must lie within the sampled video') + first = t[::2] + second = t[np.minimum(np.arange(0, len(t), 2) + 1, len(t) - 1)] + centers = (first + second) / 2 + internal = (t[1:-1:2] + t[2::2]) / 2 + edges = np.concatenate(([0.], internal, [float(duration)])) + return centers, np.stack((edges[:-1], edges[1:]), axis=1) + + +def interval_iou(a, b): + # Identical to TimeLens utils.iou for valid, single intervals. + if a[1] <= a[0] or b[1] <= b[0]: + return 0. + return max(0., min(a[1], b[1]) - max(a[0], b[0])) / (max(a[1], b[1]) - min(a[0], b[0])) + + +def decode(logits, times, duration, threshold=.25, smooth=1, *, bounds, + postprocess=POSTPROCESS_VERSION, return_raw=False): + """Maximum Bernoulli-likelihood nonempty contiguous segment (Kadane, O(T)). + + Relative to predicting background everywhere, assigning a frame foreground + contributes log(p/(1-p)) - log(threshold/(1-threshold)). A calibrated .5 + threshold is exactly the constrained independent-Bernoulli MAP segment. + All-negative sequences return their strongest single frame, without using GT. + Each timestamp is a pair midpoint, with explicit temporal cell bounds. + The resulting segment receives the default round/repair/clamp protocol; + postprocess='none' returns the original continuous MAP interval. + return_raw=True also returns that continuous interval for export provenance. + """ + z = np.asarray(logits, dtype=np.float64) + times = np.asarray(times, dtype=np.float64) + bounds = np.asarray(bounds, dtype=np.float64) + if len(z) == 0 or len(z) != len(times) or not np.isfinite(z).all(): + raise ValueError('nonempty finite scores must match timestamps') + if (bounds.shape != (len(z), 2) or not np.isfinite(bounds).all() + or np.any(bounds[:, 0] > times) or np.any(bounds[:, 1] < times) + or np.any(bounds[:, 1] <= bounds[:, 0]) or bounds[0, 0] != 0 + or bounds[-1, 1] != duration + or not np.array_equal(bounds[1:, 0], bounds[:-1, 1])): + raise ValueError('Invalid pair score interval bounds') + if not 0 < threshold < 1 or smooth < 1 or smooth % 2 != 1: + raise ValueError('threshold in (0,1); smoothing width must be positive and odd') + if smooth > 1: + z = np.convolve(np.pad(z, (smooth // 2, smooth // 2), mode='edge'), + np.ones(smooth) / smooth, mode='valid') + z = z - np.log(threshold / (1 - threshold)) + best = current = float(z[0]) + start = best_start = best_end = 0 + for i in range(1, len(z)): + if current <= 0: + start, current = i, float(z[i]) + else: + current += float(z[i]) + if current > best: + best, best_start, best_end = current, start, i + prediction = [float(bounds[best_start, 0]), float(bounds[best_end, 1])] + processed = postprocess_interval(prediction, z, bounds, duration, method=postprocess) + return (processed, prediction) if return_raw else processed + + +def metrics(predictions, rows): + if len(predictions) != len(rows): + raise ValueError('coverage mismatch') + ious = [max(interval_iou(p, s) for s in r['spans']) for p, r in zip(predictions, rows)] + return dict(n=len(rows), **{f'R1@{t}': float(100 * np.mean(np.asarray(ious) >= t)) for t in [.3, .5, .7]}, + mIoU=float(100 * np.mean(ious))) diff --git a/PixelOne-Pro-4B/runtime/src/videojev_hf/videojev_video.py b/PixelOne-Pro-4B/runtime/src/videojev_hf/videojev_video.py new file mode 100644 index 0000000000000000000000000000000000000000..5d384290da6058185a32e1ab9034abf115f51d29 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/src/videojev_hf/videojev_video.py @@ -0,0 +1,75 @@ +"""Decode original-resolution RGB frames on an exact fps grid; never resize here.""" +import numpy as np +import torch +from .videojev_temporal import time_grid + + +def sampling_grid(duration, fps=2., max_frames=None): + """Keep the requested fps unless the explicit full-video frame cap applies.""" + requested=time_grid(duration,fps) + if max_frames is not None: + if not isinstance(max_frames,int) or max_frames<1:raise ValueError('max_frames must be a positive integer') + requested=requested[requestedmax_frames: + effective_fps=max_frames/float(duration) + return np.arange(max_frames,dtype=np.float64)/effective_fps,effective_fps,'uniform_full_video' + return requested,float(fps),'fixed_fps' + + +def read_video(row, fps=2., *, max_frames=None): + import av + requested,effective_fps,sampling_mode = sampling_grid(row['duration'],fps,max_frames) + frames, actual = [], [] + previous, previous_time, origin, index, end_time = None, 0., None, 0, 0. + duplicate_pts = 0 + with av.open(row['video_path']) as container: + stream = container.streams.video[0] + stream.thread_type = 'AUTO' + stream.thread_count = 2 + for frame in container.decode(stream): + if frame.pts is None: + raise ValueError(f"Missing video PTS: {row['video_path']}") + stamp = float(frame.pts * frame.time_base) + if origin is None: + origin = stamp + now = stamp - origin + if previous is not None and now < previous_time: + if previous_time - now <= 1e-4: + duplicate_pts += 1 + continue + raise ValueError(f"Nonmonotonic PTS: {row['video_path']}") + while index < len(requested) and requested[index] <= now: + chosen, chosen_time = (previous, previous_time) if previous is not None and abs(previous_time - requested[index]) <= abs(now - requested[index]) else (frame, now) + frames.append(chosen.to_ndarray(format='rgb24')) + actual.append(chosen_time) + index += 1 + previous, previous_time = frame, now + frame_duration = float(frame.duration * frame.time_base) if frame.duration else 1 / float(stream.average_rate or 30) + end_time = now + frame_duration + if previous is None: + raise ValueError(f"Empty video: {row['video_path']}") + # Sample only the media's actual supported time range. Do not fabricate + # repeated frames to fill an annotation duration longer than the video. + sampled_duration = min(float(row['duration']), end_time) + times = requested[requested < sampled_duration] + while index < len(times): + frames.append(previous.to_ndarray(format='rgb24')) + actual.append(previous_time) + index += 1 + if not len(times) or len(frames) < len(times): + raise ValueError('Video does not cover any requested sample') + # NumPy's large contig-to-contig copy is exceptionally slow on this host. + # ATen stacking preserves every uint8 pixel exactly and avoids that path. + if max_frames is not None and len(times)!=len(requested): + # A wrong header must not leave a uniform sample covering a fictitious tail. + if sampled_duration>=float(row['duration']):raise ValueError('Sampling grid extends beyond unchanged media duration') + return read_video(dict(row,duration=sampled_duration),fps,max_frames=max_frames) + video = torch.stack([torch.from_numpy(frame) for frame in frames[:len(times)]]).numpy() + result = dict(video=video, times=times, fps=effective_fps, input_source='video', + decoded_times=np.asarray(actual[:len(times)], dtype=np.float64), + media_duration=end_time, sampled_duration=sampled_duration, + ignored_duplicate_pts=duplicate_pts) + if max_frames is not None: + result.update(requested_fps=float(fps),max_frames=max_frames,sampling_mode=sampling_mode, + sampling_duration=float(row['duration'])) + return result diff --git a/PixelOne-Pro-4B/runtime/third_party/VideoJev-LICENSE b/PixelOne-Pro-4B/runtime/third_party/VideoJev-LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..1d5180a42f1c3383ba7c7bd0a50f0837ef0168df --- /dev/null +++ b/PixelOne-Pro-4B/runtime/third_party/VideoJev-LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2026 Alibaba Cloud + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/PixelOne-Pro-4B/runtime/third_party/VideoJev-NOTICE b/PixelOne-Pro-4B/runtime/third_party/VideoJev-NOTICE new file mode 100644 index 0000000000000000000000000000000000000000..799a6d414711ec67ec86bba8f7ff4a59c8023f83 --- /dev/null +++ b/PixelOne-Pro-4B/runtime/third_party/VideoJev-NOTICE @@ -0,0 +1,4 @@ +VideoJev uses native Qwen3.5 and Qwen3.5-MoE modules from Hugging Face Transformers. +Qwen3.5-4B and Qwen3.6-35B-A3B are provided by the Qwen team under Apache-2.0. +Training and optional grouped MoE inference use XTuner (InternLM), Apache-2.0. +VideoJev modifies the language readout and adds a trained cosine decision head. diff --git a/PixelOne-Pro-4B/runtime_manifest.json b/PixelOne-Pro-4B/runtime_manifest.json new file mode 100644 index 0000000000000000000000000000000000000000..18adf95cb7fd6b9a4260e3edc383d987876d0b03 --- /dev/null +++ b/PixelOne-Pro-4B/runtime_manifest.json @@ -0,0 +1,67 @@ +{ + "pyproject.toml": "5f3b9d91f4a1b2b9a62103aac61b8f248657774fc483d7e4ee91a4eb837bdc0c", + "THIRD_PARTY_NOTICES.md": "7aa2bf0d5645313a5c2db2284f4680e51951cc3fba130fd69eeced7b231e1228", + "third_party/VideoJev-LICENSE": "50cbab8a892c5f2993b8c7351a99182507472def3b1374558308605d99b86b32", + "third_party/VideoJev-NOTICE": "042c0685fb7c35b9cd947c8b514513948323f376d7b93eb74d0d3430b084eadf", + "src/videojev_hf/__init__.py": "9b289dc25ec93434ed4ad962f47482d7ee1656f8a7f1b38fd11e9c7c4a342624", + "src/videojev_hf/configuration_videojev.py": "b91c4bc181fe31b8297a80429f036782dc3331a3da84f1fca1203b6bf1413127", + "src/videojev_hf/modeling_videojev.py": "48ae0b7d9d724c6fb7ad1355ca5fe9dadd494acf0f09b28635d4a160c88d5b40", + "src/videojev_hf/processing_videojev.py": "001281d45e61db9baa31bd3be210969f35bf2735773f1819195a2b1a6e70227f", + "src/videojev_hf/videojev_moe.py": "6421edb75def784c77e08f61a04ce4d3beed0bfcae000256cb9c074d515c80db", + "src/videojev_hf/videojev_temporal.py": "68b19275ef5657e54188d782c6531f466681d3b3fa8b77329e5c20a1631decab", + "src/videojev_hf/videojev_video.py": "0c5f93f7ac4e7da402217491e000d7b6b2f36fa8b010462f4e0bc63ef87c8c3a", + "src/jev_spatial_distill/teacher_targets.py": "718a667aa2f6352542a99284c8268200e46e1fb697ee068c110e29191cab7a9f", + "src/jev_spatial_distill/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/jev_click_finetune/model.py": "b41a3a09ab906258786e628f96bc662e9d2d4ab847034febd9801317bf90eb39", + "src/jev_click_finetune/inputs.py": "6e912d6c720c4a860a6f7ec215b178c2d6a922e5c01739833b6f18c360e1ea33", + "src/jev_click_finetune/objective.py": "f98a0c6836d45250c020eaa2943648c401cffa6ba2d0fd14139cdba41463fa79", + "src/jev_click_finetune/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/jev_unified_student/model.py": "7e8bdc5ce146dc0d63b9cab10a9c2b3a6d46d19467a22e8363692fade2e4f1f8", + "src/jev_unified_student/objective.py": "48504301ae8c02711e5a7e764b81dac1e0a21e234a11b98d1b47d3d9c375d4f6", + "src/jev_unified_student/top20.py": "8596f728107ee3e7384ccfc991c23acde9bd8438cf2c670fd221f22736116978", + "src/jev_unified_student/top100.py": "6486852b198183859684377697be9b30d53e86429cdb0417de552bfa1adcb5ea", + "src/jev_unified_student/methods.py": "298e0fe7ba89c23aaf3e7a01d8b2728cda9d3c9744e570a47c8548e05ab246a9", + "src/jev_unified_student/attention.py": "bcad90f833a5d2431c896f641073a67f4366c3513089f189065e9f11c66686ac", + "src/jev_unified_student/full_training.py": "38c3dc17bd66ddc853b9896f0e68819f1b385a48e46806379f14af5763027d15", + "src/jev_unified_student/portable_full.py": "a7d976e47a17013bd1004c86621f6ec84a0027cb30e5d3d9e3d7df56b3b81013", + "src/jev_unified_student/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/jev_unified_student/speed_loss.py": "221bbc825efaf55898ccaa34bdc60e590cdbc609fa3c815b4065c9148644c99d", + "src/jev_fine_ablation/distillation.py": "74b45681d0694ff73e82e44b7dea864f434a3081de0cf3f37d6775e149e3d64c", + "src/jev_fine_ablation/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/jev_fine_refine/objective.py": "8eb841871e35fe347051b4e7c2b851cb0ecb23b51fd58da1beb10facb3d7b453", + "src/jev_fine_refine/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/spatial_pro_experiments/core.py": "c28d3cf4dd6f84df00f5447809387facfbde01c5e365f3c6e63a6bf03a6f2579", + "src/spatial_pro_experiments/fast.py": "a76a08bfcd402e097c6bce18e06d23be210de266cebf4f93d28803fdcedcbffd", + "src/spatial_pro_experiments/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/scripts/spatial_view_sizes.py": "970aea9118e500325b06731c59802f6a6e4e61d37248ecafa87314a5b2799677", + "src/scripts/smoke_videojev.py": "734387e304d86fc5b5975d0e3be3db4fd2c11d058f4d07faae72c502b90a595e", + "src/scripts/batch_spatial_jev.py": "7729a47bc0b3b4ecb4b23faa2665d2658b535249781779e9bcd107eeb0816343", + "src/scripts/refine_spatial_jev.py": "305360bde641c4964f2f7c15406190c1cb31cc2b4fa33939221ef88430d84948", + "src/scripts/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/qwen_spatial/kernels.py": "23f03637185a8c18ab7573d3703b31a6252638d59d619b32c55b278c7eb60fb3", + "src/qwen_spatial/common.py": "812f73c41fbc960f2ced3f3bb0d676b3c3b9fe8dbf2b728bccbca9a083f72c96", + "src/qwen_spatial/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/pixelone/sampling.py": "ec0b32523e0230484af2f509b16e8878a0fec805831a363363cb22b4251bc39c", + "src/pixelone/__init__.py": "fbd113aba5dd529bb7a4dfa5b0a8f53756539a33e24246b84ca216c0a355e829", + "src/pixelone/io.py": "5c2a25774e311f39cac44de6245514226048b0c7264af53dbcfa0c8399c1b6c6", + "src/pixelone/resources.py": "1e57d070a504974d29d3b58cc85f176d6575543918bc6ab8e327146485aa06d9", + "src/pixelone/inference.py": "879c4ffae1f5c485917368a64e26e4a6abee87636d520205d3d1617248895482", + "src/pixelone/cli.py": "a2f1d8ffb6e463a9d2388d28be292c252562c234c5e1b8bedc224b1c6d452886", + "src/pixelone/data.py": "bbac25ece191dd7761797ba5cabab1f8526f9c9d05d579d29d272f54b16ed8c1", + "src/pixelone/teacher.py": "391fa31dd1f3051a7b5c110b3268a2028e2e046586451222a4b6982f7c9894ec", + "src/pixelone/checkpoint.py": "ba659771265ca4274788cae4c03d8ccf5070738913309c3a4cc3066705554a79", + "src/pixelone/training.py": "1280beabda8a6c2f21bbd186c85189daf84f09237889a9a012355a4d1b0d6be2", + "src/pixelone/export.py": "445850ae70c1559e90ce781d3aeda8e37a2724595d90774a1091f14560a7cba8", + "src/jev_spatial_distill/t3/model.py": "5f64ea8422dd31afd074b6f653e8dfbd075b0aa7933f8437a5bf1888a9f10c16", + "src/jev_spatial_distill/t3/batching.py": "23342e01e13b5edc71b8a2d8771de8720807b6d9ce0668ed21702763ec629aea", + "src/jev_spatial_distill/t3/states.py": "5430737b9af6a33456af343944c33e6b3242cf3bd2c30a71ec68c504d2cf5a0a", + "src/jev_spatial_distill/t3/common.py": "a6ad70427920e58014b1b71efe66bf8189ed2f971c8accfae9243330b1f291e0", + "src/jev_spatial_distill/t3/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/jev_spatial_distill/spatial_pointer/geometry.py": "75aa1c6b53e7677a4c935a3b2c25deb495c1796ea5b26925b3c22d9997ebb398", + "src/jev_spatial_distill/spatial_pointer/model.py": "5e3686589398f1776a07ab7de482f07e8a73bf8d3ca666672b78bbd47618cef0", + "src/jev_spatial_distill/spatial_pointer/supervision.py": "f6d8b270e011d180755b4fc0920267e38cceab9fbf4e8e7d07bf4d39c6a2505a", + "src/jev_spatial_distill/spatial_pointer/data.py": "fb873e8566f5176ea60cbf7b3ed3f768436adcabc2278e3413a29954a00946e8", + "src/jev_spatial_distill/spatial_pointer/__init__.py": "01ba4719c80b6fe911b091a7c05124b64eeece964e09c058ef8f9805daca546b", + "src/pixelone/assets/DejaVuSans.ttf": "ae7b7855e115a5966d8b1b3f80f254ccc117ec86f9965e202ee2940453837280", + "src/pixelone/assets/DejaVuSans-LICENSE.txt": "e81d9dced49fea2a7d576cbea283873de58563c5d488f954deb282843c3ea79c" +} diff --git a/PixelOne-Pro-4B/tokenizer.json b/PixelOne-Pro-4B/tokenizer.json new file mode 100644 index 0000000000000000000000000000000000000000..8cd72f2eec488230a80033061d5f18510d7a744a --- /dev/null +++ b/PixelOne-Pro-4B/tokenizer.json @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0b16fb8cbf388f6af8691645a17c909c01e536b4eb1bad865ed05fb6ef4a642a +size 19989703 diff --git a/PixelOne-Pro-4B/tokenizer_config.json b/PixelOne-Pro-4B/tokenizer_config.json new file mode 100644 index 0000000000000000000000000000000000000000..05c0cc7f302a4585cc28a253ec59d6e1dfc7f738 --- /dev/null +++ b/PixelOne-Pro-4B/tokenizer_config.json @@ -0,0 +1,37 @@ +{ + "add_prefix_space": false, + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "backend": "tokenizers", + "bos_token": null, + "clean_up_tokenization_spaces": false, + "eos_token": "<|im_end|>", + "errors": "replace", + "extra_special_tokens": [ + "<|decide|>", + "<|option_end|>" + ], + "image_token": "<|image_pad|>", + "is_local": true, + "local_files_only": true, + "model_max_length": 262144, + "model_specific_special_tokens": { + "audio_bos_token": "<|audio_start|>", + "audio_eos_token": "<|audio_end|>", + "audio_token": "<|audio_pad|>", + "image_token": "<|image_pad|>", + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" + }, + "pad_token": "<|endoftext|>", + "pretokenize_regex": "(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\\r\\n\\p{L}\\p{N}]?[\\p{L}\\p{M}]+|\\p{N}| ?[^\\s\\p{L}\\p{M}\\p{N}]+[\\r\\n]*|\\s*[\\r\\n]+|\\s+(?!\\S)|\\s+", + "processor_class": "Qwen3VLProcessor", + "split_special_tokens": false, + "tokenizer_class": "Qwen2Tokenizer", + "unk_token": null, + "video_token": "<|video_pad|>", + "vision_bos_token": "<|vision_start|>", + "vision_eos_token": "<|vision_end|>" +} diff --git a/README.md b/README.md index 32897cd3e640101ba184f8c4ccd896981de3804a..f72e25242dbe1f8044d9854263c5bc0046d9bc7b 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,98 @@ --- license: mit +language: +- en +tags: +- gui-grounding +- pixelone +- computer-use +- custom-code +- safetensors --- + +# PixelOne + +**From Options to Pixels in a Single Forward for GUI Grounding** + +![PixelOne accuracy and latency](assets/teaser.png) + +PixelOne predicts a precise click from a native-resolution screenshot and an instruction. Spatial search supplies supervision during training; inference uses one visual encoding and one model forward, without search or sequential coordinate decoding. + +## Choose a model + +This repository contains **two independent, complete model packages**. Select a subfolder rather than loading the repository root as a single checkpoint. + +| Model | Mean accuracy | Mean latency | Weight size | +| --- | ---: | ---: | ---: | +| [PixelOne-Pro-4B](https://huggingface.co/KangHui2200/PixleOne/tree/main/PixelOne-Pro-4B) | 80.62% | 0.323 s | 10.3 GB | +| [PixelOne-Pro-35B-A3B](https://huggingface.co/KangHui2200/PixleOne/tree/main/PixelOne-Pro-35B-A3B) | 83.77% | 0.431 s | 68.7 GB | + +Accuracy and latency average four benchmarks equally. Latency is from the paper's H200 measurements at batch size 1. The figure's inset bars use a truncated 50–80% accuracy scale. GPU memory must also accommodate resolution-dependent activations; weight size is not total memory usage. + +## Quick start + +Use Python 3.12 and a CUDA-enabled PyTorch 2.11 environment. If the repository is private, authenticate with `hf auth login` or your own `HF_TOKEN` environment variable first. + +Download and install the small, bundled runtime for the selected model: + +```bash +python -m pip install -U huggingface_hub +hf download KangHui2200/PixleOne \ + --include 'PixelOne-Pro-4B/runtime/*' --local-dir ./PixleOne +python -m pip install ./PixleOne/PixelOne-Pro-4B/runtime +python -m pip install flash-linear-attention==0.4.2 causal-conv1d==1.7.0 --no-build-isolation +``` + +Then predict a click. The loader downloads only the chosen model's manifest and required files, not both variants: + +```bash +pixelone infer \ + --model KangHui2200/PixleOne \ + --subfolder PixelOne-Pro-4B \ + --image screenshot.png \ + --instruction "Click the search button" \ + --device cuda:0 +``` + +For the larger model, change the subfolder to `PixelOne-Pro-35B-A3B`. Both packages contain the same runtime implementation. + +```python +from PIL import Image +from pixelone import PixelOnePredictor + +predictor = PixelOnePredictor.from_pretrained( + "KangHui2200/PixleOne", + subfolder="PixelOne-Pro-4B", + device="cuda:0", +) +with Image.open("screenshot.png") as image: + result = predictor.predict(image, "Click the search button") +print(result["point"]) +``` + +The output is `[x, y]` in original screenshot pixels. Pin `revision` to a repository commit for reproducible downloads. For offline use, download `PixelOne-Pro-4B/*` or `PixelOne-Pro-35B-A3B/*` and pass that model directory to the loader. + +## What is included + +Each model directory contains full safetensors weights, the trained decision/pixel heads, tokenizer and processor assets, `pixelone.json`, a weight index, evaluation counts and installable `runtime/` code. No separate base-model weights, LoRA adapter or search teacher are required at inference. Optimizer states, training screenshots, teacher caches and credentials are not included. + +Use `PixelOnePredictor`, **not** `AutoModelForCausalLM.generate`. The root is a collection, and each package uses a custom direct readout. Retain the loader's BF16/FP32 partition; do not cast the entire model to FP16 or BF16. Only existing full-attention layers use bidirectional masks, while linear-attention layers retain their native computation and KV caching remains disabled. + +## Results + +| Model | ScreenSpot | ScreenSpot V2 | ScreenSpot Pro | OSWorld-G | +| --- | ---: | ---: | ---: | ---: | +| PixelOne-Pro-4B | 90.33 | 92.85 | 68.12 | 71.18 | +| PixelOne-Pro-35B-A3B | 91.67 | 94.50 | 72.04 | 76.86 | + +These are the final step-1,954 Pro models. Each starts from a trained 22K Top20+KD student and continues on 500K targets with full-parameter updates, including the visual encoder. The 200K PixelOne branch is separate, not an intermediate step of Pro training. + +## Validation and attribution + +Model files retain their research-export tensor values and precision. Weight checksums match the source exports, and evaluation hit counts match the paper. The runtime passes 33 unit/tiny-model tests, including dense/MoE readout parity, training resume, checkpoint export and selective subfolder loading. Full-scale CUDA inference and H200 latency were not rerun on the packaging host, which has no working NVIDIA driver. + +The repository retains its existing **MIT** license metadata. Upstream VideoJEV/Qwen licenses and notices remain included in each model directory as `UPSTREAM_LICENSE` and `UPSTREAM_NOTICE`; runtime dependencies and the bundled font retain their own terms. See the individual model cards for details. + +[Research code](https://github.com/tiankanghui/PixleOne) · [Paper PDF](https://github.com/tiankanghui/PixleOne/blob/main/docs/PixelOne.pdf) + +PixelOne predicts coordinates only. Applications should validate actions and enforce user permissions before executing clicks. diff --git a/assets/teaser.png b/assets/teaser.png new file mode 100644 index 0000000000000000000000000000000000000000..31e97c4136203f739a1bd613f733eb0e35f68087 --- /dev/null +++ b/assets/teaser.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:37418b3ecf2cdc8bb0aff3836e70651e245a70c5daacd8de8463b198cf3e418a +size 167364