mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-29 04:36:04 +00:00
vla jepa obs stride and lingbot action noise prob
This commit is contained in:
@@ -130,6 +130,12 @@ class LingBotVAConfig(PreTrainedConfig):
|
|||||||
# Cosine tightens the loss tail and often nudges final loss down; it does NOT reduce the
|
# Cosine tightens the loss tail and often nudges final loss down; it does NOT reduce the
|
||||||
# flow-matching estimator's step-to-step noise (that's metric variance, LR-independent).
|
# flow-matching estimator's step-to-step noise (that's metric variance, LR-independent).
|
||||||
scheduler_type: str = "constant_with_warmup"
|
scheduler_type: str = "constant_with_warmup"
|
||||||
|
# Probability of corrupting the action stream's conditioning (clean/context) tokens with
|
||||||
|
# flow-matching noise during training, mirroring the video stream's noisy_cond_prob=0.5.
|
||||||
|
# Upstream train.py hardcodes 0.0 for actions (never corrupted) with no exposed knob; this is
|
||||||
|
# an experimental deviation to make the model more tolerant of imperfect action history
|
||||||
|
# (e.g. clamp-induced drift between predicted and executed actions during rollout).
|
||||||
|
action_noisy_cond_prob: float = 0.0
|
||||||
|
|
||||||
def __post_init__(self):
|
def __post_init__(self):
|
||||||
super().__post_init__()
|
super().__post_init__()
|
||||||
|
|||||||
@@ -311,7 +311,11 @@ class LingBotVAPolicy(PreTrainedPolicy):
|
|||||||
latents, self._train_sched_latent, action_mask=None, action_mode=False, noisy_cond_prob=0.5
|
latents, self._train_sched_latent, action_mask=None, action_mode=False, noisy_cond_prob=0.5
|
||||||
)
|
)
|
||||||
action_dict = self._add_noise_stream(
|
action_dict = self._add_noise_stream(
|
||||||
actions, self._train_sched_action, action_mask=actions_mask, action_mode=True, noisy_cond_prob=0.0
|
actions,
|
||||||
|
self._train_sched_action,
|
||||||
|
action_mask=actions_mask,
|
||||||
|
action_mode=True,
|
||||||
|
noisy_cond_prob=self.config.action_noisy_cond_prob,
|
||||||
)
|
)
|
||||||
latent_dict["text_emb"] = text_emb
|
latent_dict["text_emb"] = text_emb
|
||||||
action_dict["text_emb"] = text_emb
|
action_dict["text_emb"] = text_emb
|
||||||
|
|||||||
@@ -149,9 +149,14 @@ class VLAJEPAConfig(PreTrainedConfig):
|
|||||||
|
|
||||||
@property
|
@property
|
||||||
def observation_delta_indices(self) -> list[int]:
|
def observation_delta_indices(self) -> list[int]:
|
||||||
# load video_horizon frames starting from current timestep: [t, t+1, ..., t+video_horizon-1]
|
# matches original repo's observation_indices=list(range(video_horizon)) when the chunk
|
||||||
# matches original repo's observation_indices=list(range(video_horizon))
|
# fits within video_horizon frames. When chunk_size is longer (e.g. folding's 30-step
|
||||||
|
# chunk vs 8 video frames), spread the frames evenly across the chunk instead of
|
||||||
|
# clustering them at the start, so the world model sees dynamics over the whole horizon.
|
||||||
|
if self.num_video_frames >= self.chunk_size:
|
||||||
return list(range(self.num_video_frames))
|
return list(range(self.num_video_frames))
|
||||||
|
stride = (self.chunk_size - 1) // (self.num_video_frames - 1)
|
||||||
|
return [i * stride for i in range(self.num_video_frames)]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def action_delta_indices(self) -> list[int]:
|
def action_delta_indices(self) -> list[int]:
|
||||||
|
|||||||
Reference in New Issue
Block a user