Skip to content

language_mixin

language_mixin

Mixin for encoders that process tokenized language inputs.

LanguageEncoderMixin

Shared logic for encoders that process tokenized text sequences.

Provides language key setup, text padding/truncation, and input extraction with validation. Mixed into LanguageEncoder, VLM encoders, and generative language-model components.