autoregressive_vla
autoregressive_vla
¶
Autoregressive VLA decoder for discrete action-token generation.
This module is the shared implementation behind the OpenVLA and pi0-FAST Hydra presets. It runs a generative VLM on raw image/text observations to build the conditioning prefix, then trains or samples discrete action tokens autoregressively through the VLM language model.
AutoregressiveVLADecoder
¶
AutoregressiveVLADecoder(action_heads, input_keys, action_space, observation_space, observation_horizon, prediction_horizon, device, vlm_backbone, max_seq_len=512, temperature=1.0, learnable_temperature=False, deterministic=True, causal_prefix=False)
Bases: AutoregressiveDecoderMixin, LLMPrefixSuffixAttentionMixin, VLMBackboneDecoderMixin, DiscreteDecoder
Predict autoregressive action tokens from a VLM observation prefix.
Initialize a VLM-backed causal action-token decoder.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
action_heads
|
dict[str, ActionHead]
|
Must be empty. This decoder predicts action tokens with the VLM language vocabulary head. |
required |
input_keys
|
list[str]
|
Must be empty. Raw observation keys are declared by
|
required |
action_space
|
ActionSpace
|
Task action-space metadata. |
required |
observation_space
|
ObservationSpace
|
Task observation-space metadata. |
required |
observation_horizon
|
int
|
Number of observation timesteps in each sample. |
required |
prediction_horizon
|
int
|
Number of future action timesteps represented by generated action tokens. |
required |
device
|
str
|
Device used by decoder modules and generated tensors. |
required |
vlm_backbone
|
GenerativeVLM
|
Generative VLM that builds image-language prefix embeddings and exposes the causal language model vocabulary. |
required |
max_seq_len
|
int
|
Maximum prefix plus generated action-token length. |
512
|
temperature
|
float
|
Softmax temperature for stochastic inference. |
1.0
|
learnable_temperature
|
bool
|
Whether |
False
|
deterministic
|
bool
|
Whether inference uses greedy token selection. |
True
|
causal_prefix
|
bool
|
Whether to use a standard causal padding mask (OpenVLA) for the whole sequence instead of bidirectional prefix attention (Pi0-FAST). |
False
|
Source code in src/versatil/models/decoding/decoders/factory/autoregressive_vla.py
set_tokenizer
¶
Set a language-vocabulary action tokenizer for autoregressive decoding.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
tokenizer
|
Tokenizer | None
|
Tokenizer with action IDs mapped into the VLM language vocabulary. |
None
|
Source code in src/versatil/models/decoding/decoders/factory/autoregressive_vla.py
get_auxiliary_output_keys
¶
Return token outputs produced without action heads.
Source code in src/versatil/models/decoding/decoders/factory/autoregressive_vla.py
forward
¶
Run VLM-conditioned action-token prediction.