lingbotworld2_t5 ¶
LingBot World 2 UMT5 encoder with the released checkpoint's module names.
Classes¶
fastvideo.models.encoders.lingbotworld2_t5.GELU ¶
fastvideo.models.encoders.lingbotworld2_t5.LingBotWorld2T5EncoderModel ¶
LingBotWorld2T5EncoderModel(config: LingBotWorld2UMT5Config, prefix: str = '')
Bases: TextEncoder
FastVideo-native LingBot World 2 UMT5 encoder for the released .pth weights.
Source code in fastvideo/models/encoders/lingbotworld2_t5.py
Methods:¶
fastvideo.models.encoders.lingbotworld2_t5.LingBotWorld2T5EncoderModel.forward ¶
forward(input_ids: Tensor | None, position_ids: Tensor | None = None, attention_mask: Tensor | None = None, inputs_embeds: Tensor | None = None, output_hidden_states: bool | None = None, **kwargs) -> BaseEncoderOutput
Encode token ids and return source-compatible hidden states.
Source code in fastvideo/models/encoders/lingbotworld2_t5.py
fastvideo.models.encoders.lingbotworld2_t5.LingBotWorld2T5EncoderModel.load_weights ¶
Load source .pth weights whose names already match this module.
Source code in fastvideo/models/encoders/lingbotworld2_t5.py
fastvideo.models.encoders.lingbotworld2_t5.T5Attention ¶
Bases: Module
LingBot World 2 source T5 attention block.
Source code in fastvideo/models/encoders/lingbotworld2_t5.py
Methods:¶
fastvideo.models.encoders.lingbotworld2_t5.T5Attention.forward ¶
forward(x: Tensor, context: Tensor | None = None, mask: Tensor | None = None, pos_bias: Tensor | None = None) -> Tensor
Project QKV, add relative bias/mask, and return attended states.
Source code in fastvideo/models/encoders/lingbotworld2_t5.py
fastvideo.models.encoders.lingbotworld2_t5.T5FeedForward ¶
Bases: Module
LingBot World 2 source T5 gated feed-forward block.
Source code in fastvideo/models/encoders/lingbotworld2_t5.py
fastvideo.models.encoders.lingbotworld2_t5.T5LayerNorm ¶
Bases: Module
T5 RMS-style layer norm with source-compatible parameter name.
Source code in fastvideo/models/encoders/lingbotworld2_t5.py
fastvideo.models.encoders.lingbotworld2_t5.T5RelativeEmbedding ¶
Bases: Module
Per-block relative position embedding used by LingBot World 2 UMT5.
Source code in fastvideo/models/encoders/lingbotworld2_t5.py
Methods:¶
fastvideo.models.encoders.lingbotworld2_t5.T5RelativeEmbedding.forward ¶
Build a relative-position bias tensor for attention logits.
Source code in fastvideo/models/encoders/lingbotworld2_t5.py
fastvideo.models.encoders.lingbotworld2_t5.T5SelfAttention ¶
T5SelfAttention(dim: int, dim_attn: int, dim_ffn: int, num_heads: int, num_buckets: int, shared_pos: bool = False, dropout: float = 0.1)
Bases: Module
One source-compatible UMT5 encoder block.
Source code in fastvideo/models/encoders/lingbotworld2_t5.py
Methods:¶
fastvideo.models.encoders.lingbotworld2_t5.T5SelfAttention.forward ¶
Run self-attention and feed-forward residual updates.
Source code in fastvideo/models/encoders/lingbotworld2_t5.py
Functions:¶
fastvideo.models.encoders.lingbotworld2_t5.basic_clean ¶
Apply LingBot World 2's ftfy/html cleanup before tokenization.
fastvideo.models.encoders.lingbotworld2_t5.canonicalize ¶
Normalize prompts with LingBot World 2's optional punctuation handling.
Source code in fastvideo/models/encoders/lingbotworld2_t5.py
fastvideo.models.encoders.lingbotworld2_t5.lingbotworld2_whitespace_preprocess ¶
Match the LingBot World 2 source tokenizer's clean='whitespace' behavior.