Instructions to use Dexmal/DM05-Lerobot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LeRobot
How to use Dexmal/DM05-Lerobot with LeRobot:
- Notebooks
- Google Colab
- Kaggle
initial commit
Browse files- .gitattributes +1 -0
- README.md +100 -0
- chat_template.jinja +47 -0
- config.json +389 -0
- model.safetensors +3 -0
- policy_postprocessor.json +38 -0
- policy_postprocessor_step_1_unnormalizer_processor.safetensors +3 -0
- policy_preprocessor.json +98 -0
- policy_preprocessor_step_5_normalizer_processor.safetensors +3 -0
- processor_config.json +29 -0
- tokenizer.json +3 -0
- tokenizer_config.json +28 -0
.gitattributes
CHANGED
|
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 33 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
+
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -1,3 +1,103 @@
|
|
| 1 |
---
|
| 2 |
license: gemma
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: gemma
|
| 3 |
+
library_name: lerobot
|
| 4 |
+
pipeline_tag: robotics
|
| 5 |
+
base_model: Dexmal/DM05
|
| 6 |
+
tags:
|
| 7 |
+
- robotics
|
| 8 |
+
- robot-control
|
| 9 |
+
- vision-language-action
|
| 10 |
+
- vla
|
| 11 |
+
- lerobot
|
| 12 |
+
- dm05
|
| 13 |
+
- dm0.5
|
| 14 |
+
- opendm
|
| 15 |
---
|
| 16 |
+
|
| 17 |
+
# DM0.5 for LeRobot
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
|
| 21 |
+
`Dexmal/DM05-Lerobot` is the LeRobot-format base checkpoint of
|
| 22 |
+
[DM0.5](https://huggingface.co/Dexmal/DM05), adapted from
|
| 23 |
+
[OpenDM](https://github.com/dexmal/OpenDM). It predicts continuous action chunks from images, robot state,
|
| 24 |
+
and language instructions.
|
| 25 |
+
|
| 26 |
+
This is a base model for supervised fine-tuning, not a LIBERO-, RoboTwin-, or robot-specific checkpoint.
|
| 27 |
+
|
| 28 |
+
## Fine-tuning
|
| 29 |
+
|
| 30 |
+
```bash
|
| 31 |
+
lerobot-train \
|
| 32 |
+
--dataset.repo_id=HuggingFaceVLA/libero \
|
| 33 |
+
--policy.path=Dexmal/DM05-Lerobot \
|
| 34 |
+
--policy.add_state=false \
|
| 35 |
+
--policy.chunk_size=10 \
|
| 36 |
+
--policy.n_action_steps=10 \
|
| 37 |
+
--policy.repo_id=your_repo_id \
|
| 38 |
+
--output_dir=outputs/train/dm05-libero \
|
| 39 |
+
--steps=50000 \
|
| 40 |
+
--batch_size=8 \
|
| 41 |
+
--policy.device=cuda
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
For local-only training, replace `--policy.repo_id=...` with `--policy.push_to_hub=false`.
|
| 45 |
+
|
| 46 |
+
This LIBERO recipe matches OpenDM: it excludes state from the prompt and learns stored actions unchanged. Keep
|
| 47 |
+
`policy.add_state=true` unless the target recipe specifies otherwise. Policy action representation and environment
|
| 48 |
+
control mode are configured independently.
|
| 49 |
+
|
| 50 |
+
DM05 recommends complete state/action statistics in the dataset's `meta/stats.json`. If a non-standard local
|
| 51 |
+
dataset lacks them, generate the file before training:
|
| 52 |
+
|
| 53 |
+
```bash
|
| 54 |
+
uv run python -m lerobot.policies.dm05.prepare_stats_dm05 \
|
| 55 |
+
--repo-id=org/dataset \
|
| 56 |
+
--root=/path/to/dataset \
|
| 57 |
+
--chunk-size=10 \
|
| 58 |
+
--drop-n-last-frames=1
|
| 59 |
+
```
|
| 60 |
+
|
| 61 |
+
The command writes `meta/stats.json` in place. Match its chunk, episode selection, and action representation to
|
| 62 |
+
training. For relative targets, add `--use-relative-actions` and use `--force` when replacing absolute-action
|
| 63 |
+
statistics. Without target statistics, checkpoint statistics are reused with a warning and are valid only for the
|
| 64 |
+
same feature contract and distribution.
|
| 65 |
+
|
| 66 |
+
## Evaluation
|
| 67 |
+
|
| 68 |
+
Evaluate a fine-tuned checkpoint:
|
| 69 |
+
|
| 70 |
+
```bash
|
| 71 |
+
MUJOCO_GL=egl lerobot-eval \
|
| 72 |
+
--policy.path=/path/to/checkpoint/pretrained_model \
|
| 73 |
+
--env.type=libero \
|
| 74 |
+
--env.task=libero_spatial \
|
| 75 |
+
--env.control_mode=relative \
|
| 76 |
+
--policy.device=cuda
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
## Checkpoint contract
|
| 80 |
+
|
| 81 |
+
The base checkpoint uses OpenDM's 14-dimensional state/action schema. Fresh SFT takes its effective feature schema
|
| 82 |
+
and statistics from the target LeRobot dataset.
|
| 83 |
+
|
| 84 |
+
Load the complete checkpoint directory with `DM05Policy.from_pretrained()` or `--policy.path`; policy config,
|
| 85 |
+
tokenizer, preprocessing state, and weights are all required.
|
| 86 |
+
|
| 87 |
+
## Resources
|
| 88 |
+
|
| 89 |
+
- [DM0.5 technical blog](https://www.dexmal.com/blog/dm0.5/index_en.html)
|
| 90 |
+
- [OpenDM repository](https://github.com/dexmal/OpenDM)
|
| 91 |
+
- [LeRobot repository](https://github.com/huggingface/lerobot)
|
| 92 |
+
|
| 93 |
+
## Citation
|
| 94 |
+
|
| 95 |
+
```bibtex
|
| 96 |
+
@misc{dm05,
|
| 97 |
+
title = {{DM0.5}: An Open-World Foundation Model for General-Purpose Embodied Intelligence},
|
| 98 |
+
author = {{Dexmal Team}},
|
| 99 |
+
month = {July},
|
| 100 |
+
year = {2026},
|
| 101 |
+
url = {https://www.dexmal.com/blog/dm0.5/index_en.html}
|
| 102 |
+
}
|
| 103 |
+
```
|
chat_template.jinja
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{{ bos_token }}
|
| 2 |
+
{%- if messages[0]['role'] == 'system' -%}
|
| 3 |
+
{%- if messages[0]['content'] is string -%}
|
| 4 |
+
{%- set first_user_prefix = messages[0]['content'] + '
|
| 5 |
+
|
| 6 |
+
' -%}
|
| 7 |
+
{%- else -%}
|
| 8 |
+
{%- set first_user_prefix = messages[0]['content'][0]['text'] + '
|
| 9 |
+
|
| 10 |
+
' -%}
|
| 11 |
+
{%- endif -%}
|
| 12 |
+
{%- set loop_messages = messages[1:] -%}
|
| 13 |
+
{%- else -%}
|
| 14 |
+
{%- set first_user_prefix = "" -%}
|
| 15 |
+
{%- set loop_messages = messages -%}
|
| 16 |
+
{%- endif -%}
|
| 17 |
+
{%- for message in loop_messages -%}
|
| 18 |
+
{%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}
|
| 19 |
+
{{ raise_exception("Conversation roles must alternate user/assistant/user/assistant/...") }}
|
| 20 |
+
{%- endif -%}
|
| 21 |
+
{%- if (message['role'] == 'assistant') -%}
|
| 22 |
+
{%- set role = "model" -%}
|
| 23 |
+
{%- else -%}
|
| 24 |
+
{%- set role = message['role'] -%}
|
| 25 |
+
{%- endif -%}
|
| 26 |
+
{{ '<start_of_turn>' + role + '
|
| 27 |
+
' + (first_user_prefix if loop.first else "") }}
|
| 28 |
+
{%- if message['content'] is string -%}
|
| 29 |
+
{{ message['content'] | trim }}
|
| 30 |
+
{%- elif message['content'] is iterable -%}
|
| 31 |
+
{%- for item in message['content'] -%}
|
| 32 |
+
{%- if item['type'] == 'image' -%}
|
| 33 |
+
{{ '<start_of_image>' }}
|
| 34 |
+
{%- elif item['type'] == 'text' -%}
|
| 35 |
+
{{ item['text'] | trim }}
|
| 36 |
+
{%- endif -%}
|
| 37 |
+
{%- endfor -%}
|
| 38 |
+
{%- else -%}
|
| 39 |
+
{{ raise_exception("Invalid content type") }}
|
| 40 |
+
{%- endif -%}
|
| 41 |
+
{{ '<end_of_turn>
|
| 42 |
+
' }}
|
| 43 |
+
{%- endfor -%}
|
| 44 |
+
{%- if add_generation_prompt -%}
|
| 45 |
+
{{'<start_of_turn>model
|
| 46 |
+
'}}
|
| 47 |
+
{%- endif -%}
|
config.json
ADDED
|
@@ -0,0 +1,389 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"type": "dm05",
|
| 3 |
+
"n_obs_steps": 1,
|
| 4 |
+
"input_features": {
|
| 5 |
+
"observation.state": {
|
| 6 |
+
"type": "STATE",
|
| 7 |
+
"shape": [
|
| 8 |
+
14
|
| 9 |
+
]
|
| 10 |
+
}
|
| 11 |
+
},
|
| 12 |
+
"output_features": {
|
| 13 |
+
"action": {
|
| 14 |
+
"type": "ACTION",
|
| 15 |
+
"shape": [
|
| 16 |
+
14
|
| 17 |
+
]
|
| 18 |
+
}
|
| 19 |
+
},
|
| 20 |
+
"device": "cpu",
|
| 21 |
+
"use_amp": false,
|
| 22 |
+
"use_peft": false,
|
| 23 |
+
"push_to_hub": true,
|
| 24 |
+
"repo_id": null,
|
| 25 |
+
"private": null,
|
| 26 |
+
"tags": null,
|
| 27 |
+
"license": "gemma",
|
| 28 |
+
"pretrained_path": null,
|
| 29 |
+
"pretrained_revision": null,
|
| 30 |
+
"core_config": {
|
| 31 |
+
"vlm_gradient_checkpointing": true,
|
| 32 |
+
"ae_gradient_checkpointing": true,
|
| 33 |
+
"ae_gradient_checkpointing_layers": 1,
|
| 34 |
+
"freeze_vlm_embedding": false,
|
| 35 |
+
"llm_attn_implementation": "eager",
|
| 36 |
+
"vision_attn_implementation": "sdpa",
|
| 37 |
+
"action_attn_implementation": "sdpa",
|
| 38 |
+
"transformers_version": "5.5.4",
|
| 39 |
+
"architectures": [
|
| 40 |
+
"DM05ForConditionalGeneration"
|
| 41 |
+
],
|
| 42 |
+
"output_hidden_states": false,
|
| 43 |
+
"return_dict": true,
|
| 44 |
+
"dtype": "bfloat16",
|
| 45 |
+
"chunk_size_feed_forward": 0,
|
| 46 |
+
"is_encoder_decoder": false,
|
| 47 |
+
"id2label": {
|
| 48 |
+
"0": "LABEL_0",
|
| 49 |
+
"1": "LABEL_1"
|
| 50 |
+
},
|
| 51 |
+
"label2id": {
|
| 52 |
+
"LABEL_0": 0,
|
| 53 |
+
"LABEL_1": 1
|
| 54 |
+
},
|
| 55 |
+
"problem_type": null,
|
| 56 |
+
"vlm_config": {
|
| 57 |
+
"architectures": [
|
| 58 |
+
"Gemma3ForConditionalGeneration"
|
| 59 |
+
],
|
| 60 |
+
"output_hidden_states": false,
|
| 61 |
+
"return_dict": true,
|
| 62 |
+
"dtype": "bfloat16",
|
| 63 |
+
"chunk_size_feed_forward": 0,
|
| 64 |
+
"is_encoder_decoder": false,
|
| 65 |
+
"id2label": {
|
| 66 |
+
"0": "LABEL_0",
|
| 67 |
+
"1": "LABEL_1"
|
| 68 |
+
},
|
| 69 |
+
"label2id": {
|
| 70 |
+
"LABEL_0": 0,
|
| 71 |
+
"LABEL_1": 1
|
| 72 |
+
},
|
| 73 |
+
"problem_type": null,
|
| 74 |
+
"text_config": {
|
| 75 |
+
"architectures": null,
|
| 76 |
+
"output_hidden_states": false,
|
| 77 |
+
"return_dict": true,
|
| 78 |
+
"dtype": "bfloat16",
|
| 79 |
+
"chunk_size_feed_forward": 0,
|
| 80 |
+
"is_encoder_decoder": false,
|
| 81 |
+
"id2label": {
|
| 82 |
+
"0": "LABEL_0",
|
| 83 |
+
"1": "LABEL_1"
|
| 84 |
+
},
|
| 85 |
+
"label2id": {
|
| 86 |
+
"LABEL_0": 0,
|
| 87 |
+
"LABEL_1": 1
|
| 88 |
+
},
|
| 89 |
+
"problem_type": null,
|
| 90 |
+
"vocab_size": 262208,
|
| 91 |
+
"hidden_size": 2560,
|
| 92 |
+
"intermediate_size": 10240,
|
| 93 |
+
"num_hidden_layers": 34,
|
| 94 |
+
"num_attention_heads": 8,
|
| 95 |
+
"num_key_value_heads": 4,
|
| 96 |
+
"head_dim": 256,
|
| 97 |
+
"hidden_activation": "gelu_pytorch_tanh",
|
| 98 |
+
"max_position_embeddings": 131072,
|
| 99 |
+
"initializer_range": 0.02,
|
| 100 |
+
"rms_norm_eps": 1e-06,
|
| 101 |
+
"use_cache": true,
|
| 102 |
+
"pad_token_id": 0,
|
| 103 |
+
"eos_token_id": 1,
|
| 104 |
+
"bos_token_id": 2,
|
| 105 |
+
"tie_word_embeddings": true,
|
| 106 |
+
"rope_parameters": {
|
| 107 |
+
"full_attention": {
|
| 108 |
+
"factor": 8.0,
|
| 109 |
+
"rope_theta": 1000000.0,
|
| 110 |
+
"rope_type": "linear"
|
| 111 |
+
},
|
| 112 |
+
"sliding_attention": {
|
| 113 |
+
"rope_theta": 10000.0,
|
| 114 |
+
"rope_type": "default"
|
| 115 |
+
}
|
| 116 |
+
},
|
| 117 |
+
"attention_bias": false,
|
| 118 |
+
"attention_dropout": 0.0,
|
| 119 |
+
"query_pre_attn_scalar": 256,
|
| 120 |
+
"sliding_window": 4096,
|
| 121 |
+
"layer_types": [
|
| 122 |
+
"sliding_attention",
|
| 123 |
+
"sliding_attention",
|
| 124 |
+
"sliding_attention",
|
| 125 |
+
"sliding_attention",
|
| 126 |
+
"sliding_attention",
|
| 127 |
+
"full_attention",
|
| 128 |
+
"sliding_attention",
|
| 129 |
+
"sliding_attention",
|
| 130 |
+
"sliding_attention",
|
| 131 |
+
"sliding_attention",
|
| 132 |
+
"sliding_attention",
|
| 133 |
+
"full_attention",
|
| 134 |
+
"sliding_attention",
|
| 135 |
+
"sliding_attention",
|
| 136 |
+
"sliding_attention",
|
| 137 |
+
"sliding_attention",
|
| 138 |
+
"sliding_attention",
|
| 139 |
+
"full_attention",
|
| 140 |
+
"sliding_attention",
|
| 141 |
+
"sliding_attention",
|
| 142 |
+
"sliding_attention",
|
| 143 |
+
"sliding_attention",
|
| 144 |
+
"sliding_attention",
|
| 145 |
+
"full_attention",
|
| 146 |
+
"sliding_attention",
|
| 147 |
+
"sliding_attention",
|
| 148 |
+
"sliding_attention",
|
| 149 |
+
"sliding_attention",
|
| 150 |
+
"sliding_attention",
|
| 151 |
+
"full_attention",
|
| 152 |
+
"sliding_attention",
|
| 153 |
+
"sliding_attention",
|
| 154 |
+
"sliding_attention",
|
| 155 |
+
"sliding_attention"
|
| 156 |
+
],
|
| 157 |
+
"final_logit_softcapping": null,
|
| 158 |
+
"attn_logit_softcapping": null,
|
| 159 |
+
"use_bidirectional_attention": false,
|
| 160 |
+
"_sliding_window_pattern": 6,
|
| 161 |
+
"_name_or_path": "",
|
| 162 |
+
"model_type": "gemma3_text",
|
| 163 |
+
"attn_implementation": "eager",
|
| 164 |
+
"output_attentions": false
|
| 165 |
+
},
|
| 166 |
+
"vision_config": {
|
| 167 |
+
"architectures": null,
|
| 168 |
+
"output_hidden_states": false,
|
| 169 |
+
"return_dict": true,
|
| 170 |
+
"dtype": "bfloat16",
|
| 171 |
+
"chunk_size_feed_forward": 0,
|
| 172 |
+
"is_encoder_decoder": false,
|
| 173 |
+
"id2label": {
|
| 174 |
+
"0": "LABEL_0",
|
| 175 |
+
"1": "LABEL_1"
|
| 176 |
+
},
|
| 177 |
+
"label2id": {
|
| 178 |
+
"LABEL_0": 0,
|
| 179 |
+
"LABEL_1": 1
|
| 180 |
+
},
|
| 181 |
+
"problem_type": null,
|
| 182 |
+
"hidden_size": 1152,
|
| 183 |
+
"intermediate_size": 4304,
|
| 184 |
+
"num_hidden_layers": 27,
|
| 185 |
+
"num_attention_heads": 16,
|
| 186 |
+
"num_channels": 3,
|
| 187 |
+
"image_size": 448,
|
| 188 |
+
"patch_size": 14,
|
| 189 |
+
"hidden_act": "gelu_pytorch_tanh",
|
| 190 |
+
"layer_norm_eps": 1e-06,
|
| 191 |
+
"attention_dropout": 0.0,
|
| 192 |
+
"_name_or_path": "",
|
| 193 |
+
"model_type": "siglip_vision_model",
|
| 194 |
+
"vision_use_head": false,
|
| 195 |
+
"attn_implementation": "sdpa",
|
| 196 |
+
"output_attentions": false
|
| 197 |
+
},
|
| 198 |
+
"mm_tokens_per_image": 256,
|
| 199 |
+
"boi_token_index": 255999,
|
| 200 |
+
"eoi_token_index": 256000,
|
| 201 |
+
"image_token_index": 262144,
|
| 202 |
+
"initializer_range": 0.02,
|
| 203 |
+
"tie_word_embeddings": true,
|
| 204 |
+
"_name_or_path": "",
|
| 205 |
+
"eos_token_id": [
|
| 206 |
+
1,
|
| 207 |
+
106
|
| 208 |
+
],
|
| 209 |
+
"model_type": "gemma3",
|
| 210 |
+
"attn_implementation": {
|
| 211 |
+
"": "eager",
|
| 212 |
+
"text_config": "eager",
|
| 213 |
+
"vision_config": "sdpa"
|
| 214 |
+
},
|
| 215 |
+
"output_attentions": false
|
| 216 |
+
},
|
| 217 |
+
"action_config": {
|
| 218 |
+
"architectures": null,
|
| 219 |
+
"output_hidden_states": false,
|
| 220 |
+
"return_dict": true,
|
| 221 |
+
"dtype": null,
|
| 222 |
+
"chunk_size_feed_forward": 0,
|
| 223 |
+
"is_encoder_decoder": false,
|
| 224 |
+
"id2label": {
|
| 225 |
+
"0": "LABEL_0",
|
| 226 |
+
"1": "LABEL_1"
|
| 227 |
+
},
|
| 228 |
+
"label2id": {
|
| 229 |
+
"LABEL_0": 0,
|
| 230 |
+
"LABEL_1": 1
|
| 231 |
+
},
|
| 232 |
+
"problem_type": null,
|
| 233 |
+
"vocab_size": 262208,
|
| 234 |
+
"hidden_size": 1024,
|
| 235 |
+
"intermediate_size": 4096,
|
| 236 |
+
"num_hidden_layers": 34,
|
| 237 |
+
"num_attention_heads": 8,
|
| 238 |
+
"num_key_value_heads": 4,
|
| 239 |
+
"head_dim": 256,
|
| 240 |
+
"hidden_activation": "gelu_pytorch_tanh",
|
| 241 |
+
"max_position_embeddings": 131072,
|
| 242 |
+
"initializer_range": 0.02,
|
| 243 |
+
"rms_norm_eps": 1e-06,
|
| 244 |
+
"use_cache": true,
|
| 245 |
+
"pad_token_id": 0,
|
| 246 |
+
"eos_token_id": 1,
|
| 247 |
+
"bos_token_id": 2,
|
| 248 |
+
"tie_word_embeddings": true,
|
| 249 |
+
"rope_parameters": {
|
| 250 |
+
"full_attention": {
|
| 251 |
+
"factor": 8.0,
|
| 252 |
+
"rope_theta": 1000000.0,
|
| 253 |
+
"rope_type": "linear"
|
| 254 |
+
},
|
| 255 |
+
"sliding_attention": {
|
| 256 |
+
"rope_theta": 10000.0,
|
| 257 |
+
"rope_type": "default"
|
| 258 |
+
}
|
| 259 |
+
},
|
| 260 |
+
"attention_bias": false,
|
| 261 |
+
"attention_dropout": 0.0,
|
| 262 |
+
"query_pre_attn_scalar": 256,
|
| 263 |
+
"sliding_window": 4096,
|
| 264 |
+
"layer_types": [
|
| 265 |
+
"sliding_attention",
|
| 266 |
+
"sliding_attention",
|
| 267 |
+
"sliding_attention",
|
| 268 |
+
"sliding_attention",
|
| 269 |
+
"sliding_attention",
|
| 270 |
+
"full_attention",
|
| 271 |
+
"sliding_attention",
|
| 272 |
+
"sliding_attention",
|
| 273 |
+
"sliding_attention",
|
| 274 |
+
"sliding_attention",
|
| 275 |
+
"sliding_attention",
|
| 276 |
+
"full_attention",
|
| 277 |
+
"sliding_attention",
|
| 278 |
+
"sliding_attention",
|
| 279 |
+
"sliding_attention",
|
| 280 |
+
"sliding_attention",
|
| 281 |
+
"sliding_attention",
|
| 282 |
+
"full_attention",
|
| 283 |
+
"sliding_attention",
|
| 284 |
+
"sliding_attention",
|
| 285 |
+
"sliding_attention",
|
| 286 |
+
"sliding_attention",
|
| 287 |
+
"sliding_attention",
|
| 288 |
+
"full_attention",
|
| 289 |
+
"sliding_attention",
|
| 290 |
+
"sliding_attention",
|
| 291 |
+
"sliding_attention",
|
| 292 |
+
"sliding_attention",
|
| 293 |
+
"sliding_attention",
|
| 294 |
+
"full_attention",
|
| 295 |
+
"sliding_attention",
|
| 296 |
+
"sliding_attention",
|
| 297 |
+
"sliding_attention",
|
| 298 |
+
"sliding_attention"
|
| 299 |
+
],
|
| 300 |
+
"final_logit_softcapping": null,
|
| 301 |
+
"attn_logit_softcapping": null,
|
| 302 |
+
"use_bidirectional_attention": false,
|
| 303 |
+
"_sliding_window_pattern": 6,
|
| 304 |
+
"_name_or_path": "",
|
| 305 |
+
"model_type": "gemma3_text",
|
| 306 |
+
"attn_implementation": "sdpa",
|
| 307 |
+
"action_attn_implementation": "sdpa",
|
| 308 |
+
"ae_gradient_checkpointing_layers": 1,
|
| 309 |
+
"output_attentions": false
|
| 310 |
+
},
|
| 311 |
+
"processor_config": null,
|
| 312 |
+
"action_dim": 32,
|
| 313 |
+
"chunk_size": 50,
|
| 314 |
+
"bf16": true,
|
| 315 |
+
"_name_or_path": ".",
|
| 316 |
+
"bos_token_id": 2,
|
| 317 |
+
"eos_token_id": 1,
|
| 318 |
+
"model_type": "dexbotic_dm05",
|
| 319 |
+
"pad_token_id": 0,
|
| 320 |
+
"tie_word_embeddings": true,
|
| 321 |
+
"gradient_checkpointing": true,
|
| 322 |
+
"output_attentions": false
|
| 323 |
+
},
|
| 324 |
+
"chunk_size": 50,
|
| 325 |
+
"n_action_steps": 50,
|
| 326 |
+
"drop_n_last_frames": 1,
|
| 327 |
+
"max_state_dim": 32,
|
| 328 |
+
"max_action_dim": 32,
|
| 329 |
+
"image_resolution": [
|
| 330 |
+
448,
|
| 331 |
+
448
|
| 332 |
+
],
|
| 333 |
+
"empty_cameras": 0,
|
| 334 |
+
"add_state": true,
|
| 335 |
+
"pretrained_name_or_path": ".",
|
| 336 |
+
"processor_name_or_path": ".",
|
| 337 |
+
"image_keys": null,
|
| 338 |
+
"n_bins": 256,
|
| 339 |
+
"tokenizer_max_length": 1024,
|
| 340 |
+
"diffusion_steps": 10,
|
| 341 |
+
"compile_model": false,
|
| 342 |
+
"compile_suffix_pad_length": 1024,
|
| 343 |
+
"llm_attn_implementation": "eager",
|
| 344 |
+
"vision_attn_implementation": "sdpa",
|
| 345 |
+
"action_attn_implementation": "sdpa",
|
| 346 |
+
"use_liger_kernel": false,
|
| 347 |
+
"dtype": "bfloat16",
|
| 348 |
+
"vlm_gradient_checkpointing": true,
|
| 349 |
+
"ae_gradient_checkpointing": true,
|
| 350 |
+
"ae_gradient_checkpointing_layers": 1,
|
| 351 |
+
"freeze_vlm_embedding": true,
|
| 352 |
+
"use_relative_actions": false,
|
| 353 |
+
"relative_exclude_joints": [
|
| 354 |
+
"gripper"
|
| 355 |
+
],
|
| 356 |
+
"action_feature_names": [
|
| 357 |
+
"joint_0",
|
| 358 |
+
"joint_1",
|
| 359 |
+
"joint_2",
|
| 360 |
+
"joint_3",
|
| 361 |
+
"joint_4",
|
| 362 |
+
"joint_5",
|
| 363 |
+
"gripper_6",
|
| 364 |
+
"joint_7",
|
| 365 |
+
"joint_8",
|
| 366 |
+
"joint_9",
|
| 367 |
+
"joint_10",
|
| 368 |
+
"joint_11",
|
| 369 |
+
"joint_12",
|
| 370 |
+
"gripper_13"
|
| 371 |
+
],
|
| 372 |
+
"norm_clip": true,
|
| 373 |
+
"normalization_mapping": {
|
| 374 |
+
"VISUAL": "IDENTITY",
|
| 375 |
+
"STATE": "QUANTILES",
|
| 376 |
+
"ACTION": "QUANTILES"
|
| 377 |
+
},
|
| 378 |
+
"optimizer_lr": 2.5e-05,
|
| 379 |
+
"optimizer_betas": [
|
| 380 |
+
0.9,
|
| 381 |
+
0.95
|
| 382 |
+
],
|
| 383 |
+
"optimizer_eps": 1e-08,
|
| 384 |
+
"optimizer_weight_decay": 1e-10,
|
| 385 |
+
"optimizer_grad_clip_norm": 1.0,
|
| 386 |
+
"scheduler_warmup_steps": 1000,
|
| 387 |
+
"scheduler_decay_steps": 50000,
|
| 388 |
+
"scheduler_decay_lr": 2.5e-06
|
| 389 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:8a5f81e751ecb52c018f634ffd3c6a61a420f70f1faa09eadecfb3bb5b1c8226
|
| 3 |
+
size 10315934288
|
policy_postprocessor.json
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "policy_postprocessor",
|
| 3 |
+
"steps": [
|
| 4 |
+
{
|
| 5 |
+
"registry_name": "device_processor",
|
| 6 |
+
"config": {
|
| 7 |
+
"device": "cpu",
|
| 8 |
+
"float_dtype": "float32"
|
| 9 |
+
}
|
| 10 |
+
},
|
| 11 |
+
{
|
| 12 |
+
"registry_name": "unnormalizer_processor",
|
| 13 |
+
"config": {
|
| 14 |
+
"eps": 1e-06,
|
| 15 |
+
"features": {
|
| 16 |
+
"action": {
|
| 17 |
+
"type": "ACTION",
|
| 18 |
+
"shape": [
|
| 19 |
+
14
|
| 20 |
+
]
|
| 21 |
+
}
|
| 22 |
+
},
|
| 23 |
+
"norm_map": {
|
| 24 |
+
"VISUAL": "IDENTITY",
|
| 25 |
+
"STATE": "QUANTILES",
|
| 26 |
+
"ACTION": "QUANTILES"
|
| 27 |
+
}
|
| 28 |
+
},
|
| 29 |
+
"state_file": "policy_postprocessor_step_1_unnormalizer_processor.safetensors"
|
| 30 |
+
},
|
| 31 |
+
{
|
| 32 |
+
"registry_name": "absolute_actions_processor",
|
| 33 |
+
"config": {
|
| 34 |
+
"enabled": false
|
| 35 |
+
}
|
| 36 |
+
}
|
| 37 |
+
]
|
| 38 |
+
}
|
policy_postprocessor_step_1_unnormalizer_processor.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:553b9d4453e67e79632ec99a65940bbe2f23d267783726b82e0b34ff841c72f9
|
| 3 |
+
size 1040
|
policy_preprocessor.json
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"name": "policy_preprocessor",
|
| 3 |
+
"steps": [
|
| 4 |
+
{
|
| 5 |
+
"registry_name": "rename_observations_processor",
|
| 6 |
+
"config": {
|
| 7 |
+
"rename_map": {}
|
| 8 |
+
}
|
| 9 |
+
},
|
| 10 |
+
{
|
| 11 |
+
"registry_name": "to_batch_processor",
|
| 12 |
+
"config": {}
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"registry_name": "dm05_task_processor",
|
| 16 |
+
"config": {
|
| 17 |
+
"default_task": "Execute the robot action."
|
| 18 |
+
}
|
| 19 |
+
},
|
| 20 |
+
{
|
| 21 |
+
"registry_name": "dm05_action_reference_probe_processor",
|
| 22 |
+
"config": {
|
| 23 |
+
"action_dim": 14
|
| 24 |
+
}
|
| 25 |
+
},
|
| 26 |
+
{
|
| 27 |
+
"registry_name": "relative_actions_processor",
|
| 28 |
+
"config": {
|
| 29 |
+
"enabled": false,
|
| 30 |
+
"exclude_joints": [
|
| 31 |
+
"gripper"
|
| 32 |
+
],
|
| 33 |
+
"action_names": [
|
| 34 |
+
"joint_0",
|
| 35 |
+
"joint_1",
|
| 36 |
+
"joint_2",
|
| 37 |
+
"joint_3",
|
| 38 |
+
"joint_4",
|
| 39 |
+
"joint_5",
|
| 40 |
+
"gripper_6",
|
| 41 |
+
"joint_7",
|
| 42 |
+
"joint_8",
|
| 43 |
+
"joint_9",
|
| 44 |
+
"joint_10",
|
| 45 |
+
"joint_11",
|
| 46 |
+
"joint_12",
|
| 47 |
+
"gripper_13"
|
| 48 |
+
]
|
| 49 |
+
}
|
| 50 |
+
},
|
| 51 |
+
{
|
| 52 |
+
"registry_name": "normalizer_processor",
|
| 53 |
+
"config": {
|
| 54 |
+
"eps": 1e-06,
|
| 55 |
+
"features": {
|
| 56 |
+
"observation.state": {
|
| 57 |
+
"type": "STATE",
|
| 58 |
+
"shape": [
|
| 59 |
+
14
|
| 60 |
+
]
|
| 61 |
+
},
|
| 62 |
+
"action": {
|
| 63 |
+
"type": "ACTION",
|
| 64 |
+
"shape": [
|
| 65 |
+
14
|
| 66 |
+
]
|
| 67 |
+
}
|
| 68 |
+
},
|
| 69 |
+
"norm_map": {
|
| 70 |
+
"VISUAL": "IDENTITY",
|
| 71 |
+
"STATE": "QUANTILES",
|
| 72 |
+
"ACTION": "QUANTILES"
|
| 73 |
+
},
|
| 74 |
+
"normalize_observation_keys": [
|
| 75 |
+
"observation.state"
|
| 76 |
+
]
|
| 77 |
+
},
|
| 78 |
+
"state_file": "policy_preprocessor_step_5_normalizer_processor.safetensors"
|
| 79 |
+
},
|
| 80 |
+
{
|
| 81 |
+
"registry_name": "dm05_action_reference_extract_processor",
|
| 82 |
+
"config": {}
|
| 83 |
+
},
|
| 84 |
+
{
|
| 85 |
+
"registry_name": "dm05_images_to_pil_processor",
|
| 86 |
+
"config": {
|
| 87 |
+
"image_keys": null
|
| 88 |
+
}
|
| 89 |
+
},
|
| 90 |
+
{
|
| 91 |
+
"registry_name": "device_processor",
|
| 92 |
+
"config": {
|
| 93 |
+
"device": "cpu",
|
| 94 |
+
"float_dtype": null
|
| 95 |
+
}
|
| 96 |
+
}
|
| 97 |
+
]
|
| 98 |
+
}
|
policy_preprocessor_step_5_normalizer_processor.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:553b9d4453e67e79632ec99a65940bbe2f23d267783726b82e0b34ff841c72f9
|
| 3 |
+
size 1040
|
processor_config.json
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_processor": {
|
| 3 |
+
"data_format": "channels_first",
|
| 4 |
+
"do_convert_rgb": null,
|
| 5 |
+
"do_normalize": true,
|
| 6 |
+
"do_rescale": true,
|
| 7 |
+
"do_resize": true,
|
| 8 |
+
"image_mean": [
|
| 9 |
+
0.5,
|
| 10 |
+
0.5,
|
| 11 |
+
0.5
|
| 12 |
+
],
|
| 13 |
+
"image_processor_type": "Gemma3ImageProcessor",
|
| 14 |
+
"image_seq_length": 256,
|
| 15 |
+
"image_std": [
|
| 16 |
+
0.5,
|
| 17 |
+
0.5,
|
| 18 |
+
0.5
|
| 19 |
+
],
|
| 20 |
+
"resample": 2,
|
| 21 |
+
"rescale_factor": 0.00392156862745098,
|
| 22 |
+
"size": {
|
| 23 |
+
"height": 448,
|
| 24 |
+
"width": 448
|
| 25 |
+
}
|
| 26 |
+
},
|
| 27 |
+
"image_seq_length": 256,
|
| 28 |
+
"processor_class": "Gemma3Processor"
|
| 29 |
+
}
|
tokenizer.json
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:daab2354f8a74e70d70b4d1f804939b68a8c9624dd06cb7858e52dd8970e9726
|
| 3 |
+
size 33384567
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"backend": "tokenizers",
|
| 3 |
+
"boi_token": "<start_of_image>",
|
| 4 |
+
"boi_token_id": 255999,
|
| 5 |
+
"bos_token": "<bos>",
|
| 6 |
+
"chat_template": "{{ bos_token }}\n{%- if messages[0]['role'] == 'system' -%}\n {%- if messages[0]['content'] is string -%}\n {%- set first_user_prefix = messages[0]['content'] + '\n\n' -%}\n {%- else -%}\n {%- set first_user_prefix = messages[0]['content'][0]['text'] + '\n\n' -%}\n {%- endif -%}\n {%- set loop_messages = messages[1:] -%}\n{%- else -%}\n {%- set first_user_prefix = \"\" -%}\n {%- set loop_messages = messages -%}\n{%- endif -%}\n{%- for message in loop_messages -%}\n {%- if (message['role'] == 'user') != (loop.index0 % 2 == 0) -%}\n {{ raise_exception(\"Conversation roles must alternate user/assistant/user/assistant/...\") }}\n {%- endif -%}\n {%- if (message['role'] == 'assistant') -%}\n {%- set role = \"model\" -%}\n {%- else -%}\n {%- set role = message['role'] -%}\n {%- endif -%}\n {{ '<start_of_turn>' + role + '\n' + (first_user_prefix if loop.first else \"\") }}\n {%- if message['content'] is string -%}\n {{ message['content'] | trim }}\n {%- elif message['content'] is iterable -%}\n {%- for item in message['content'] -%}\n {%- if item['type'] == 'image' -%}\n {{ '<start_of_image>' }}\n {%- elif item['type'] == 'text' -%}\n {{ item['text'] | trim }}\n {%- endif -%}\n {%- endfor -%}\n {%- else -%}\n {{ raise_exception(\"Invalid content type\") }}\n {%- endif -%}\n {{ '<end_of_turn>\n' }}\n{%- endfor -%}\n{%- if add_generation_prompt -%}\n {{'<start_of_turn>model\n'}}\n{%- endif -%}\n",
|
| 7 |
+
"clean_up_tokenization_spaces": false,
|
| 8 |
+
"eoi_token": "<end_of_image>",
|
| 9 |
+
"eoi_token_id": 256000,
|
| 10 |
+
"eos_token": "<eos>",
|
| 11 |
+
"image_token": "<image_soft_token>",
|
| 12 |
+
"image_token_id": 262144,
|
| 13 |
+
"is_local": true,
|
| 14 |
+
"mask_token": "<mask>",
|
| 15 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 16 |
+
"model_specific_special_tokens": {
|
| 17 |
+
"boi_token": "<start_of_image>",
|
| 18 |
+
"eoi_token": "<end_of_image>",
|
| 19 |
+
"image_token": "<image_soft_token>"
|
| 20 |
+
},
|
| 21 |
+
"pad_token": "<pad>",
|
| 22 |
+
"processor_class": "Gemma3Processor",
|
| 23 |
+
"sp_model_kwargs": null,
|
| 24 |
+
"spaces_between_special_tokens": false,
|
| 25 |
+
"tokenizer_class": "GemmaTokenizer",
|
| 26 |
+
"unk_token": "<unk>",
|
| 27 |
+
"use_default_system_prompt": false
|
| 28 |
+
}
|