Run this model with HF Jobs
Run solnoman/PerceptronAI on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/solnoman/PerceptronAI. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/solnoman/PerceptronAI on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/solnoman/PerceptronAI. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/solnoman/PerceptronAI. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
Instructions to use solnoman/PerceptronAI with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use solnoman/PerceptronAI with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="solnoman/PerceptronAI", trust_remote_code=True) messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("solnoman/PerceptronAI", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use solnoman/PerceptronAI with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "solnoman/PerceptronAI" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "solnoman/PerceptronAI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/solnoman/PerceptronAI
- SGLang
How to use solnoman/PerceptronAI with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "solnoman/PerceptronAI" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "solnoman/PerceptronAI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "solnoman/PerceptronAI" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "solnoman/PerceptronAI", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use solnoman/PerceptronAI with Docker Model Runner:
docker model run hf.co/solnoman/PerceptronAI
Upload 17 files
Browse filesFiles changed (17)
- LICENSE.txtAdded+79
- README.mdAdded+66
- added_tokens.jsonAdded+28
- chat_template.jinjaAdded+89
- config.jsonAdded+89
- generation_config.jsonAdded+6
- merges.txtAdded
- model-00001-of-00003.safetensorsAdded+3
- model-00002-of-00003.safetensorsAdded+3
- model-00003-of-00003.safetensorsAdded+3
- model.safetensors.index.jsonAdded+758
- modular_isaac.pyAdded+1626
- preprocessor_config.jsonAdded+10
- processor_config.jsonAdded+209
- special_tokens_map.jsonAdded+31
- tokenizer_config.jsonAdded+243
- vocab.jsonAdded
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879# Perceptron, Inc. Non-Production License
## 1. Scope and acceptance
**1.1. Scope of the Agreement.**This Agreement applies to any use, modification, or Distribution of any Perceptron Model by You, regardless of the source You obtained a copy of such Perceptron Model.
**1.2. Acceptance.** By accessing, using, modifying, Distributing a Perceptron Model, or by creating, using or distributing a Derivative of the Perceptron Model, You agree to be bound by this Agreement.
**1.3. Acceptance on behalf of a third-party.** If You accept this Agreement on behalf of Your employer or another person or entity, You warrant and represent that You have the authority to act and accept this Agreement on their behalf. In such a case, the word “You” in this Agreement will refer to Your employer or such other person or entity.
## 2. License **2.1. Grant of rights.** Subject to Section 3 below, Perceptron, Inc. hereby grants You a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable, limited license to use, copy, modify, and Distribute under the conditions provided in Section 2.2 below, the Perceptron Model and any Derivatives made by or for Perceptron, Inc. and to create Derivatives of the Perceptron Model.
**2.2. Distribution of Perceptron Model and Derivatives made by or for Perceptron, Inc..** Subject to Section 3 below, You may Distribute copies of the Perceptron Model and/or Derivatives made by or for Perceptron, Inc., under the following conditions: - You must make available a copy of this Agreement to third-party recipients of the Perceptron Models and/or Derivatives made by or for Perceptron, Inc. you Distribute, it being specified that any rights to use the Perceptron Models and/or Derivatives made by or for Perceptron, Inc. shall be directly granted by Perceptron, Inc. to said third-party recipients pursuant to the Perceptron, Inc. Non-Production License agreement executed between these parties; - You must retain in all copies of the Perceptron Models the following attribution notice within a “Notice” text file distributed as part of such copies: “Licensed by Perceptron, Inc. under the Perceptron, Inc. Non-Production License”.
**2.3. Distribution of Derivatives made by or for You.** Subject to Section 3 below, You may Distribute any Derivatives made by or for You under additional or different terms and conditions, provided that:- In any event, the use and modification of Perceptron Model and/or Derivatives made by or for Perceptron, Inc. shall remain governed by the terms and conditions of this Agreement;- You include in any such Derivatives made by or for You prominent notices stating that You modified the concerned Perceptron Model; and- Any terms and conditions You impose on any third-party recipients relating to Derivatives made by or for You shall neither limit such third-party recipients’ use of the Perceptron Model or any Derivatives made by or for Perceptron, Inc. in accordance with the Perceptron, Inc. Non-Production License nor conflict with any of its terms and conditions.
## 3. Limitations**3.1. Misrepresentation.** You must not misrepresent or imply, through any means, that the Derivatives made by or for You and/or any modified version of the Perceptron Model You Distribute under your name and responsibility is an official product of Perceptron, Inc. or has been endorsed, approved or validated by Perceptron, Inc., unless You are authorized by Us to do so in writing.
**3.2. Usage Limitation**- You shall only use the Perceptron Models and Derivatives (whether or not created by Perceptron, Inc.) for testing, research, Personal, or evaluation purposes in Non-Production Environments; - Subject to the foregoing, You shall not supply the Perceptron Models or Derivatives in the course of a commercial activity, whether in return for payment or free of charge, in any medium or form, including but not limited to through a hosted or managed service (e.g. SaaS, cloud instances, etc.), or behind a software layer. **3.3. Usage not permitted under this Agreement.** If You want to use a Perceptron Model or a Derivative for any purpose that is not expressly authorized under this Agreement, You must request a license from Perceptron, Inc., which Perceptron, Inc. may grant to You in Perceptron, Inc.’s sole discretion. Please contact Perceptron, Inc. at the following e-mail address if You want to discuss such a license: sales@perceptron.inc
## 4. Intellectual Property**4.1. Trademarks.** No trademark licenses are granted under this Agreement, and in connection with the Perceptron Models, You may not use any name or mark owned by or associated with Perceptron, Inc. or any of its affiliates, except (i) as required for reasonable and customary use in describing and Distributing the Perceptron Models and Derivatives made by or for Perceptron, Inc. and (ii) for attribution purposes as required by this Agreement.
**4.2. Outputs.** We claim no ownership rights in and to the Outputs. You are solely responsible for the Outputs You generate and their subsequent uses in accordance with this Agreement.
**4.3. Derivatives.** By entering into this Agreement, You accept that any Derivatives that You may create or that may be created for You shall be subject to the restrictions set out in Section 3 of this Agreement.
# 5. Liability**5.1. Limitation of liability.** In no event, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall Perceptron, Inc. be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this Agreement or out of the use or inability to use the Perceptron Models and Derivatives (including but not limited to damages for loss of data, loss of goodwill, loss of expected profit or savings, work stoppage, computer failure or malfunction, or any damage caused by malware or security breaches), even if Perceptron, Inc. has been advised of the possibility of such damages.
**5.2. Indemnification.** You agree to indemnify and hold harmless Perceptron, Inc. from and against any claims, damages, or losses arising out of or related to Your use or Distribution of the Perceptron Models and Derivatives.
## 6. Warranty**6.1. Disclaimer.** Unless required by applicable law or agreed to in writing, Perceptron, Inc. provides the Perceptron Models and Derivatives 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. Perceptron, Inc. does not represent nor warrant that the Perceptron Models and Derivatives will be error-free, meet Your or any third party’s requirements, be secure or will allow You or any third party to achieve any kind of result or generate any kind of content. You are solely responsible for determining the appropriateness of using or Distributing the Perceptron Models and Derivatives and assume any risks associated with Your exercise of rights under this Agreement.
# 7. Termination**7.1. Term.** This Agreement is effective as of the date of your acceptance of this Agreement or access to the concerned Perceptron Models or Derivatives and will continue until terminated in accordance with the following terms.
**7.2. Termination.** Perceptron, Inc. may terminate this Agreement at any time if You are in breach of this Agreement. Upon termination of this Agreement, You must cease to use all Perceptron Models and Derivatives and shall permanently delete any copy thereof. Sections 5, 6, 7 and 8 shall survive the termination of this Agreement.
**7.3. Litigation.** If You initiate any legal action or proceedings against Us or any other entity (including a cross-claim or counterclaim in a lawsuit), alleging that the Model or a Derivative, or any part thereof, infringe upon intellectual property or other rights owned or licensable by You, then any licenses granted to You under this Agreement will immediately terminate as of the date such legal action or claim is filed or initiated.
# 8. General provisions8.1. Governing Law. This Agreement will be governed by and construed in accordance with the laws of the State of Washington, without regard to its conflict of law principles.
8.2. Jurisdiction. The state and federal courts located in King County, Washington shall have exclusive jurisdiction over any dispute arising out of or relating to this Agreement, and You and We consent to personal jurisdiction and venue in such courts.
**8.3. Severability.** If any provision of this Agreement is held to be invalid, illegal or unenforceable, the remaining provisions shall be unaffected thereby and remain valid as if such provision had not been set forth herein.
# 9. Definitions **“Agreement”**: means this Perceptron, Inc. Non-Production License agreement governing the access, use, and Distribution of the Perceptron Models and Derivatives.
**“Derivative”**: means any (i) modified version of the Perceptron Model (including but not limited to any customized or fine-tuned version thereof), (ii) work based on the Perceptron Model, or (iii) any other derivative work thereof. For the avoidance of doubt, Outputs are not considered as Derivatives under this Agreement.
**“Distribution”**, **“Distributing”**, **“Distribute”** or **“Distributed”**: means providing or making available, by any means, a copy of the Perceptron Models and/or the Derivatives as the case may be, subject to Section 3 of this Agreement.
**“Perceptron, Inc.”**, **“We”** or **“Us”**: means Perceptron, Inc., a Delaware corporation with its principal place of business at 10900 NE 8th St Suite 613, Bellevue, WA 98004.
**“Perceptron Model”**: means the foundational large language model(s), and its elements which include algorithms, software, instructed checkpoints, parameters, source code (inference code, evaluation code and, if applicable, fine-tuning code) and any other elements associated thereto made available by Perceptron, Inc. under this Agreement, including, if any, the technical documentation, manuals and instructions for the use and operation thereof.
**“Non-Production Environment”**: means any setting, use case, or application of the Perceptron Models or Derivatives that expressly excludes live, real-world conditions, commercial operations, revenue-generating activities, or direct interactions with or impacts on end users (such as, for instance, Your employees or customers). Non-Production Environment may include, but is not limited to, any setting, use case, or application for research, development, testing, quality assurance, training, internal evaluation (other than any internal usage by employees in the context of the company’s business activities), and demonstration purposes.
**“Outputs”**: means any content generated by the operation of the Perceptron Models or the Derivatives from a prompt (i.e., text instructions) provided by users. For the avoidance of doubt, Outputs do not include any components of a Perceptron Models, such as any fine-tuned versions of the Perceptron Models, the weights, or parameters.
**“Personal”**: means any use of a Perceptron Model or a Derivative that is (i) solely for personal, non-profit and non-commercial purposes and (ii) not directly or indirectly connected to any commercial activities, business operations, or employment responsibilities. For illustration purposes, Personal use of a Model or a Derivative does not include any usage by individuals employed in companies in the context of their daily tasks, any activity that is intended to generate revenue, or that is performed on behalf of a commercial entity.
**“You”**: means the individual or entity entering into this Agreement with Perceptron, Inc..123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566---
license: cc-by-nc-4.0
base_model:
- Qwen/Qwen3-1.7B
- google/siglip2-so400m-patch14-384
library_name: transformers
tags:
- perceptron
- issac-0.1
---
# [Isaac-0.1 by Perceptron](https://www.perceptron.inc/blog/introducing-isaac-0-1)*Note this is the Post-trained model* [Try out the model on our playground](https://www.perceptron.inc/demo)
We're introducing Isaac 0.1, our first perceptive-language model and a major step toward building AI systems that can understand and interact with the physical world. Isaac 0.1 is an open-source, 2B-parameter model built for real-world applications. It sets a new standard for efficiency, delivering capabilities that meet or exceed those of models over 50 times its size.
Founded by the team behind Meta's Chameleon multimodal models, Perceptron is tackling a fundamental challenge: bringing the power of physical AI to the dynamic, multimodal, and real-time environments we live and work in.
Isaac 0.1 is the first in our family of models built to be the intelligence layer for the physical world. It's now available open source for researchers and developers everywhere.
## What’s new in Isaac 0.1**Visual QA, simply trained**Strong results on standard understanding benchmarks with a straightforward, reproducible training recipe.
**Grounded spatial intelligence**Precise pointing and localization with robust spatial reasoning. Ask “what’s broken in this machine?” and get grounded answers with highlighted regions—handling occlusions, relationships, and object interactions.
**In-context learning for perception**Show a few annotated examples (defects, safety conditions, etc.) in the prompt and the model adapts—no YOLO-style fine-tuning or custom detector stacks required.
**OCR & fine-grained detail**Reads small text and dense scenes reliably, across resolutions, with dynamic image handling for tiny features and cluttered layouts.
**Conversational Pointing**A new interaction pattern where language and vision stay in lockstep: every claim is grounded and visually cited, reducing hallucinations and making reasoning auditable.
## Benchmarks

## Example
```bashpip install perceptron```
## Example using transformers
Learn more: [Huggingface Example Repo](https://github.com/perceptron-ai-inc/perceptron/tree/main/huggingface)
```bash!git clone https://github.com/perceptron-ai-inc/perceptron.git!cp -r perceptron/huggingface ./huggingface```
```pythonfrom transformers import AutoTokenizer, AutoConfig, AutoModelForCausalLMfrom huggingface.modular_isaac import IsaacProcessor
tokenizer = AutoTokenizer.from_pretrained("PerceptronAI/Isaac-0.1", trust_remote_code=True, use_fast=False)config = AutoConfig.from_pretrained("PerceptronAI/Isaac-0.1", trust_remote_code=True)processor = IsaacProcessor(tokenizer=tokenizer, config=config)model = AutoModelForCausalLM.from_pretrained("PerceptronAI/Isaac-0.1", trust_remote_code=True)```12345678910111213141516171819202122232425262728{ "</think>": 151668, "</tool_call>": 151658, "</tool_response>": 151666, "<think>": 151667, "<tool_call>": 151657, "<tool_response>": 151665, "<|box_end|>": 151649, "<|box_start|>": 151648, "<|endoftext|>": 151643, "<|file_sep|>": 151664, "<|fim_middle|>": 151660, "<|fim_pad|>": 151662, "<|fim_prefix|>": 151659, "<|fim_suffix|>": 151661, "<|im_end|>": 151645, "<|im_start|>": 151644, "<|image_pad|>": 151655, "<|object_ref_end|>": 151647, "<|object_ref_start|>": 151646, "<|quad_end|>": 151651, "<|quad_start|>": 151650, "<|repo_name|>": 151663, "<|video_pad|>": 151656, "<|vision_end|>": 151653, "<|vision_pad|>": 151654, "<|vision_start|>": 151652}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889{%- if tools %} {{- '<|im_start|>system\n' }} {%- if messages[0].role == 'system' %} {{- messages[0].content + '\n\n' }} {%- endif %} {{- "# Tools\n\nYou may call one or more functions to assist with the user query.\n\nYou are provided with function signatures within <tools></tools> XML tags:\n<tools>" }} {%- for tool in tools %} {{- "\n" }} {{- tool | tojson }} {%- endfor %} {{- "\n</tools>\n\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\n<tool_call>\n{\"name\": <function-name>, \"arguments\": <args-json-object>}\n</tool_call><|im_end|>\n" }}{%- else %} {%- if messages[0].role == 'system' %} {{- '<|im_start|>system\n' + messages[0].content + '<|im_end|>\n' }} {%- endif %}{%- endif %}{%- set ns = namespace(multi_step_tool=true, last_query_index=messages|length - 1) %}{%- for message in messages[::-1] %} {%- set index = (messages|length - 1) - loop.index0 %} {%- if ns.multi_step_tool and message.role == "user" and message.content is string and not(message.content.startswith('<tool_response>') and message.content.endswith('</tool_response>')) %} {%- set ns.multi_step_tool = false %} {%- set ns.last_query_index = index %} {%- endif %}{%- endfor %}{%- for message in messages %} {%- if message.content is string %} {%- set content = message.content %} {%- else %} {%- set content = '' %} {%- endif %} {%- if (message.role == "user") or (message.role == "system" and not loop.first) %} {{- '<|im_start|>' + message.role + '\n' + content + '<|im_end|>' + '\n' }} {%- elif message.role == "assistant" %} {%- set reasoning_content = '' %} {%- if message.reasoning_content is string %} {%- set reasoning_content = message.reasoning_content %} {%- else %} {%- if '</think>' in content %} {%- set reasoning_content = content.split('</think>')[0].rstrip('\n').split('<think>')[-1].lstrip('\n') %} {%- set content = content.split('</think>')[-1].lstrip('\n') %} {%- endif %} {%- endif %} {%- if loop.index0 > ns.last_query_index %} {%- if loop.last or (not loop.last and reasoning_content) %} {{- '<|im_start|>' + message.role + '\n<think>\n' + reasoning_content.strip('\n') + '\n</think>\n\n' + content.lstrip('\n') }} {%- else %} {{- '<|im_start|>' + message.role + '\n' + content }} {%- endif %} {%- else %} {{- '<|im_start|>' + message.role + '\n' + content }} {%- endif %} {%- if message.tool_calls %} {%- for tool_call in message.tool_calls %} {%- if (loop.first and content) or (not loop.first) %} {{- '\n' }} {%- endif %} {%- if tool_call.function %} {%- set tool_call = tool_call.function %} {%- endif %} {{- '<tool_call>\n{"name": "' }} {{- tool_call.name }} {{- '", "arguments": ' }} {%- if tool_call.arguments is string %} {{- tool_call.arguments }} {%- else %} {{- tool_call.arguments | tojson }} {%- endif %} {{- '}\n</tool_call>' }} {%- endfor %} {%- endif %} {{- '<|im_end|>\n' }} {%- elif message.role == "tool" %} {%- if loop.first or (messages[loop.index0 - 1].role != "tool") %} {{- '<|im_start|>user' }} {%- endif %} {{- '\n<tool_response>\n' }} {{- content }} {{- '\n</tool_response>' }} {%- if loop.last or (messages[loop.index0 + 1].role != "tool") %} {{- '<|im_end|>\n' }} {%- endif %} {%- endif %}{%- endfor %}{%- if add_generation_prompt %} {{- '<|im_start|>assistant\n' }} {%- if enable_thinking is defined and enable_thinking is false %} {{- '<think>\n\n</think>\n\n' }} {%- endif %}{%- endif %}1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889{ "architectures": [ "IsaacForConditionalGeneration" ], "attention_bias": false, "attention_dropout": 0.0, "auto_map": { "AutoConfig": "modular_isaac.IsaacConfig", "AutoModelForCausalLM": "modular_isaac.IsaacForConditionalGeneration" }, "bos_token_id": 151643, "dtype": "float32", "eos_token_id": 151645, "head_dim": 128, "hidden_act": "silu", "hidden_size": 2048, "initializer_range": 0.02, "intermediate_size": 6144, "layer_types": [ "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention" ], "max_position_embeddings": 40960, "max_sequence_length": 16384, "max_window_layers": 28, "model_type": "isaac", "num_attention_heads": 16, "num_hidden_layers": 28, "num_key_value_heads": 8, "pixel_shuffle_scale": 2, "rms_norm_eps": 1e-06, "rope_scaling": { "mrope_interleaved": true, "mrope_section": null, "rope_type": "default" }, "rope_theta": 1000000.0, "sliding_window": null, "tie_word_embeddings": false, "transformers_version": "4.56.1", "use_cache": true, "use_sliding_window": false, "video_patch_size": 16, "vision_config": { "attention_dropout": 0.0, "hidden_act": "gelu_pytorch_tanh", "hidden_size": 1152, "image_size": 256, "intermediate_size": 4304, "layer_norm_eps": 1e-06, "model_type": "pixel_shuffle_siglip2", "num_attention_heads": 16, "num_channels": 3, "num_hidden_layers": 27, "num_patches": 256, "patch_size": 16, "pixel_shuffle_scale_factor": 2 }, "vision_max_num_patches": 6144, "vision_min_num_patches": 256, "vision_token": "<image>", "vocab_size": 151936}123456{ "_from_model_config": true, "bos_token_id": 151643, "eos_token_id": 151645, "transformers_version": "4.56.1"}123version https://git-lfs.github.com/spec/v1oid sha256:c8078bf1707dacd4660adea2c98f82acf54c9a42b1ce9db682584bd932ebb39fsize 135123version https://git-lfs.github.com/spec/v1oid sha256:22d1c028ff6f0f9529830c4cf50a27882a6b10233515ea225b24d844d09ca68bsize 135123version https://git-lfs.github.com/spec/v1oid sha256:6a4707ad26a292bc01e51bc29dbcbdbb506278814e3c8675f537496024afbf7asize 135123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758{ "metadata": { "total_parameters": 2567073008, "total_size": 10268292032 }, "weight_map": { "lm_head.weight": "model-00003-of-00003.safetensors", "model.embed_tokens.weight": "model-00001-of-00003.safetensors", "model.layers.0.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.0.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.0.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.0.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.0.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.0.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.0.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.0.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.0.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.0.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.0.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.1.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.1.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.1.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.1.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.1.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.1.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.1.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.1.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.1.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.1.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.1.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.10.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.10.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.10.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.10.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.10.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.10.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.10.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.10.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.10.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.10.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.10.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.11.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.11.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.11.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.11.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.11.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.11.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.11.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.11.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.11.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.11.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.11.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.12.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.12.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.12.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.12.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.12.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.12.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.12.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.12.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.12.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.12.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.12.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.13.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.13.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.13.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.13.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.13.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.13.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.13.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.13.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.13.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.13.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.13.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.14.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.14.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.14.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.14.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.14.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.14.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.14.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.14.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.14.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.14.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.14.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.15.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.15.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.15.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.15.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.15.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.15.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.15.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.15.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.15.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.15.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.15.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.16.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.16.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.16.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.16.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.16.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.16.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.16.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.16.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.16.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.16.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.16.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.17.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.17.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.17.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.17.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.17.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.17.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.17.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.17.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.17.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.17.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.17.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.18.input_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.18.mlp.down_proj.weight": "model-00002-of-00003.safetensors", "model.layers.18.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.18.mlp.up_proj.weight": "model-00002-of-00003.safetensors", "model.layers.18.post_attention_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.18.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.18.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.18.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.18.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.18.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.18.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.19.input_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.19.mlp.down_proj.weight": "model-00002-of-00003.safetensors", "model.layers.19.mlp.gate_proj.weight": "model-00002-of-00003.safetensors", "model.layers.19.mlp.up_proj.weight": "model-00002-of-00003.safetensors", "model.layers.19.post_attention_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.19.self_attn.k_norm.weight": "model-00002-of-00003.safetensors", "model.layers.19.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.layers.19.self_attn.o_proj.weight": "model-00002-of-00003.safetensors", "model.layers.19.self_attn.q_norm.weight": "model-00002-of-00003.safetensors", "model.layers.19.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.layers.19.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.layers.2.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.2.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.2.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.2.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.2.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.2.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.2.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.2.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.2.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.2.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.2.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.20.input_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.20.mlp.down_proj.weight": "model-00002-of-00003.safetensors", "model.layers.20.mlp.gate_proj.weight": "model-00002-of-00003.safetensors", "model.layers.20.mlp.up_proj.weight": "model-00002-of-00003.safetensors", "model.layers.20.post_attention_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.20.self_attn.k_norm.weight": "model-00002-of-00003.safetensors", "model.layers.20.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.layers.20.self_attn.o_proj.weight": "model-00002-of-00003.safetensors", "model.layers.20.self_attn.q_norm.weight": "model-00002-of-00003.safetensors", "model.layers.20.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.layers.20.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.layers.21.input_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.21.mlp.down_proj.weight": "model-00002-of-00003.safetensors", "model.layers.21.mlp.gate_proj.weight": "model-00002-of-00003.safetensors", "model.layers.21.mlp.up_proj.weight": "model-00002-of-00003.safetensors", "model.layers.21.post_attention_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.21.self_attn.k_norm.weight": "model-00002-of-00003.safetensors", "model.layers.21.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.layers.21.self_attn.o_proj.weight": "model-00002-of-00003.safetensors", "model.layers.21.self_attn.q_norm.weight": "model-00002-of-00003.safetensors", "model.layers.21.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.layers.21.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.layers.22.input_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.22.mlp.down_proj.weight": "model-00002-of-00003.safetensors", "model.layers.22.mlp.gate_proj.weight": "model-00002-of-00003.safetensors", "model.layers.22.mlp.up_proj.weight": "model-00002-of-00003.safetensors", "model.layers.22.post_attention_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.22.self_attn.k_norm.weight": "model-00002-of-00003.safetensors", "model.layers.22.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.layers.22.self_attn.o_proj.weight": "model-00002-of-00003.safetensors", "model.layers.22.self_attn.q_norm.weight": "model-00002-of-00003.safetensors", "model.layers.22.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.layers.22.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.layers.23.input_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.23.mlp.down_proj.weight": "model-00002-of-00003.safetensors", "model.layers.23.mlp.gate_proj.weight": "model-00002-of-00003.safetensors", "model.layers.23.mlp.up_proj.weight": "model-00002-of-00003.safetensors", "model.layers.23.post_attention_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.23.self_attn.k_norm.weight": "model-00002-of-00003.safetensors", "model.layers.23.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.layers.23.self_attn.o_proj.weight": "model-00002-of-00003.safetensors", "model.layers.23.self_attn.q_norm.weight": "model-00002-of-00003.safetensors", "model.layers.23.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.layers.23.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.layers.24.input_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.24.mlp.down_proj.weight": "model-00002-of-00003.safetensors", "model.layers.24.mlp.gate_proj.weight": "model-00002-of-00003.safetensors", "model.layers.24.mlp.up_proj.weight": "model-00002-of-00003.safetensors", "model.layers.24.post_attention_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.24.self_attn.k_norm.weight": "model-00002-of-00003.safetensors", "model.layers.24.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.layers.24.self_attn.o_proj.weight": "model-00002-of-00003.safetensors", "model.layers.24.self_attn.q_norm.weight": "model-00002-of-00003.safetensors", "model.layers.24.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.layers.24.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.layers.25.input_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.25.mlp.down_proj.weight": "model-00002-of-00003.safetensors", "model.layers.25.mlp.gate_proj.weight": "model-00002-of-00003.safetensors", "model.layers.25.mlp.up_proj.weight": "model-00002-of-00003.safetensors", "model.layers.25.post_attention_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.25.self_attn.k_norm.weight": "model-00002-of-00003.safetensors", "model.layers.25.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.layers.25.self_attn.o_proj.weight": "model-00002-of-00003.safetensors", "model.layers.25.self_attn.q_norm.weight": "model-00002-of-00003.safetensors", "model.layers.25.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.layers.25.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.layers.26.input_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.26.mlp.down_proj.weight": "model-00002-of-00003.safetensors", "model.layers.26.mlp.gate_proj.weight": "model-00002-of-00003.safetensors", "model.layers.26.mlp.up_proj.weight": "model-00002-of-00003.safetensors", "model.layers.26.post_attention_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.26.self_attn.k_norm.weight": "model-00002-of-00003.safetensors", "model.layers.26.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.layers.26.self_attn.o_proj.weight": "model-00002-of-00003.safetensors", "model.layers.26.self_attn.q_norm.weight": "model-00002-of-00003.safetensors", "model.layers.26.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.layers.26.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.layers.27.input_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.27.mlp.down_proj.weight": "model-00002-of-00003.safetensors", "model.layers.27.mlp.gate_proj.weight": "model-00002-of-00003.safetensors", "model.layers.27.mlp.up_proj.weight": "model-00002-of-00003.safetensors", "model.layers.27.post_attention_layernorm.weight": "model-00002-of-00003.safetensors", "model.layers.27.self_attn.k_norm.weight": "model-00002-of-00003.safetensors", "model.layers.27.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.layers.27.self_attn.o_proj.weight": "model-00002-of-00003.safetensors", "model.layers.27.self_attn.q_norm.weight": "model-00002-of-00003.safetensors", "model.layers.27.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.layers.27.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.layers.3.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.3.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.3.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.3.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.3.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.3.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.3.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.3.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.3.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.3.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.3.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.4.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.4.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.4.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.4.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.4.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.4.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.4.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.4.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.4.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.4.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.4.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.5.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.5.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.5.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.5.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.5.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.5.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.5.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.5.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.5.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.5.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.5.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.6.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.6.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.6.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.6.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.6.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.6.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.6.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.6.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.6.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.6.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.6.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.7.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.7.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.7.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.7.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.7.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.7.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.7.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.7.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.7.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.7.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.7.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.8.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.8.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.8.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.8.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.8.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.8.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.8.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.8.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.8.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.8.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.8.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.layers.9.input_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.9.mlp.down_proj.weight": "model-00001-of-00003.safetensors", "model.layers.9.mlp.gate_proj.weight": "model-00001-of-00003.safetensors", "model.layers.9.mlp.up_proj.weight": "model-00001-of-00003.safetensors", "model.layers.9.post_attention_layernorm.weight": "model-00001-of-00003.safetensors", "model.layers.9.self_attn.k_norm.weight": "model-00001-of-00003.safetensors", "model.layers.9.self_attn.k_proj.weight": "model-00001-of-00003.safetensors", "model.layers.9.self_attn.o_proj.weight": "model-00001-of-00003.safetensors", "model.layers.9.self_attn.q_norm.weight": "model-00001-of-00003.safetensors", "model.layers.9.self_attn.q_proj.weight": "model-00001-of-00003.safetensors", "model.layers.9.self_attn.v_proj.weight": "model-00001-of-00003.safetensors", "model.norm.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.embeddings.patch_embedding.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.embeddings.patch_embedding.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.embeddings.position_embedding.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.0.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.1.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.10.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.11.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.12.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.13.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.14.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.15.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.16.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.17.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.18.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.19.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.2.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.20.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.21.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.22.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.23.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.24.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.25.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.26.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.3.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.4.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.5.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.6.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.7.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.8.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.layer_norm1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.layer_norm1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.layer_norm2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.layer_norm2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.mlp.fc1.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.mlp.fc1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.mlp.fc2.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.mlp.fc2.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.self_attn.k_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.self_attn.k_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.self_attn.out_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.self_attn.out_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.self_attn.q_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.self_attn.q_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.self_attn.v_proj.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.encoder.layers.9.self_attn.v_proj.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.0.post_layernorm.bias": "model-00002-of-00003.safetensors", "model.vision_embedding.0.post_layernorm.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.1.weight": "model-00002-of-00003.safetensors", "model.vision_embedding.3.weight": "model-00002-of-00003.safetensors" }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626from __future__ import annotations
from collections import defaultdictfrom typing import Any, Union, TypedDict
import mathimport numpy as npimport torchimport torch.nn as nnimport torch.nn.functional as Fimport PIL.Image
from transformers import ( AutoTokenizer, BatchFeature, Cache, Qwen3Config, Qwen3ForCausalLM, Qwen3PreTrainedModel,)from transformers.cache_utils import SlidingWindowCache, StaticCachefrom transformers.generation.utils import GenerationMixinfrom transformers.modeling_outputs import BaseModelOutputWithPast, CausalLMOutputWithPastfrom transformers.models.qwen3.modeling_qwen3 import Qwen3DecoderLayer, Qwen3Modelfrom transformers.models.qwen2.tokenization_qwen2 import Qwen2Tokenizerfrom transformers.processing_utils import ProcessorMixinfrom transformers.tokenization_utils import TensorTypefrom transformers.modeling_attn_mask_utils import AttentionMaskConverterimport re
from transformers.models.siglip2.modeling_siglip2 import ( Siglip2MLP,)from transformers.models.siglip2.configuration_siglip2 import Siglip2VisionConfigfrom perceptron.tensorstream import ( Event, Stream, TensorStream, TextType, VisionType, create_stream, group_streams,)from perceptron.tensorstream.ops import ( compute_mrope_pos_tensor, modality_mask, reconstruct_tensor_stream_from_compact_dict, slice as ts_slice, tensor_stream_token_view,)
class PixelShuffleSiglip2VisionConfig(Siglip2VisionConfig): """Vision configuration for Isaac with Pixel Shuffle support.
Extends Siglip2VisionConfig with additional fields for pixel shuffle. """
model_type = "pixel_shuffle_siglip2" base_config_key = "vision_config"
def __init__( self, pixel_shuffle_scale_factor: int = 1, num_patches: int = 256, **kwargs, ): super().__init__(**kwargs)
# Add our custom fields self.pixel_shuffle_scale_factor = pixel_shuffle_scale_factor self.num_patches = num_patches
def create_cumulative_seq_lengths(seq_sizes: torch.Tensor, device: torch.device) -> tuple[torch.Tensor, int]: """Create cumulative sequence lengths for variable-length attention.""" cu_seqlens = torch.zeros(len(seq_sizes) + 1, dtype=torch.int32, device=device) cu_seqlens[1:] = seq_sizes.cumsum(0) max_seqlen = int(seq_sizes.max().item()) if len(seq_sizes) > 0 else 0 return cu_seqlens, max_seqlen
class Siglip2VariableSequenceEmbeddings(nn.Module): def __init__(self, config: PixelShuffleSiglip2VisionConfig): super().__init__() self.config = config self.embed_dim = config.hidden_size self.patch_size = config.patch_size
self.patch_embedding = nn.Linear( in_features=config.num_channels * self.patch_size * self.patch_size, out_features=self.embed_dim, )
self.num_patches = config.num_patches self.position_embedding_size = int(self.num_patches**0.5) self.position_embedding = nn.Embedding(self.num_patches, self.embed_dim)
def positional_embeddings( self, packed_seq_patches: tuple[torch.Tensor, torch.Tensor, torch.Tensor] ) -> torch.Tensor: # Prepare positional embeddings grid: (1, embed_dim, h, w) positional_embeddings = ( self.position_embedding.weight.reshape(self.position_embedding_size, self.position_embedding_size, -1) .permute(2, 0, 1) .unsqueeze(0) )
_seq_patches, _seq_sizes, spatial_shapes = packed_seq_patches pos_embeds_list = [] mode = "bilinear" align_corners = False antialias = True for spatial_shape in spatial_shapes: height, width = spatial_shape # Guard to ensure height and width are positive for torch.compile if height > 0 and width > 0: resized_pos_embed = F.interpolate( positional_embeddings, size=(height, width), mode=mode, align_corners=align_corners, antialias=antialias, ) # Reshape from (1, embed_dim, height, width) to (height*width, embed_dim) resized_pos_embed = resized_pos_embed.reshape(self.embed_dim, height * width).transpose(0, 1) else: # Fallback - should never happen in practice resized_pos_embed = positional_embeddings.reshape( self.embed_dim, self.position_embedding_size * self.position_embedding_size ).transpose(0, 1)[: height * width] pos_embeds_list.append(resized_pos_embed)
# Concatenate all positional embeddings along the sequence dimension pos_embeds = torch.cat(pos_embeds_list, dim=0) return pos_embeds
def forward(self, packed_seq_patches: tuple[torch.Tensor, torch.Tensor, torch.Tensor]): seq_patches, _seq_sizes, _spatial_shapes = packed_seq_patches
# Apply patch embeddings target_dtype = self.patch_embedding.weight.dtype patch_embeds = self.patch_embedding(seq_patches.to(dtype=target_dtype)) pos_embeds = self.positional_embeddings(packed_seq_patches)
# Add positional embeddings to patch embeddings embeddings = patch_embeds + pos_embeds return embeddings
class Siglip2VariableLengthAttention(nn.Module): """Custom attention that supports variable-length sequences with flash attention."""
def __init__(self, config): super().__init__() self.config = config self.embed_dim = config.hidden_size self.num_heads = config.num_attention_heads self.head_dim = self.embed_dim // self.num_heads if self.head_dim * self.num_heads != self.embed_dim: raise ValueError( f"embed_dim must be divisible by num_heads (got `embed_dim`: {self.embed_dim} and `num_heads`:" f" {self.num_heads})." ) self.scale = self.head_dim**-0.5 self.dropout = config.attention_dropout
self.k_proj = nn.Linear(self.embed_dim, self.embed_dim) self.v_proj = nn.Linear(self.embed_dim, self.embed_dim) self.q_proj = nn.Linear(self.embed_dim, self.embed_dim) self.out_proj = nn.Linear(self.embed_dim, self.embed_dim)
def forward(self, hidden_states, cu_seqlens=None, max_seqlen=None): batch_size, seq_len, _ = hidden_states.size()
# For variable-length attention, we need to reshape to (total_tokens, embed_dim) if batch_size != 1: raise ValueError("Variable-length attention expects batch_size=1 for packed sequences") hidden_states = hidden_states.squeeze(0) # Remove batch dimension: (seq_len, embed_dim)
# Store original dtype orig_dtype = hidden_states.dtype
# 1. Linear projections Q = self.q_proj(hidden_states) # (seq_len, embed_dim) K = self.k_proj(hidden_states) # (seq_len, embed_dim) V = self.v_proj(hidden_states) # (seq_len, embed_dim)
# 2. Reshape for multi-head attention: (seq_len, n_heads, head_dim) Q = Q.view(-1, self.num_heads, self.embed_dim // self.num_heads) K = K.view(-1, self.num_heads, self.embed_dim // self.num_heads) V = V.view(-1, self.num_heads, self.embed_dim // self.num_heads)
# 3. Apply variable-length attention using flash attention attn_output, _, _, _, _ = torch.ops.aten._flash_attention_forward( query=Q, key=K, value=V, cum_seq_q=cu_seqlens, cum_seq_k=cu_seqlens, max_q=max_seqlen, max_k=max_seqlen, dropout_p=self.dropout if self.training else 0.0, is_causal=False, return_debug_mask=False, scale=self.scale, window_size_left=-1, window_size_right=-1, alibi_slopes=None, )
# 4. Reshape attention output from (seq_len, n_heads, head_dim) to (seq_len, embed_dim) attn_output = attn_output.reshape(seq_len, self.embed_dim)
# 5. Convert back to original dtype if needed if attn_output.dtype != orig_dtype: attn_output = attn_output.to(orig_dtype)
# 6. Project output attn_output = self.out_proj(attn_output) # (seq_len, embed_dim)
# 7. Add back batch dimension for compatibility attn_output = attn_output.unsqueeze(0) # (1, seq_len, embed_dim)
return attn_output, None
class IsaacSiglip2EncoderLayer(nn.Module): """Siglip2 encoder layer with variable-length attention."""
def __init__(self, config: PixelShuffleSiglip2VisionConfig): super().__init__() self.embed_dim = config.hidden_size self.self_attn = Siglip2VariableLengthAttention(config)
self.layer_norm1 = nn.LayerNorm(self.embed_dim, eps=config.layer_norm_eps) self.mlp = Siglip2MLP(config) # Use HF's Siglip2MLP self.layer_norm2 = nn.LayerNorm(self.embed_dim, eps=config.layer_norm_eps)
def forward( self, hidden_states: torch.Tensor, cu_seqlens: torch.Tensor = None, max_seqlen: int = None, ) -> tuple[torch.FloatTensor]: residual = hidden_states
hidden_states = self.layer_norm1(hidden_states)
hidden_states, attn_weights = self.self_attn( hidden_states=hidden_states, cu_seqlens=cu_seqlens, max_seqlen=max_seqlen, )
hidden_states = residual + hidden_states
residual = hidden_states hidden_states = self.layer_norm2(hidden_states) hidden_states = self.mlp(hidden_states) hidden_states = residual + hidden_states
return (hidden_states,)
class IsaacEncoder(nn.Module): """Encoder using Isaac encoder layers with variable-length attention support."""
def __init__(self, config: PixelShuffleSiglip2VisionConfig): super().__init__() self.config = config self.layers = nn.ModuleList([IsaacSiglip2EncoderLayer(config) for _ in range(config.num_hidden_layers)])
def forward( self, inputs_embeds, cu_seqlens: torch.Tensor | None = None, max_seqlen: int | None = None, output_hidden_states: bool = False, ): all_hidden_states = () if output_hidden_states else None
hidden_states = inputs_embeds
for encoder_layer in self.layers: if output_hidden_states: all_hidden_states = all_hidden_states + (hidden_states,)
layer_outputs = encoder_layer( hidden_states, cu_seqlens, max_seqlen, )
hidden_states = layer_outputs[0]
if output_hidden_states: all_hidden_states = all_hidden_states + (hidden_states,)
return hidden_states, all_hidden_states, None
def create_pixel_shuffle_index_map( seq_sizes: torch.Tensor, token_grids: torch.Tensor, scale_factor: int = 1, device: torch.device | None = None,) -> torch.Tensor: """ Build a gather-index map that tells us, for every *output* token after pixel-shuffle, which `scale_factor**2` *input* tokens are being merged.
Args ---- seq_sizes : (num_images,) - #patches in each image (row-major order) token_grids : (num_images,2) - (height, width) for every image scale_factor : spatial down-scale factor (≥2) device : (optional) overrides `seq_sizes.device`
Returns ------- gather_idx : (new_total_seq_len, scale_factor**2) int64 tensor. gather_idx[i, j] is the *flat* index into the *original* packed sequence for the j-th sub-patch that forms the i-th output token. """ if device is None: device = seq_sizes.device
r = int(scale_factor) if r < 2: raise ValueError("`scale_factor` must be ≥ 2")
# Safety: all spatial dims must be divisible by r # Cannot run under torch compile fullgraph mode hence if not torch.compiler.is_compiling(): if not ((token_grids[:, 0] % r == 0).all() and (token_grids[:, 1] % r == 0).all()): raise AssertionError( f"Every (H,W) in `token_grids` must be divisible by scale_factor={r}, got {token_grids.tolist()}" )
gather_chunks: list[torch.Tensor] = [] tok_offset = 0
for seq_len, (h, w) in zip(seq_sizes.tolist(), token_grids.tolist(), strict=False): # Build the (H, W) grid of flat indices for this image grid = torch.arange(seq_len, device=device, dtype=torch.int64) + tok_offset grid = grid.view(h, w) # (H, W)
# -------- identical ordering to your fixed-res routine -------- # Step 1: split width into blocks of r grid = grid.view(h, w // r, r) # (H, W/r, r) # Step 2: now split height into blocks of r grid = grid.view(h // r, r, w // r, r) # (H/r, r, W/r, r) # Step 3: final permutation to (H/r, W/r, r, r) grid = grid.permute(0, 2, 1, 3).contiguous() # (H/r, W/r, r, r) # Step 4: each (r, r) block forms one output token gather_chunks.append(grid.reshape(-1, r * r)) # (H*W / r², r²)
tok_offset += seq_len
# Concatenate over all images in the packed batch gather_idx = torch.cat(gather_chunks, dim=0) # (Σ_i HᵢWᵢ/r², r²) return gather_idx
def pixel_shuffle_varlen( x: torch.Tensor, token_grids: torch.Tensor, scale_factor: int = 1,) -> torch.Tensor: r"""Apply pixel shuffle to a packed vision sequence without unpacking per image.
Args: x (`torch.Tensor`): Concatenated vision embeddings. Accepts `(seq_len, hidden_size)` or `(1, seq_len, hidden_size)` shapes produced by stacking image patches. token_grids (`torch.Tensor`): Integer tensor of shape `(num_images, 2)` whose rows give the `(height, width)` patch grid sizes corresponding to each image segment inside `x`. scale_factor (`int`, *optional*, defaults to 1): Spatial down-sampling factor specific to pixel shuffle. Values greater than one merge `scale_factor**2` neighboring patches into a single embedding channel-group.
Returns: `torch.Tensor`: Pixel-shuffled embeddings with shape matching the input convention: `(seq_len, hidden_size * scale_factor**2)` when the input was 2D, or `(1, seq_len, hidden_size * scale_factor**2)` if the singleton batch dimension was present.
Raises: ValueError: If more than one batch item is provided. """ keep_batch_dim = x.dim() == 3 if keep_batch_dim: if x.size(0) != 1: raise AssertionError("Packed sequence is expected to have batch_size == 1") x_ = x.squeeze(0) # (seq, embed) else: x_ = x # (seq, embed)
embed_dim = x_.size(-1) r = int(scale_factor)
# Calculate seq_sizes from token_grids seq_sizes = torch.prod(token_grids, dim=-1)
# Build index map and gather in one go gather_idx = create_pixel_shuffle_index_map( seq_sizes=seq_sizes, token_grids=token_grids, scale_factor=r, device=x_.device, ) # (new_seq, r²)
# Gather → (new_seq, r², embed_dim) gathered = x_[gather_idx] # fancy indexing keeps gradient
# Merge the r² group dimension into channels to finish the shuffle out = gathered.reshape(gathered.size(0), embed_dim * r * r)
# Restore batch dimension if needed if keep_batch_dim: out = out.unsqueeze(0) return out
class Siglip2SequenceVisionTransformer(nn.Module): def __init__(self, config: PixelShuffleSiglip2VisionConfig): super().__init__() self.config = config self.embeddings = Siglip2VariableSequenceEmbeddings(config) self.encoder = IsaacEncoder(config) self.post_layernorm = nn.LayerNorm(config.hidden_size, eps=config.layer_norm_eps) self.pixel_shuffle_scale_factor = config.pixel_shuffle_scale_factor
def forward(self, packed_seq_patches: tuple[torch.Tensor, torch.Tensor]): seq_patches, token_grids = packed_seq_patches seq_sizes = torch.prod(token_grids, dim=-1)
# Get embeddings from packed sequence hidden_states = self.embeddings((seq_patches, seq_sizes, token_grids))
# Add a pseudo batch dimension for the encoder hidden_states = hidden_states.unsqueeze(0)
# Generate cumulative sequence lengths for variable-length attention cu_seqlens, max_seqlen = create_cumulative_seq_lengths(seq_sizes, hidden_states.device)
# Pass through encoder with variable-length attention parameters hidden_states, _, _ = self.encoder( inputs_embeds=hidden_states, cu_seqlens=cu_seqlens, max_seqlen=max_seqlen, )
# Apply final layer normalization hidden_states = self.post_layernorm(hidden_states)
if self.pixel_shuffle_scale_factor > 1: hidden_states = pixel_shuffle_varlen( x=hidden_states, token_grids=token_grids, scale_factor=self.pixel_shuffle_scale_factor, ) # Remove the pseudo batch dimension we added earlier hidden_states = hidden_states.squeeze(0)
# Return the full sequence of embeddings return hidden_states
# ============================================================================# Configuration# ============================================================================
MAX_PIXELS = 60_000_000 # 60‑megapixel ceiling ≈ 8200 × 7300 px
# Vision preprocessing constantsVISION_MEAN = (0.5, 0.5, 0.5)VISION_STD = (0.5, 0.5, 0.5)VISION_SCALE = 1 / 255
def _make_writeable(arr: np.ndarray) -> np.ndarray: """Return *arr* itself if it is already writeable, otherwise try to flip the write flag in-place and finally fall back to `arr.copy()`. This guarantees the buffer handed to `torch.from_numpy()` is always writeable, silencing the PyTorch warning about undefined behaviour. """ if arr.flags.writeable: return arr
# First, try the cheap path — in‑place flag toggle (works for mmap'd arrays # and some shared memory buffers): try: arr.setflags(write=True) return arr # success: no data copy except ValueError: # Buffer is inherently read‑only (e.g. backed by PyAV / PIL): make copy return arr.copy()
def extract_image_pil(image: PIL.Image.Image) -> torch.Tensor | None: if image.width * image.height > MAX_PIXELS: raise ValueError(f"Image (w={image.width}, h={image.height}) > MAX=`{MAX_PIXELS}`") img = image if image.mode == "RGB" else image.convert("RGB") arr = np.asarray(img) arr = _make_writeable(arr) return torch.from_numpy(arr)
def get_image_size_for_max_num_patches( image_height: int, image_width: int, patch_size: int, max_num_patches: int, min_num_patches: int | None = None, eps: float = 1e-5, pixel_shuffle_scale: int = 1,) -> tuple[int, int]: r"""Compute a target resolution whose patch grid satisfies patching parametrization.
Args: image_height (`int`): Height in pixels of the source image prior to any resizing. image_width (`int`): Width in pixels of the source image prior to any resizing. patch_size (`int`): Size of the square patch used by the vision encoder. max_num_patches (`int`): Upper bound on `(height / patch_size) * (width / patch_size)` after resizing. min_num_patches (`int`, *optional*): Lower bound on the number of patches. When provided the image will be scaled up if necessary. eps (`float`, *optional*, defaults to 1e-5): Convergence tolerance for the internal binary search to determing the target dimensions. pixel_shuffle_scale (`int`, *optional*, defaults to 1): Additional stride multiplier applied when pixel shuffle later reduces spatial resolution.
Returns: `tuple[int, int]`: Height and width (in pixels) that are multiples of `patch_size * pixel_shuffle_scale` and respect both the maximum and optional minimum patch-count constraints. """
def get_scaled_image_size(scale, original_size, patch_size, pixel_shuffle_scale): scaled_size = scale * original_size divisor = patch_size * pixel_shuffle_scale scaled_size = math.ceil(scaled_size / divisor) * divisor scaled_size = max(divisor, scaled_size) return int(scaled_size)
# Ensure divisibility divisor = patch_size * pixel_shuffle_scale adjusted_height = math.ceil(image_height / divisor) * divisor adjusted_height = max(divisor, adjusted_height) adjusted_width = math.ceil(image_width / divisor) * divisor adjusted_width = max(divisor, adjusted_width)
num_patches = (adjusted_height / patch_size) * (adjusted_width / patch_size)
if min_num_patches is not None and num_patches < min_num_patches: # Scale up scale_min, scale_max = 1.0, 100.0 while (scale_max - scale_min) >= eps: scale = (scale_min + scale_max) / 2 target_height = get_scaled_image_size(scale, image_height, patch_size, pixel_shuffle_scale) target_width = get_scaled_image_size(scale, image_width, patch_size, pixel_shuffle_scale) num_patches = (target_height / patch_size) * (target_width / patch_size) if num_patches >= min_num_patches: scale_max = scale else: scale_min = scale scale = scale_max target_height = get_scaled_image_size(scale, image_height, patch_size, pixel_shuffle_scale) target_width = get_scaled_image_size(scale, image_width, patch_size, pixel_shuffle_scale) return target_height, target_width elif num_patches <= max_num_patches: return adjusted_height, adjusted_width else: # Scale down scale_min, scale_max = eps / 10, 1.0 while (scale_max - scale_min) >= eps: scale = (scale_min + scale_max) / 2 target_height = get_scaled_image_size(scale, image_height, patch_size, pixel_shuffle_scale) target_width = get_scaled_image_size(scale, image_width, patch_size, pixel_shuffle_scale) num_patches = (target_height / patch_size) * (target_width / patch_size) if num_patches <= max_num_patches: scale_min = scale else: scale_max = scale scale = scale_min target_height = get_scaled_image_size(scale, image_height, patch_size, pixel_shuffle_scale) target_width = get_scaled_image_size(scale, image_width, patch_size, pixel_shuffle_scale) return target_height, target_width
_MEAN_TENSOR = torch.tensor(VISION_MEAN, dtype=torch.float32).view(1, 1, 1, -1)_STD_TENSOR = torch.tensor(VISION_STD, dtype=torch.float32).view(1, 1, 1, -1)
def prepare_image_tensor( image: torch.Tensor, scale: float = VISION_SCALE,) -> torch.Tensor: r"""Standardize RGB images prior to patch extraction via rescaling and whitening.
Args: image (`torch.Tensor`): Tensor with shape `(..., height, width, 3)` containing RGB values. The tensor is converted to floating point if needed. scale (`float`, *optional*, defaults to `VISION_SCALE`): Scalar multiplier applied before normalization. Returns: `torch.Tensor`: Normalized tensor with the same shape as the input and dtype `torch.float32`. """ if not torch.is_floating_point(image): image = image.float() rescaled = image * scale
# Use precomputed tensors and move to the correct device if needed mean_tensor = _MEAN_TENSOR.to(image.device) std_tensor = _STD_TENSOR.to(image.device)
normalized = (rescaled - mean_tensor) / std_tensor return normalized
def patchify_vision(image: torch.Tensor, patch_size: int) -> torch.Tensor: r"""Convert normalized images into flattened ViT-style patches.
Args: image (`torch.Tensor`): Tensor of shape `(num_images, height, width, channels)`. patch_size (`int`): Edge length of the square patches
Returns: `torch.Tensor`: Patch tensor where each position stores the flattened pixels belonging to that patch.
Raises: ValueError: If `height` or `width` is not divisible by `patch_size`. """ num_images, height, width, channels = image.shape if height % patch_size or width % patch_size: raise ValueError(f"Dimensions of images {image.shape} are not divisible by patch_size={patch_size}.") patches = image.reshape(num_images, height // patch_size, patch_size, width // patch_size, patch_size, channels) patches = patches.permute(0, 1, 3, 2, 4, 5) patches = patches.reshape(num_images, height // patch_size, width // patch_size, channels * patch_size * patch_size) return patches
def process_vision_for_patches( images: torch.Tensor, patch_size: int, max_num_patches: int, min_num_patches: int | None = None, pixel_shuffle_scale: int = 1,) -> tuple[torch.Tensor, list[int]]: r"""Resize, normalize, and patchify RGB images for the vision encoder.
Args: images (`torch.Tensor`): Either `(height, width, channels)` for a single image or `(num_images, height, width, channels)` for a batch. Channels are expected to be RGB. patch_size (`int`): Edge length of square patches; implictly controls resize grid granularity. max_num_patches (`int`): Maximum number of patches allowed after resizing. min_num_patches (`int`, *optional*): Minimum number of patches. If provided, the routine upsamples images as needed to satisfy the lower bound. pixel_shuffle_scale (`int`, *optional*, defaults to 1): pixel shuffle scale factor; influences the target grid that the function produces.
Returns: `tuple[torch.Tensor, list[int]]`: A pair `(patches, dims_virtual)` where `patches` has shape `(num_images, target_h / patch_size, target_w / patch_size, channels * patch_size**2)` and `dims_virtual` encodes effective `(images, height, width)` dimensions after optional pixel shuffling. """ # Add batch dim if single image if images.dim() == 3: images = images.unsqueeze(0)
# Permute to channel first for resize images = images.permute(0, 3, 1, 2)
# Get target dimensions _, _, orig_height, orig_width = images.shape target_height, target_width = get_image_size_for_max_num_patches( orig_height, orig_width, patch_size, max_num_patches, min_num_patches=min_num_patches, pixel_shuffle_scale=pixel_shuffle_scale, )
# Resize images = F.interpolate( images, size=(target_height, target_width), mode="bilinear", align_corners=False, )
# Back to channel last images = images.permute(0, 2, 3, 1)
# Normalize images = prepare_image_tensor(images)
# Patchify patches = patchify_vision(images, patch_size=patch_size)
# Calculate dimensions for the patches n_images, h_patches, w_patches, _ = patches.shape dims_virtual = ( [1, h_patches, w_patches] if pixel_shuffle_scale == 1 else [1, h_patches // pixel_shuffle_scale, w_patches // pixel_shuffle_scale] )
return patches, dims_virtual
def precompute_inv_freq(theta: float, dim: int) -> torch.Tensor: """ Returns shape (dim//2,). """ inv_freq = 1.0 / (theta ** (torch.arange(0, dim, 2, dtype=torch.float32) / dim)) return inv_freq # type: ignore[return-value]
def precompute_cos_sin_3d( position_ids: torch.Tensor, # shape (3, B, T) inv_freq: torch.Tensor, # shape (dim//2,) mrope_half_section: list[int], # sum to dim//2) -> tuple[torch.Tensor, torch.Tensor]: r"""Generate 3D rotary embeddings for multi-axis positions.
Args: position_ids (`torch.Tensor`): Tensor of shape `(3, batch_size, seq_len)` containing positional indices for the x/y/t axes. inv_freq (`torch.Tensor`): Precomputed inverse frequency vector used to derive rotary phases. mrope_half_section (`list[int]`): Sizes the axis-specific frequency blocks.
Returns: `tuple[torch.Tensor, torch.Tensor]`: Cosine and sine tensors, each of shape `(batch_size, seq_len, dim)`, ready to be passed into rotary attention layers. """ B = position_ids.shape[1] T = position_ids.shape[2] dim_half = inv_freq.shape[0] device = position_ids.device
# Initialize with full dimension (not half) to match LLaMA cos_3d = torch.zeros((B, T, dim_half * 2), dtype=torch.float32, device=device) sin_3d = torch.zeros((B, T, dim_half * 2), dtype=torch.float32, device=device)
offset = 0 for d in range(3): block_size = mrope_half_section[d] freq_slice = inv_freq[offset : offset + block_size] # shape => (block_size,) # shape => (B, T, block_size) phase = position_ids[d].unsqueeze(-1).float() * freq_slice
cos_part = phase.cos() sin_part = phase.sin()
# Duplicate values for both halves of the dimension cos_3d[:, :, offset : offset + block_size] = cos_part cos_3d[:, :, dim_half + offset : dim_half + offset + block_size] = cos_part sin_3d[:, :, offset : offset + block_size] = sin_part sin_3d[:, :, dim_half + offset : dim_half + offset + block_size] = sin_part
offset += block_size
return cos_3d, sin_3d
class RopeScaling(TypedDict, total=False): rope_type: str factor: float mrope_section: list[int] mrope_interleaved: bool low_freq_factor: float high_freq_factor: float original_max_position_embeddings: int
class IsaacConfig(Qwen3Config): """Configuration class for Isaac multimodal model."""
model_type = "isaac" sub_configs = {"vision_config": PixelShuffleSiglip2VisionConfig}
def __init__( self, vision_config=None, vision_patch_size: int = 16, vision_max_num_patches: int = 256, vision_min_num_patches: int | None = None, pixel_shuffle_scale: int = 1, max_sequence_length: int = 16384, vision_token: str = "<image>", **kwargs, ): super().__init__(**kwargs)
# Handle vision config - either dict or PixelShuffleSiglip2VisionConfig instance if isinstance(vision_config, dict): self.vision_config = self.sub_configs["vision_config"](**vision_config) elif vision_config is None: self.vision_config = self.sub_configs["vision_config"]() else: self.vision_config = vision_config
# EventStreamProcessor parameters (for backward compatibility) self.video_patch_size = vision_patch_size self.vision_max_num_patches = vision_max_num_patches self.vision_min_num_patches = vision_min_num_patches self.pixel_shuffle_scale = pixel_shuffle_scale
# Processing parameters self.max_sequence_length = max_sequence_length self.vision_token = vision_token
# ============================================================================# Processor Components# ============================================================================
def create_text_event(tokenizer: AutoTokenizer, text: str, time: float = 0.0) -> Event: r"""Wrap a text into an `Event` compatible with the multimodal TensorStream.
Args: tokenizer (`AutoTokenizer`): Tokenizer used to convert text into model vocabulary ids. text (`str`): Plain-text fragment to encode. time (`float`, *optional*, defaults to 0.0): Timeline coordinate associated with the event. Both start and end times use the same value because text segments are instantaneous in the scheduler.
Returns: `Event`: Event carrying a `(num_tokens, 1)` tensor of token ids with matching metadata so that downstream processors can compute modality-specific embeddings. """ tokens = tokenizer.encode(text, add_special_tokens=False, return_tensors="pt").squeeze(0)
# Calculate dimensions for the event num_tokens = len(tokens) dims_virtual = [num_tokens, 1] # [sequence_length, 1] dims_real = dims_virtual.copy()
# Ensure tokens has the right shape for tensor_stream_token_view # It expects a 2D tensor where sum(dim=-1) gives the token IDs if tokens.dim() == 1: tokens = tokens.unsqueeze(-1)
return Event( data=tokens, type=TextType.text, time=(time, time), dims_virtual=dims_virtual, dims_real=dims_real, idx_range=(0, num_tokens), )
# ============================================================================# Processor# ============================================================================
class IsaacProcessor(ProcessorMixin): attributes = ["tokenizer"] tokenizer_class = ("Qwen2Tokenizer", "Qwen2TokenizerFast")
def __init__( self, tokenizer: Qwen2Tokenizer, config: IsaacConfig | dict, ): super().__init__(tokenizer) self.tokenizer = tokenizer
if isinstance(config, dict): config = IsaacConfig(**config) self.config = config
# Use vision token from config self.vision_token = config.vision_token
# Processing parameters self.max_sequence_length = config.max_sequence_length
# Vision processing parameters self.patch_size = config.video_patch_size self.max_num_patches = config.vision_max_num_patches self.min_num_patches = config.vision_min_num_patches self.pixel_shuffle_scale = config.pixel_shuffle_scale
def apply_chat_template( self, messages: list[dict[str, Any]], tokenize: bool = False, add_generation_prompt: bool = False, **kwargs, ) -> Any: return self.tokenizer.apply_chat_template( messages, tokenize=tokenize, add_generation_prompt=add_generation_prompt, **kwargs )
def build_event_stream_simple( self, text: str, images: list[PIL.Image.Image] | None = None, ) -> Stream: events = [] # Process text and images # Find all occurrences of vision token
pattern = re.escape(self.vision_token) parts = re.split(f"({pattern})", text) # Keep the delimiter in the result
image_idx = 0 for current_time, part in enumerate(parts): if part == self.vision_token: # Replace vision token with image event if image_idx < len(images): # Create vision event from PIL image image_tensor = extract_image_pil(images[image_idx]) if image_tensor is not None: # Create a vision event with the image tensor vision_event = Event( data=image_tensor.unsqueeze(0), # HWC format from extract_image_pil type=VisionType.image, # I-frame time=(current_time, current_time), ) events.append(vision_event) image_idx += 1 elif part: # Non-empty text part # tokens = self.text_processor.tokenize(part, add_special_tokens=False) text_event = create_text_event(self.tokenizer, part, time=current_time) events.append(text_event)
# Process vision events if any if any(event.type == VisionType.image for event in events): # Separate text and vision events for processing text_events = [event for event in events if event.type == TextType.text] vision_events = [event for event in events if event.type == VisionType.image]
# Process vision events using functional approach processed_vision_events = [] for vision_event in vision_events: # Process the vision data patches, dims_virtual = process_vision_for_patches( vision_event.data.squeeze(0), # Remove the extra dimension patch_size=self.patch_size, max_num_patches=self.max_num_patches, min_num_patches=self.min_num_patches, pixel_shuffle_scale=self.pixel_shuffle_scale, )
# Update event with processed data vision_event.data = patches.unsqueeze(1) # Add back frame dimension vision_event.dims_virtual = dims_virtual vision_event.dims_real = ( dims_virtual if self.pixel_shuffle_scale == 1 else [ dims_virtual[0], dims_virtual[1] * self.pixel_shuffle_scale, dims_virtual[2] * self.pixel_shuffle_scale, ] ) vision_event.idx_range = (0, math.prod(dims_virtual))
# Flatten the patches vision_event.data = vision_event.data.reshape(-1, vision_event.data.shape[-1]) processed_vision_events.append(vision_event)
events = text_events + processed_vision_events
# Create stream without scheduling (events already in order) return create_stream(events, priority=[TextType.text, VisionType.image], schedule=True)
def __call__( self, text: Union[str, list[str]], images: Union[PIL.Image.Image, list[PIL.Image.Image], None] = None, return_tensors: str | TensorType | None = TensorType.PYTORCH, **kwargs, ) -> BatchFeature: """ Process text and images into TensorStream format. Args: text: Input text or list of texts with vision tokens images: PIL image or list of images (optional) return_tensors: Format for output tensors
Returns: BatchFeature with input_ids and tensor_stream """ # Normalize inputs to lists if isinstance(text, str): texts = [text] else: texts = text
if images is not None: if isinstance(images, PIL.Image.Image): images_list = [images] else: images_list = images else: images_list = None
if len(texts) != 1: raise ValueError("IsaacProcessor currently supports batch_size=1") if images_list is not None: # Count vision tokens in text to validate image count vision_token_count = texts[0].count(self.vision_token) if vision_token_count != len(images_list): raise ValueError( f"Number of {self.vision_token} tokens in text ({vision_token_count}) " f"must match number of images ({len(images_list)})" )
# Build event stream stream = self.build_event_stream_simple( text=texts[0], images=images_list, )
# Create TensorStream tensor_stream = TensorStream([stream])
# Slice to max length if needed _, T = tensor_stream.shape if T > self.max_sequence_length: tensor_stream = ts_slice(tensor_stream, start=T - self.max_sequence_length, end=T)
# Get token view tokens = tensor_stream_token_view(tensor_stream) if return_tensors in (TensorType.PYTORCH, "pt"): input_ids = torch.as_tensor(tokens, dtype=torch.long) else: input_ids = tokens
data = { "input_ids": input_ids, "tensor_stream": tensor_stream, }
return BatchFeature(data=data)
# ============================================================================# Model# ============================================================================
def compute_position_ids_input_ids(input_ids: torch.Tensor) -> torch.Tensor: r"""Create 3D positional indices for token input.
Args: input_ids (`torch.Tensor`): Tensor of shape `(batch_size, seq_len)` containing token ids.
Returns: `torch.Tensor`: Positional indices with shape `(batch_size, seq_len, 3)` where each channel duplicates the 1D position so it can be consumed by the 3-axis MRoPE rotary embedding. """ batch_size, seq_length = input_ids.shape position_ids = torch.arange(seq_length, device=input_ids.device) position_ids = position_ids.view(1, -1).expand(batch_size, -1) position_ids = position_ids.unsqueeze(2).expand(-1, -1, 3) # Add 3D for MRoPE return position_ids
class IsaacRotaryEmbedding(nn.Module): def __init__(self, config: IsaacConfig, device=None): super().__init__()
# Extract dimensions from config self.hidden_size = config.hidden_size self.num_attention_heads = config.num_attention_heads self.head_dim = config.head_dim
# Get rope_scaling config - use direct access when available rope_scaling = getattr(config, "rope_scaling", None) or {}
# Read RopeScaling parameters self.rope_type = rope_scaling.get("rope_type", "default")
self.mrope_section = [ self.head_dim // 4, # 2x more for temporal dim self.head_dim // 8, self.head_dim // 8, ]
rope_base = getattr(config, "rope_theta", 10000.0) inv_freq = precompute_inv_freq(rope_base, self.head_dim) self.register_buffer("inv_freq", inv_freq, persistent=False)
def forward(self, position_ids: torch.Tensor, modality_tensor: torch.Tensor) -> tuple[torch.Tensor, torch.Tensor]: with torch.no_grad(): # Ensure non-spatial tokens have 1D rotation equivalence not_spatial = ~(modality_tensor == VisionType.image.value) # shape is [N, 1] data_1d = position_ids[not_spatial][..., 0].unsqueeze(-1) # now broadcast it from [N, 1] -> [N, D] so it matches pos[not_spatial] exactly data_1d = data_1d.expand(-1, position_ids.shape[-1]) # expand along the last dim position_ids = position_ids.clone() # Clone to avoid warning about in-place operations on expanded tensors position_ids[not_spatial] = data_1d position_ids = position_ids.permute(2, 0, 1) # pos dim first -> (3, B, L) cos, sin = precompute_cos_sin_3d(position_ids, self.inv_freq, self.mrope_section)
return cos, sin
class IsaacModel(Qwen3Model): def __init__(self, config: IsaacConfig): super().__init__(config) text_cfg = getattr(config, "get_text_config", lambda: config)() self.layers = torch.nn.ModuleList( [Qwen3DecoderLayer(text_cfg, layer_idx) for layer_idx in range(config.num_hidden_layers)] ) self.rotary_emb = IsaacRotaryEmbedding(config, device=self.device)
vision_cfg = config.vision_config if vision_cfg is None: raise ValueError("IsaacConfig should always have vision_config")
hidden_dim = vision_cfg.hidden_size * (vision_cfg.pixel_shuffle_scale_factor**2) self.vision_embedding = nn.Sequential( Siglip2SequenceVisionTransformer(vision_cfg), nn.Linear( hidden_dim, 4 * hidden_dim, bias=False, ), nn.SiLU(), nn.Linear(4 * hidden_dim, config.hidden_size, bias=False), )
# Dispatch table for TensorStream balanced embedding (text + vision) self.embed_fns = { TextType: self.embed_text_tokens, VisionType: self.embed_vision, }
def embed_text_tokens(self, token_ids: torch.Tensor) -> torch.Tensor: """Embed text tokens, squeezing singleton dimensions.""" # Text events are shaped as (..., 1); squeeze the singleton index dim h = self.embed_tokens(token_ids) if h.dim() >= 2 and h.size(-2) == 1: h = h[..., 0, :] return h
def embed_vision(self, vision_tokens: tuple[torch.Tensor, torch.Tensor]) -> torch.Tensor: """Embed vision tokens using the vision encoder.""" # vision tokens is (seq_patches, token_grids) return self.vision_embedding(vision_tokens)
def embed_stream(self, tensor_stream: TensorStream) -> torch.Tensor: """ Embed each modality stream independently, preserving the original TensorStream structure. """ flat_stream = tensor_stream.flat_stream() per_modality_stream = group_streams(flat_stream, group_fn=lambda ev: ev.type, schedule=False) per_modality_compact_stream = {k: v.compact() for k, v in per_modality_stream.items()}
# Collect per-event grids for vision tokens (H, W like dims sans time) token_grids = defaultdict(list) for stream in tensor_stream.streams: for event in stream: token_grids[event.type].append(event.dims(virtual=False))
embedded_compact = {} for stream_type, modality_payload_tensor in per_modality_compact_stream.items(): if stream_type.modality == VisionType: # Build a (N_events, 2) grid tensor with spatial dims only grids = token_grids.get(stream_type, []) if len(grids) == 0: input_tensor = modality_payload_tensor else: token_grids_tensor = torch.tensor(grids, dtype=torch.long, device=tensor_stream.device)[:, 1:] input_tensor = (modality_payload_tensor, token_grids_tensor) embedded_compact[stream_type] = self.embed_fns[stream_type.modality](input_tensor) else: embedded_compact[stream_type] = self.embed_fns[stream_type.modality](modality_payload_tensor)
# Reconstruct a TensorStream with embedded payloads and compact embedded_ts = reconstruct_tensor_stream_from_compact_dict(tensor_stream, embedded_compact) h = embedded_ts.compact() # (B, T, D) return h
def forward( self, input_ids: torch.LongTensor | None = None, tensor_stream: TensorStream | None = None, attention_mask: torch.Tensor | None = None, position_ids: torch.LongTensor | None = None, modality_tensor: torch.LongTensor | None = None, past_key_values: list[torch.FloatTensor] | None = None, inputs_embeds: torch.FloatTensor | None = None, use_cache: bool | None = None, output_hidden_states: bool | None = None, return_dict: bool | None = None, cache_position: torch.LongTensor | None = None, **kwargs, ) -> tuple | BaseModelOutputWithPast: """ Forward pass with MRoPE position embeddings.
Computes position embeddings once and passes them through all layers. """ output_hidden_states = ( output_hidden_states if output_hidden_states is not None else self.config.output_hidden_states ) use_cache = use_cache if use_cache is not None else self.config.use_cache return_dict = return_dict if return_dict is not None else self.config.use_return_dict
# Get inputs if tensor_stream is not None and inputs_embeds is not None: raise ValueError("You cannot specify both tensor_stream and inputs_embeds") elif tensor_stream is not None: # Embed TensorStream directly inputs_embeds = self.embed_stream(tensor_stream) # Create modality tensor if not provided if modality_tensor is None: modality_tensor = modality_mask(tensor_stream) elif input_ids is not None and inputs_embeds is not None: raise ValueError("You cannot specify both input_ids and inputs_embeds at the same time") elif input_ids is not None: inputs_embeds = self.embed_tokens(input_ids) # Create text modality tensor if not provided if modality_tensor is None: batch_size, seq_length = input_ids.shape modality_tensor = torch.full( (batch_size, seq_length), TextType.text.value, device=input_ids.device, dtype=torch.long ) elif inputs_embeds is None: raise ValueError("You have to specify either tensor_stream, input_ids or inputs_embeds")
# Create default position_ids if not provided if position_ids is None: if tensor_stream is not None: position_ids = compute_mrope_pos_tensor(tensor_stream) # (B,L,3) else: position_ids = compute_position_ids_input_ids(input_ids)
# Compute MRoPE position embeddings if we have custom rotary_emb cos, sin = self.rotary_emb(position_ids, modality_tensor) cos = cos.to(inputs_embeds.dtype) sin = sin.to(inputs_embeds.dtype)
# Prepare attention mask if attention_mask is not None: attention_mask = self._update_causal_mask( attention_mask, inputs_embeds, cache_position, past_key_values, False )
# Initialize hidden states hidden_states = inputs_embeds
for decoder_layer in self.layers: layer_outputs = decoder_layer( hidden_states, attention_mask=attention_mask, position_ids=position_ids, past_key_value=past_key_values, use_cache=use_cache, cache_position=cache_position, position_embeddings=(cos, sin), **kwargs, )
hidden_states = layer_outputs[0] if isinstance(layer_outputs, tuple) else layer_outputs
# Final layer norm hidden_states = self.norm(hidden_states)
return BaseModelOutputWithPast( last_hidden_state=hidden_states, past_key_values=past_key_values, )
def _update_causal_mask( self, attention_mask: torch.Tensor, input_tensor: torch.Tensor, cache_position: torch.Tensor, past_key_values: Cache, output_attentions: bool = False, ): if self.config._attn_implementation == "flash_attention_2": if attention_mask is not None and past_key_values is not None: is_padding_right = attention_mask[:, -1].sum().item() != input_tensor.size()[0] if is_padding_right: raise ValueError( "You are attempting to perform batched generation with padding_side='right'" " this may lead to unexpected behaviour for Flash Attention version of Qwen3. Make sure to " " call `tokenizer.padding_side = 'left'` before tokenizing the input. " ) if attention_mask is not None and 0.0 in attention_mask: return attention_mask return None
# For SDPA, when possible, we will rely on its `is_causal` argument instead of its `attn_mask` argument, in # order to dispatch on Flash Attention 2. This feature is not compatible with static cache, as SDPA will fail # to infer the attention mask. past_seen_tokens = past_key_values.get_seq_length() if past_key_values is not None else 0 using_static_cache = isinstance(past_key_values, StaticCache) using_sliding_window_cache = isinstance(past_key_values, SlidingWindowCache)
# When output attentions is True, sdpa implementation's forward method calls the eager implementation's forward if ( self.config._attn_implementation == "sdpa" and not (using_static_cache or using_sliding_window_cache) and not output_attentions ): if AttentionMaskConverter._ignore_causal_mask_sdpa( attention_mask, inputs_embeds=input_tensor, past_key_values_length=past_seen_tokens, sliding_window=self.config.sliding_window, is_training=self.training, ): return None
dtype, device = input_tensor.dtype, input_tensor.device min_dtype = torch.finfo(dtype).min sequence_length = input_tensor.shape[1] # SlidingWindowCache or StaticCache if using_sliding_window_cache or using_static_cache: target_length = past_key_values.get_max_cache_shape() # DynamicCache or no cache else: target_length = ( attention_mask.shape[-1] if isinstance(attention_mask, torch.Tensor) else past_seen_tokens + sequence_length + 1 )
# In case the provided `attention` mask is 2D, we generate a causal mask here (4D). causal_mask = self._prepare_4d_causal_attention_mask_with_cache_position( attention_mask, sequence_length=sequence_length, target_length=target_length, dtype=dtype, device=device, cache_position=cache_position, batch_size=input_tensor.shape[0], config=self.config, past_key_values=past_key_values, )
if ( self.config._attn_implementation == "sdpa" and attention_mask is not None and attention_mask.device.type in ["cuda", "xpu", "npu"] and not output_attentions ): # Attend to all tokens in fully masked rows in the causal_mask, for example the relevant first rows when # using left padding. This is required by F.scaled_dot_product_attention memory-efficient attention path. # Details: https://github.com/pytorch/pytorch/issues/110213 causal_mask = AttentionMaskConverter._unmask_unattended(causal_mask, min_dtype)
return causal_mask
@staticmethod def _prepare_4d_causal_attention_mask_with_cache_position( attention_mask: torch.Tensor, sequence_length: int, target_length: int, dtype: torch.dtype, device: torch.device, cache_position: torch.Tensor, batch_size: int, config: Qwen3Config, past_key_values: Cache, ): """ Creates a causal 4D mask of shape `(batch_size, 1, query_length, key_value_length)` from a 2D mask of shape `(batch_size, key_value_length)`, or if the input `attention_mask` is already 4D, do nothing.
Args: attention_mask (`torch.Tensor`): A 2D attention mask of shape `(batch_size, key_value_length)` or a 4D attention mask of shape `(batch_size, 1, query_length, key_value_length)`. sequence_length (`int`): The sequence length being processed. target_length (`int`): The target length: when generating with static cache, the mask should be as long as the static cache, to account for the 0 padding, the part of the cache that is not filled yet. dtype (`torch.dtype`): The dtype to use for the 4D attention mask. device (`torch.device`): The device to place the 4D attention mask on. cache_position (`torch.Tensor`): Indices depicting the position of the input sequence tokens in the sequence. batch_size (`torch.Tensor`): Batch size. config (`Qwen3Config`): The model's configuration class past_key_values (`Cache`): The cache class that is being used currently to generate """ if attention_mask is not None and attention_mask.dim() == 4: # In this case we assume that the mask comes already in inverted form and requires no inversion or slicing. causal_mask = attention_mask else: min_dtype = torch.finfo(dtype).min causal_mask = torch.full( (sequence_length, target_length), fill_value=min_dtype, dtype=dtype, device=device ) diagonal_attend_mask = torch.arange(target_length, device=device) > cache_position.reshape(-1, 1) if config.sliding_window is not None: # if we have sliding window, we should not attend to tokens beyond sliding window length, so we mask them out also # the check is needed to verify is current checkpoint was trained with sliding window or not if not isinstance(past_key_values, SlidingWindowCache) or sequence_length > target_length: sliding_attend_mask = torch.arange(target_length, device=device) <= ( cache_position.reshape(-1, 1) - config.sliding_window ) diagonal_attend_mask.bitwise_or_(sliding_attend_mask) causal_mask *= diagonal_attend_mask causal_mask = causal_mask[None, None, :, :].expand(batch_size, 1, -1, -1) if attention_mask is not None: causal_mask = causal_mask.clone() # copy to contiguous memory for in-place edit if attention_mask.shape[-1] > target_length: attention_mask = attention_mask[:, :target_length] mask_length = attention_mask.shape[-1] padding_mask = causal_mask[:, :, :, :mask_length] + attention_mask[:, None, None, :].to( causal_mask.device ) padding_mask = padding_mask == 0 causal_mask[:, :, :, :mask_length] = causal_mask[:, :, :, :mask_length].masked_fill( padding_mask, min_dtype ) return causal_mask
class IsaacForConditionalGeneration(Qwen3ForCausalLM, GenerationMixin): """Isaac multimodal model for conditional generation."""
config_class = IsaacConfig
def __init__(self, config: IsaacConfig): Qwen3PreTrainedModel.__init__(self, config) self.model = IsaacModel(config) # Use our custom model self.vocab_size = config.vocab_size self.lm_head = nn.Linear(config.hidden_size, config.vocab_size, bias=False) # Tracks rotary position offsets computed during a full forward pass so decode steps can reuse them. self.rope_deltas = None
self.config = config
def get_rope_index( self, input_ids: torch.Tensor | None, tensor_stream: TensorStream | None, attention_mask: torch.Tensor | None, ) -> tuple[torch.Tensor, torch.Tensor]: """Compute MRoPE position ids from a TensorStream (or 1D fallback).
Returns (position_ids, rope_deltas). position_ids is (B,L,3) for MRoPE. rope_deltas is (B,1) used to advance positions in decode. """ # tensor_stream present: compute 3D coords if tensor_stream is None and input_ids is None: raise ValueError("`tensor_stream` or `input_ids` must be provided to compute rope indices")
if tensor_stream is not None: pos_3d = compute_mrope_pos_tensor(tensor_stream) # (B,L,3) else: pos_3d = compute_position_ids_input_ids(input_ids) B, L, _ = pos_3d.shape
# Max position per batch across the 3 planes and sequence dimension: (B,) m_per_batch = pos_3d.amax(dim=(1, 2))
# Sequence lengths per batch: (B,) if attention_mask is None: seq_lens = torch.full_like(m_per_batch, L) else: seq_lens = attention_mask.eq(1).sum(dim=-1).to(dtype=m_per_batch.dtype, device=m_per_batch.device)
rope_deltas = (m_per_batch + 1 - seq_lens).to(dtype=pos_3d.dtype).unsqueeze(1) return pos_3d, rope_deltas
def forward( self, input_ids: torch.LongTensor | None = None, tensor_stream: TensorStream | None = None, attention_mask: torch.Tensor | None = None, position_ids: torch.LongTensor | None = None, past_key_values: list[torch.FloatTensor] | None = None, inputs_embeds: torch.FloatTensor | None = None, labels: torch.LongTensor | None = None, use_cache: bool | None = None, output_hidden_states: bool | None = None, return_dict: bool | None = None, cache_position: torch.LongTensor | None = None, **kwargs, ) -> tuple | CausalLMOutputWithPast: """ Forward pass for conditional generation supporting both standard inputs and TensorStream. Uses our embed_stream approach for multimodal inputs. """
# Don't compute embeddings here - let the model handle it if tensor_stream is not None: input_ids = None if input_ids is None and inputs_embeds is None and tensor_stream is None: raise ValueError("Either input_ids, inputs_embeds, or tensor_stream must be provided.")
# Build position ids (MRoPE) if needed and tensor_stream is available # During decode we reuse `self.rope_deltas` computed on the initial forward pass; `rope_delta` captures how far # cached rotary phases have progressed so we can advance `position_ids` without rebuilding the TensorStream. if position_ids is None and tensor_stream is not None: position_ids, self.rope_deltas = self.get_rope_index(input_ids, tensor_stream, attention_mask) elif position_ids is None and input_ids is not None: # For text inputs build position ids and modality tensor position_ids = compute_position_ids_input_ids(input_ids) if cache_position is not None and self.rope_deltas is not None: # Combine the incremental decode step (`cache_position`) with cached offsets so hidden states continue # rotating in lockstep across generation steps. rope_delta = (cache_position[0] + self.rope_deltas).to(input_ids.device) else: rope_delta = 0 if cache_position is not None and not isinstance(rope_delta, int): # otherwise `deltas` is an int `0` batch_size = input_ids.shape[0] rope_delta = rope_delta.repeat_interleave(batch_size // rope_delta.shape[0], dim=0) position_ids = position_ids.add(rope_delta)
if tensor_stream is not None: modality_tensor = modality_mask(tensor_stream) else: batch_size, seq_len = input_ids.shape modality_tensor = torch.empty(batch_size, seq_len, device=position_ids.device).fill_(TextType.text.value)
outputs = self.model( input_ids=input_ids, tensor_stream=tensor_stream, attention_mask=attention_mask, position_ids=position_ids, modality_tensor=modality_tensor, past_key_values=past_key_values, inputs_embeds=inputs_embeds, use_cache=use_cache, output_hidden_states=output_hidden_states, return_dict=return_dict, cache_position=cache_position, **kwargs, )
hidden_states = outputs[0] logits = self.lm_head(hidden_states)
loss = None if labels is not None: loss = self.loss_function(logits=logits, labels=labels, vocab_size=self.config.vocab_size)
return CausalLMOutputWithPast( loss=loss, logits=logits, past_key_values=outputs.past_key_values, hidden_states=outputs.hidden_states, attentions=None, )
def prepare_inputs_for_generation( self, input_ids: torch.LongTensor, past_key_values: list[torch.FloatTensor] | None = None, attention_mask: torch.Tensor | None = None, inputs_embeds: torch.FloatTensor | None = None, tensor_stream: TensorStream | None = None, cache_position: torch.LongTensor | None = None, position_ids: torch.LongTensor | None = None, use_cache: bool = True, **kwargs, ) -> dict[str, Any]: """ Prepare inputs for generation, handling TensorStream inputs properly. """ # Call parent preparation model_inputs = super().prepare_inputs_for_generation( input_ids, past_key_values=past_key_values, attention_mask=attention_mask, inputs_embeds=inputs_embeds, cache_position=cache_position, position_ids=position_ids, use_cache=use_cache, **kwargs, )
# Handle TensorStream for first forward pass only if tensor_stream is not None and (cache_position is None or cache_position[0] == 0): model_inputs["tensor_stream"] = tensor_stream # Let forward rebuild position_ids using cached deltas during decode model_inputs["position_ids"] = None # Drop tensor_stream after step 0 if cache_position is not None and cache_position[0] != 0: model_inputs["tensor_stream"] = None return model_inputs
def can_generate(self) -> bool: return True
__all__ = [ "IsaacConfig", "IsaacModel", "IsaacForConditionalGeneration", "IsaacProcessor",]12345678910{ "processor_class": "IsaacProcessor", "tokenizer_class": [ "Qwen2Tokenizer", "Qwen2TokenizerFast" ], "auto_map": { "AutoProcessor": "modular_isaac.IsaacProcessor" }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209{ "auto_map": { "AutoProcessor": "modular_isaac.IsaacProcessor" }, "config": { "_name_or_path": "", "add_cross_attention": false, "architectures": [ "IsaacForConditionalGeneration" ], "attention_bias": false, "attention_dropout": 0.0, "auto_map": { "AutoModelForCausalLM": "modular_isaac.IsaacForConditionalGeneration" }, "bad_words_ids": null, "begin_suppress_tokens": null, "bos_token_id": 151643, "chunk_size_feed_forward": 0, "cross_attention_hidden_size": null, "decoder_start_token_id": null, "diversity_penalty": 0.0, "do_sample": false, "dtype": "float32", "early_stopping": false, "encoder_no_repeat_ngram_size": 0, "eos_token_id": 151645, "exponential_decay_length_penalty": null, "finetuning_task": null, "forced_bos_token_id": null, "forced_eos_token_id": null, "head_dim": 128, "hidden_act": "silu", "hidden_size": 2048, "id2label": { "0": "LABEL_0", "1": "LABEL_1" }, "initializer_range": 0.02, "intermediate_size": 6144, "is_decoder": false, "is_encoder_decoder": false, "label2id": { "LABEL_0": 0, "LABEL_1": 1 }, "layer_types": [ "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention", "full_attention" ], "length_penalty": 1.0, "max_length": 20, "max_position_embeddings": 40960, "max_sequence_length": 16384, "max_window_layers": 28, "min_length": 0, "model_type": "isaac", "no_repeat_ngram_size": 0, "num_attention_heads": 16, "num_beam_groups": 1, "num_beams": 1, "num_hidden_layers": 28, "num_key_value_heads": 8, "num_return_sequences": 1, "output_attentions": false, "output_hidden_states": false, "output_scores": false, "pad_token_id": null, "pixel_shuffle_scale": 2, "prefix": null, "problem_type": null, "pruned_heads": {}, "remove_invalid_values": false, "repetition_penalty": 1.0, "return_dict": true, "return_dict_in_generate": false, "rms_norm_eps": 1e-06, "rope_scaling": { "mrope_interleaved": true, "mrope_section": null, "rope_type": "default" }, "rope_theta": 1000000.0, "sep_token_id": null, "sliding_window": null, "suppress_tokens": null, "task_specific_params": null, "temperature": 1.0, "tf_legacy_loss": false, "tie_encoder_decoder": false, "tie_word_embeddings": false, "tokenizer_class": null, "top_k": 50, "top_p": 1.0, "torchscript": false, "transformers_version": "4.56.1", "typical_p": 1.0, "use_bfloat16": false, "use_cache": true, "use_sliding_window": false, "video_patch_size": 16, "vision_config": { "_name_or_path": "", "add_cross_attention": false, "architectures": null, "attention_dropout": 0.0, "bad_words_ids": null, "begin_suppress_tokens": null, "bos_token_id": null, "chunk_size_feed_forward": 0, "cross_attention_hidden_size": null, "decoder_start_token_id": null, "diversity_penalty": 0.0, "do_sample": false, "dtype": null, "early_stopping": false, "encoder_no_repeat_ngram_size": 0, "eos_token_id": null, "exponential_decay_length_penalty": null, "finetuning_task": null, "forced_bos_token_id": null, "forced_eos_token_id": null, "hidden_act": "gelu_pytorch_tanh", "hidden_size": 1152, "id2label": { "0": "LABEL_0", "1": "LABEL_1" }, "image_size": 256, "intermediate_size": 4304, "is_decoder": false, "is_encoder_decoder": false, "label2id": { "LABEL_0": 0, "LABEL_1": 1 }, "layer_norm_eps": 1e-06, "length_penalty": 1.0, "max_length": 20, "min_length": 0, "model_type": "pixel_shuffle_siglip2", "no_repeat_ngram_size": 0, "num_attention_heads": 16, "num_beam_groups": 1, "num_beams": 1, "num_channels": 3, "num_hidden_layers": 27, "num_patches": 256, "num_return_sequences": 1, "output_attentions": false, "output_hidden_states": false, "output_scores": false, "pad_token_id": null, "patch_size": 16, "pixel_shuffle_scale_factor": 2, "prefix": null, "problem_type": null, "pruned_heads": {}, "remove_invalid_values": false, "repetition_penalty": 1.0, "return_dict": true, "return_dict_in_generate": false, "sep_token_id": null, "suppress_tokens": null, "task_specific_params": null, "temperature": 1.0, "tf_legacy_loss": false, "tie_encoder_decoder": false, "tie_word_embeddings": true, "tokenizer_class": null, "top_k": 50, "top_p": 1.0, "torchscript": false, "typical_p": 1.0, "use_bfloat16": false }, "vision_max_num_patches": 6144, "vision_min_num_patches": 256, "vision_token": "<image>", "vocab_size": 151936 }, "processor_class": "IsaacProcessor"}12345678910111213141516171819202122232425262728293031{ "additional_special_tokens": [ "<|im_start|>", "<|im_end|>", "<|object_ref_start|>", "<|object_ref_end|>", "<|box_start|>", "<|box_end|>", "<|quad_start|>", "<|quad_end|>", "<|vision_start|>", "<|vision_end|>", "<|vision_pad|>", "<|image_pad|>", "<|video_pad|>" ], "eos_token": { "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }, "pad_token": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243{ "add_bos_token": false, "add_prefix_space": false, "added_tokens_decoder": { "151643": { "content": "<|endoftext|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151644": { "content": "<|im_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151645": { "content": "<|im_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151646": { "content": "<|object_ref_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151647": { "content": "<|object_ref_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151648": { "content": "<|box_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151649": { "content": "<|box_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151650": { "content": "<|quad_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151651": { "content": "<|quad_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151652": { "content": "<|vision_start|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151653": { "content": "<|vision_end|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151654": { "content": "<|vision_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151655": { "content": "<|image_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151656": { "content": "<|video_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": true }, "151657": { "content": "<tool_call>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151658": { "content": "</tool_call>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151659": { "content": "<|fim_prefix|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151660": { "content": "<|fim_middle|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151661": { "content": "<|fim_suffix|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151662": { "content": "<|fim_pad|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151663": { "content": "<|repo_name|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151664": { "content": "<|file_sep|>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151665": { "content": "<tool_response>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151666": { "content": "</tool_response>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151667": { "content": "<think>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false }, "151668": { "content": "</think>", "lstrip": false, "normalized": false, "rstrip": false, "single_word": false, "special": false } }, "additional_special_tokens": [ "<|im_start|>", "<|im_end|>", "<|object_ref_start|>", "<|object_ref_end|>", "<|box_start|>", "<|box_end|>", "<|quad_start|>", "<|quad_end|>", "<|vision_start|>", "<|vision_end|>", "<|vision_pad|>", "<|image_pad|>", "<|video_pad|>" ], "auto_map": { "AutoProcessor": "modular_isaac.IsaacProcessor" }, "bos_token": null, "clean_up_tokenization_spaces": false, "eos_token": "<|im_end|>", "errors": "replace", "extra_special_tokens": {}, "model_max_length": 131072, "pad_token": "<|endoftext|>", "processor_class": "IsaacProcessor", "split_special_tokens": false, "tokenizer_class": "Qwen2Tokenizer", "unk_token": null}LICENSE.txtAdded+79
README.mdAdded+66
added_tokens.jsonAdded+28
chat_template.jinjaAdded+89
config.jsonAdded+89
generation_config.jsonAdded+6
merges.txtAdded
model-00001-of-00003.safetensorsAdded+3
model-00002-of-00003.safetensorsAdded+3
model-00003-of-00003.safetensorsAdded+3
model.safetensors.index.jsonAdded+758
modular_isaac.pyAdded+1626
preprocessor_config.jsonAdded+10
processor_config.jsonAdded+209
special_tokens_map.jsonAdded+31
tokenizer_config.jsonAdded+243
vocab.jsonAdded