SYMBOL INDEX (81 symbols across 5 files) FILE: finetune/dataset.py class SupervisedDataset (line 13) | class SupervisedDataset(Dataset): method __init__ (line 16) | def __init__( method __len__ (line 29) | def __len__(self): method check_ret (line 32) | def check_ret(self, ret): method check_audio (line 46) | def check_audio(self, ret): method prepare_labels (line 53) | def prepare_labels(self, data): method add_dataset_prefix (line 100) | def add_dataset_prefix(self, item): method __getitem__ (line 111) | def __getitem__(self, i): FILE: finetune/finetune.py class ModelArguments (line 30) | class ModelArguments: class DataArguments (line 35) | class DataArguments: class TrainingArguments (line 42) | class TrainingArguments(transformers.TrainingArguments): class LoraArguments (line 61) | class LoraArguments: function maybe_zero_3 (line 75) | def maybe_zero_3(param): function get_peft_state_maybe_zero_3 (line 86) | def get_peft_state_maybe_zero_3(named_params, bias): function rank0_print (line 114) | def rank0_print(*args): function safe_save_model_for_hf_trainer (line 119) | def safe_save_model_for_hf_trainer(trainer, output_dir: str, bias="none"): function make_supervised_data_module (line 133) | def make_supervised_data_module( function get_parameter_number (line 160) | def get_parameter_number(model): function load_model_from_pretrained (line 178) | def load_model_from_pretrained(model_path, dtype=torch.bfloat16): function load_tokenizer_from_pretrained (line 185) | def load_tokenizer_from_pretrained(model_path): function train (line 190) | def train(): FILE: finetune/trainer.py class MegrezOTrainer (line 16) | class MegrezOTrainer(Trainer): method compute_loss (line 17) | def compute_loss(self, model, inputs, return_outputs=False): method prediction_step (line 55) | def prediction_step( method training_step (line 140) | def training_step( FILE: gradio_app.py function main (line 31) | def main(model_path: str, port: int): FILE: vllm_demo/megrezo.py class MegrezORawImageInput (line 75) | class MegrezORawImageInput(TypedDict): class MegrezOAudioInput (line 81) | class MegrezOAudioInput(TypedDict): class MegrezOAudioTensorInput (line 87) | class MegrezOAudioTensorInput(TypedDict): class MegrezOImagePixelInputs (line 95) | class MegrezOImagePixelInputs(TypedDict): class MegrezOImageEmbeddingInputs (line 118) | class MegrezOImageEmbeddingInputs(TypedDict): function insert_audio_embeddings (line 136) | def insert_audio_embeddings(text_embeddings, inserted_embeddings, insert... function insert_image_embeddings (line 149) | def insert_image_embeddings(text_embeddings, inserted_embeddings, insert... class Resampler (line 169) | class Resampler(nn.Module): method __init__ (line 171) | def __init__( method _init_weights (line 211) | def _init_weights(self, m: nn.Module) -> None: method _repeat (line 220) | def _repeat(self, query, N: int): method _set_2d_pos_cache (line 223) | def _set_2d_pos_cache(self, max_size: Tuple[int, int], device: torch.t... method _adjust_pos_cache (line 228) | def _adjust_pos_cache(self, tgt_sizes: torch.Tensor, device: torch.typ... method forward (line 240) | def forward(self, x: torch.Tensor, tgt_sizes: torch.Tensor) -> torch.T... class LayerNorm (line 288) | class LayerNorm(nn.LayerNorm): method forward (line 289) | def forward(self, x: Tensor) -> Tensor: class Linear (line 294) | class Linear(nn.Linear): method forward (line 295) | def forward(self, x: Tensor) -> Tensor: class Conv1d (line 303) | class Conv1d(nn.Conv1d): method _conv_forward (line 304) | def _conv_forward(self, x: Tensor, weight: Tensor, bias: Optional[Tens... function sinusoids (line 308) | def sinusoids(length, channels, max_timescale=10000): class MultiHeadAttention (line 317) | class MultiHeadAttention(nn.Module): method __init__ (line 318) | def __init__(self, n_state: int, n_head: int): method forward (line 326) | def forward( method qkv_attention (line 348) | def qkv_attention(self, q: Tensor, k: Tensor, v: Tensor, mask: Optiona... class ResidualAttentionBlock (line 363) | class ResidualAttentionBlock(nn.Module): method __init__ (line 364) | def __init__(self, n_state: int, n_head: int, cross_attention: bool = ... method forward (line 377) | def forward( class AudioEncoder (line 391) | class AudioEncoder(nn.Module): method __init__ (line 392) | def __init__( method forward (line 427) | def forward(self, x: Tensor, padding_mask: Tensor = None, audio_length... method encode (line 481) | def encode( class AudioModel (line 506) | class AudioModel(torch.nn.Module): method __init__ (line 508) | def __init__(self, config): method forward (line 513) | def forward(self, audio_info): function get_max_megrezo_image_tokens (line 524) | def get_max_megrezo_image_tokens(ctx: InputContext): function dummy_seq_data_for_minicpmv (line 529) | def dummy_seq_data_for_minicpmv(seq_len: int, num_images: int): function dummy_image_for_minicpmv (line 533) | def dummy_image_for_minicpmv(ctx: InputContext, hf_config: PretrainedCon... function dummy_data_for_minicpmv (line 539) | def dummy_data_for_minicpmv(ctx: InputContext, seq_len: int, mm_counts: ... function input_processor_for_megrezo (line 548) | def input_processor_for_megrezo(ctx: InputContext, inputs: DecoderOnlyIn... function input_mapper_for_megrezo (line 592) | def input_mapper_for_megrezo(ctx: InputContext, data: object): class MegrezOModel (line 601) | class MegrezOModel(nn.Module, VllmModelForTextGeneration, SupportsMultiM... method __init__ (line 608) | def __init__( method get_vision_hidden_states (line 647) | def get_vision_hidden_states( method compose_embeddings (line 665) | def compose_embeddings(self, mini_batch): method _parse_inputs (line 694) | def _parse_inputs(self, input_ids: torch.Tensor, **kwargs): method forward (line 721) | def forward( method compute_logits (line 753) | def compute_logits( method sample (line 761) | def sample( method load_weights (line 769) | def load_weights(self, weights: Iterable[Tuple[str, torch.Tensor]]): method get_mm_mapping (line 835) | def get_mm_mapping(self) -> MultiModelKeys: method init_llm (line 841) | def init_llm( method init_audio_module (line 859) | def init_audio_module( method init_vision_module (line 867) | def init_vision_module( method init_resampler (line 881) | def init_resampler(