AdrianLlopart commited on
Commit
a6aac55
Β·
verified Β·
1 Parent(s): 28c06cb

rskill.yaml: sync to OpenRAL namespace + current schema (joint_units, evaluated_tasks, ADR-0071)

Browse files
Files changed (1) hide show
  1. rskill.yaml +173 -0
rskill.yaml ADDED
@@ -0,0 +1,173 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # rSkill manifest β€” OpenRAL packaging format V1 (CLAUDE.md Β§6.4)
2
+ #
3
+ # Wraps: OpenRAL/rskill-molmoact2-so101-nf4 (NF4-quantized from
4
+ # allenai/MolmoAct2-SO100_101 via tools/quantize_rskill.py)
5
+ # Base: allenai/MolmoAct2 (Ai2 action reasoning model, Molmo2-ER VLM +
6
+ # flow-matching action expert) β€” arXiv:2605.02881
7
+ #
8
+ # Why NF4: bf16 MolmoAct2 (~5.5 B params, ~11 GiB) OOMs an 8 GiB consumer
9
+ # GPU. NF4 quantization of every Linear with >=4M weight elements brings
10
+ # the working set to ~3.5 GiB, comfortably under the 8 GiB ceiling while
11
+ # preserving paper-faithful behaviour (Molmo2-ER backbone + DiT-style
12
+ # action expert). The OpenRAL molmoact2 adapter detects the upstream
13
+ # repo's quantization_metadata.json sentinel and loads the pre-quantized
14
+ # weights via load_prequantized_state_for_rskill (no on-the-fly
15
+ # quantization cost at startup).
16
+ #
17
+ # norm_tag: this checkpoint requires norm_tag="so100_so101_molmoact2" (the
18
+ # adapter's bare default is "libero", which this checkpoint rejects). It is
19
+ # declared below under image_preprocessing.norm_tag and propagated to the
20
+ # adapter by resolve_image_preprocessing, so SimEnvironment configs need NOT
21
+ # set it β€” a SimEnvironment YAML may still override it via vla.extra.norm_tag.
22
+ #
23
+ # UNITS β€” degrees: this checkpoint was trained on LeRobot SO-100/101 teleop
24
+ # recorded in joint DEGREES (norm_stats.json spans Β±270, control_mode
25
+ # "absolute joint pose"). MuJoCo scenes are radian-native, so a sim config
26
+ # driving this rSkill MUST select the degree convention, e.g. the so101_box
27
+ # scene's `scene.backend_options.joint_units: degrees`. The env then converts
28
+ # its proprio state (rad→deg) and the returned action (deg→rad) at the policy
29
+ # boundary. NOTE: the LeRobot SO-101 servo-degree calibration does not share a
30
+ # zero with the MuJoCo `so101_new_calib` URDF (e.g. trained shoulder_lift sits
31
+ # ~45–186Β°, the MJCF joint maxes at 100Β°), so a units conversion alone aligns
32
+ # magnitudes but not the per-joint zero reference; full task fidelity needs the
33
+ # dataset's calibration offsets. See scenes/sim/so101_tube_insertion.yaml.
34
+ #
35
+ # LICENSE (CLAUDE.md Β§7.4): Apache-2.0 (code + weights). MolmoAct2 is a
36
+ # fully open release from Ai2 β€” weights, training code, and data are all
37
+ # Apache-2.0. Commercial use is permitted.
38
+
39
+ # ── Identity ───────────────────────────────────────────────────────────────
40
+ schema_version: "0.1"
41
+ name: "OpenRAL/rskill-molmoact2-so101-nf4"
42
+ version: "0.1.0"
43
+ license: "apache-2.0"
44
+ role: "s1"
45
+ kind: "vla" # ADR-00XX: rSkill kind discriminator. "vla" = learnable Vision-Language-Action policy.
46
+
47
+ # ── Policy identity ────────────────────────────────────────────────────────
48
+ model_family: "molmoact2"
49
+
50
+ # ── Compatibility contract ─────────────────────────────────────────────────
51
+ # MolmoAct2-SO100_101 was finetuned on a mixture of SO-100 and SO-101
52
+ # teleop data with identical 6-DoF kinematics (Feetech STS3215 servo chain).
53
+ # Both embodiment tags are claimed because the training distribution covers
54
+ # both and the 6-DoF absolute joint-position contract is identical.
55
+ embodiment_tags:
56
+ - "so100_follower"
57
+ - "so101_follower"
58
+
59
+ # MolmoAct2-SO100_101 consumes two RGB camera streams. The training data
60
+ # used overhead ("top") and side-mounted ("side") Realsense views; the
61
+ # aliases below map from the canonical SO101 scene camera names to the
62
+ # model's expected feature keys.
63
+ sensors_required:
64
+ - modality: "rgb"
65
+ vla_feature_key: "observation.images.camera1"
66
+ min_width: 224
67
+ min_height: 224
68
+ - modality: "rgb"
69
+ vla_feature_key: "observation.images.camera2"
70
+ min_width: 224
71
+ min_height: 224
72
+
73
+ # Output side (ADR-0013). For the canonical so101_follower embodiment the
74
+ # loader auto-fills n_dof + vla_action_key from robots/so101_follower/robot.yaml.
75
+ # The checkpoint emits absolute joint-position targets.
76
+ actuators_required:
77
+ - kind: "joint_position"
78
+ control_mode_semantics:
79
+ mode: "absolute"
80
+
81
+ # ── Runtime / weights ──────────────────────────────────────────────────────
82
+ runtime: "pytorch"
83
+ quantization:
84
+ # ``int4`` is the OpenRAL ``QuantizationDtype`` enum value that matches
85
+ # bitsandbytes NF4. The exact bnb scheme (nf4 + compute_dtype bf16, applied
86
+ # to every Linear with >=4M weight elements) is recorded in the upstream
87
+ # ``quantization_metadata.json`` sentinel that the molmoact2 adapter probes
88
+ # via ``detect_prequantized_nf4`` and loads via ``install_prequantized_linears``.
89
+ dtype: "int4"
90
+ backend: "pytorch"
91
+ # Informational VRAM ceilings, used by `openral rskill check` / `openral doctor`.
92
+ # The NF4 packed weights are ~3.5 GiB and fit comfortably under the 8 GiB
93
+ # consumer-GPU ceiling. bf16 ceiling matches the base Molmo2-ER model (~5.5B
94
+ # params Γ— 2 bytes = ~11 GiB weights only; peak inference higher).
95
+ min_vram_gb:
96
+ fp32: 22.0
97
+ bf16: 11.0
98
+ int4: 4.0
99
+ weights_uri: "hf://OpenRAL/rskill-molmoact2-so101-nf4"
100
+
101
+ # ── Preprocessing (all knobs needed to interpret IO) ───────────────────────
102
+ processors:
103
+ preprocessor_uri: "hf://OpenRAL/rskill-molmoact2-so101-nf4/policy_preprocessor.json"
104
+ postprocessor_uri: "hf://OpenRAL/rskill-molmoact2-so101-nf4/policy_postprocessor.json"
105
+ # SO-100/101 teleop data is recorded upright β€” no rotation applied.
106
+ # Aliases map from canonical SO101 scene camera keys (so101_box scene emits
107
+ # ``oak_top`` + ``wrist``) to the model's training feature keys (``top`` /
108
+ # ``side``). Adjust per-scene in vla.extra if your camera names differ.
109
+ image_preprocessing:
110
+ flip_180: false
111
+ norm_tag: "so100_so101_molmoact2"
112
+ # Secondary activation lever: caps the image processor's tile count (each extra
113
+ # 378px crop adds ~182 pooled image tokens with quadratic attention cost).
114
+ # MEASURED on an 8 GiB RTX 4070 (transformers 5.x): this does NOT by itself
115
+ # decide the 8 GiB fit β€” the inference peak (~7.63 GiB) is set by the LM token
116
+ # embedding, not the vision crops, and transformers 5.x's fast image processor
117
+ # does not honour max_crops the way the slow one did. The actual 8 GiB enabler
118
+ # is the CUDA expandable-segments allocator, which the molmoact2 adapter turns
119
+ # on automatically (see policies/molmoact2.py::_enable_expandable_segments).
120
+ # The pin is kept conservative for the slow-processor path / larger frames;
121
+ # raise it via vla.extra.image_max_crops if you have VRAM headroom.
122
+ image_max_crops: 4
123
+ aliases:
124
+ top: "top"
125
+ wrist: "side"
126
+ state_contract:
127
+ dim: 6
128
+
129
+ # ── Execution semantics ────────────────────────────────────────────────────
130
+ chunk_size: 10
131
+ # n_action_steps omitted β€” equals chunk_size (full chunk replay, MolmoAct2 default).
132
+ latency_budget:
133
+ # MolmoAct2's adaptive-depth reasoning runs a single action call in ~180 ms
134
+ # (base) to ~790 ms (with depth reasoning); a half-chunk replan budget of
135
+ # 1000 ms leaves headroom for the flow-matching sampling (10 steps default).
136
+ per_chunk_ms: 1000.0
137
+
138
+ # ── Provenance ─────────────────────────────────────────────────────────────
139
+ paper_url: "https://arxiv.org/abs/2605.02881"
140
+ source_repo: "hf://allenai/MolmoAct2-SO100_101"
141
+
142
+ description: >
143
+ MolmoAct2 (Ai2) finetuned on the SO-100/SO-101 teleop mixture, NF4-quantized
144
+ for 8 GB GPUs. Emits 6-DoF absolute joint-position chunks (size 10) for the
145
+ SO-100/SO-101 follower arm. Flow-matching action expert on Molmo2-ER VLM.
146
+ Apache-2.0. norm_tag="so100_so101_molmoact2" travels in the manifest's
147
+ image_preprocessing block (overridable via vla.extra.norm_tag).
148
+
149
+ # ADR-0022 β€” action vocabulary surfaced to the reasoner LLM tool palette so it
150
+ # can pick this skill by what it does (action verb + object + scene), not just
151
+ # by its slug.
152
+ actions:
153
+ - "pick"
154
+ - "place"
155
+ - "pick_and_place"
156
+ - "grasp"
157
+ objects: []
158
+ scenes:
159
+ - "tabletop"
160
+
161
+ # ADR-0019 β€” per-checkpoint action contract (consumed by the dataset bridge to
162
+ # bind the LeRobot v3 `action` feature shape). SO-100/101 uses a 6-D absolute
163
+ # joint-position action (5 arm joints + 1 gripper).
164
+ action_contract:
165
+ dim: 6
166
+ # ADR-0071 β€” SO-101 emits absolute joint positions (5 arm joints + 1 gripper).
167
+ representation: "joint_positions"
168
+ # EXPLICIT joint units β€” trained on LeRobot SO-100/101 teleop, which records in
169
+ # DEGREES (verified from norm_stats.json metadata_by_tag/so100_so101_molmoact2:
170
+ # state_stats span βˆ’270…+250, q99β‰ˆ185 β€” far outside radians). The runner
171
+ # converts deg↔rad at the policy boundary; see the header UNITS note. Same
172
+ # convention as the smolvla-so101-pen reference.
173
+ joint_units: "degrees"