Add WAP release documentation and verified initial shards
Browse filesFiles changed (20)
- MODEL_COMPLETEAdded+9
- README.md+85
- checkpoint_meta.jsonAdded+37
- config.jsonAdded+104
- configuration_unis.pyAdded+217
- generation_config.jsonAdded+7
- model-00001-of-00016.safetensorsAdded+3
- model-00002-of-00016.safetensorsAdded+3
- model-00003-of-00016.safetensorsAdded+3
- model-00004-of-00016.safetensorsAdded+3
- model-00005-of-00016.safetensorsAdded+3
- model-00012-of-00016.safetensorsAdded+3
- model-00014-of-00016.safetensorsAdded+3
- model-00015-of-00016.safetensorsAdded+3
- model-00016-of-00016.safetensorsAdded+3
- model.safetensors.index.jsonAdded+765
- tokenization_unis.pyAdded+279
- tokenizer_config.jsonAdded+10
- unis.tiktokenAdded
- unis_vision_tokens.txtAdded
123456789{ "step": 2000, "keys": 758, "parameters": 37508999810, "dtype": "bfloat16", "optimizer_saved": false, "training_state_path": null, "recovered_from_incomplete_export": true}123---license: apache-2.0---12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788---license: apache-2.0pipeline_tag: image-to-imagedatasets:- EmbodiedCity/WAPtags:- robotics- robotwin- depth-conditioned-generation- safetensors---<p align="center"><img src="https://raw.githubusercontent.com/EmbodiedCity/WAP.code/main/docs/assets/teaser.png" alt="WAP project overview" width="100%"></p><h1 align="center">World-as-Prompt (WAP)</h1><p align="center"><b>Fiction v1 · RoboTwin 38B depth-conditioned model · Step 2000</b></p><p align="center"><img src="https://img.shields.io/badge/arXiv-coming%20soon-b31b1b" alt="arXiv coming soon"><a href="https://embodiedcity.github.io/WAP/"><img src="https://img.shields.io/badge/Project-Page-blue" alt="Project page"></a><a href="https://github.com/EmbodiedCity/WAP.code"><img src="https://img.shields.io/badge/Code-GitHub-181717" alt="Code on GitHub"></a><a href="https://huggingface.co/datasets/EmbodiedCity/WAP"><img src="https://img.shields.io/badge/Dataset-Hugging%20Face-ffd21e" alt="Dataset on Hugging Face"></a></p>**Upload in progress.** The available shards are listed in Files and versions. The complete release is being verified.Fiction v1 generates the RGB observation that a frozen robot policy sees. Given a scene description, a clean appearance reference and the current depth image, it renders a clean-looking version of the current scene. In the released RoboTwin evaluation, the policy received the generated image at each query and produced the robot actions itself.The code repository includes a single-frame inference example. The project page shows closed-loop rollouts and results for individual tasks.## CheckpointThe model uses the Xiaomi-Robotics-U0 UNIS architecture with FlashAR decoding. The released checkpoint contains **37,508,999,810 parameters** in BF16. The 16 safetensors files form one checkpoint. The weight index maps 758 tensor names to their shards.The weights were recovered from the step-2000 export. The release includes the inference weights, model configuration and UNIS text tokenizer. Exact training continuation would additionally require the original optimizer, FP32 master-state and RNG data. Those are unavailable for this checkpoint.During training, FlashAR learns to predict clean RGB tokens from the prompt, reference RGB and depth. At inference, a frozen visual decoder turns the predicted tokens into an RGB observation. The figure shows DA3 estimating depth from raw RGB. The example below accepts a prepared depth PNG directly.## Run the exampleUse Linux, Python 3.12 and a CUDA 12.8-compatible driver. The inference runner uses two GPUs, with FlashAR on the first and the IBQ vision tokenizer on the second. The original deployment budgeted 88 GiB and 16 GiB respectively. Follow the inference repository's environment setup, including its vLLM patch, then run these commands from the repository root.```bashhf download EmbodiedCity/WAP --local-dir checkpoints/fiction-v1hf download BAAI/Emu3.5-VisionTokenizer config.yaml model.ckpt \--revision a5c45bdb8084763048e094ae124778bfeca7d5ee \--local-dir checkpoints/ibqexport U0_INFERENCE_SOURCE="$PWD/src/frozen/robotwin37/upstream_xiaomi_u0/inference"export PYTHONPATH="$U0_INFERENCE_SOURCE:$PWD/src/xiaomi/upstream_xiaomi_u0/training/src:$PWD/static_backend${PYTHONPATH:+:$PYTHONPATH}"CUDA_VISIBLE_DEVICES=0,1 python tools/infer_robotwin38b_image.py \--checkpoint checkpoints/fiction-v1 --vq checkpoints/ibq \--reference examples/reference.png --depth examples/depth.png \--prompt examples/prompt.txt --output results/fiction.png```The external vision tokenizer encodes the reference and depth, then decodes the generated visual tokens. The pinned tokenizer files match the hashes recorded during dataset preparation. [Vision tokenizer](https://huggingface.co/BAAI/Emu3.5-VisionTokenizer/tree/a5c45bdb8084763048e094ae124778bfeca7d5ee)## Input and output- **Reference.** A clean 960 × 240 RGB canvas provides appearance. Place the top camera, left wrist and right wrist views side by side in that order.- **Depth.** Use the same camera order and size. Convert valid metric depth to an 8-bit grayscale value with `round(255 * clip(1 - depth_mm / 1000, 0, 1))`. Encode invalid depth as zero.- **Text.** Start with `examples/prompt.txt` in the code repository. Retain the two visual input placeholders and the output placeholder in their original positions when changing the scene description.- **Output.** The reference runner generates a 15 × 60 grid of visual tokens and decodes it into one 960 × 240 RGB canvas.## Closed-loop evaluationOn the official RoboTwin 2.0 randomized benchmark, across 50 tasks and 100 episodes per task, π0.5 succeeded on **2,298/5,000 episodes (45.96%)** with the recorded baseline observations and **3,078/5,000 (61.56%)** with Fiction v1 observations. The difference is **15.60 percentage points**. The comparison uses the official baseline outcomes for the same seeds. The main result uses a clean reference from the training set matched by task.These results cover simulation. Each policy query was rendered independently, so successive observations can flicker. Success declined on 10 of the 50 tasks. Depth alone does not determine color, and the evaluation supplied a per-episode description that included clean workspace, background and lighting information. The choice of reference and the availability of this text matter when interpreting the scores. [Evaluation details and task breakdown](https://embodiedcity.github.io/WAP/#results)## Citation```bibtex@misc{fang2026worldasprompt,title = {{World-as-Prompt}: Rewriting Robot Observations for Robust Policy Execution},author = {Fang, Jianjie and Wang, Ziyou and Zheng, Yichun andWang, Zhaolu and Tang, Rongze and Xu, Jiacheng andLiu, Xvyuan and Gao, Chen and Wu, Wei andChen, Xinlei and Li, Yong},year = {2026}}```
12345678910111213141516171819202122232425262728293031323334353637{ "format": "hf_safetensors", "global_step": 2000, "source_checkpoint": "hf-step-0002000.partial", "optimizer_saved": false, "exact_training_resume_supported": false, "training_state_path": null, "dataset_sha256": "1c3f2676a4dfe302583b81099789b844ae0388e26739a4b685b5038c54bb0bd9", "epochs": 0, "training_seconds": 63930.77560952678, "campaign_sample_cursor_steps": 7416, "sample_cursor_unit": "rank_record_slots", "campaign_total_epochs": 5, "batch_per_gpu": 8, "world_size": 8, "seed": 20260910, "learning_rate": 1e-06, "performance_settings": { "cpu_threads": 8, "optimizer_fused": true, "loss_chunk_tokens": 256 }, "module_origins": { "UNISDecoderLayer": "modeling_unis.py", "UNISFlashAR": "model.py", "TrainableFlashAR": "flashar_model.py", "trainer": "train_flashar.py", "training_adapter": "flashar_model.py" }, "recovered_from_incomplete_export": true, "recovery_audit": "checkpoint-recovery-audit.json", "recovery_limits": [ "BF16 model weights only", "FP32 master residuals, AdamW moments and steps, and rank RNG unavailable" ], "save_every_steps": 1000}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104{ "vocab_size": 282926, "max_position_embeddings": 32768, "hidden_size": 5120, "intermediate_size": 25600, "num_hidden_layers": 64, "num_attention_heads": 64, "num_key_value_heads": 8, "head_dim": 128, "hidden_act": "silu", "initializer_range": 0.02, "rms_norm_eps": 1e-06, "pretraining_tp": 1, "use_cache": false, "rope_theta": 1000000, "rope_scaling": null, "attention_dropout": 0.0, "img_token_id": 151851, "boi_token_id": 151852, "eoi_token_id": 151853, "eol_token_id": 151846, "eof_token_id": 151847, "image_area": 518400, "return_dict": true, "output_hidden_states": false, "torchscript": false, "torch_dtype": "bfloat16", "pruned_heads": {}, "tie_word_embeddings": false, "chunk_size_feed_forward": 0, "is_encoder_decoder": false, "is_decoder": false, "cross_attention_hidden_size": null, "add_cross_attention": false, "tie_encoder_decoder": false, "architectures": [ "UNISFlashARForCausalLM" ], "finetuning_task": null, "id2label": { "0": "LABEL_0", "1": "LABEL_1" }, "label2id": { "LABEL_0": 0, "LABEL_1": 1 }, "task_specific_params": null, "problem_type": null, "tokenizer_class": null, "prefix": null, "bos_token_id": 151849, "pad_token_id": 151643, "eos_token_id": 151850, "sep_token_id": null, "decoder_start_token_id": null, "max_length": 20, "min_length": 0, "do_sample": false, "early_stopping": false, "num_beams": 1, "num_beam_groups": 1, "diversity_penalty": 0.0, "temperature": 1.0, "top_k": 50, "top_p": 1.0, "typical_p": 1.0, "repetition_penalty": 1.0, "length_penalty": 1.0, "no_repeat_ngram_size": 0, "encoder_no_repeat_ngram_size": 0, "bad_words_ids": null, "num_return_sequences": 1, "output_scores": false, "return_dict_in_generate": false, "forced_bos_token_id": null, "forced_eos_token_id": null, "remove_invalid_values": false, "exponential_decay_length_penalty": null, "suppress_tokens": null, "begin_suppress_tokens": null, "_name_or_path": "", "transformers_version": "4.55.2", "auto_map": { "AutoConfig": "configuration_unis.UNISConfig" }, "model_type": "UNIS", "format": "hf_safetensors", "format_version": 1, "flashar_variant": "edit", "use_vertical_block": true, "vertical_layers": 4, "vertical_start_layer": 60, "use_sequence_block": false, "sequence_layers": 4, "sequence_start_layer": 60, "visual_token_offset": 151854, "generation_order": "raster", "checkpoint_iteration": 9500, "tf_legacy_loss": false, "use_bfloat16": false, "training_step": 2000, "output_attentions": false}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217# coding=utf-8# Copyright 2024 The Emu team, BAAI and The HuggingFace Inc. team. All rights reserved.## This code is based on EleutherAI's GPT-NeoX library and the GPT-NeoX# and OPT implementations in this library. It has been modified from its# original forms to accommodate minor architectural differences compared# to GPT-NeoX and OPT used by the Meta AI team that trained the model.## Licensed under the Apache License, Version 2.0 (the "License");# you may not use this file except in compliance with the License.# You may obtain a copy of the License at## http://www.apache.org/licenses/LICENSE-2.0## Unless required by applicable law or agreed to in writing, software# distributed under the License is distributed on an "AS IS" BASIS,# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# See the License for the specific language governing permissions and# limitations under the License.""" Xiaomi-Robotics-U0 model configuration"""
from typing import Optional
from transformers.configuration_utils import PretrainedConfigfrom transformers.utils import logging
logger = logging.get_logger(__name__)
UNIS_PRETRAINED_CONFIG_ARCHIVE_MAP = {}
class UNISConfig(PretrainedConfig): r""" This is the configuration class to store the configuration of a [`UNISModel`]. It is used to instantiate an Xiaomi-Robotics-U0 model according to the specified arguments, defining the model architecture. Instantiating a configuration with the defaults will yield a similar configuration to that of the Xiaomi-Robotics-U0-8B.
Configuration objects inherit from [`PretrainedConfig`] and can be used to control the model outputs. Read the documentation from [`PretrainedConfig`] for more information.
Args: vocab_size (`int`, *optional*, defaults to 184622): Vocabulary size of the Xiaomi-Robotics-U0 model. Defines the number of different tokens that can be represented by the `inputs_ids` passed when calling [`UNISModel`] hidden_size (`int`, *optional*, defaults to 4096): Dimension of the hidden representations. intermediate_size (`int`, *optional*, defaults to 14336): Dimension of the MLP representations. num_hidden_layers (`int`, *optional*, defaults to 32): Number of hidden layers in the Transformer decoder. num_attention_heads (`int`, *optional*, defaults to 32): Number of attention heads for each attention layer in the Transformer decoder. num_key_value_heads (`int`, *optional*, defaults to 8): This is the number of key_value heads that should be used to implement Grouped Query Attention. If `num_key_value_heads=num_attention_heads`, the model will use Multi Head Attention (MHA), if `num_key_value_heads=1 the model will use Multi Query Attention (MQA) otherwise GQA is used. When converting a multi-head checkpoint to a GQA checkpoint, each group key and value head should be constructed by meanpooling all the original heads within that group. For more details checkout [this paper](https://arxiv.org/pdf/2305.13245.pdf). If it is not specified, will default to `num_attention_heads`. head_dim (`int`, *optional*, defaults to 128): The attention head dimension. hidden_act (`str` or `function`, *optional*, defaults to `"silu"`): The non-linear activation function (function or string) in the decoder. max_position_embeddings (`int`, *optional*, defaults to 9216): The maximum sequence length that this model might ever be used with. Emu supports up to 9216 tokens, initializer_range (`float`, *optional*, defaults to 0.02): The standard deviation of the truncated_normal_initializer for initializing all weight matrices. rms_norm_eps (`float`, *optional*, defaults to 1e-05): The epsilon used by the rms normalization layers. use_cache (`bool`, *optional*, defaults to `True`): Whether or not the model should return the last key/values attentions (not used by all models). Only relevant if `config.is_decoder=True`. pad_token_id (`int`, *optional*, 151643): Padding token id. bos_token_id (`int`, *optional*, defaults to 151849): Beginning of stream token id. eos_token_id (`int`, *optional*, defaults to 151850): End of stream token id. img_token_id (`int`, *optional*, defaults to 151851): image token id. boi_token_id (`int`, *optional*, defaults to 151852): Beginning of image token id. eoi_token_id (`int`, *optional*, defaults to 151853): End of image token id. eol_token_id (`int`, *optional*, defaults to 151846): End of line token id. eof_token_id (`int`, *optional*, defaults to 151847): End of line token id. image_area (`int`, *optional*, defaults to 1024 * 1024) generated image area (image area used in training) pretraining_tp (`int`, *optional*, defaults to 1): Experimental feature. Tensor parallelism rank used during pretraining. Please refer to [this document](https://huggingface.co/docs/transformers/parallelism) to understand more about it. This value is necessary to ensure exact reproducibility of the pretraining results. Please refer to [this issue](https://github.com/pytorch/pytorch/issues/76232). tie_word_embeddings (`bool`, *optional*, defaults to `False`): Whether to tie weight embeddings rope_theta (`float`, *optional*, defaults to 1_000_000.0): The base period of the RoPE embeddings. rope_scaling (`Dict`, *optional*): Dictionary containing the scaling configuration for the RoPE embeddings. Currently supports two scaling strategies: linear and dynamic. Their scaling factor must be a float greater than 1. The expected format is `{"type": strategy name, "factor": scaling factor}`. When using this flag, don't update `max_position_embeddings` to the expected new maximum. See the following thread for more information on how these scaling strategies behave: https://www.reddit.com/r/LocalLLaMA/comments/14mrgpr/dynamically_scaled_rope_further_increases/. This is an experimental feature, subject to breaking API changes in future versions. attention_dropout (`float`, *optional*, defaults to 0.1): The dropout ratio for the attention probabilities.
```python >>> from transformers import UNISModel, UNISConfig
>>> # Initializing a Xiaomi-Robotics-U0-8b style configuration >>> configuration = UNISConfig()
>>> # Initializing a model from the Xiaomi-Robotics-U0-8b style configuration >>> model = UNISModel(configuration)
>>> # Accessing the model configuration >>> configuration = model.config ```"""
model_type = "UNIS" keys_to_ignore_at_inference = ["past_key_values"]
def __init__( self, vocab_size: int = 184622, hidden_size: int = 4096, intermediate_size: int = 14336, num_hidden_layers: int = 32, num_attention_heads: int = 32, num_key_value_heads: Optional[int] = 8, head_dim=128, hidden_act: str = "silu", max_position_embeddings: int = 9216, initializer_range: float = 0.02, rms_norm_eps: float = 1e-5, use_cache: bool = True, pad_token_id: int = 151643, bos_token_id: int = 151849, eos_token_id: int = 151850, img_token_id: int = 151851, boi_token_id: int = 151852, eoi_token_id: int = 151853, eol_token_id: int = 151846, eof_token_id: int = 151847, image_area: int = 1024 * 1024, pretraining_tp: int = 1, tie_word_embeddings: bool = False, rope_theta: float = 1000000.0, rope_scaling: Optional = None, attention_dropout: float = 0.1, **kwargs, ): self.vocab_size = vocab_size self.max_position_embeddings = max_position_embeddings self.hidden_size = hidden_size self.intermediate_size = intermediate_size self.num_hidden_layers = num_hidden_layers self.num_attention_heads = num_attention_heads
# for backward compatibility if num_key_value_heads is None: num_key_value_heads = num_attention_heads
self.num_key_value_heads = num_key_value_heads self.head_dim = head_dim self.hidden_act = hidden_act self.initializer_range = initializer_range self.rms_norm_eps = rms_norm_eps self.pretraining_tp = pretraining_tp self.use_cache = use_cache self.rope_theta = rope_theta self.rope_scaling = rope_scaling self._rope_scaling_validation() self.attention_dropout = attention_dropout
self.img_token_id = img_token_id self.boi_token_id = boi_token_id self.eoi_token_id = eoi_token_id self.eol_token_id = eol_token_id self.eof_token_id = eof_token_id self.image_area = image_area
super().__init__( pad_token_id=pad_token_id, bos_token_id=bos_token_id, eos_token_id=eos_token_id, tie_word_embeddings=tie_word_embeddings, **kwargs, )
def _rope_scaling_validation(self): """ Validate the `rope_scaling` configuration. """ if self.rope_scaling is None: return
if not isinstance(self.rope_scaling, dict) or len(self.rope_scaling) != 2: raise ValueError( "`rope_scaling` must be a dictionary with with two fields, `type` and `factor`, " f"got {self.rope_scaling}" ) rope_scaling_type = self.rope_scaling.get("type", None) rope_scaling_factor = self.rope_scaling.get("factor", None) if rope_scaling_type is None or rope_scaling_type not in ["linear", "dynamic"]: raise ValueError( f"`rope_scaling`'s type field must be one of ['linear', 'dynamic'], got {rope_scaling_type}" ) if rope_scaling_factor is None or not isinstance(rope_scaling_factor, float) or rope_scaling_factor <= 1.0: raise ValueError(f"`rope_scaling`'s factor field must be a float > 1, got {rope_scaling_factor}")1234567{ "_from_model_config": true, "bos_token_id": 151849, "eos_token_id": 151850, "pad_token_id": 151643, "transformers_version": "4.48.2"}123version https://git-lfs.github.com/spec/v1oid sha256:325126b93ec2f4cbb44e17700890e96ccbc57557701973596df52154a8667f25size 4952416280123version https://git-lfs.github.com/spec/v1oid sha256:a288b08999be790149d575a3f4a8f70c628b3bd5b89a66099bc2d22c1d8ab93csize 4959876792123version https://git-lfs.github.com/spec/v1oid sha256:d3b65c451583f66419143bc45fc9fd1a1a66b390b0e049a92bca6b52b8f21dbasize 4875989872123version https://git-lfs.github.com/spec/v1oid sha256:9941da0d88ca45316789a48373d89cbbde864a3a35b9861774aecd21985dc979size 4875989912123version https://git-lfs.github.com/spec/v1oid sha256:1c53302978de4c866428f4a5a90c67bd4627613af8a5a71045ac7714b132756csize 4875989912123version https://git-lfs.github.com/spec/v1oid sha256:d24113f90764fe8febb4fc20b2a1ed71ee3a8903fc065458b460dcd8c4f93868size 4875989912123version https://git-lfs.github.com/spec/v1oid sha256:cd84c9c35d3cdbec68c3da9d42dae4e7fbc941828ea6205b13cb611406c0eb9dsize 4847568640123version https://git-lfs.github.com/spec/v1oid sha256:2160536a1f5e35e0c75440bba669f48832b5443bd65aaf366822e47c6ddcd6e1size 3712057288123version https://git-lfs.github.com/spec/v1oid sha256:bf2eb205a61230661e2998c0833b408a5a24e7ef9a09c62680ce0c5eba7801fesize 2910281532123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765{ "metadata": { "total_size": 75017999620 }, "weight_map": { "backbone.embed_tokens.weight": "model-00001-of-00016.safetensors", "backbone.layers.0.self_attn.q_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.0.self_attn.k_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.0.self_attn.v_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.0.self_attn.o_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.0.self_attn.q_norm.weight": "model-00001-of-00016.safetensors", "backbone.layers.0.self_attn.k_norm.weight": "model-00001-of-00016.safetensors", "backbone.layers.0.mlp.gate_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.0.mlp.up_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.0.mlp.down_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.0.input_layernorm.weight": "model-00001-of-00016.safetensors", "backbone.layers.0.post_attention_layernorm.weight": "model-00001-of-00016.safetensors", "backbone.layers.1.self_attn.q_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.1.self_attn.k_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.1.self_attn.v_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.1.self_attn.o_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.1.self_attn.q_norm.weight": "model-00001-of-00016.safetensors", "backbone.layers.1.self_attn.k_norm.weight": "model-00001-of-00016.safetensors", "backbone.layers.1.mlp.gate_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.1.mlp.up_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.1.mlp.down_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.1.input_layernorm.weight": "model-00001-of-00016.safetensors", "backbone.layers.1.post_attention_layernorm.weight": "model-00001-of-00016.safetensors", "backbone.layers.2.self_attn.q_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.2.self_attn.k_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.2.self_attn.v_proj.weight": "model-00001-of-00016.safetensors", "backbone.layers.2.self_attn.o_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.2.self_attn.q_norm.weight": "model-00002-of-00016.safetensors", "backbone.layers.2.self_attn.k_norm.weight": "model-00002-of-00016.safetensors", "backbone.layers.2.mlp.gate_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.2.mlp.up_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.2.mlp.down_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.2.input_layernorm.weight": "model-00002-of-00016.safetensors", "backbone.layers.2.post_attention_layernorm.weight": "model-00002-of-00016.safetensors", "backbone.layers.3.self_attn.q_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.3.self_attn.k_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.3.self_attn.v_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.3.self_attn.o_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.3.self_attn.q_norm.weight": "model-00002-of-00016.safetensors", "backbone.layers.3.self_attn.k_norm.weight": "model-00002-of-00016.safetensors", "backbone.layers.3.mlp.gate_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.3.mlp.up_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.3.mlp.down_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.3.input_layernorm.weight": "model-00002-of-00016.safetensors", "backbone.layers.3.post_attention_layernorm.weight": "model-00002-of-00016.safetensors", "backbone.layers.4.self_attn.q_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.4.self_attn.k_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.4.self_attn.v_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.4.self_attn.o_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.4.self_attn.q_norm.weight": "model-00002-of-00016.safetensors", "backbone.layers.4.self_attn.k_norm.weight": "model-00002-of-00016.safetensors", "backbone.layers.4.mlp.gate_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.4.mlp.up_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.4.mlp.down_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.4.input_layernorm.weight": "model-00002-of-00016.safetensors", "backbone.layers.4.post_attention_layernorm.weight": "model-00002-of-00016.safetensors", "backbone.layers.5.self_attn.q_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.5.self_attn.k_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.5.self_attn.v_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.5.self_attn.o_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.5.self_attn.q_norm.weight": "model-00002-of-00016.safetensors", "backbone.layers.5.self_attn.k_norm.weight": "model-00002-of-00016.safetensors", "backbone.layers.5.mlp.gate_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.5.mlp.up_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.5.mlp.down_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.5.input_layernorm.weight": "model-00002-of-00016.safetensors", "backbone.layers.5.post_attention_layernorm.weight": "model-00002-of-00016.safetensors", "backbone.layers.6.self_attn.q_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.6.self_attn.k_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.6.self_attn.v_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.6.self_attn.o_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.6.self_attn.q_norm.weight": "model-00002-of-00016.safetensors", "backbone.layers.6.self_attn.k_norm.weight": "model-00002-of-00016.safetensors", "backbone.layers.6.mlp.gate_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.6.mlp.up_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.6.mlp.down_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.6.input_layernorm.weight": "model-00002-of-00016.safetensors", "backbone.layers.6.post_attention_layernorm.weight": "model-00002-of-00016.safetensors", "backbone.layers.7.self_attn.q_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.7.self_attn.k_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.7.self_attn.v_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.7.self_attn.o_proj.weight": "model-00002-of-00016.safetensors", "backbone.layers.7.self_attn.q_norm.weight": "model-00002-of-00016.safetensors", "backbone.layers.7.self_attn.k_norm.weight": "model-00002-of-00016.safetensors", "backbone.layers.7.mlp.gate_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.7.mlp.up_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.7.mlp.down_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.7.input_layernorm.weight": "model-00003-of-00016.safetensors", "backbone.layers.7.post_attention_layernorm.weight": "model-00003-of-00016.safetensors", "backbone.layers.8.self_attn.q_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.8.self_attn.k_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.8.self_attn.v_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.8.self_attn.o_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.8.self_attn.q_norm.weight": "model-00003-of-00016.safetensors", "backbone.layers.8.self_attn.k_norm.weight": "model-00003-of-00016.safetensors", "backbone.layers.8.mlp.gate_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.8.mlp.up_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.8.mlp.down_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.8.input_layernorm.weight": "model-00003-of-00016.safetensors", "backbone.layers.8.post_attention_layernorm.weight": "model-00003-of-00016.safetensors", "backbone.layers.9.self_attn.q_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.9.self_attn.k_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.9.self_attn.v_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.9.self_attn.o_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.9.self_attn.q_norm.weight": "model-00003-of-00016.safetensors", "backbone.layers.9.self_attn.k_norm.weight": "model-00003-of-00016.safetensors", "backbone.layers.9.mlp.gate_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.9.mlp.up_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.9.mlp.down_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.9.input_layernorm.weight": "model-00003-of-00016.safetensors", "backbone.layers.9.post_attention_layernorm.weight": "model-00003-of-00016.safetensors", "backbone.layers.10.self_attn.q_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.10.self_attn.k_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.10.self_attn.v_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.10.self_attn.o_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.10.self_attn.q_norm.weight": "model-00003-of-00016.safetensors", "backbone.layers.10.self_attn.k_norm.weight": "model-00003-of-00016.safetensors", "backbone.layers.10.mlp.gate_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.10.mlp.up_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.10.mlp.down_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.10.input_layernorm.weight": "model-00003-of-00016.safetensors", "backbone.layers.10.post_attention_layernorm.weight": "model-00003-of-00016.safetensors", "backbone.layers.11.self_attn.q_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.11.self_attn.k_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.11.self_attn.v_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.11.self_attn.o_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.11.self_attn.q_norm.weight": "model-00003-of-00016.safetensors", "backbone.layers.11.self_attn.k_norm.weight": "model-00003-of-00016.safetensors", "backbone.layers.11.mlp.gate_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.11.mlp.up_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.11.mlp.down_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.11.input_layernorm.weight": "model-00003-of-00016.safetensors", "backbone.layers.11.post_attention_layernorm.weight": "model-00003-of-00016.safetensors", "backbone.layers.12.self_attn.q_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.12.self_attn.k_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.12.self_attn.v_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.12.self_attn.o_proj.weight": "model-00003-of-00016.safetensors", "backbone.layers.12.self_attn.q_norm.weight": "model-00003-of-00016.safetensors", "backbone.layers.12.self_attn.k_norm.weight": "model-00003-of-00016.safetensors", "backbone.layers.12.mlp.gate_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.12.mlp.up_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.12.mlp.down_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.12.input_layernorm.weight": "model-00004-of-00016.safetensors", "backbone.layers.12.post_attention_layernorm.weight": "model-00004-of-00016.safetensors", "backbone.layers.13.self_attn.q_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.13.self_attn.k_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.13.self_attn.v_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.13.self_attn.o_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.13.self_attn.q_norm.weight": "model-00004-of-00016.safetensors", "backbone.layers.13.self_attn.k_norm.weight": "model-00004-of-00016.safetensors", "backbone.layers.13.mlp.gate_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.13.mlp.up_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.13.mlp.down_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.13.input_layernorm.weight": "model-00004-of-00016.safetensors", "backbone.layers.13.post_attention_layernorm.weight": "model-00004-of-00016.safetensors", "backbone.layers.14.self_attn.q_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.14.self_attn.k_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.14.self_attn.v_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.14.self_attn.o_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.14.self_attn.q_norm.weight": "model-00004-of-00016.safetensors", "backbone.layers.14.self_attn.k_norm.weight": "model-00004-of-00016.safetensors", "backbone.layers.14.mlp.gate_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.14.mlp.up_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.14.mlp.down_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.14.input_layernorm.weight": "model-00004-of-00016.safetensors", "backbone.layers.14.post_attention_layernorm.weight": "model-00004-of-00016.safetensors", "backbone.layers.15.self_attn.q_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.15.self_attn.k_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.15.self_attn.v_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.15.self_attn.o_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.15.self_attn.q_norm.weight": "model-00004-of-00016.safetensors", "backbone.layers.15.self_attn.k_norm.weight": "model-00004-of-00016.safetensors", "backbone.layers.15.mlp.gate_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.15.mlp.up_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.15.mlp.down_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.15.input_layernorm.weight": "model-00004-of-00016.safetensors", "backbone.layers.15.post_attention_layernorm.weight": "model-00004-of-00016.safetensors", "backbone.layers.16.self_attn.q_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.16.self_attn.k_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.16.self_attn.v_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.16.self_attn.o_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.16.self_attn.q_norm.weight": "model-00004-of-00016.safetensors", "backbone.layers.16.self_attn.k_norm.weight": "model-00004-of-00016.safetensors", "backbone.layers.16.mlp.gate_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.16.mlp.up_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.16.mlp.down_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.16.input_layernorm.weight": "model-00004-of-00016.safetensors", "backbone.layers.16.post_attention_layernorm.weight": "model-00004-of-00016.safetensors", "backbone.layers.17.self_attn.q_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.17.self_attn.k_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.17.self_attn.v_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.17.self_attn.o_proj.weight": "model-00004-of-00016.safetensors", "backbone.layers.17.self_attn.q_norm.weight": "model-00004-of-00016.safetensors", "backbone.layers.17.self_attn.k_norm.weight": "model-00004-of-00016.safetensors", "backbone.layers.17.mlp.gate_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.17.mlp.up_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.17.mlp.down_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.17.input_layernorm.weight": "model-00005-of-00016.safetensors", "backbone.layers.17.post_attention_layernorm.weight": "model-00005-of-00016.safetensors", "backbone.layers.18.self_attn.q_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.18.self_attn.k_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.18.self_attn.v_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.18.self_attn.o_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.18.self_attn.q_norm.weight": "model-00005-of-00016.safetensors", "backbone.layers.18.self_attn.k_norm.weight": "model-00005-of-00016.safetensors", "backbone.layers.18.mlp.gate_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.18.mlp.up_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.18.mlp.down_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.18.input_layernorm.weight": "model-00005-of-00016.safetensors", "backbone.layers.18.post_attention_layernorm.weight": "model-00005-of-00016.safetensors", "backbone.layers.19.self_attn.q_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.19.self_attn.k_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.19.self_attn.v_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.19.self_attn.o_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.19.self_attn.q_norm.weight": "model-00005-of-00016.safetensors", "backbone.layers.19.self_attn.k_norm.weight": "model-00005-of-00016.safetensors", "backbone.layers.19.mlp.gate_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.19.mlp.up_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.19.mlp.down_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.19.input_layernorm.weight": "model-00005-of-00016.safetensors", "backbone.layers.19.post_attention_layernorm.weight": "model-00005-of-00016.safetensors", "backbone.layers.20.self_attn.q_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.20.self_attn.k_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.20.self_attn.v_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.20.self_attn.o_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.20.self_attn.q_norm.weight": "model-00005-of-00016.safetensors", "backbone.layers.20.self_attn.k_norm.weight": "model-00005-of-00016.safetensors", "backbone.layers.20.mlp.gate_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.20.mlp.up_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.20.mlp.down_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.20.input_layernorm.weight": "model-00005-of-00016.safetensors", "backbone.layers.20.post_attention_layernorm.weight": "model-00005-of-00016.safetensors", "backbone.layers.21.self_attn.q_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.21.self_attn.k_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.21.self_attn.v_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.21.self_attn.o_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.21.self_attn.q_norm.weight": "model-00005-of-00016.safetensors", "backbone.layers.21.self_attn.k_norm.weight": "model-00005-of-00016.safetensors", "backbone.layers.21.mlp.gate_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.21.mlp.up_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.21.mlp.down_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.21.input_layernorm.weight": "model-00005-of-00016.safetensors", "backbone.layers.21.post_attention_layernorm.weight": "model-00005-of-00016.safetensors", "backbone.layers.22.self_attn.q_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.22.self_attn.k_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.22.self_attn.v_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.22.self_attn.o_proj.weight": "model-00005-of-00016.safetensors", "backbone.layers.22.self_attn.q_norm.weight": "model-00005-of-00016.safetensors", "backbone.layers.22.self_attn.k_norm.weight": "model-00005-of-00016.safetensors", "backbone.layers.22.mlp.gate_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.22.mlp.up_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.22.mlp.down_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.22.input_layernorm.weight": "model-00006-of-00016.safetensors", "backbone.layers.22.post_attention_layernorm.weight": "model-00006-of-00016.safetensors", "backbone.layers.23.self_attn.q_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.23.self_attn.k_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.23.self_attn.v_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.23.self_attn.o_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.23.self_attn.q_norm.weight": "model-00006-of-00016.safetensors", "backbone.layers.23.self_attn.k_norm.weight": "model-00006-of-00016.safetensors", "backbone.layers.23.mlp.gate_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.23.mlp.up_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.23.mlp.down_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.23.input_layernorm.weight": "model-00006-of-00016.safetensors", "backbone.layers.23.post_attention_layernorm.weight": "model-00006-of-00016.safetensors", "backbone.layers.24.self_attn.q_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.24.self_attn.k_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.24.self_attn.v_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.24.self_attn.o_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.24.self_attn.q_norm.weight": "model-00006-of-00016.safetensors", "backbone.layers.24.self_attn.k_norm.weight": "model-00006-of-00016.safetensors", "backbone.layers.24.mlp.gate_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.24.mlp.up_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.24.mlp.down_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.24.input_layernorm.weight": "model-00006-of-00016.safetensors", "backbone.layers.24.post_attention_layernorm.weight": "model-00006-of-00016.safetensors", "backbone.layers.25.self_attn.q_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.25.self_attn.k_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.25.self_attn.v_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.25.self_attn.o_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.25.self_attn.q_norm.weight": "model-00006-of-00016.safetensors", "backbone.layers.25.self_attn.k_norm.weight": "model-00006-of-00016.safetensors", "backbone.layers.25.mlp.gate_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.25.mlp.up_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.25.mlp.down_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.25.input_layernorm.weight": "model-00006-of-00016.safetensors", "backbone.layers.25.post_attention_layernorm.weight": "model-00006-of-00016.safetensors", "backbone.layers.26.self_attn.q_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.26.self_attn.k_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.26.self_attn.v_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.26.self_attn.o_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.26.self_attn.q_norm.weight": "model-00006-of-00016.safetensors", "backbone.layers.26.self_attn.k_norm.weight": "model-00006-of-00016.safetensors", "backbone.layers.26.mlp.gate_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.26.mlp.up_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.26.mlp.down_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.26.input_layernorm.weight": "model-00006-of-00016.safetensors", "backbone.layers.26.post_attention_layernorm.weight": "model-00006-of-00016.safetensors", "backbone.layers.27.self_attn.q_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.27.self_attn.k_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.27.self_attn.v_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.27.self_attn.o_proj.weight": "model-00006-of-00016.safetensors", "backbone.layers.27.self_attn.q_norm.weight": "model-00006-of-00016.safetensors", "backbone.layers.27.self_attn.k_norm.weight": "model-00006-of-00016.safetensors", "backbone.layers.27.mlp.gate_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.27.mlp.up_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.27.mlp.down_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.27.input_layernorm.weight": "model-00007-of-00016.safetensors", "backbone.layers.27.post_attention_layernorm.weight": "model-00007-of-00016.safetensors", "backbone.layers.28.self_attn.q_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.28.self_attn.k_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.28.self_attn.v_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.28.self_attn.o_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.28.self_attn.q_norm.weight": "model-00007-of-00016.safetensors", "backbone.layers.28.self_attn.k_norm.weight": "model-00007-of-00016.safetensors", "backbone.layers.28.mlp.gate_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.28.mlp.up_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.28.mlp.down_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.28.input_layernorm.weight": "model-00007-of-00016.safetensors", "backbone.layers.28.post_attention_layernorm.weight": "model-00007-of-00016.safetensors", "backbone.layers.29.self_attn.q_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.29.self_attn.k_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.29.self_attn.v_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.29.self_attn.o_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.29.self_attn.q_norm.weight": "model-00007-of-00016.safetensors", "backbone.layers.29.self_attn.k_norm.weight": "model-00007-of-00016.safetensors", "backbone.layers.29.mlp.gate_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.29.mlp.up_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.29.mlp.down_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.29.input_layernorm.weight": "model-00007-of-00016.safetensors", "backbone.layers.29.post_attention_layernorm.weight": "model-00007-of-00016.safetensors", "backbone.layers.30.self_attn.q_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.30.self_attn.k_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.30.self_attn.v_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.30.self_attn.o_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.30.self_attn.q_norm.weight": "model-00007-of-00016.safetensors", "backbone.layers.30.self_attn.k_norm.weight": "model-00007-of-00016.safetensors", "backbone.layers.30.mlp.gate_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.30.mlp.up_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.30.mlp.down_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.30.input_layernorm.weight": "model-00007-of-00016.safetensors", "backbone.layers.30.post_attention_layernorm.weight": "model-00007-of-00016.safetensors", "backbone.layers.31.self_attn.q_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.31.self_attn.k_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.31.self_attn.v_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.31.self_attn.o_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.31.self_attn.q_norm.weight": "model-00007-of-00016.safetensors", "backbone.layers.31.self_attn.k_norm.weight": "model-00007-of-00016.safetensors", "backbone.layers.31.mlp.gate_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.31.mlp.up_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.31.mlp.down_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.31.input_layernorm.weight": "model-00007-of-00016.safetensors", "backbone.layers.31.post_attention_layernorm.weight": "model-00007-of-00016.safetensors", "backbone.layers.32.self_attn.q_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.32.self_attn.k_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.32.self_attn.v_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.32.self_attn.o_proj.weight": "model-00007-of-00016.safetensors", "backbone.layers.32.self_attn.q_norm.weight": "model-00007-of-00016.safetensors", "backbone.layers.32.self_attn.k_norm.weight": "model-00007-of-00016.safetensors", "backbone.layers.32.mlp.gate_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.32.mlp.up_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.32.mlp.down_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.32.input_layernorm.weight": "model-00008-of-00016.safetensors", "backbone.layers.32.post_attention_layernorm.weight": "model-00008-of-00016.safetensors", "backbone.layers.33.self_attn.q_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.33.self_attn.k_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.33.self_attn.v_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.33.self_attn.o_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.33.self_attn.q_norm.weight": "model-00008-of-00016.safetensors", "backbone.layers.33.self_attn.k_norm.weight": "model-00008-of-00016.safetensors", "backbone.layers.33.mlp.gate_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.33.mlp.up_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.33.mlp.down_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.33.input_layernorm.weight": "model-00008-of-00016.safetensors", "backbone.layers.33.post_attention_layernorm.weight": "model-00008-of-00016.safetensors", "backbone.layers.34.self_attn.q_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.34.self_attn.k_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.34.self_attn.v_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.34.self_attn.o_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.34.self_attn.q_norm.weight": "model-00008-of-00016.safetensors", "backbone.layers.34.self_attn.k_norm.weight": "model-00008-of-00016.safetensors", "backbone.layers.34.mlp.gate_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.34.mlp.up_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.34.mlp.down_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.34.input_layernorm.weight": "model-00008-of-00016.safetensors", "backbone.layers.34.post_attention_layernorm.weight": "model-00008-of-00016.safetensors", "backbone.layers.35.self_attn.q_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.35.self_attn.k_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.35.self_attn.v_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.35.self_attn.o_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.35.self_attn.q_norm.weight": "model-00008-of-00016.safetensors", "backbone.layers.35.self_attn.k_norm.weight": "model-00008-of-00016.safetensors", "backbone.layers.35.mlp.gate_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.35.mlp.up_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.35.mlp.down_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.35.input_layernorm.weight": "model-00008-of-00016.safetensors", "backbone.layers.35.post_attention_layernorm.weight": "model-00008-of-00016.safetensors", "backbone.layers.36.self_attn.q_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.36.self_attn.k_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.36.self_attn.v_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.36.self_attn.o_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.36.self_attn.q_norm.weight": "model-00008-of-00016.safetensors", "backbone.layers.36.self_attn.k_norm.weight": "model-00008-of-00016.safetensors", "backbone.layers.36.mlp.gate_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.36.mlp.up_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.36.mlp.down_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.36.input_layernorm.weight": "model-00008-of-00016.safetensors", "backbone.layers.36.post_attention_layernorm.weight": "model-00008-of-00016.safetensors", "backbone.layers.37.self_attn.q_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.37.self_attn.k_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.37.self_attn.v_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.37.self_attn.o_proj.weight": "model-00008-of-00016.safetensors", "backbone.layers.37.self_attn.q_norm.weight": "model-00008-of-00016.safetensors", "backbone.layers.37.self_attn.k_norm.weight": "model-00008-of-00016.safetensors", "backbone.layers.37.mlp.gate_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.37.mlp.up_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.37.mlp.down_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.37.input_layernorm.weight": "model-00009-of-00016.safetensors", "backbone.layers.37.post_attention_layernorm.weight": "model-00009-of-00016.safetensors", "backbone.layers.38.self_attn.q_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.38.self_attn.k_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.38.self_attn.v_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.38.self_attn.o_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.38.self_attn.q_norm.weight": "model-00009-of-00016.safetensors", "backbone.layers.38.self_attn.k_norm.weight": "model-00009-of-00016.safetensors", "backbone.layers.38.mlp.gate_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.38.mlp.up_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.38.mlp.down_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.38.input_layernorm.weight": "model-00009-of-00016.safetensors", "backbone.layers.38.post_attention_layernorm.weight": "model-00009-of-00016.safetensors", "backbone.layers.39.self_attn.q_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.39.self_attn.k_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.39.self_attn.v_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.39.self_attn.o_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.39.self_attn.q_norm.weight": "model-00009-of-00016.safetensors", "backbone.layers.39.self_attn.k_norm.weight": "model-00009-of-00016.safetensors", "backbone.layers.39.mlp.gate_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.39.mlp.up_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.39.mlp.down_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.39.input_layernorm.weight": "model-00009-of-00016.safetensors", "backbone.layers.39.post_attention_layernorm.weight": "model-00009-of-00016.safetensors", "backbone.layers.40.self_attn.q_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.40.self_attn.k_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.40.self_attn.v_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.40.self_attn.o_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.40.self_attn.q_norm.weight": "model-00009-of-00016.safetensors", "backbone.layers.40.self_attn.k_norm.weight": "model-00009-of-00016.safetensors", "backbone.layers.40.mlp.gate_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.40.mlp.up_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.40.mlp.down_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.40.input_layernorm.weight": "model-00009-of-00016.safetensors", "backbone.layers.40.post_attention_layernorm.weight": "model-00009-of-00016.safetensors", "backbone.layers.41.self_attn.q_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.41.self_attn.k_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.41.self_attn.v_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.41.self_attn.o_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.41.self_attn.q_norm.weight": "model-00009-of-00016.safetensors", "backbone.layers.41.self_attn.k_norm.weight": "model-00009-of-00016.safetensors", "backbone.layers.41.mlp.gate_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.41.mlp.up_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.41.mlp.down_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.41.input_layernorm.weight": "model-00009-of-00016.safetensors", "backbone.layers.41.post_attention_layernorm.weight": "model-00009-of-00016.safetensors", "backbone.layers.42.self_attn.q_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.42.self_attn.k_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.42.self_attn.v_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.42.self_attn.o_proj.weight": "model-00009-of-00016.safetensors", "backbone.layers.42.self_attn.q_norm.weight": "model-00009-of-00016.safetensors", "backbone.layers.42.self_attn.k_norm.weight": "model-00009-of-00016.safetensors", "backbone.layers.42.mlp.gate_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.42.mlp.up_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.42.mlp.down_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.42.input_layernorm.weight": "model-00010-of-00016.safetensors", "backbone.layers.42.post_attention_layernorm.weight": "model-00010-of-00016.safetensors", "backbone.layers.43.self_attn.q_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.43.self_attn.k_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.43.self_attn.v_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.43.self_attn.o_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.43.self_attn.q_norm.weight": "model-00010-of-00016.safetensors", "backbone.layers.43.self_attn.k_norm.weight": "model-00010-of-00016.safetensors", "backbone.layers.43.mlp.gate_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.43.mlp.up_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.43.mlp.down_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.43.input_layernorm.weight": "model-00010-of-00016.safetensors", "backbone.layers.43.post_attention_layernorm.weight": "model-00010-of-00016.safetensors", "backbone.layers.44.self_attn.q_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.44.self_attn.k_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.44.self_attn.v_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.44.self_attn.o_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.44.self_attn.q_norm.weight": "model-00010-of-00016.safetensors", "backbone.layers.44.self_attn.k_norm.weight": "model-00010-of-00016.safetensors", "backbone.layers.44.mlp.gate_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.44.mlp.up_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.44.mlp.down_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.44.input_layernorm.weight": "model-00010-of-00016.safetensors", "backbone.layers.44.post_attention_layernorm.weight": "model-00010-of-00016.safetensors", "backbone.layers.45.self_attn.q_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.45.self_attn.k_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.45.self_attn.v_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.45.self_attn.o_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.45.self_attn.q_norm.weight": "model-00010-of-00016.safetensors", "backbone.layers.45.self_attn.k_norm.weight": "model-00010-of-00016.safetensors", "backbone.layers.45.mlp.gate_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.45.mlp.up_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.45.mlp.down_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.45.input_layernorm.weight": "model-00010-of-00016.safetensors", "backbone.layers.45.post_attention_layernorm.weight": "model-00010-of-00016.safetensors", "backbone.layers.46.self_attn.q_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.46.self_attn.k_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.46.self_attn.v_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.46.self_attn.o_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.46.self_attn.q_norm.weight": "model-00010-of-00016.safetensors", "backbone.layers.46.self_attn.k_norm.weight": "model-00010-of-00016.safetensors", "backbone.layers.46.mlp.gate_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.46.mlp.up_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.46.mlp.down_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.46.input_layernorm.weight": "model-00010-of-00016.safetensors", "backbone.layers.46.post_attention_layernorm.weight": "model-00010-of-00016.safetensors", "backbone.layers.47.self_attn.q_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.47.self_attn.k_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.47.self_attn.v_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.47.self_attn.o_proj.weight": "model-00010-of-00016.safetensors", "backbone.layers.47.self_attn.q_norm.weight": "model-00010-of-00016.safetensors", "backbone.layers.47.self_attn.k_norm.weight": "model-00010-of-00016.safetensors", "backbone.layers.47.mlp.gate_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.47.mlp.up_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.47.mlp.down_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.47.input_layernorm.weight": "model-00011-of-00016.safetensors", "backbone.layers.47.post_attention_layernorm.weight": "model-00011-of-00016.safetensors", "backbone.layers.48.self_attn.q_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.48.self_attn.k_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.48.self_attn.v_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.48.self_attn.o_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.48.self_attn.q_norm.weight": "model-00011-of-00016.safetensors", "backbone.layers.48.self_attn.k_norm.weight": "model-00011-of-00016.safetensors", "backbone.layers.48.mlp.gate_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.48.mlp.up_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.48.mlp.down_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.48.input_layernorm.weight": "model-00011-of-00016.safetensors", "backbone.layers.48.post_attention_layernorm.weight": "model-00011-of-00016.safetensors", "backbone.layers.49.self_attn.q_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.49.self_attn.k_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.49.self_attn.v_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.49.self_attn.o_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.49.self_attn.q_norm.weight": "model-00011-of-00016.safetensors", "backbone.layers.49.self_attn.k_norm.weight": "model-00011-of-00016.safetensors", "backbone.layers.49.mlp.gate_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.49.mlp.up_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.49.mlp.down_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.49.input_layernorm.weight": "model-00011-of-00016.safetensors", "backbone.layers.49.post_attention_layernorm.weight": "model-00011-of-00016.safetensors", "backbone.layers.50.self_attn.q_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.50.self_attn.k_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.50.self_attn.v_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.50.self_attn.o_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.50.self_attn.q_norm.weight": "model-00011-of-00016.safetensors", "backbone.layers.50.self_attn.k_norm.weight": "model-00011-of-00016.safetensors", "backbone.layers.50.mlp.gate_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.50.mlp.up_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.50.mlp.down_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.50.input_layernorm.weight": "model-00011-of-00016.safetensors", "backbone.layers.50.post_attention_layernorm.weight": "model-00011-of-00016.safetensors", "backbone.layers.51.self_attn.q_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.51.self_attn.k_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.51.self_attn.v_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.51.self_attn.o_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.51.self_attn.q_norm.weight": "model-00011-of-00016.safetensors", "backbone.layers.51.self_attn.k_norm.weight": "model-00011-of-00016.safetensors", "backbone.layers.51.mlp.gate_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.51.mlp.up_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.51.mlp.down_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.51.input_layernorm.weight": "model-00011-of-00016.safetensors", "backbone.layers.51.post_attention_layernorm.weight": "model-00011-of-00016.safetensors", "backbone.layers.52.self_attn.q_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.52.self_attn.k_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.52.self_attn.v_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.52.self_attn.o_proj.weight": "model-00011-of-00016.safetensors", "backbone.layers.52.self_attn.q_norm.weight": "model-00011-of-00016.safetensors", "backbone.layers.52.self_attn.k_norm.weight": "model-00011-of-00016.safetensors", "backbone.layers.52.mlp.gate_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.52.mlp.up_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.52.mlp.down_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.52.input_layernorm.weight": "model-00012-of-00016.safetensors", "backbone.layers.52.post_attention_layernorm.weight": "model-00012-of-00016.safetensors", "backbone.layers.53.self_attn.q_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.53.self_attn.k_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.53.self_attn.v_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.53.self_attn.o_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.53.self_attn.q_norm.weight": "model-00012-of-00016.safetensors", "backbone.layers.53.self_attn.k_norm.weight": "model-00012-of-00016.safetensors", "backbone.layers.53.mlp.gate_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.53.mlp.up_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.53.mlp.down_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.53.input_layernorm.weight": "model-00012-of-00016.safetensors", "backbone.layers.53.post_attention_layernorm.weight": "model-00012-of-00016.safetensors", "backbone.layers.54.self_attn.q_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.54.self_attn.k_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.54.self_attn.v_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.54.self_attn.o_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.54.self_attn.q_norm.weight": "model-00012-of-00016.safetensors", "backbone.layers.54.self_attn.k_norm.weight": "model-00012-of-00016.safetensors", "backbone.layers.54.mlp.gate_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.54.mlp.up_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.54.mlp.down_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.54.input_layernorm.weight": "model-00012-of-00016.safetensors", "backbone.layers.54.post_attention_layernorm.weight": "model-00012-of-00016.safetensors", "backbone.layers.55.self_attn.q_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.55.self_attn.k_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.55.self_attn.v_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.55.self_attn.o_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.55.self_attn.q_norm.weight": "model-00012-of-00016.safetensors", "backbone.layers.55.self_attn.k_norm.weight": "model-00012-of-00016.safetensors", "backbone.layers.55.mlp.gate_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.55.mlp.up_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.55.mlp.down_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.55.input_layernorm.weight": "model-00012-of-00016.safetensors", "backbone.layers.55.post_attention_layernorm.weight": "model-00012-of-00016.safetensors", "backbone.layers.56.self_attn.q_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.56.self_attn.k_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.56.self_attn.v_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.56.self_attn.o_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.56.self_attn.q_norm.weight": "model-00012-of-00016.safetensors", "backbone.layers.56.self_attn.k_norm.weight": "model-00012-of-00016.safetensors", "backbone.layers.56.mlp.gate_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.56.mlp.up_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.56.mlp.down_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.56.input_layernorm.weight": "model-00012-of-00016.safetensors", "backbone.layers.56.post_attention_layernorm.weight": "model-00012-of-00016.safetensors", "backbone.layers.57.self_attn.q_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.57.self_attn.k_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.57.self_attn.v_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.57.self_attn.o_proj.weight": "model-00012-of-00016.safetensors", "backbone.layers.57.self_attn.q_norm.weight": "model-00012-of-00016.safetensors", "backbone.layers.57.self_attn.k_norm.weight": "model-00012-of-00016.safetensors", "backbone.layers.57.mlp.gate_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.57.mlp.up_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.57.mlp.down_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.57.input_layernorm.weight": "model-00013-of-00016.safetensors", "backbone.layers.57.post_attention_layernorm.weight": "model-00013-of-00016.safetensors", "backbone.layers.58.self_attn.q_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.58.self_attn.k_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.58.self_attn.v_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.58.self_attn.o_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.58.self_attn.q_norm.weight": "model-00013-of-00016.safetensors", "backbone.layers.58.self_attn.k_norm.weight": "model-00013-of-00016.safetensors", "backbone.layers.58.mlp.gate_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.58.mlp.up_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.58.mlp.down_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.58.input_layernorm.weight": "model-00013-of-00016.safetensors", "backbone.layers.58.post_attention_layernorm.weight": "model-00013-of-00016.safetensors", "backbone.layers.59.self_attn.q_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.59.self_attn.k_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.59.self_attn.v_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.59.self_attn.o_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.59.self_attn.q_norm.weight": "model-00013-of-00016.safetensors", "backbone.layers.59.self_attn.k_norm.weight": "model-00013-of-00016.safetensors", "backbone.layers.59.mlp.gate_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.59.mlp.up_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.59.mlp.down_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.59.input_layernorm.weight": "model-00013-of-00016.safetensors", "backbone.layers.59.post_attention_layernorm.weight": "model-00013-of-00016.safetensors", "backbone.layers.60.self_attn.q_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.60.self_attn.k_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.60.self_attn.v_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.60.self_attn.o_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.60.self_attn.q_norm.weight": "model-00013-of-00016.safetensors", "backbone.layers.60.self_attn.k_norm.weight": "model-00013-of-00016.safetensors", "backbone.layers.60.mlp.gate_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.60.mlp.up_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.60.mlp.down_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.60.input_layernorm.weight": "model-00013-of-00016.safetensors", "backbone.layers.60.post_attention_layernorm.weight": "model-00013-of-00016.safetensors", "backbone.layers.61.self_attn.q_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.61.self_attn.k_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.61.self_attn.v_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.61.self_attn.o_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.61.self_attn.q_norm.weight": "model-00013-of-00016.safetensors", "backbone.layers.61.self_attn.k_norm.weight": "model-00013-of-00016.safetensors", "backbone.layers.61.mlp.gate_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.61.mlp.up_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.61.mlp.down_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.61.input_layernorm.weight": "model-00013-of-00016.safetensors", "backbone.layers.61.post_attention_layernorm.weight": "model-00013-of-00016.safetensors", "backbone.layers.62.self_attn.q_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.62.self_attn.k_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.62.self_attn.v_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.62.self_attn.o_proj.weight": "model-00013-of-00016.safetensors", "backbone.layers.62.self_attn.q_norm.weight": "model-00013-of-00016.safetensors", "backbone.layers.62.self_attn.k_norm.weight": "model-00013-of-00016.safetensors", "backbone.layers.62.mlp.gate_proj.weight": "model-00014-of-00016.safetensors", "backbone.layers.62.mlp.up_proj.weight": "model-00014-of-00016.safetensors", "backbone.layers.62.mlp.down_proj.weight": "model-00014-of-00016.safetensors", "backbone.layers.62.input_layernorm.weight": "model-00014-of-00016.safetensors", "backbone.layers.62.post_attention_layernorm.weight": "model-00014-of-00016.safetensors", "backbone.layers.63.self_attn.q_proj.weight": "model-00014-of-00016.safetensors", "backbone.layers.63.self_attn.k_proj.weight": "model-00014-of-00016.safetensors", "backbone.layers.63.self_attn.v_proj.weight": "model-00014-of-00016.safetensors", "backbone.layers.63.self_attn.o_proj.weight": "model-00014-of-00016.safetensors", "backbone.layers.63.self_attn.q_norm.weight": "model-00014-of-00016.safetensors", "backbone.layers.63.self_attn.k_norm.weight": "model-00014-of-00016.safetensors", "backbone.layers.63.mlp.gate_proj.weight": "model-00014-of-00016.safetensors", "backbone.layers.63.mlp.up_proj.weight": "model-00014-of-00016.safetensors", "backbone.layers.63.mlp.down_proj.weight": "model-00014-of-00016.safetensors", "backbone.layers.63.input_layernorm.weight": "model-00014-of-00016.safetensors", "backbone.layers.63.post_attention_layernorm.weight": "model-00014-of-00016.safetensors", "backbone.norm.weight": "model-00014-of-00016.safetensors", "horizontal_head.weight": "model-00014-of-00016.safetensors", "vertical_block.0.self_attn.q_proj.weight": "model-00014-of-00016.safetensors", "vertical_block.0.self_attn.k_proj.weight": "model-00014-of-00016.safetensors", "vertical_block.0.self_attn.v_proj.weight": "model-00014-of-00016.safetensors", "vertical_block.0.self_attn.o_proj.weight": "model-00014-of-00016.safetensors", "vertical_block.0.self_attn.q_norm.weight": "model-00014-of-00016.safetensors", "vertical_block.0.self_attn.k_norm.weight": "model-00014-of-00016.safetensors", "vertical_block.0.mlp.gate_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.0.mlp.up_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.0.mlp.down_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.0.input_layernorm.weight": "model-00015-of-00016.safetensors", "vertical_block.0.post_attention_layernorm.weight": "model-00015-of-00016.safetensors", "vertical_block.1.self_attn.q_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.1.self_attn.k_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.1.self_attn.v_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.1.self_attn.o_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.1.self_attn.q_norm.weight": "model-00015-of-00016.safetensors", "vertical_block.1.self_attn.k_norm.weight": "model-00015-of-00016.safetensors", "vertical_block.1.mlp.gate_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.1.mlp.up_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.1.mlp.down_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.1.input_layernorm.weight": "model-00015-of-00016.safetensors", "vertical_block.1.post_attention_layernorm.weight": "model-00015-of-00016.safetensors", "vertical_block.2.self_attn.q_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.2.self_attn.k_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.2.self_attn.v_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.2.self_attn.o_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.2.self_attn.q_norm.weight": "model-00015-of-00016.safetensors", "vertical_block.2.self_attn.k_norm.weight": "model-00015-of-00016.safetensors", "vertical_block.2.mlp.gate_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.2.mlp.up_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.2.mlp.down_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.2.input_layernorm.weight": "model-00015-of-00016.safetensors", "vertical_block.2.post_attention_layernorm.weight": "model-00015-of-00016.safetensors", "vertical_block.3.self_attn.q_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.3.self_attn.k_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.3.self_attn.v_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.3.self_attn.o_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.3.self_attn.q_norm.weight": "model-00015-of-00016.safetensors", "vertical_block.3.self_attn.k_norm.weight": "model-00015-of-00016.safetensors", "vertical_block.3.mlp.gate_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.3.mlp.up_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.3.mlp.down_proj.weight": "model-00015-of-00016.safetensors", "vertical_block.3.input_layernorm.weight": "model-00015-of-00016.safetensors", "vertical_block.3.post_attention_layernorm.weight": "model-00015-of-00016.safetensors", "vertical_norm.weight": "model-00015-of-00016.safetensors", "vertical_head.weight": "model-00016-of-00016.safetensors", "hv_gate_mlp.0.weight": "model-00016-of-00016.safetensors", "hv_gate_mlp.2.weight": "model-00016-of-00016.safetensors", "hv_gate_mlp.2.bias": "model-00016-of-00016.safetensors", "hv_gate_corner.weight": "model-00016-of-00016.safetensors", "hv_gate_corner.bias": "model-00016-of-00016.safetensors" }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279# Copyright 2025 BAAI. and/or its affiliates.# SPDX-License-Identifier: Apache-2.0"""Tokenization classes for Xiaomi-Robotics-U0."""
import base64import loggingimport osimport unicodedatafrom typing import Collection, Dict, List, Set, Tuple, Union
import tiktokenfrom transformers import PreTrainedTokenizer, AddedToken
logger = logging.getLogger(__name__)
VOCAB_FILES_NAMES = {"vocab_file": "unis.tiktoken"}
PAT_STR = r"""(?i:'s|'t|'re|'ve|'m|'ll|'d)|[^\r\n\p{L}\p{N}]?\p{L}+|\p{N}| ?[^\s\p{L}\p{N}]+[\r\n]*|\s*[\r\n]+|\s+(?!\S)|\s+"""ENDOFTEXT = "<|endoftext|>"IMSTART = "<|im_start|>"IMEND = "<|im_end|>"# as the default behavior is changed to allow special tokens in# regular texts, the surface forms of special tokens need to be# as different as possible to minimize the impactEXTRAS = tuple((f"<|extra_{i}|>" for i in range(205)))# changed to use actual index to avoid misconfiguration with vocabulary expansionSPECIAL_START_ID = 151643
def _load_tiktoken_bpe(tiktoken_bpe_file: str) -> Dict[bytes, int]: with open(tiktoken_bpe_file, "rb") as f: contents = f.read() return { base64.b64decode(token): int(rank) for token, rank in (line.split() for line in contents.splitlines() if line) }
class UNISTokenizer(PreTrainedTokenizer): """Xiaomi-Robotics-U0 tokenizer."""
vocab_files_names = VOCAB_FILES_NAMES
def __init__( self, vocab_file, errors="replace", extra_vocab_file=None, special_tokens_file=None, **kwargs, ): super().__init__(**kwargs)
# how to handle errors in decoding UTF-8 byte sequences # use ignore if you are in streaming inference self.errors = errors
self.mergeable_ranks = _load_tiktoken_bpe(vocab_file) # type: Dict[bytes, int]
vision_tokens = [] if special_tokens_file is not None: with open(special_tokens_file, 'r') as f: vision_tokens = [ token.strip() for token in f.readlines() if len(token.strip()) > 0 ] SPECIAL_TOKENS = tuple( enumerate( ( ( ENDOFTEXT, IMSTART, IMEND, ) + EXTRAS + tuple(vision_tokens) ), start=SPECIAL_START_ID, ) ) self.special_tokens = {token: index for index, token in SPECIAL_TOKENS} self.special_tokens_set = set(t for _, t in SPECIAL_TOKENS)
# try load extra vocab from file if extra_vocab_file is not None: used_ids = set(self.mergeable_ranks.values()) | set(self.special_tokens.values()) extra_mergeable_ranks = _load_tiktoken_bpe(extra_vocab_file) for token, index in extra_mergeable_ranks.items(): if token in self.mergeable_ranks: logger.info(f"extra token {token} exists, skipping") continue if index in used_ids: logger.info(f'the index {index} for extra token {token} exists, skipping') continue self.mergeable_ranks[token] = index # the index may be sparse after this, but don't worry tiktoken.Encoding will handle this
enc = tiktoken.Encoding( "Xiaomi-Robotics-U0", pat_str=PAT_STR, mergeable_ranks=self.mergeable_ranks, special_tokens=self.special_tokens, ) assert ( len(self.mergeable_ranks) + len(self.special_tokens) == enc.n_vocab ), f"{len(self.mergeable_ranks) + len(self.special_tokens)} != {enc.n_vocab} in encoding"
self.decoder = { v: k for k, v in self.mergeable_ranks.items() } # type: dict[int, bytes|str] self.decoder.update({v: k for k, v in self.special_tokens.items()})
self.tokenizer = enc # type: tiktoken.Encoding
self.eod_id = self.tokenizer.eot_token
def __getstate__(self): # for pickle lovers state = self.__dict__.copy() del state["tokenizer"] return state
def __setstate__(self, state): # tokenizer is not python native; don't pass it; rebuild it self.__dict__.update(state) enc = tiktoken.Encoding( "Xiaomi-Robotics-U0", pat_str=PAT_STR, mergeable_ranks=self.mergeable_ranks, special_tokens=self.special_tokens, ) self.tokenizer = enc
def __len__(self) -> int: return self.tokenizer.n_vocab
def get_vocab(self) -> Dict[bytes, int]: return self.mergeable_ranks
def convert_tokens_to_ids( self, tokens: Union[bytes, str, List[Union[bytes, str]]] ) -> List[int]: ids = [] if isinstance(tokens, (str, bytes)): if tokens in self.special_tokens: return self.special_tokens[tokens] else: return self.mergeable_ranks.get(tokens) for token in tokens: if token in self.special_tokens: ids.append(self.special_tokens[token]) else: ids.append(self.mergeable_ranks.get(token)) return ids
def _add_tokens( self, new_tokens: Union[List[str], List[AddedToken]], special_tokens: bool = False, ) -> int: if not special_tokens and new_tokens: raise ValueError("Adding regular tokens is not supported") for token in new_tokens: surface_form = token.content if isinstance(token, AddedToken) else token if surface_form not in self.special_tokens_set: raise ValueError("Adding unknown special tokens is not supported") return 0
def save_vocabulary(self, save_directory: str, **kwargs) -> Tuple[str]: """ Save only the vocabulary of the tokenizer (vocabulary).
Returns: `Tuple(str)`: Paths to the files saved. """ file_path = os.path.join(save_directory, "unis.tiktoken") with open(file_path, "w", encoding="utf8") as w: for k, v in self.mergeable_ranks.items(): line = base64.b64encode(k).decode("utf8") + " " + str(v) + "\n" w.write(line) return (file_path,)
def tokenize( self, text: str, allowed_special: Union[Set, str] = "all", disallowed_special: Union[Collection, str] = (), **kwargs, ) -> List[Union[bytes, str]]: """ Converts a string in a sequence of tokens.
Args: text (`str`): The sequence to be encoded. allowed_special (`Literal["all"]` or `set`): The surface forms of the tokens to be encoded as special tokens in regular texts. Default to "all". disallowed_special (`Literal["all"]` or `Collection`): The surface forms of the tokens that should not be in regular texts and trigger errors. Default to an empty tuple.
kwargs (additional keyword arguments, *optional*): Will be passed to the underlying model specific encode method.
Returns: `List[bytes|str]`: The list of tokens. """ tokens = [] text = unicodedata.normalize("NFC", text)
# this implementation takes a detour: text -> token id -> token surface forms for t in self.tokenizer.encode( text, allowed_special=allowed_special, disallowed_special=disallowed_special ): tokens.append(self.decoder[t]) return tokens
def convert_tokens_to_string(self, tokens: List[Union[bytes, str]]) -> str: """ Converts a sequence of tokens in a single string. """ text = "" temp = b"" for t in tokens: if isinstance(t, str): if temp: text += temp.decode("utf-8", errors=self.errors) temp = b"" text += t elif isinstance(t, bytes): temp += t else: raise TypeError("token should only be of type types or str") if temp: text += temp.decode("utf-8", errors=self.errors) return text
@property def vocab_size(self): return self.tokenizer.n_vocab
def _convert_id_to_token(self, index: int) -> Union[bytes, str]: """Converts an id to a token, special tokens included""" if index in self.decoder: return self.decoder[index] raise ValueError("unknown ids")
def _convert_token_to_id(self, token: Union[bytes, str]) -> int: """Converts a token to an id using the vocab, special tokens included""" if token in self.special_tokens: return self.special_tokens[token] if token in self.mergeable_ranks: return self.mergeable_ranks[token] raise ValueError("unknown token")
def _tokenize(self, text: str, **kwargs): """ Converts a string in a sequence of tokens (string), using the tokenizer. Split in words for word-based vocabulary or sub-words for sub-word-based vocabularies (BPE/SentencePieces/WordPieces).
Do NOT take care of added tokens. """ raise NotImplementedError
def _decode( self, token_ids: Union[int, List[int]], skip_special_tokens: bool = False, errors: str = None, **kwargs, ) -> str: if isinstance(token_ids, int): token_ids = [token_ids] if skip_special_tokens: token_ids = [i for i in token_ids if i < self.eod_id] return self.tokenizer.decode(token_ids, errors=errors or self.errors)12345678910{ "model_max_length": 1000000000000000000, "tokenizer_class": "UNISTokenizer", "auto_map": { "AutoTokenizer": [ "tokenization_unis.UNISTokenizer", null ] }}MODEL_COMPLETEAdded+9
README.md+85
checkpoint_meta.jsonAdded+37
config.jsonAdded+104
configuration_unis.pyAdded+217
generation_config.jsonAdded+7
model-00001-of-00016.safetensorsAdded+3
model-00002-of-00016.safetensorsAdded+3
model-00003-of-00016.safetensorsAdded+3
model-00004-of-00016.safetensorsAdded+3
model-00005-of-00016.safetensorsAdded+3
model-00012-of-00016.safetensorsAdded+3
model-00014-of-00016.safetensorsAdded+3
model-00015-of-00016.safetensorsAdded+3
model-00016-of-00016.safetensorsAdded+3
model.safetensors.index.jsonAdded+765
tokenization_unis.pyAdded+279
tokenizer_config.jsonAdded+10
unis.tiktokenAdded
unis_vision_tokens.txtAdded