SYMBOL INDEX (74 symbols across 9 files) FILE: dataset/lm_dataset.py class VLMDataset (line 16) | class VLMDataset(Dataset): method __init__ (line 17) | def __init__(self, parquet_path, tokenizer, preprocess=None, max_lengt... method __len__ (line 29) | def __len__(self): method create_chat_prompt (line 32) | def create_chat_prompt(self, conversations): method generate_labels (line 43) | def generate_labels(self, input_ids): method __getitem__ (line 61) | def __getitem__(self, index: int): FILE: eval_vlm.py function init_model (line 12) | def init_model(args): function main (line 31) | def main(): FILE: model/model_minimind.py class MiniMindConfig (line 8) | class MiniMindConfig(PretrainedConfig): method __init__ (line 11) | def __init__( class RMSNorm (line 96) | class RMSNorm(torch.nn.Module): method __init__ (line 97) | def __init__(self, dim: int, eps: float = 1e-5): method _norm (line 102) | def _norm(self, x): method forward (line 105) | def forward(self, x): function precompute_freqs_cis (line 109) | def precompute_freqs_cis(dim: int, end: int = int(32 * 1024), rope_base:... function apply_rotary_pos_emb (line 131) | def apply_rotary_pos_emb(q, k, cos, sin, position_ids=None, unsqueeze_di... function repeat_kv (line 140) | def repeat_kv(x: torch.Tensor, n_rep: int) -> torch.Tensor: class Attention (line 150) | class Attention(nn.Module): method __init__ (line 151) | def __init__(self, args: MiniMindConfig): method forward (line 169) | def forward(self, class FeedForward (line 216) | class FeedForward(nn.Module): method __init__ (line 217) | def __init__(self, config: MiniMindConfig): method forward (line 228) | def forward(self, x): class MoEGate (line 232) | class MoEGate(nn.Module): method __init__ (line 233) | def __init__(self, config: MiniMindConfig): method reset_parameters (line 248) | def reset_parameters(self) -> None: method forward (line 251) | def forward(self, hidden_states): class MOEFeedForward (line 288) | class MOEFeedForward(nn.Module): method __init__ (line 289) | def __init__(self, config: MiniMindConfig): method forward (line 303) | def forward(self, x): method moe_infer (line 329) | def moe_infer(self, x, flat_expert_indices, flat_expert_weights): class MiniMindBlock (line 352) | class MiniMindBlock(nn.Module): method __init__ (line 353) | def __init__(self, layer_id: int, config: MiniMindConfig): method forward (line 365) | def forward(self, hidden_states, position_embeddings, past_key_value=N... class MiniMindModel (line 376) | class MiniMindModel(nn.Module): method __init__ (line 377) | def __init__(self, config: MiniMindConfig): method forward (line 392) | def forward(self, class MiniMindForCausalLM (line 427) | class MiniMindForCausalLM(PreTrainedModel, GenerationMixin): method __init__ (line 430) | def __init__(self, config: MiniMindConfig = None): method forward (line 437) | def forward(self, FILE: model/model_vlm.py class VLMConfig (line 13) | class VLMConfig(MiniMindConfig): method __init__ (line 16) | def __init__( class VisionProj (line 26) | class VisionProj(nn.Module): method __init__ (line 27) | def __init__(self, ve_hidden_size=768, hidden_size=512): method forward (line 35) | def forward(self, image_encoders): class MiniMindVLM (line 41) | class MiniMindVLM(MiniMindForCausalLM): method __init__ (line 44) | def __init__(self, params: VLMConfig = None, vision_model_path="./mode... method get_vision_model (line 52) | def get_vision_model(model_path: str): method image2tensor (line 65) | def image2tensor(image, processor): method get_image_embeddings (line 71) | def get_image_embeddings(image_tensors, vision_model): method count_vision_proj (line 77) | def count_vision_proj(self, tokens, h, vision_tensors=None, seqlen=512): method forward (line 112) | def forward(self, FILE: scripts/convert_vlm.py function convert_torch2transformers_minimind (line 14) | def convert_torch2transformers_minimind(torch_path, transformers_path, d... function convert_transformers2torch (line 31) | def convert_transformers2torch(transformers_path, torch_path): FILE: scripts/web_demo_vlm.py function init_model (line 21) | def init_model(lm_config): class CustomStreamer (line 39) | class CustomStreamer(TextStreamer): method __init__ (line 40) | def __init__(self, tokenizer, queue): method on_finalized_text (line 45) | def on_finalized_text(self, text: str, stream_end: bool = False): function chat (line 51) | def chat(prompt, current_image_path): function launch_gradio_server (line 97) | def launch_gradio_server(server_name="0.0.0.0", server_port=7788): FILE: trainer/train_pretrain_vlm.py function train_epoch (line 24) | def train_epoch(epoch, loader, iters, start_step=0, wandb=None): FILE: trainer/train_sft_vlm.py function train_epoch (line 24) | def train_epoch(epoch, loader, iters, start_step=0, wandb=None): FILE: trainer/trainer_utils.py function get_model_params (line 19) | def get_model_params(model, config, ignore_patterns=['vision_encoder']): function is_main_process (line 33) | def is_main_process(): function Logger (line 37) | def Logger(content): function get_lr (line 42) | def get_lr(current_step, total_steps, lr): function init_distributed_mode (line 46) | def init_distributed_mode(): function setup_seed (line 56) | def setup_seed(seed: int): function init_vlm_model (line 66) | def init_vlm_model(vlm_config, from_weight='pretrain_vlm', tokenizer_pat... function vlm_checkpoint (line 96) | def vlm_checkpoint(vlm_config, weight='pretrain_vlm', model=None, optimi... class SkipBatchSampler (line 154) | class SkipBatchSampler(Sampler): method __init__ (line 155) | def __init__(self, sampler, batch_size, skip_batches=0): method __iter__ (line 160) | def __iter__(self): method __len__ (line 175) | def __len__(self):