docs: HF model card — best-of-both front-matter derived from manifest
Browse files
README.md
CHANGED
|
@@ -1,85 +1,184 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
| 2 |
license: apache-2.0
|
| 3 |
-
base_model: robometer/Robometer-4B
|
| 4 |
-
tags:
|
| 5 |
-
- reward-model
|
| 6 |
-
- robotics
|
| 7 |
-
- vision-language-action
|
| 8 |
-
- openral
|
| 9 |
-
- bitsandbytes
|
| 10 |
-
- nf4
|
| 11 |
-
library_name: openral
|
| 12 |
pipeline_tag: robotics
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
# rskill-robometer-4b-nf4
|
| 16 |
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
robot's camera frames + the task instruction, it emits **per-frame normalized
|
| 23 |
-
progress (0–1)** and **per-frame success probability**. The OpenRAL reasoner polls
|
| 24 |
-
it on demand (read-only `query_task_progress` tool) to decide whether to continue,
|
| 25 |
-
advance, or replan — **advisory only**, never on the control path.
|
| 26 |
-
|
| 27 |
-
## What's in this repo
|
| 28 |
-
|
| 29 |
-
A self-contained checkpoint that the OpenRAL reward sidecar loads **directly as
|
| 30 |
-
4-bit** — no bf16 materialization, no requantize:
|
| 31 |
-
|
| 32 |
-
- `model.safetensors` — 236 `Linear` modules packed to bitsandbytes NF4 (~3.32 GB
|
| 33 |
-
resident), plus the folded non-persistent rotary `inv_freq` buffers.
|
| 34 |
-
- `config.json` — model config (resized vocab 151674).
|
| 35 |
-
- `config.yaml` — the `robometer` `ExperimentConfig` (lets the sidecar rebuild the
|
| 36 |
-
`RBM` graph offline).
|
| 37 |
-
- tokenizer / processor files (incl. `added_tokens.json` — the model's added
|
| 38 |
-
progress token).
|
| 39 |
-
- `quantization_metadata.json` — provenance.
|
| 40 |
-
|
| 41 |
-
> The model **class is `RBM`** (`robometer.models.rbm`) — the upstream
|
| 42 |
-
> `config.json` advertises `architectures: ["RFM"]` with **no `auto_map`**, so
|
| 43 |
-
> vanilla `transformers.AutoModel` cannot load it. The OpenRAL sidecar installs the
|
| 44 |
-
> pinned `robometer` package (commit `a669dffc`) with **`transformers==4.57.1`** in
|
| 45 |
-
> an isolated venv and builds the skeleton on the `meta` device, then installs these
|
| 46 |
-
> packed NF4 weights via `Params4bit.from_prequantized`.
|
| 47 |
-
|
| 48 |
-
## Provenance & verification
|
| 49 |
-
|
| 50 |
-
- **Source:** `robometer/Robometer-4B` @ `beef63bc914c5c189329d49c6d712d96d632aa34` (Apache-2.0).
|
| 51 |
-
- **Quantization:** bitsandbytes NF4 (double-quant), compute dtype bf16, the OpenRAL
|
| 52 |
-
rule `nn.Linear.numel ≥ 4e6 → Linear4bit`. Built by
|
| 53 |
-
[`tools/build_robometer_nf4_checkpoint.py`](https://github.com/OpenRAL/openral/blob/master/tools/build_robometer_nf4_checkpoint.py).
|
| 54 |
-
- **Bit-identical** to loading the upstream bf16 weights and quantizing in place:
|
| 55 |
-
same-process forward `max|Δ| = 0`; 4-bit dequant round-trip `0`. For a byte-stable
|
| 56 |
-
reward ramp across process launches, the sidecar pins the math SDP kernel +
|
| 57 |
-
`use_deterministic_algorithms(True)` + `CUBLAS_WORKSPACE_CONFIG=:4096:8` +
|
| 58 |
-
`cudnn.allow_tf32=False`.
|
| 59 |
-
- **Footprint:** ~3.32 GB resident on an 8 GB GPU; co-resident with the sim (and a
|
| 60 |
-
small NF4 VLA). The reward forward subsamples the frame window to bound activation.
|
| 61 |
-
|
| 62 |
-
## Usage (OpenRAL)
|
| 63 |
-
|
| 64 |
-
This is consumed by OpenRAL, not loaded standalone. The `kind: reward` manifest
|
| 65 |
-
points `weights_uri` here:
|
| 66 |
-
|
| 67 |
-
```yaml
|
| 68 |
-
weights_uri: "hf://OpenRAL/rskill-robometer-4b-nf4"
|
| 69 |
-
```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|
license: apache-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
pipeline_tag: robotics
|
| 6 |
+
tags:
|
| 7 |
+
- OpenRAL
|
| 8 |
+
- rskill
|
| 9 |
+
- nf4
|
| 10 |
+
- 4-bit
|
| 11 |
+
- any
|
| 12 |
+
- reward
|
| 13 |
+
- reward-model
|
| 14 |
+
- robot-learning
|
| 15 |
+
- progress-estimation
|
| 16 |
+
- success-detection
|
| 17 |
+
- qwen3-vl
|
| 18 |
+
- bitsandbytes
|
| 19 |
+
base_model:
|
| 20 |
+
- robometer/Robometer-4B
|
| 21 |
+
base_model_relation: quantized
|
| 22 |
+
inference: false
|
| 23 |
---
|
| 24 |
|
| 25 |
# rskill-robometer-4b-nf4
|
| 26 |
|
| 27 |
+
> **OpenRAL rSkill** — Robometer-4B (Qwen3-VL-4B robotic **reward foundation
|
| 28 |
+
> model**) packaged as an NF4 bitsandbytes `reward` rSkill (ADR-0057). Given a
|
| 29 |
+
> rollout's RGB frames plus the task instruction, it emits **per-frame
|
| 30 |
+
> normalized progress (0–1)** and **per-frame success probability**, queried on
|
| 31 |
+
> demand by the Reasoner. **No actuators. Advisory-only.** Apache-2.0.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 32 |
|
| 33 |
+
## Quick Start
|
| 34 |
|
| 35 |
```bash
|
| 36 |
+
ral skill install hf://OpenRAL/rskill-robometer-4b-nf4
|
| 37 |
+
```
|
| 38 |
+
|
| 39 |
+
```python
|
| 40 |
+
from openral_core.schemas import RSkillManifest
|
| 41 |
+
|
| 42 |
+
manifest = RSkillManifest.from_yaml("rskills/robometer-4b/rskill.yaml")
|
| 43 |
+
assert manifest.kind == "reward"
|
| 44 |
+
assert manifest.role == "s2"
|
| 45 |
+
assert manifest.reward.progress_range == (0.0, 1.0)
|
| 46 |
+
assert manifest.quantization.extra["scheme"] == "nf4"
|
| 47 |
+
assert manifest.is_commercial_use_allowed is True
|
| 48 |
```
|
| 49 |
|
| 50 |
+
## What It Does
|
| 51 |
+
|
| 52 |
+
Robometer is a general-purpose robotic reward model trained on RBM-1M (>1M
|
| 53 |
+
trajectories across diverse embodiments, including failures) with a dual
|
| 54 |
+
objective: a frame-level **progress** loss anchored on expert data and a
|
| 55 |
+
trajectory-comparison **preference** loss for global ordering. Given a task
|
| 56 |
+
instruction and a rollout video, it predicts per-frame progress (continuous
|
| 57 |
+
values over time) and per-frame success probability.
|
| 58 |
+
|
| 59 |
+
This rSkill declares `kind: reward` and `role: s2`: it is a pure perception
|
| 60 |
+
**consumer** operating at S2 (slow-reasoning) rate (~0.2–1 Hz), not an S1 fast
|
| 61 |
+
policy. It runs **in parallel with a `kind: vla` policy**, continuously
|
| 62 |
+
ingesting the VLA's camera frames into a rolling window, and the Reasoner
|
| 63 |
+
queries it on demand — *"how is success doing now / over the last X seconds?"* —
|
| 64 |
+
to decide whether to continue, escalate to a scene VLM (`query_scene`), advance
|
| 65 |
+
to the next subgoal, or enter the replanning ladder. It **never drives
|
| 66 |
+
`ros2_control` joints** and never gates motors (CLAUDE.md §1.1).
|
| 67 |
+
|
| 68 |
+
## Why a reward model alongside the VLA
|
| 69 |
+
|
| 70 |
+
A VLA policy emits actions but has no notion of whether it is *succeeding*.
|
| 71 |
+
Robometer closes that loop: it turns the camera stream into a normalized
|
| 72 |
+
per-frame progress + success signal the Reasoner can act on, so a stalled or
|
| 73 |
+
failing rollout triggers replanning instead of running to a timeout.
|
| 74 |
+
|
| 75 |
+
## Architecture
|
| 76 |
+
|
| 77 |
+
Robometer-4B finetunes `Qwen/Qwen3-VL-4B-Instruct` (`model_type: qwen3_vl`)
|
| 78 |
+
with three prediction heads — `progress_head`, `success_head`, `preference_head`
|
| 79 |
+
— on top of a frame-pooled attention readout (`frame_pool_attn`). The on-disk
|
| 80 |
+
HF `config.json` advertises `architectures: ["RFM"]`, but the actual model
|
| 81 |
+
class is `RBM` (in the upstream `robometer` package). **It has no `auto_map` and
|
| 82 |
+
ships no Hub-side modeling code, so vanilla `transformers.AutoModel` cannot load
|
| 83 |
+
it** — the sidecar loads it via the pinned `robometer` package
|
| 84 |
+
(`robometer.utils.save.load_model_from_hf`).
|
| 85 |
+
|
| 86 |
+
## Runtime
|
| 87 |
+
|
| 88 |
+
The `kind: reward` runtime is implemented as a read-only Reasoner tool
|
| 89 |
+
(`QueryTaskProgressTool`), **not** an `ExecuteSkill` (a reward monitor produces
|
| 90 |
+
scalars, not actions):
|
| 91 |
+
|
| 92 |
+
- **Sidecar**: an out-of-process ZMQ REQ/REP + msgpack server boots the NF4
|
| 93 |
+
model in its own isolated venv, maintains a rolling time-indexed frame buffer
|
| 94 |
+
(`frame_window_s`), and answers windowed progress/success queries. It loads
|
| 95 |
+
via `robometer.utils.save.load_model_from_hf` with **`transformers` pinned to
|
| 96 |
+
`4.57.1`** (5.x changes the processor `__call__` kwargs and drops `input_ids`)
|
| 97 |
+
and the `robometer` package pinned to commit `a669dffc`.
|
| 98 |
+
- **Frame source**: abstracted for **sim and real**. The sidecar consumes the
|
| 99 |
+
same `sensor_msgs/Image` camera topic the co-active VLA uses — fed by the
|
| 100 |
+
GStreamer perception tee on real hardware, or by the sim HAL camera publisher
|
| 101 |
+
in `deploy-sim` (which has no GStreamer). In `deploy-sim` only camera-rendering
|
| 102 |
+
robots expose frames; absent frames surface as `ROSPerceptionStale`.
|
| 103 |
+
- **Reasoner tool**: the LLM sees the read-only `query_task_progress` tool when
|
| 104 |
+
a reward rSkill is co-active with a VLA. It asks for the windowed assessment
|
| 105 |
+
(`progress_now`, `success_now`, trends, `stalled`) and the answer feeds the
|
| 106 |
+
next reasoning tick / the replanning ladder.
|
| 107 |
+
|
| 108 |
+
### Inference contract
|
| 109 |
+
|
| 110 |
+
Discrete (binned) mode yields the normalized signal OpenRAL consumes:
|
| 111 |
+
`compute_batch_outputs(..., sample_type="progress", is_discrete_mode=True,
|
| 112 |
+
num_bins=100)` returns `progress_pred` (per-frame ∈ [0,1]) and
|
| 113 |
+
`outputs_success["success_probs"]` (per-frame ∈ [0,1]). Continuous mode returns
|
| 114 |
+
raw, unnormalized regression values instead. Default sampling is 3 fps.
|
| 115 |
+
|
| 116 |
+
### Validated live
|
| 117 |
+
|
| 118 |
+
End-to-end on an **NVIDIA RTX 4070 Laptop (8 GB)** (ADR-0057 Phases 0/2/3):
|
| 119 |
+
|
| 120 |
+
- **NF4 quantization**: 236 `Linear` modules → `Linear4bit`; **8.91 GB bf16 →
|
| 121 |
+
3.33 GB resident**, **3.56 GB peak** including an 8-frame forward — **4.44 GB
|
| 122 |
+
headroom** for a co-resident small NF4 VLA.
|
| 123 |
+
- **Working sidecar**: streaming a real rollout video ("Put green stick in
|
| 124 |
+
brown bowl") through the ZMQ sidecar, **progress ramped 0.21 → 0.88** and
|
| 125 |
+
**success spiked to 0.90 exactly at task completion**, then eased — exactly
|
| 126 |
+
the Reasoner signal intended.
|
| 127 |
+
|
| 128 |
+
Run with `PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True`. The model loads via
|
| 129 |
+
the `robometer` package (not `AutoModel`); the sidecar venv pins
|
| 130 |
+
`transformers==4.57.1`.
|
| 131 |
+
|
| 132 |
+
## Benchmark Numbers
|
| 133 |
+
|
| 134 |
+
Paper-reported (Robometer team, March 2026, arXiv 2603.02115);
|
| 135 |
+
`reproduced_locally: false`. Robometer reports more generalizable reward
|
| 136 |
+
functions than prior methods (GVL, VLAC, RoboDopamine, TOPReward) across
|
| 137 |
+
benchmarks and real-world evaluations, improving downstream robot-learning
|
| 138 |
+
performance. See the paper for the full tables.
|
| 139 |
+
|
| 140 |
+
## Supported robots and embodiments
|
| 141 |
+
|
| 142 |
+
This reward monitor is **embodiment-agnostic** — it scores camera frames + a
|
| 143 |
+
task instruction and emits scalars, never actuator commands, so it imposes no
|
| 144 |
+
kinematic requirement. The only hardware dependency is an RGB camera stream of
|
| 145 |
+
at least 224×224. It pairs with any S1 VLA policy: the VLA acts, this model
|
| 146 |
+
reports whether the task is progressing / has succeeded.
|
| 147 |
+
|
| 148 |
+
## Sensors and Observation Contract
|
| 149 |
+
|
| 150 |
+
| Direction | Key | Modality | Shape / format | Notes |
|
| 151 |
+
|---|---|---|---|---|
|
| 152 |
+
| in | any RGB camera | RGB video frames | min 224 × 224 | the same topic the co-active VLA consumes |
|
| 153 |
+
| in | task instruction | text | natural language | required (`instruction_required: true`) |
|
| 154 |
+
| out | progress | float per frame | ∈ `progress_range` (`[0,1]`) | normalized task progress |
|
| 155 |
+
| out | success | float per frame | ∈ `[0,1]` | per-frame success probability |
|
| 156 |
+
|
| 157 |
+
The model emits no action chunks and has no proprioception contract.
|
| 158 |
+
|
| 159 |
+
## Manifest Summary
|
| 160 |
+
|
| 161 |
+
| Field | Value |
|
| 162 |
+
|---|---|
|
| 163 |
+
| `name` | `OpenRAL/rskill-robometer-4b-nf4` |
|
| 164 |
+
| `version` | `0.1.0` |
|
| 165 |
+
| `license` | `apache-2.0` |
|
| 166 |
+
| `role` / `kind` | `s2` / `reward` |
|
| 167 |
+
| `runtime` | `pytorch` |
|
| 168 |
+
| `quantization.dtype` / `scheme` | `int4` / `nf4` |
|
| 169 |
+
| `weights_uri` | `hf://OpenRAL/rskill-robometer-4b-nf4` (pre-quantized NF4, meta-loadable; built from the SHA-pinned upstream `source_repo`) |
|
| 170 |
+
| `min_vram_gb.bf16` | 9.0 GB |
|
| 171 |
+
| `min_vram_gb.int4` | 3.6 GB |
|
| 172 |
+
| `reward.frame_window_s` / `target_fps` | 40.0 s / 3.0 fps (ADR-0074 amendment — scores the whole attempt start→now, not an 8 s trailing slice) |
|
| 173 |
+
| `reward.progress_range` / `success_threshold` | `[0,1]` / 0.5 |
|
| 174 |
+
| `latency_budget.per_chunk_ms` | 3000 ms |
|
| 175 |
+
| `actions` | `monitor` |
|
| 176 |
|
| 177 |
## License
|
| 178 |
|
| 179 |
+
The rSkill package metadata and README are OpenRAL project files under
|
| 180 |
+
Apache-2.0. The wrapped Robometer-4B weights are released under **Apache-2.0**,
|
| 181 |
+
permitting commercial use. No `OPENRAL_ALLOW_NONCOMMERCIAL=1` flag is needed.
|
| 182 |
+
The upstream `robometer` code (loaded by the sidecar) is governed by its own
|
| 183 |
+
repository license; it is executed in an isolated, pinned sidecar venv and is
|
| 184 |
+
**not** an OpenRAL-trusted org (see `_vendor/PROVENANCE.md`).
|