espnet2.sds.end_to_end.mini_omni.litgpt.model.GPT
espnet2.sds.end_to_end.mini_omni.litgpt.model.GPT
class espnet2.sds.end_to_end.mini_omni.litgpt.model.GPT(config: Config)
Bases: Module
Initialize internal Module state, shared by both nn.Module and ScriptModule.
clear_kv_cache() → None
concat_whisper_feat(audio_feature, input_ids, T, task)
forward(audio_features: Tensor, input_ids: Tensor, input_pos: Tensor | None = None, whisper_lens: list | None = None, task: str | None = None) → Tensor
Define the computation performed at every call.
Should be overridden by all subclasses.
NOTE
Although the recipe for forward pass needs to be defined within this function, one should call the Module instance afterwards instead of this since the former takes care of running the registered hooks while the latter silently ignores them.
classmethod from_name(name: str, **kwargs: Any) → Self
property max_seq_length : int
reset_parameters() → None
rope_cache(device: device | None = None) → Tuple[Tensor, Tensor]
set_kv_cache(batch_size: int, rope_cache_length: int | None = None, device: device | None = None, dtype: dtype | None = None) → None
