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
sync model files
Browse files- README.md +6 -6
- config.json +2 -2
- chat_template.jinja → dm05_processor/chat_template.jinja +0 -0
- processor_config.json → dm05_processor/processor_config.json +0 -0
- tokenizer.json → dm05_processor/tokenizer.json +0 -0
- tokenizer_config.json → dm05_processor/tokenizer_config.json +1 -1
- policy_preprocessor.json +12 -5
README.md
CHANGED
|
@@ -47,20 +47,20 @@ This LIBERO recipe matches OpenDM: it excludes state from the prompt and learns
|
|
| 47 |
`policy.add_state=true` unless the target recipe specifies otherwise. Policy action representation and environment
|
| 48 |
control mode are configured independently.
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 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
|
| 62 |
-
training.
|
| 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
|
|
|
|
| 47 |
`policy.add_state=true` unless the target recipe specifies otherwise. Policy action representation and environment
|
| 48 |
control mode are configured independently.
|
| 49 |
|
| 50 |
+
Absolute-action training uses the standard LeRobot state/action statistics in `meta/stats.json`. Relative-action
|
| 51 |
+
training requires separately prepared statistics because its arm targets are `action - state`:
|
| 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 |
+
--force
|
| 60 |
```
|
| 61 |
|
| 62 |
+
The command writes `meta/stats.json` in place. Match its chunk, episode selection, and excluded-joint settings to
|
| 63 |
+
training. 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
|
config.json
CHANGED
|
@@ -333,7 +333,7 @@
|
|
| 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,
|
|
@@ -386,4 +386,4 @@
|
|
| 386 |
"scheduler_warmup_steps": 1000,
|
| 387 |
"scheduler_decay_steps": 50000,
|
| 388 |
"scheduler_decay_lr": 2.5e-06
|
| 389 |
-
}
|
|
|
|
| 333 |
"empty_cameras": 0,
|
| 334 |
"add_state": true,
|
| 335 |
"pretrained_name_or_path": ".",
|
| 336 |
+
"processor_name_or_path": null,
|
| 337 |
"image_keys": null,
|
| 338 |
"n_bins": 256,
|
| 339 |
"tokenizer_max_length": 1024,
|
|
|
|
| 386 |
"scheduler_warmup_steps": 1000,
|
| 387 |
"scheduler_decay_steps": 50000,
|
| 388 |
"scheduler_decay_lr": 2.5e-06
|
| 389 |
+
}
|
chat_template.jinja → dm05_processor/chat_template.jinja
RENAMED
|
File without changes
|
processor_config.json → dm05_processor/processor_config.json
RENAMED
|
File without changes
|
tokenizer.json → dm05_processor/tokenizer.json
RENAMED
|
File without changes
|
tokenizer_config.json → dm05_processor/tokenizer_config.json
RENAMED
|
@@ -3,11 +3,11 @@
|
|
| 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,
|
|
|
|
| 3 |
"boi_token": "<start_of_image>",
|
| 4 |
"boi_token_id": 255999,
|
| 5 |
"bos_token": "<bos>",
|
|
|
|
| 6 |
"clean_up_tokenization_spaces": false,
|
| 7 |
"eoi_token": "<end_of_image>",
|
| 8 |
"eoi_token_id": 256000,
|
| 9 |
"eos_token": "<eos>",
|
| 10 |
+
"fix_mistral_regex": false,
|
| 11 |
"image_token": "<image_soft_token>",
|
| 12 |
"image_token_id": 262144,
|
| 13 |
"is_local": true,
|
policy_preprocessor.json
CHANGED
|
@@ -82,10 +82,8 @@
|
|
| 82 |
"config": {}
|
| 83 |
},
|
| 84 |
{
|
| 85 |
-
"registry_name": "
|
| 86 |
-
"config": {
|
| 87 |
-
"image_keys": null
|
| 88 |
-
}
|
| 89 |
},
|
| 90 |
{
|
| 91 |
"registry_name": "device_processor",
|
|
@@ -93,6 +91,15 @@
|
|
| 93 |
"device": "cpu",
|
| 94 |
"float_dtype": null
|
| 95 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 96 |
}
|
| 97 |
]
|
| 98 |
-
}
|
|
|
|
| 82 |
"config": {}
|
| 83 |
},
|
| 84 |
{
|
| 85 |
+
"registry_name": "dm05_state_bins_processor",
|
| 86 |
+
"config": {}
|
|
|
|
|
|
|
| 87 |
},
|
| 88 |
{
|
| 89 |
"registry_name": "device_processor",
|
|
|
|
| 91 |
"device": "cpu",
|
| 92 |
"float_dtype": null
|
| 93 |
}
|
| 94 |
+
},
|
| 95 |
+
{
|
| 96 |
+
"registry_name": "dm05_processor_artifacts",
|
| 97 |
+
"config": {
|
| 98 |
+
"processor_name_or_path": "dm05_processor"
|
| 99 |
+
},
|
| 100 |
+
"artifacts": {
|
| 101 |
+
"processor_name_or_path": "dm05_processor"
|
| 102 |
+
}
|
| 103 |
}
|
| 104 |
]
|
| 105 |
+
}
|