mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-16 22:41:49 +00:00
docs(recipes): compact language recipe comments
This commit is contained in:
@@ -1,15 +1,5 @@
|
|||||||
# subtask — subtask + action blend, no memory.
|
# Predicts subtasks from tasks and trains subtask-conditioned action flow without memory or plans.
|
||||||
#
|
# Requires `subtask` annotations; samples with missing `if_present` bindings do not render.
|
||||||
# Same as subtask_mem but with the memory_update sub-recipe dropped, so
|
|
||||||
# the model only learns:
|
|
||||||
#
|
|
||||||
# high_level_subtask — predict the subtask from the task.
|
|
||||||
# low_level_execution — flow loss with [images, subtask, state].
|
|
||||||
#
|
|
||||||
# No persistent high-level state (no memory note, no plan): the prompt is
|
|
||||||
# just the task / subtask. Requires the dataset to carry `subtask`
|
|
||||||
# annotations; samples whose `if_present` bindings are missing don't
|
|
||||||
# render.
|
|
||||||
|
|
||||||
blend:
|
blend:
|
||||||
|
|
||||||
@@ -22,9 +12,5 @@ blend:
|
|||||||
low_level_execution:
|
low_level_execution:
|
||||||
weight: 0.70
|
weight: 0.70
|
||||||
messages:
|
messages:
|
||||||
# The action expert is conditioned on the SUBTASK — at inference
|
# The low-level stream trains action flow on the generated or annotated subtask.
|
||||||
# `HighLevelSubtaskFwd` generates it via the LM head and feeds it
|
|
||||||
# here. `stream: low_level` flips `predict_actions=True` so the
|
|
||||||
# flow loss fires; no text-CE target (subtask prediction is owned
|
|
||||||
# by `high_level_subtask`).
|
|
||||||
- {role: user, content: "${subtask}", stream: low_level, if_present: subtask}
|
- {role: user, content: "${subtask}", stream: low_level, if_present: subtask}
|
||||||
|
|||||||
@@ -1,17 +1,5 @@
|
|||||||
# subtask_mem — compact Hi-Robot blend with memory.
|
# Trains subtask prediction, subtask-conditioned action flow, and memory updates without plans.
|
||||||
#
|
# Requires `subtask` and `memory`; missing `if_present` bindings skip the affected sub-recipe.
|
||||||
# Trains the core subtask + action objectives and memory updates:
|
|
||||||
#
|
|
||||||
# high_level_subtask — predict the subtask from the task.
|
|
||||||
# low_level_execution — flow loss with [images, subtask, state].
|
|
||||||
# memory_update — compress progress into a memory note.
|
|
||||||
#
|
|
||||||
# Plan is intentionally left out — memory is the only persistent
|
|
||||||
# high-level state here, keeping the prompt short.
|
|
||||||
#
|
|
||||||
# Requires the dataset to carry `subtask` and `memory` annotations.
|
|
||||||
# Sub-recipes whose `if_present` bindings are missing simply don't
|
|
||||||
# render for that sample.
|
|
||||||
|
|
||||||
blend:
|
blend:
|
||||||
|
|
||||||
@@ -24,26 +12,12 @@ blend:
|
|||||||
low_level_execution:
|
low_level_execution:
|
||||||
weight: 0.60
|
weight: 0.60
|
||||||
messages:
|
messages:
|
||||||
# The action expert is conditioned on the SUBTASK — at inference
|
# The low-level stream trains action flow on the generated or annotated subtask.
|
||||||
# `HighLevelSubtaskFwd` generates it via the LM head and feeds it
|
|
||||||
# here. `stream: low_level` flips `predict_actions=True` so the
|
|
||||||
# flow loss fires; no text-CE target (subtask prediction is owned
|
|
||||||
# by `high_level_subtask`).
|
|
||||||
- {role: user, content: "${subtask}", stream: low_level, if_present: subtask}
|
- {role: user, content: "${subtask}", stream: low_level, if_present: subtask}
|
||||||
|
|
||||||
memory_update:
|
memory_update:
|
||||||
# At inference, `MemoryUpdateFwd` is triggered only on
|
# `active_at` densifies sparse boundaries while preserving the prior-memory/subtask mapping.
|
||||||
# `subtask_change` events (sparse). Training densely with
|
# Inference controls update timing through `subtask_change` events.
|
||||||
# `active_at` — i.e. on every frame inside a subtask interval,
|
|
||||||
# not just the boundary frame — supervises the same
|
|
||||||
# (prior_memory, completed_subtask) → current_memory mapping
|
|
||||||
# against varied observations within the interval. The model
|
|
||||||
# learns a stateless transformation; the *when* to emit lives in
|
|
||||||
# the inference trigger, not the model. Annotations only exist
|
|
||||||
# for ~1% of frames as boundary events, so `emitted_at` would
|
|
||||||
# waste 99% of the blend draws (and silently leak them into a
|
|
||||||
# task-conditioned fallback); `active_at` lifts the renderable
|
|
||||||
# rate to ~87% on this dataset.
|
|
||||||
weight: 0.15
|
weight: 0.15
|
||||||
bindings:
|
bindings:
|
||||||
prior_memory: "nth_prev(style=memory, offset=1)"
|
prior_memory: "nth_prev(style=memory, offset=1)"
|
||||||
|
|||||||
@@ -1,28 +1,5 @@
|
|||||||
# subtask_mem_vqa_speech — Hi-Robot blend + memory + spoken responses.
|
# Adds memory, spoken interjection responses, and camera-grounded VQA to subtask/action training.
|
||||||
#
|
# Missing optional annotations skip only their sub-recipe; `say` tool calls tokenize as `<say>...</say>`.
|
||||||
# Extends the compact subtask_mem recipe with VQA and spoken interjection responses:
|
|
||||||
#
|
|
||||||
# high_level_subtask — predict the subtask from the task.
|
|
||||||
# low_level_execution — flow loss with [images, subtask, state].
|
|
||||||
# memory_update — compress progress into a memory note.
|
|
||||||
# user_interjection_response — reply to a user interjection with a
|
|
||||||
# spoken `say` tool call (no plan, no
|
|
||||||
# subtask text — just the spoken reply).
|
|
||||||
# ask_vqa_{top,wrist} — camera-grounded VQA.
|
|
||||||
#
|
|
||||||
# Plan is intentionally left out — memory is the only persistent
|
|
||||||
# high-level state here, keeping the prompt short.
|
|
||||||
#
|
|
||||||
# Requires the dataset to carry `memory`, `interjection` and `say`-tool
|
|
||||||
# annotations (the annotation pipeline's memory + interjection modules)
|
|
||||||
# in addition to `subtask` and `vqa`. Sub-recipes whose `if_present`
|
|
||||||
# bindings are missing simply don't render for that sample, so a
|
|
||||||
# dataset without interjections still trains the rest of the blend.
|
|
||||||
#
|
|
||||||
# Tool-call note: the `say` tool call on the interjection-response turn
|
|
||||||
# is flattened to a `<say>...</say>` text marker by the tokenizer step
|
|
||||||
# (`_flatten_say_tool_calls`) so the LM head learns to emit exactly the
|
|
||||||
# marker the runtime parses back (`_split_plan_and_say`).
|
|
||||||
|
|
||||||
blend:
|
blend:
|
||||||
|
|
||||||
@@ -35,26 +12,12 @@ blend:
|
|||||||
low_level_execution:
|
low_level_execution:
|
||||||
weight: 0.40
|
weight: 0.40
|
||||||
messages:
|
messages:
|
||||||
# The action expert is conditioned on the SUBTASK — at inference
|
# The low-level stream trains action flow on the generated or annotated subtask.
|
||||||
# `HighLevelSubtaskFwd` generates it via the LM head and feeds it
|
|
||||||
# here. `stream: low_level` flips `predict_actions=True` so the
|
|
||||||
# flow loss fires; no text-CE target (subtask prediction is owned
|
|
||||||
# by `high_level_subtask`).
|
|
||||||
- {role: user, content: "${subtask}", stream: low_level, if_present: subtask}
|
- {role: user, content: "${subtask}", stream: low_level, if_present: subtask}
|
||||||
|
|
||||||
memory_update:
|
memory_update:
|
||||||
# At inference, `MemoryUpdateFwd` is triggered only on
|
# `active_at` densifies sparse boundaries while preserving the prior-memory/subtask mapping.
|
||||||
# `subtask_change` events (sparse). Training densely with
|
# Inference controls update timing through `subtask_change` events.
|
||||||
# `active_at` — i.e. on every frame inside a subtask interval,
|
|
||||||
# not just the boundary frame — supervises the same
|
|
||||||
# (prior_memory, completed_subtask) → current_memory mapping
|
|
||||||
# against varied observations within the interval. The model
|
|
||||||
# learns a stateless transformation; the *when* to emit lives in
|
|
||||||
# the inference trigger, not the model. Annotations only exist
|
|
||||||
# for ~1% of frames as boundary events, so `emitted_at` would
|
|
||||||
# waste 99% of the blend draws (and silently leak them into the
|
|
||||||
# task-conditioned fallback); `active_at` lifts the renderable
|
|
||||||
# rate to ~87% on Hi-Robot-style datasets.
|
|
||||||
weight: 0.10
|
weight: 0.10
|
||||||
bindings:
|
bindings:
|
||||||
prior_memory: "nth_prev(style=memory, offset=1)"
|
prior_memory: "nth_prev(style=memory, offset=1)"
|
||||||
@@ -74,15 +37,10 @@ blend:
|
|||||||
messages:
|
messages:
|
||||||
- {role: user, content: "${task}", stream: high_level}
|
- {role: user, content: "${task}", stream: high_level}
|
||||||
- {role: user, content: "${interjection}", stream: high_level, if_present: interjection}
|
- {role: user, content: "${interjection}", stream: high_level, if_present: interjection}
|
||||||
# Spoken reply only: the assistant turn carries no text content,
|
# The assistant target is a `say` tool call flattened to a `<say>...</say>` marker.
|
||||||
# just a `say` tool call (`tool_calls_from: speech`). The chat
|
|
||||||
# tokenizer flattens it to a `<say>...</say>` marker, so the
|
|
||||||
# supervised target trains the model to respond to an
|
|
||||||
# interjection with a spoken acknowledgement.
|
|
||||||
- {role: assistant, stream: high_level, target: true, if_present: speech, tool_calls_from: speech}
|
- {role: assistant, stream: high_level, target: true, if_present: speech, tool_calls_from: speech}
|
||||||
|
|
||||||
# VQA is view-dependent — each camera gets its own sub-recipe so the
|
# Each camera uses a separate VQA sub-recipe for view-specific binding.
|
||||||
# resolver disambiguates via `camera=...`. Adjust camera keys to your dataset.
|
|
||||||
ask_vqa_top:
|
ask_vqa_top:
|
||||||
weight: 0.075
|
weight: 0.075
|
||||||
bindings:
|
bindings:
|
||||||
|
|||||||
Reference in New Issue
Block a user