Instructions to use albus2024/dita_long with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LeRobot
How to use albus2024/dita_long with LeRobot:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
File size: 8,020 Bytes
4fa5f72 68a9edd 4fa5f72 e222ad7 4fa5f72 68a9edd 4fa5f72 68a9edd 4fa5f72 e222ad7 5a61b42 4fa5f72 0509d0a 4fa5f72 3828ef7 4fa5f72 e222ad7 40690c3 0509d0a 40690c3 0509d0a 40690c3 0509d0a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | ---
library_name: lerobot
pipeline_tag: robotics
tags:
- lerobot
- dita
- libero
---
# Dita — libero_10_no_noops
This repository is a strict LeRobot conversion of `libero_long.pth` from the original
[Dita](https://github.com/RoboDita/Dita) implementation. It is configured for the
`libero_10_no_noops` action distribution and is not interchangeable with another LIBERO suite.
## Provenance and compatibility contract
- Source checkpoint: `model_ckpt/libero_long.pth`
- Source checkpoint SHA256: `4342de0cfaccc335b6288e378038db2748a703f6187217f50c340f37d49ffa7a`
- Conversion code commit: `f506ceccb9b2816ffebb024b14aeaa2b34fbd46b`
- Dataset statistics: `/home/shared/lyanam/huggingface/hub/datasets--openvla--modified_libero_rlds/snapshots/6ce6aaaaabdbe590b1eef5cd29c0d33f14a08551/libero_10_no_noops/1.0.0/dataset_statistics_3f36439171368ac499e64c677362e590ff6e0b2a87996780fc0e486ac04fd7a4.json`
- Dataset statistics SHA256: `e8b8c1dd10b983643a4aeb532b5e245437565bd12c66dbce431c59dda903c1ef`
- Image processing: one RGB primary/agentview camera, resized to 224×224, followed once by
ImageNet mean `(0.485, 0.456, 0.406)` and std `(0.229, 0.224, 0.225)`.
- Action processing: dimensions 0–5 use this suite's `q01`/`q99`; dimension 6 is not normalized.
- Action mask: `[true, true, true, true, true, true, false]`.
- q01: `[-0.6348214149475098, -0.7741071581840515, -0.7633928656578064, -0.09749999642372131, -0.14819999992847435, -0.2742857038974762, 0.0]`
- q99: `[0.7714285850524902, 0.8464285731315613, 0.9375, 0.13928571343421936, 0.15964286029338837, 0.3246428668498993, 1.0]`
- Gripper: normalized output is thresholded with `> 0.5`, then the Cartesian dimensions are
unnormalized, then the original Dita gripper sign flip is applied.
- Rollout: `traj_length=11`, two-frame history, `chunk_size=10`, `n_action_steps=1`,
`num_inference_steps=10`, DDIM `prediction_type=epsilon`, and CUDA AMP by default.
- `policy.dtype` controls compute precision (`float32`, `float16`, `bfloat16`);
parameters remain FP32. `dtype` is the sole precision setting; `use_amp` is derived internally.
- LIBERO's LeRobot environment processor performs the 180° image rotation. The policy does not
rotate the image a second time.
## Install
```bash
pip install "lerobot_policy_dita[libero] @ https://huggingface.co/albus2024/dita_long/resolve/main/lerobot_policy_dita-2.2.0-py3-none-any.whl"
```
## Evaluate
```bash
lerobot-eval \
--policy.path=albus2024/dita_long \
--policy.gripper_mode=binary \
--policy.device=cuda \
--env.type=libero \
--env.task=libero_10 \
--env.max_parallel_tasks=1 \
--eval.batch_size=1 \
--eval.n_episodes=10 \
--output_dir=./outputs/dita_long
```
The processor state in this repository contains the required statistics; no source `.pth` file or
local dataset metadata is needed at evaluation time.
## Validation
The converter checks all parameter names and shapes, loads with `strict=True`, and checks the
saved artifact files. Run the project's parity and converted-checkpoint verification scripts
separately before using the policy; conversion alone does not establish rollout parity.
## Runtime 2.1.0 training configuration
Install the **2.2.0 wheel above** for this revision. The new training fields
require this runtime. The policy weights, processor files and action statistics
are preserved; this is a configuration/runtime update, not a newly trained model.
| Setting | Value |
| --- | --- |
| `freeze_backbone` | `false` |
| `gradient_checkpointing` | `true`, only during gradient-enabled training |
| `optimizer_lr` | `0.0005` |
| `optimizer_backbone_lr_scale` | `0.1` |
| AdamW betas / epsilon | `[0.9, 0.95]` / `1e-8` |
| Weight decay | `0.05`; bias and one-dimensional parameters use `0` |
| Gradient clipping | Disabled (`optimizer_grad_clip_norm=0`) |
| LR schedule | 1000-step warmup, cosine to 100000 steps, minimum scale `0.01` |
| `lora_dropout` | `0.0` |
Inference automatically skips ViT and QFormer activation-checkpoint wrappers.
`policy.dtype` remains `float16` by default; BF16 and FP32 are also supported.
CLIP text encoding remains frozen. The gripper mode remains
`binary`; see [gripper modes](GRIPPER_MODES.md).
### Fine-tuning and LoRA
Use the following for full fine-tuning (choose an appropriate target dataset):
```bash
lerobot-train \
--policy.path=albus2024/dita_long \
--policy.device=cuda \
--policy.dtype=bfloat16 \
--policy.input_features=null \
--policy.push_to_hub=false \
--dataset.repo_id=YOUR_USERNAME/YOUR_DATASET \
--output_dir=outputs/train/dita_long_full \
--steps=100000
```
For LoRA, install the optional dependency and add the adapter arguments:
```bash
pip install "lerobot_policy_dita[lora] @ https://huggingface.co/albus2024/dita_long/resolve/main/lerobot_policy_dita-2.2.0-py3-none-any.whl"
# Add to lerobot-train and choose a fresh output directory:
# --peft.method_type=LORA --peft.r=32
```
LoRA targets every Dita linear layer, including the ViT, QFormer/FiLM and action
head. Only adapter weights are trained. The default alpha is twice the rank;
initialization is Gaussian for A and zero for B. Use LeRobot's native policy
factory/evaluation entry points to load saved adapters together with their base
model. Do not set `policy.use_peft=true` when starting from a base checkpoint.
The LR schedule keeps its configured 100000-step period even in shorter runs;
the first update has zero LR. Set `policy.scheduler_decay_steps` explicitly for
a different period. These defaults follow the upstream LIBERO recipe, including
the higher `5e-4` peak LR for LIBERO-Long; DROID uses `1e-4` as a fine-tuning
starting point and can be overridden for the target task. When adapting DROID
to LIBERO, pass `--policy.gripper_mode=binary`.
See [runtime validation](runtime_validation_report.json) for the checks performed
with this release and [source hashes](runtime_source_manifest.json) for the exact
packaged code. The previous [runtime 2.0.1 report](history/runtime-2.0.1/runtime_validation_report.json)
is archived. Short training/inference checks do not establish convergence or
robot task success.
## Runtime 2.2.0 image preprocessing
Install the **2.2.0 wheel linked above** before loading this revision. The saved
config now explicitly contains `image_preprocessing_device=cpu`. The weights,
processor files and action statistics remain the same.
Pixel validation always uses one min/max reduction on the model device: on CUDA
it runs on the GPU even when image resizing runs on the CPU. NaN, infinities and
pixels outside `[0, 1]` are rejected. There is no validation-device option.
`policy.image_preprocessing_device` controls FP32 antialiased bilinear resizing
and ImageNet normalization in both training and inference:
| Value | Behavior |
| --- | --- |
| `cpu` | CPU resize/normalization, preserving the reference numerical path |
| `policy` | Resize/normalization on the actual model device, including local CUDA ranks |
To fine-tune using GPU preprocessing, add this CLI override:
```bash
--policy.image_preprocessing_device=policy
```
This overrides an initialization saved with `cpu`. The fine-tuned full-policy
or LoRA checkpoint saves `policy`, which is restored for inference. Use the same
saved setting for training and deployment. `policy.dtype` controls model AMP;
image preprocessing remains FP32 for all supported compute dtypes.
With fixed RNG and deterministic kernels, the new `cpu` mode exactly matched the
previous implementation's loss, all parameter gradients, and inference actions
on the checked real-data batch in FP32, BF16 and FP16. Switching existing weights
to GPU resizing produces measurable differences, especially under AMP; no
rollout-equivalence or convergence claim is made. This published configuration
therefore remains `cpu`.
See [per-model numerical validation](runtime_validation_report.json),
[training and deployment instructions](TRAINING.md), and the
[archived runtime 2.1.0 configuration](history/runtime-2.1.0/config.json).
|