MCPcopy Create free account

hub / github.com/apple/ml-mgie / functions

Functions40 in github.com/apple/ml-mgie

↓ 7 callersMethodget_model
(self)
mgie_llava.py:230
↓ 3 callersFunctionb2f
(b)
mgie_train.py:43
↓ 3 callersMethodget_vision_tower
(self)
mgie_llava.py:46
↓ 3 callersFunctionresize
(f)
mgie_train.py:44
↓ 2 callersMethod__init__
(self)
mgie_llava.py:188
↓ 2 callersFunction_tokenize_fn
Tokenize a list of strings.
mgie_train.py:219
↓ 2 callersFunctionimg2npy
(f)
mgie_train.py:54
↓ 2 callersFunctionmaybe_zero_3
(param, ignore_status=False, name=None)
mgie_train.py:114
↓ 2 callersFunctionpreprocess
Given a list of sources, each is a conversation list. This transform: 1. Add signal '### ' at the beginning each sentence, with end signal '\
mgie_train.py:445
↓ 1 callersMethod__init__
(self, data_path: str, tokenizer: transformers.PreTrainedTokenizer)
mgie_train.py:482
↓ 1 callersFunction_add_speaker_and_signal
Add speaker and start/end signal on each round.
mgie_train.py:257
↓ 1 callersFunction_mask_targets
(target, tokenized_lens, speakers)
mgie_train.py:246
↓ 1 callersFunctionfind_all_linear_names
(model)
mgie_train.py:162
↓ 1 callersMethodforward
(self, llm, emb)
mgie_llava.py:198
↓ 1 callersFunctionget_peft_state_maybe_zero_3
(named_params, bias)
mgie_train.py:129
↓ 1 callersFunctionget_peft_state_non_lora_maybe_zero_3
(named_params, require_grad_only=True)
mgie_train.py:154
↓ 1 callersMethodget_vision_tower
(self)
mgie_llava.py:233
↓ 1 callersMethodinitialize_vision_modules
(self, vision_tower, mm_vision_select_layer, pretrain_mm_mlp_adapter=None, f
mgie_llava.py:52
↓ 1 callersMethodinitialize_vision_tokenizer
(self, mm_use_im_start_end, tokenizer, device, tune_mm_mlp_adapter=False,
mgie_llava.py:362
↓ 1 callersFunctionmake_supervised_data_module
Make dataset and collator for supervised fine-tuning.
mgie_train.py:581
↓ 1 callersFunctionpatch_FSDP_use_orig_params
(func)
mgie_train.py:761
↓ 1 callersFunctionpreprocess_mpt
( sources, tokenizer: transformers.PreTrainedTokenizer, )
mgie_train.py:373
↓ 1 callersFunctionpreprocess_multimodal
( sources: Sequence[str], multimodal_cfg: dict, cur_token_len: int, )
mgie_train.py:278
↓ 1 callersFunctionpreprocess_v1
( sources, tokenizer: transformers.PreTrainedTokenizer, )
mgie_train.py:303
↓ 1 callersFunctionsafe_save_model_for_hf_trainer
Collects the state dict and dump to disk.
mgie_train.py:176
↓ 1 callersFunctionsmart_tokenizer_and_embedding_resize
Resize tokenizer and embedding. Note: This is the unoptimized version that may make your embedding size not be divisible by 64.
mgie_train.py:194
↓ 1 callersFunctiontrain
()
mgie_train.py:602
Method__call__
(self, instances: Sequence[Dict])
mgie_train.py:552
Method__getitem__
(self, i)
mgie_train.py:498
Method__getitem__
(self, i)
mgie_train.py:518
Method__init__
(self, data_path: str, tokenizer: transformers.PreTrainedTokenizer, multimod
mgie_train.py:504
Method__init__
(self, config: LlamaConfig)
mgie_llava.py:35
Method__init__
(self, config)
mgie_llava.py:208
Method__len__
(self)
mgie_train.py:495
Method__len__
(self)
mgie_train.py:515
Methodforward
( self, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor] = N
mgie_llava.py:89
Methodforward
( self, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor] = N
mgie_llava.py:243
Functionmake_inputs_require_grad
(module, input, output)
mgie_train.py:658
Methodprepare_inputs_for_generation
( self, input_ids, past_key_values=None, attention_mask=None, inputs_embeds=None, **kwargs )
mgie_llava.py:340
Functionwrap_func
(*args, **kwargs)
mgie_train.py:762