MCPcopy Create free account

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

Functions656 in github.com/ASTRAL-Group/ASTRA

Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
minigpt4/models/modeling_llama.py:168
Methodforward
Args: hidden_states (`torch.FloatTensor`): input to the layer of shape `(batch, seq_len, embed_dim)` attention_mask (
minigpt4/models/modeling_llama.py:247
Methodforward
( self, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor] = N
minigpt4/models/modeling_llama.py:466
Methodforward
r""" Args: labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing
minigpt4/models/modeling_llama.py:629
Methodforward
(self, x)
minigpt4/models/eva_vit.py:37
Methodforward
(self, x)
minigpt4/models/eva_vit.py:54
Methodforward
(self, x, rel_pos_bias=None)
minigpt4/models/eva_vit.py:118
Methodforward
(self, x, rel_pos_bias=None)
minigpt4/models/eva_vit.py:173
Methodforward
(self, x, **kwargs)
minigpt4/models/eva_vit.py:198
Methodforward
(self)
minigpt4/models/eva_vit.py:238
Methodforward
(self, x)
minigpt4/models/eva_vit.py:349
Methodforward
(self, samples)
minigpt4/models/mini_gpt4.py:167
Methodforward
(self, x: torch.Tensor)
minigpt4/models/blip2.py:102
Methodforward_features
(self, samples, **kwargs)
minigpt4/models/base_model.py:129
Methodfrom_config
(cls, cfg=None)
minigpt4/processors/blip_processors.py:40
Methodfrom_config
(cls, cfg=None)
minigpt4/processors/blip_processors.py:92
Methodfrom_config
(cls, cfg=None)
minigpt4/processors/blip_processors.py:132
Methodfrom_pretrained
( cls, pretrained_model_name_or_path: str=" ", tokenizer_name: str = " ", devi
image_attr/image_attr_minigpt.py:67
Methodfrom_pretrained
( cls, pretrained_model_name_or_path: str=" ", tokenizer_name: str = " ", devi
image_attr/image_attr_llava.py:56
Methodfrom_pretrained
( cls, pretrained_model_name_or_path: str=" ", tokenizer_name: str = " ", devi
image_attr/image_attr_qwen.py:57
FunctiongetAttMap
(img, attMap, blur=True, overlap=True)
minigpt4/common/gradcam.py:7
Methodget_attention_map
(self)
minigpt4/models/Qformer.py:158
Methodget_attn_gradients
(self)
minigpt4/models/Qformer.py:152
Methodget_attributions
Get the attributions for (part of) the response. Arguments: start_idx (int, optional): Start index of th
image_attr/image_attr_minigpt.py:263
Methodget_attributions
Get the attributions for (part of) the response. Arguments: start_idx (int, optional): Start index of th
image_attr/image_attr_llava.py:225
Functionget_attributions_df
( attributions: NDArray[Any], context_partitioner, top_k: Optional[int] = None, )
image_attr/utils.py:427
Functionget_cache_path
(rel_path)
minigpt4/common/utils.py:46
Methodget_classifier
(self)
minigpt4/models/eva_vit.py:317
Methodget_config
(self)
minigpt4/common/config.py:128
Methodget_context
Get a version of the context ablated according to the given mask.
image_attr/context_partitioner.py:47
Methodget_context
(self, mask: Optional[NDArray] = None)
image_attr/context_partitioner.py:136
Methodget_context
(self, mask: Optional[NDArray] = None)
image_attr/context_partitioner.py:180
Methodget_decoder
(self)
minigpt4/models/modeling_llama.py:624
Functionget_file_size
Given a file, get the size of file in MB
minigpt4/common/utils.py:419
Methodget_input_embeddings
(self)
minigpt4/models/Qformer.py:699
Methodget_input_embeddings
(self)
minigpt4/models/modeling_llama.py:435
Methodget_input_embeddings
(self)
minigpt4/models/modeling_llama.py:609
Methodget_intermediate_layers
(self, x)
minigpt4/models/eva_vit.py:354
Functionget_masks_and_logit_probs
( model, tokenizer, num_masks, num_sources, get_prompt_ids, response_ids, ablation
image_attr/utils.py:362
Methodget_output_embeddings
(self)
minigpt4/models/Qformer.py:981
Methodget_output_embeddings
(self)
minigpt4/models/Qformer.py:1144
Methodget_output_embeddings
(self)
minigpt4/models/modeling_llama.py:615
Methodget_runner_class
(cls, name)
minigpt4/common/registry.py:252
Methodget_source
(self, index: int)
image_attr/context_partitioner.py:177
Functionget_vlm_masks_and_logit_probs
( model, processor, tokenizer, num_masks, num_sources, partitioner, get_query_ids,
image_attr/utils.py:249
Methodglobal_avg
(self)
minigpt4/common/logger.py:61
Functionhighlight_word_indices
(words, indices, separators, color: bool)
image_attr/utils.py:46
Functionidentity_func
(img)
minigpt4/processors/randaugment.py:15
Methodinference_step
(self)
minigpt4/tasks/base_task.py:80
Functioninit_distributed_mode
(args)
minigpt4/common/dist_utils.py:57
Methodinit_image_query
( self, image: Image, query: str, source_type: str = "patch", generate
image_attr/image_attr_minigpt.py:109
Methodinit_image_query
( self, image: Image, query: str, source_type: str = "patch", generate
image_attr/image_attr_llava.py:73
Methodinit_lr
(self)
minigpt4/runners/runner_base.py:292
Functionlevel_to_args
(level)
minigpt4/processors/randaugment.py:224
Methodlist_datasets
(cls)
minigpt4/common/registry.py:276
Methodlist_models
(cls)
minigpt4/common/registry.py:260
Methodlist_processors
(cls)
minigpt4/common/registry.py:268
Methodlist_runners
(cls)
minigpt4/common/registry.py:256
Methodload_checkpoint_from_config
Load checkpoint as specified in the config file. If load_finetuned is True, load the finetuned model; otherwise, load the pretrained
minigpt4/models/base_model.py:81
Functionload_dataset
Example >>> dataset = load_dataset("coco_caption", cfg=None) >>> splits = dataset.keys() >>> print([len(dataset[split]) for split in
minigpt4/datasets/builders/__init__.py:23
Functionload_file
Common i/o utility to handle loading data from various file formats. Supported: .pkl, .pickle, .npy, .json For the npy files, we
minigpt4/common/utils.py:313
Functionload_json
(filename)
minigpt4/common/utils.py:54
Functionload_model
Load supported models. To list all available models and types in registry: >>> from minigpt4.models import model_zoo >>> print(model
minigpt4/models/__init__.py:27
Functionload_model_and_preprocess
Load model and its related preprocessors. List all available models and types in registry: >>> from minigpt4.models import model_zoo
minigpt4/models/__init__.py:113
Functionload_processor
Example >>> processor = load_processor("alpro_video_train", cfg=None)
minigpt4/processors/__init__.py:25
Methodlog_freq
(self)
minigpt4/runners/runner_base.py:287
Methodlr_scheduler
A property to get and create learning rate scheduler by split just in need.
minigpt4/runners/runner_base.py:142
Functionmain_process
(func)
minigpt4/common/dist_utils.py:107
Methodmax_epoch
(self)
minigpt4/runners/runner_base.py:283
Methodmedian
(self)
minigpt4/common/logger.py:51
Methodmin_lr
(self)
minigpt4/runners/runner_base.py:296
Methodmodel_cfg
(self)
minigpt4/common/config.py:140
Functionnode_to_dict
(node)
minigpt4/common/config.py:169
Functionnone_level_to_args
(level)
minigpt4/processors/randaugment.py:266
Functionnormalize
(images)
minigpt4/conversation/conversation.py:18
Functionnow
()
minigpt4/common/utils.py:35
Methodnum_sources
The number of sources within the context. I.e., the number of sources that the context is partitioned into. Returns:
image_attr/image_attr_minigpt.py:185
Methodnum_sources
The number of sources within the context. I.e., the number of sources that the context is partitioned into. Returns:
image_attr/image_attr_llava.py:146
Methodnum_sources
The number of sources.
image_attr/context_partitioner.py:35
Methodnum_sources
(self)
image_attr/context_partitioner.py:110
Methodnum_sources
(self)
image_attr/context_partitioner.py:174
Methodnum_sources
The number of sources within the context. I.e., the number of sources that the context is partitioned into. Returns:
image_attr/image_attr_qwen.py:161
Methodoptimizer
(self)
minigpt4/runners/runner_base.py:99
Methodparts
(self)
image_attr/context_partitioner.py:104
Methodparts
(self)
image_attr/context_partitioner.py:162
Functionposterize_func
same output as PIL.ImageOps.posterize
minigpt4/processors/randaugment.py:192
Methodprepare_inputs_for_generation
( self, input_ids, query_embeds, past=None, attention_mask=None, **model_kwargs )
minigpt4/models/Qformer.py:1097
Methodprepare_inputs_for_generation
( self, input_ids, query_embeds=None, past_key_values=None, attention_mask=None, inputs_embeds=None, *
minigpt4/models/modeling_llama.py:717
Methodpretty_print
(self)
minigpt4/common/config.py:143
Methodprint_help
(self)
minigpt4/common/config.py:256
Methodregister_builder
r"""Register a dataset builder to registry with key 'name' Args: name: Key with which the builder will be registered. Us
minigpt4/common/registry.py:22
Methodregister_lr_scheduler
r"""Register a model to registry with key 'name' Args: name: Key with which the task will be registered. Usage:
minigpt4/common/registry.py:141
Methodregister_model
r"""Register a task to registry with key 'name' Args: name: Key with which the task will be registered. Usage:
minigpt4/common/registry.py:83
Methodregister_processor
r"""Register a processor to registry with key 'name' Args: name: Key with which the task will be registered. Usage:
minigpt4/common/registry.py:112
Methodregister_runner
r"""Register a model to registry with key 'name' Args: name: Key with which the task will be registered. Usage:
minigpt4/common/registry.py:165
Methodregister_task
r"""Register a task to registry with key 'name' Args: name: Key with which the task will be registered. Usage:
minigpt4/common/registry.py:54
Methodrescale
(param, layer_id)
minigpt4/models/eva_vit.py:301
Methodreset_classifier
(self, num_classes, global_pool='')
minigpt4/models/eva_vit.py:320
Methodresponse
(self)
image_attr/image_attr_minigpt.py:179
Methodresponse
(self)
image_attr/image_attr_llava.py:140
← previousnext →501–600 of 656, ranked by callers