MCPcopy Create free account

hub / github.com/Alpha-VLLM/LLaMA2-Accessory / functions

Functions1,094 in github.com/Alpha-VLLM/LLaMA2-Accessory

↓ 1 callersFunctionsetup_mixed_precision
(args)
Large-DiT-T2I/train.py:255
↓ 1 callersFunctionshow_mask
(img: Image, mask: torch.Tensor, color)
accessory/demos/multi_turn_mm_box.py:218
↓ 1 callersFunctionspace_timesteps
Create a list of timesteps to use from an original diffusion process, given the number of timesteps we want to take from equally-sized portio
Large-DiT-ImageNet/diffusion/respace.py:12
↓ 1 callersFunctionspace_timesteps
Create a list of timesteps to use from an original diffusion process, given the number of timesteps we want to take from equally-sized portio
Large-DiT-T2I/diffusion/respace.py:12
↓ 1 callersMethodsparse_transpose
( self, size, row_indices, column_indices)
accessory/model/LLM/mixtral_sparse_ens5.py:305
↓ 1 callersMethodsparse_transpose
( self, size, row_indices, column_indices)
accessory/model/LLM/mixtral_sparse.py:299
↓ 1 callersMethodsparse_transpose
( self, size, row_indices, column_indices)
accessory/model/LLM/mixtral_sparse_ens.py:303
↓ 1 callersFunctionsplit_list
Split a list into n (roughly) equal-sized chunks
light-eval/src/eval_mmvet.py:80
↓ 1 callersFunctionsplit_list
Split a list into n (roughly) equal-sized chunks
light-eval/src/eval_llavabenchmark.py:90
↓ 1 callersFunctiontensor_load_shard
r"""A helper function to partially load a tensor. This can save memory sometimes as this allows tensor parallel shards to stream into memory (
accessory/util/tensor_parallel.py:488
↓ 1 callersMethodtimestep_embedding
Create sinusoidal timestep embeddings. :param t: a 1-D Tensor of N indices, one per batch element. These ma
Large-DiT-ImageNet/models.py:57
↓ 1 callersMethodtimestep_embedding
Create sinusoidal timestep embeddings. :param t: a 1-D Tensor of N indices, one per batch element. These ma
Large-DiT-T2I/models/model.py:57
↓ 1 callersMethodtoken_drop
Drops labels to enable classifier-free guidance.
Large-DiT-ImageNet/models.py:101
↓ 1 callersMethodtoken_drop
Drops labels to enable classifier-free guidance.
Large-DiT-T2I/models/model.py:101
↓ 1 callersMethodtopology
(self, x: torch.Tensor, padded_bins: torch.Tensor)
accessory/model/LLM/mixtral_sparse_ens5.py:335
↓ 1 callersMethodtopology
(self, x: torch.Tensor, padded_bins: torch.Tensor)
accessory/model/LLM/mixtral_sparse.py:329
↓ 1 callersMethodtopology
(self, x: torch.Tensor, padded_bins: torch.Tensor)
accessory/model/LLM/mixtral_sparse_ens.py:333
↓ 1 callersFunctiontrain_one_epoch
(model: torch.nn.Module, data_loader, optimizer: torch.optim.Optimizer,
accessory/engine_finetune.py:13
↓ 1 callersFunctiontrain_one_epoch
(model: torch.nn.Module, data_loader, val_loader, optimizer: torch.optim.Optimizer,
accessory/engine_pretrain.py:14
↓ 1 callersMethodtraining_losses
( self, model, *args, **kwargs )
Large-DiT-ImageNet/diffusion/respace.py:94
↓ 1 callersMethodtraining_losses
( self, model, *args, **kwargs )
Large-DiT-T2I/diffusion/respace.py:94
↓ 1 callersMethodunpatchify
x: (N, T, patch_size**2 * C) imgs: (N, H, W, C)
Large-DiT-ImageNet/models.py:527
↓ 1 callersMethodunpatchify
x: (N, T, patch_size**2 * C) imgs: (N, H, W, C)
Large-DiT-T2I/models/model.py:575
↓ 1 callersMethodupdateProgress
(self, progress)
accessory/eval_mm/utils/vqa_eval.py:320
↓ 1 callersFunctionupdate_ema
Step the EMA model towards the current model.
Large-DiT-ImageNet/train.py:77
↓ 1 callersFunctionupdate_ema
Step the EMA model towards the current model.
Large-DiT-T2I/train.py:121
↓ 1 callersMethodupdate_with_all_losses
Update the reweighting using losses from a model. Sub-classes should override this method to update the reweighting using los
Large-DiT-ImageNet/diffusion/timestep_sampler.py:106
↓ 1 callersMethodupdate_with_all_losses
Update the reweighting using losses from a model. Sub-classes should override this method to update the reweighting using los
Large-DiT-T2I/diffusion/timestep_sampler.py:106
↓ 1 callersFunctionval_one_epoch
(model: torch.nn.Module, data_loader: Iterable, epoch: int, args=None)
accessory/engine_pretrain.py:119
↓ 1 callersFunctionvalidate_data
Method validate_data: validates that all files in the results folder are correct (have the correct name contents). Va
accessory/eval_mm/infographicsvqa_eval.py:36
↓ 1 callersMethodweights
Get a numpy array of weights, one per diffusion step. The weights needn't be normalized, but must be positive.
Large-DiT-ImageNet/diffusion/timestep_sampler.py:38
↓ 1 callersMethodweights
Get a numpy array of weights, one per diffusion step. The weights needn't be normalized, but must be positive.
Large-DiT-T2I/diffusion/timestep_sampler.py:38
↓ 1 callersFunctionwithin_eps
(pred: float, gt: float)
accessory/eval_mm/utils/math_utils.py:460
↓ 1 callersFunctionworker_func
()
accessory/demos/single_turn_mm.py:155
↓ 1 callersFunctionworker_func
()
accessory/demos/single_turn.py:143
↓ 1 callersFunctionwrite_configs
( params: Dict[str, Any], dtype: torch.dtype, dest_dir: str, vocab_size: int )
accessory/tools/convert_weights_to_hf.py:284
↓ 1 callersFunctionwrite_hf_ckpt
( hf_state_dict: List[Dict[str, torch.Tensor]], dest_dir: str, tokenizer_path: str, params: Dict[str,
accessory/tools/convert_weights_to_hf.py:345
↓ 1 callersFunctionwrite_model_weights
( hf_state_dict: List[Dict[str, torch.Tensor]], dest_dir: str )
accessory/tools/convert_weights_to_hf.py:240
↓ 1 callersFunctionwrite_tokenizer
(tokenizer_path: str, dest_dir: str)
accessory/tools/convert_weights_to_hf.py:266
FunctionDiT_Llama_3B_patch2
(**kwargs)
Large-DiT-ImageNet/models.py:673
FunctionDiT_Llama_3B_patch2
(**kwargs)
Large-DiT-T2I/models/model.py:750
FunctionDiT_Llama_600M_patch2
(**kwargs)
Large-DiT-ImageNet/models.py:666
FunctionDiT_Llama_600M_patch2
(**kwargs)
Large-DiT-T2I/models/model.py:744
FunctionDiT_Llama_7B_patch2
(**kwargs)
Large-DiT-ImageNet/models.py:680
FunctionDiT_Llama_7B_patch2
(**kwargs)
Large-DiT-T2I/models/model.py:756
Method__call__
(self, x, ts, **kwargs)
Large-DiT-ImageNet/diffusion/respace.py:124
Method__call__
(self, x, ts, **kwargs)
Large-DiT-T2I/diffusion/respace.py:124
Method__call__
(self, img: Image.Image)
accessory/eval_mm/inference_image_sphinx.py:53
Method__call__
(self, img: Image.Image)
accessory/data/transform.py:19
Method__call__
(self, loss, optimizer, model: FSDP, clip_grad=None, parameters=None, create_graph=False, update_grad=True)
accessory/util/misc.py:301
Method__enter__
(self)
accessory/util/tensor_type.py:20
Method__eq__
(self, other)
light-eval/src/eval_utils/math_util.py:246
Method__exit__
( self, exc_type: Optional[type[BaseException]], exc_val: Optional[BaseException],
accessory/util/tensor_type.py:35
Method__getattr__
(self, attr)
accessory/util/misc.py:225
Method__getitem__
(self, idx: int)
SPHINX/batch_inference.py:41
Method__getitem__
(self, index)
Large-DiT-T2I/data/dataset.py:169
Method__getitem__
(self, idx)
accessory/eval_mm/inference_image_sphinx.py:92
Method__getitem__
(self, idx)
accessory/data/falcon.py:187
Method__getitem__
(self, idx)
accessory/data/falcon_packed.py:183
Method__getitem__
(self, index)
accessory/data/alpaca.py:164
Method__getitem__
(self, index)
accessory/data/conversation/dataset.py:275
Method__init__
(self, hidden_size, frequency_embedding_size=256)
Large-DiT-ImageNet/models.py:40
Method__init__
(self, num_classes, hidden_size, dropout_prob)
Large-DiT-ImageNet/models.py:91
Method__init__
Initialize the FeedForward module. Args: dim (int): Input dimension. hidden_dim (int): Hidden dimension of t
Large-DiT-ImageNet/models.py:299
Method__init__
Initialize a TransformerBlock. Args: layer_id (int): Identifier for the layer. dim (int): Embedding dimensio
Large-DiT-ImageNet/models.py:356
Method__init__
(self, hidden_size, patch_size, out_channels)
Large-DiT-ImageNet/models.py:453
Method__init__
( self, input_size: int = 32, patch_size: int = 2, in_channels: int = 4,
Large-DiT-ImageNet/models.py:481
Method__init__
(self, diffusion)
Large-DiT-ImageNet/diffusion/timestep_sampler.py:63
Method__init__
(self, diffusion, history_per_term=10, uniform_prob=0.001)
Large-DiT-ImageNet/diffusion/timestep_sampler.py:121
Method__init__
( self, *, betas, model_mean_type, model_var_type, loss_type
Large-DiT-ImageNet/diffusion/gaussian_diffusion.py:153
Method__init__
(self, use_timesteps, **kwargs)
Large-DiT-ImageNet/diffusion/respace.py:73
Method__init__
(self, image_size: int, list_path: str)
SPHINX/batch_inference.py:26
Method__init__
(self, transform, tokenizer_path, text_dropout_prob, max_words=128)
Large-DiT-T2I/train.py:55
Method__init__
(self, diffusion)
Large-DiT-T2I/diffusion/timestep_sampler.py:63
Method__init__
(self, diffusion, history_per_term=10, uniform_prob=0.001)
Large-DiT-T2I/diffusion/timestep_sampler.py:121
Method__init__
( self, *, betas, model_mean_type, model_var_type, loss_type
Large-DiT-T2I/diffusion/gaussian_diffusion.py:153
Method__init__
(self, use_timesteps, **kwargs)
Large-DiT-T2I/diffusion/respace.py:73
Method__init__
(self, message=None)
Large-DiT-T2I/data/dataset.py:22
Method__init__
(self, config_path, item_processor: ItemProcessor, cache_on
Large-DiT-T2I/data/dataset.py:36
Method__init__
(self, hidden_size, frequency_embedding_size=256)
Large-DiT-T2I/models/model.py:40
Method__init__
(self, num_classes, hidden_size, dropout_prob)
Large-DiT-T2I/models/model.py:91
Method__init__
Initialize the FeedForward module. Args: dim (int): Input dimension. hidden_dim (int): Hidden dimension of t
Large-DiT-T2I/models/model.py:333
Method__init__
Initialize a TransformerBlock. Args: layer_id (int): Identifier for the layer. dim (int): Embedding dimensio
Large-DiT-T2I/models/model.py:390
Method__init__
(self, hidden_size, patch_size, out_channels)
Large-DiT-T2I/models/model.py:490
Method__init__
( self, patch_size: int = 2, max_seq_len: int = 288, in_channels: int = 4,
Large-DiT-T2I/models/model.py:518
Method__init__
pad an image to squre (borrowed from LLAVA, thx) :param background_color: rgb values for padded pixels, normalized to [0, 1]
accessory/eval_mm/inference_image_sphinx.py:46
Method__init__
(self, anno_path, prompt, img_root, img_size=224)
accessory/eval_mm/inference_image_sphinx.py:80
Method__init__
(self, config, global_config, prompt)
accessory/eval_mm/evaluate.py:85
Method__init__
(self)
accessory/eval_mm/utils/metric.py:54
Method__init__
(self)
accessory/eval_mm/utils/metric.py:104
Method__init__
Constructor of VQA helper class for reading and visualizing questions and answers. :param annotation_file (str): location of VQA anno
accessory/eval_mm/utils/vqa.py:33
Method__init__
(self, vqa=None, vqaRes=None, n=2)
accessory/eval_mm/utils/vqa_eval.py:20
Method__init__
(self, code, timeout, use_process: bool)
accessory/eval_mm/utils/math_utils.py:24
Method__init__
( self, llama_type: str, llama_config: str|List[str], tokenizer_path: str, with_visual: bool =
accessory/model/meta.py:20
Method__init__
Create a tokenizer, with inner implementation either spm or HF transformers tokenzier :param model_path: - when using spm
accessory/model/tokenizer.py:16
Method__init__
(self, *from_pretrained_args, gpus:Optional[int]=None, gpu_ids:Optional[List
accessory/model/multi_gpu_wrapper.py:172
Method__init__
( self, in_features: int, out_features: int, bias: bool = True, gather
accessory/model/peft.py:79
Method__init__
( self, in_features: int, out_features: int, bias: bool = True, input_
accessory/model/peft.py:189
Method__init__
Initialize the RMSNorm normalization layer. Args: dim (int): The dimension of the input tensor.
accessory/model/components.py:11
Method__init__
(self, args: ModelArgs)
accessory/model/LLM/mixtral_peft.py:63
← previousnext →601–700 of 1,094, ranked by callers