MCPcopy Create free account

hub / github.com/ASTRAL-Group/ASTRA / functions

Functions656 in github.com/ASTRAL-Group/ASTRA

Method_reorder_cache
(self, past, beam_idx)
minigpt4/models/Qformer.py:1120
Method_reorder_cache
(past_key_values, beam_idx)
minigpt4/models/modeling_llama.py:750
Method_response_ids
(self)
image_attr/image_attr_minigpt.py:175
Method_response_ids
(self)
image_attr/image_attr_llava.py:136
Method_response_ids
(self)
image_attr/image_attr_qwen.py:151
Method_response_start
(self)
image_attr/image_attr_minigpt.py:150
Method_response_start
(self)
image_attr/image_attr_llava.py:107
Method_response_start
(self)
image_attr/image_attr_qwen.py:110
Method_set_gradient_checkpointing
(self, module, value=False)
minigpt4/models/modeling_llama.py:341
Method_shape
(self, tensor: torch.Tensor, seq_len: int, bsz: int)
minigpt4/models/modeling_llama.py:165
Method_validate_runner_config
This method validates the configuration, such that 1) all the user specified options are valid; 2) no type mismatches
minigpt4/common/config.py:43
Functionabspath
Make a path absolute, but take into account prefixes like "http://" or "manifold://"
minigpt4/common/utils.py:374
Methodaccum_grad_iters
(self)
minigpt4/runners/runner_base.py:300
Functionall_gather_with_grad
Performs all_gather operation on the provided tensors. Graph remains connected for backward grad computation.
minigpt4/models/base_model.py:203
Methodanswer
(self, conv, img_list, max_new_tokens=300, num_beams=1, min_length=1, top_p=0.9, repetition_pen
minigpt4/conversation/conversation.py:159
Methodask
(self, text, conv)
minigpt4/conversation/conversation.py:150
Methodattack
(self, text_prompt_template, offset, batch_size = 8, num_iter=2000)
minigpt_utils/text_attacker.py:110
Methodattack_constrained
(self, text_prompt, img, batch_size = 8, num_iter=2000, alpha=1/255, epsilon = 128/255 )
minigpt_utils/visual_attacker.py:100
Methodattack_unconstrained
(self, text_prompt, img, batch_size = 8, num_iter=2000, alpha=1/255)
minigpt_utils/visual_attacker.py:46
Functionautocontrast_func
same output as PIL.ImageOps.autocontrast
minigpt4/processors/randaugment.py:19
Methodavg
(self)
minigpt4/common/logger.py:56
Methodbefore_evaluation
(self, **kwargs)
minigpt4/models/base_model.py:102
Functionbrightness_func
same output as PIL.ImageEnhance.Contrast
minigpt4/processors/randaugment.py:129
Methodbuild
(self)
minigpt4/datasets/builders/image_text_pair_builder.py:23
Methodbuild
(self)
minigpt4/datasets/builders/image_text_pair_builder.py:55
Methodbuild
(self, **kwargs)
minigpt4/processors/base_processor.py:23
Methodbuild_datasets
Build a dictionary of datasets, keyed by split 'train', 'valid', 'test'. Download dataset and annotations automatically if not exist.
minigpt4/tasks/base_task.py:35
Methodbuild_datasets
(self)
minigpt4/datasets/builders/image_text_pair_builder.py:83
Methodbuild_model
(self, cfg)
minigpt4/tasks/base_task.py:29
Functioncache_url
This implementation downloads the remote resource and caches it locally. The resource will only be downloaded if not previously requested.
minigpt4/common/utils.py:242
Functioncleanup_dir
Utility for deleting a directory. Useful for cleaning the storage space that contains various training artifacts like checkpoints, data etc.
minigpt4/common/utils.py:408
Methodcollater
(self, samples)
minigpt4/datasets/datasets/base_dataset.py:53
Functioncolor_func
same output as PIL.ImageEnhance.Color
minigpt4/processors/randaugment.py:97
Functioncompute_sim_matrix
(model, data_loader, **kwargs)
minigpt4/models/blip2.py:108
Functionconcat_datasets
Concatenates multiple datasets into a single dataset. It supports may-style datasets and DataPipeline from WebDataset. Currently, does not s
minigpt4/datasets/data_utils.py:125
Functioncontrast_func
same output as PIL.ImageEnhance.Contrast
minigpt4/processors/randaugment.py:115
Methodcopy_params
(self)
minigpt4/models/base_model.py:163
Methodcreate_custom_forward
(module)
minigpt4/models/Qformer.py:533
Methodcreate_custom_forward
(module)
minigpt4/models/modeling_llama.py:550
Functioncreate_file_symlink
Simply create the symlinks for a given file1 to file2. Useful during model checkpointing to symlinks to the latest successful checkpoint.
minigpt4/common/utils.py:261
Methodcuda_enabled
(self)
minigpt4/runners/runner_base.py:279
Methodcustom_forward
(*inputs)
minigpt4/models/Qformer.py:534
Methodcustom_forward
(*inputs)
minigpt4/models/modeling_llama.py:551
Functioncustom_forward_hook
(module, input, output)
steer_eval/steering_minigpt_jb.py:138
Functioncustom_forward_hook
(module, input, output)
steer_eval/steering_llava_jb_ood.py:109
Functioncustom_forward_hook
(module, input, output)
steer_eval/steering_qwen_jb.py:116
Functioncustom_forward_hook
(module, input, output)
steer_eval/steering_llava_typo.py:111
Functioncustom_forward_hook
(module, input, output)
steer_eval/steering_minigpt_typo.py:125
Functioncustom_forward_hook
(module, input, output)
steer_eval/steering_llava_toxic.py:106
Functioncustom_forward_hook
(module, input, output)
steer_eval/steering_qwen_jb_ood.py:117
Functioncustom_forward_hook
(module, input, output)
steer_eval/steering_minigpt_jb_ood.py:138
Functioncustom_forward_hook
(module, input, output)
steer_eval/steering_minigpt_toxic.py:129
Functioncustom_forward_hook
(module, input, output)
steer_eval/steering_qwen_toxic.py:115
Functioncustom_forward_hook
(module, input, output)
steer_eval/steering_llava_jb.py:108
Functioncustom_forward_hook
(module, input, output)
steer_eval/steering_qwen_typo.py:110
Functioncustom_forward_hook
(module, input, output)
utility_eval/minigpt_mmbench.py:149
Functioncustom_forward_hook
(module, input, output)
utility_eval/minigpt_mmvet.py:118
Functioncustom_forward_hook
(module, input, output)
utility_eval/qwen_mmvet.py:111
Functioncustom_forward_hook
(module, input, output)
utility_eval/llava_mmvet.py:110
Functioncustom_forward_hook
(module, input, output)
utility_eval/llava_mmbench.py:133
Functioncustom_forward_hook
(module, input, output)
utility_eval/qwen_mmbench.py:148
Functioncutout_func
(img, pad_size, replace=(0, 0, 0))
minigpt4/processors/randaugment.py:209
Functioncutout_level_to_args
(cutout_const, MAX_LEVEL, replace_value)
minigpt4/processors/randaugment.py:250
Methoddataloaders
A property to get and create dataloaders by split just in need. If no train_dataset_ratio is provided, concatenate map-style dataset
minigpt4/runners/runner_base.py:182
Methoddatasets_cfg
(self)
minigpt4/common/config.py:136
Functiondenormalize
(images)
minigpt4/conversation/conversation.py:25
Methoddevice
(self)
minigpt4/runners/runner_base.py:68
Methoddevice
(self)
minigpt4/models/base_model.py:133
Methoddict
(self)
minigpt4/conversation/conversation.py:99
Functiondisabled_train
Overwrite model.train with this function to make sure train/eval mode does not change anymore.
minigpt4/models/blip2.py:93
Methoddispl_item
(self, index)
minigpt4/datasets/datasets/caption_datasets.py:16
Functiondownload_and_extract_archive
( url: str, download_root: str, extract_root: Optional[str] = None, filename: Optional[str] =
minigpt4/common/utils.py:221
Functiondownload_google_drive_url
Download a file from google drive Downloading an URL from google drive requires confirmation when the file of the size is too big (google
minigpt4/common/utils.py:108
Methodepoch
(self)
minigpt4/datasets/datasets/dataloader_utils.py:142
Functionequalize_func
same output as PIL.ImageOps.equalize PIL's implementation is different from cv2.equalize
minigpt4/processors/randaugment.py:52
Methodevaluate_only
Set to True to skip training.
minigpt4/runners/runner_base.py:328
Methodevaluation
(self, model, data_loader, cuda_enabled=True)
minigpt4/tasks/image_text_pretrain.py:17
Methodextra_repr
(self)
minigpt4/models/eva_vit.py:40
Methodfeed_forward_chunk
(self, attention_output)
minigpt4/models/Qformer.py:476
Methodfeed_forward_chunk_query
(self, attention_output)
minigpt4/models/Qformer.py:481
Methodfit
( self, masks: NDArray, outputs: NDArray, num_output_tokens: int )
image_attr/solver.py:41
Methodforward
(ctx, x)
minigpt4/models/base_model.py:189
Methodforward
( self, input_ids=None, position_ids=None, query_embeds=None, past_key
minigpt4/models/Qformer.py:78
Methodforward
( self, hidden_states, attention_mask=None, head_mask=None, encoder_hi
minigpt4/models/Qformer.py:169
Methodforward
(self, hidden_states, input_tensor)
minigpt4/models/Qformer.py:285
Methodforward
( self, hidden_states, attention_mask=None, head_mask=None, encoder_hi
minigpt4/models/Qformer.py:322
Methodforward
(self, hidden_states)
minigpt4/models/Qformer.py:358
Methodforward
(self, hidden_states, input_tensor)
minigpt4/models/Qformer.py:371
Methodforward
( self, hidden_states, attention_mask=None, head_mask=None, encoder_hi
minigpt4/models/Qformer.py:402
Methodforward
( self, hidden_states, attention_mask=None, head_mask=None, encoder_hi
minigpt4/models/Qformer.py:495
Methodforward
(self, hidden_states)
minigpt4/models/Qformer.py:598
Methodforward
(self, hidden_states)
minigpt4/models/Qformer.py:617
Methodforward
(self, hidden_states)
minigpt4/models/Qformer.py:638
Methodforward
(self, sequence_output)
minigpt4/models/Qformer.py:649
Methodforward
r""" encoder_hidden_states (:obj:`torch.FloatTensor` of shape :obj:`(batch_size, sequence_length, hidden_size)`, `optional`): Seq
minigpt4/models/Qformer.py:804
Methodforward
r""" encoder_hidden_states (:obj:`torch.FloatTensor` of shape :obj:`(batch_size, sequence_length, hidden_size)`, `optional`): Seq
minigpt4/models/Qformer.py:987
Methodforward
r""" labels (:obj:`torch.LongTensor` of shape :obj:`(batch_size, sequence_length)`, `optional`): Labels for computing the masked l
minigpt4/models/Qformer.py:1150
Methodforward
(self, hidden_states)
minigpt4/models/modeling_llama.py:66
Methodforward
(self, x, seq_len=None)
minigpt4/models/modeling_llama.py:92
Methodforward
(self, x)
minigpt4/models/modeling_llama.py:139
← previousnext →401–500 of 656, ranked by callers