Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NVlabs/DoRA
/ functions
Functions
2,507 in github.com/NVlabs/DoRA
⨍
Functions
2,507
◇
Types & classes
532
↳
Endpoints
73
↓ 645 callers
Method
to
(self, *args, **kwargs)
image_video_text_understanding/CLIP-ViL/src/tools/vision_helpers.py:92
↓ 168 callers
Method
get
(cls, config_name: str)
image_video_text_understanding/VL-T5/src/adapters/adapter_configuration.py:64
↓ 156 callers
Method
load
(cls, path)
image_video_text_understanding/VL-T5/src/param.py:324
↓ 114 callers
Method
update
(self, new_val)
image_video_text_understanding/VL-T5/src/utils.py:48
↓ 106 callers
Method
from_pretrained
(cls, pretrained_model_name_or_path: str, **kwargs)
image_video_text_understanding/VL-T5/inference/utils.py:178
↓ 80 callers
Method
save
(self, path)
image_video_text_understanding/VL-T5/src/param.py:319
↓ 77 callers
Method
from_pretrained
r""" Instantiate a [`LoraModel`] from a pretrained Lora configuration and weights. Args: model ([`~transformers.PreTraine
visual_instruction_tuning/peft/src/peft/peft_model.py:207
↓ 73 callers
Method
encode
(self, text)
image_video_text_understanding/VL-T5/src/clip/simple_tokenizer.py:121
↓ 69 callers
Method
train_step
(self, batch)
image_video_text_understanding/VL-T5/src/gqa_model.py:12
↓ 65 callers
Method
copy
(self)
visual_instruction_tuning/llava/conversation.py:190
↓ 64 callers
Method
backward
(ctx, grad)
image_video_text_understanding/VL-T5/inference/modeling_frcnn.py:411
↓ 64 callers
Method
eval
(self)
image_video_text_understanding/VL-T5/src/lora/layers.py:138
↓ 58 callers
Method
stride
(self)
image_video_text_understanding/VL-T5/inference/modeling_frcnn.py:804
↓ 55 callers
Method
step
(self)
image_video_text_understanding/VL-T5/src/utils.py:152
↓ 54 callers
Method
update
(self, adapter_name)
visual_instruction_tuning/peft/src/peft/utils/other.py:146
↓ 53 callers
Function
get_peft_model
Returns a Peft model object from a model and a config. Args: model ([`transformers.PreTrainedModel`]): Model to be wrapped.
visual_instruction_tuning/peft/src/peft/mapping.py:87
↓ 47 callers
Method
from_pretrained
See `AutoTokenizer.from_pretrained` docstring.
visual_instruction_tuning/llava/model/language_model/mpt/adapt_tokenizer.py:37
↓ 44 callers
Method
test_step
(self, batch, **kwargs)
image_video_text_understanding/VL-T5/src/gqa_model.py:49
↓ 44 callers
Method
vis_forward
(self, batch, device)
image_video_text_understanding/VL-T5/src/modeling_t5.py:715
↓ 43 callers
Method
from_pretrained
r""" Args: Instantiate a `LoraModel` from a pretrained Lora configuration and weights. model (`transformers.PreTrainedMode
commonsense_reasoning/peft/src/peft/peft_model.py:133
↓ 42 callers
Method
resize_token_embeddings
(self, new_num_tokens: int)
image_video_text_understanding/VL-T5/src/my_transformers/modeling_bart.py:1433
↓ 38 callers
Function
tokenizer_image_token
(prompt, tokenizer, image_token_index=IMAGE_TOKEN_INDEX, return_tensors=None)
visual_instruction_tuning/llava/mm_utils.py:43
↓ 35 callers
Method
init_weights
(self)
image_video_text_understanding/VL-T5/src/trainer_base.py:688
↓ 35 callers
Method
save_pretrained
r""" This function saves the adapter model and the adapter configuration files to a directory, so that it can be reloaded using the [`
visual_instruction_tuning/peft/src/peft/peft_model.py:124
↓ 34 callers
Method
generate
(self, **kwargs)
commonsense_reasoning/peft/src/peft/peft_model.py:592
↓ 34 callers
Method
get_lr
(self)
image_video_text_understanding/CLIP-ViL/src/lxrt/optimization.py:86
↓ 32 callers
Method
convert_tokens_to_ids
Converts a sequence of tokens into ids using the vocab.
image_video_text_understanding/CLIP-ViL/src/lxrt/tokenization.py:115
↓ 29 callers
Method
append_message
(self, role, message)
visual_instruction_tuning/llava/conversation.py:106
↓ 29 callers
Function
transpose
(weight, fan_in_fan_out)
visual_instruction_tuning/peft/src/peft/utils/other.py:265
↓ 29 callers
Method
write
(self, buf)
visual_instruction_tuning/llava/utils.py:73
↓ 27 callers
Function
get_vis_encoder
(backbone='openai/clip-vit-base-patch32', **kwargs)
image_video_text_understanding/VL-T5/src/vis_encoder.py:88
↓ 25 callers
Method
generate
(self, **kwargs)
visual_instruction_tuning/peft/src/peft/peft_model.py:974
↓ 24 callers
Function
parse_args
(parse=True, **optional_kwargs)
image_video_text_understanding/VL-T5/src/param.py:67
↓ 22 callers
Method
__init__
(self)
image_video_text_understanding/CLIP-ViL/src/lxrt/modeling.py:133
↓ 20 callers
Method
to_dict
(self)
visual_instruction_tuning/peft/src/peft/utils/config.py:71
↓ 19 callers
Method
create_model
(self, model_class, config=None, **kwargs)
image_video_text_understanding/VL-T5/src/trainer_base.py:313
↓ 18 callers
Method
dim
(self)
image_video_text_understanding/CLIP-ViL/src/lxrt/entry.py:126
↓ 18 callers
Method
get_prompt
(self)
visual_instruction_tuning/llava/conversation.py:29
↓ 18 callers
Method
load
(self, path)
image_video_text_understanding/CLIP-ViL/src/tasks/gqa.py:409
↓ 18 callers
Method
load_checkpoint
(self, ckpt_path)
image_video_text_understanding/VL-T5/src/trainer_base.py:680
↓ 18 callers
Method
set_epoch
(self, epoch)
image_video_text_understanding/VL-T5/src/multitask_data.py:33
↓ 18 callers
Function
set_global_logging_level
Override logging levels of different modules based on their name as a prefix. It needs to be invoked after the modules have been loaded so th
image_video_text_understanding/VL-T5/src/utils.py:74
↓ 18 callers
Function
transpose
(weight, fan_in_fan_out)
commonsense_reasoning/peft/src/peft/utils/other.py:158
↓ 17 callers
Method
create_config
(self)
image_video_text_understanding/VL-T5/src/trainer_base.py:183
↓ 17 callers
Method
create_optimizer_and_scheduler
(self)
image_video_text_understanding/VL-T5/src/trainer_base.py:573
↓ 17 callers
Method
create_tokenizer
(self, **kwargs)
image_video_text_understanding/VL-T5/src/trainer_base.py:547
↓ 17 callers
Method
get_prompt
Returns the virtual prompts to use for Peft. Only applicable when `peft_config.peft_type != PeftType.LORA`.
visual_instruction_tuning/peft/src/peft/peft_model.py:345
↓ 15 callers
Function
_get_submodules
(model, key)
visual_instruction_tuning/peft/src/peft/utils/other.py:155
↓ 15 callers
Method
encode
(self, text)
image_video_text_understanding/CLIP-ViL/clip/simple_tokenizer.py:121
↓ 15 callers
Method
get_input_embeddings
(self)
visual_instruction_tuning/llava/model/language_model/mpt/modeling_mpt.py:81
↓ 15 callers
Method
train
(self)
image_video_text_understanding/VL-T5/src/tvc.py:159
↓ 14 callers
Method
__init__
(self, cfg, input_shape: Dict[str, ShapeSpec])
image_video_text_understanding/VL-T5/inference/modeling_frcnn.py:1503
↓ 14 callers
Method
_shape
(self, tensor: torch.Tensor, seq_len: int, bsz: int)
image_video_text_understanding/VL-T5/src/my_transformers/modeling_bart.py:168
↓ 14 callers
Function
is_bnb_available
()
visual_instruction_tuning/peft/src/peft/import_utils.py:18
↓ 13 callers
Method
device
(self)
visual_instruction_tuning/llava/model/multimodal_encoder/clip_encoder.py:62
↓ 13 callers
Method
freeze_whole_model
(self)
image_video_text_understanding/VL-T5/src/trainer_base.py:340
↓ 13 callers
Method
get_model
(self)
visual_instruction_tuning/llava/model/llava_arch.py:88
↓ 13 callers
Method
partial_eval
(self)
image_video_text_understanding/VL-T5/src/trainer_base.py:344
↓ 13 callers
Method
print_trainable_params_percentage
(self, model)
image_video_text_understanding/VL-T5/src/trainer_base.py:325
↓ 13 callers
Method
unfreeze_parameters
(self)
image_video_text_understanding/VL-T5/src/trainer_base.py:380
↓ 12 callers
Method
prepare_inputs_for_testing
(self)
visual_instruction_tuning/peft/tests/test_decoder_models.py:57
↓ 12 callers
Method
to_gradio_chatbot
(self)
visual_instruction_tuning/llava/conversation.py:159
↓ 11 callers
Method
__init__
(self, config: BartConfig)
image_video_text_understanding/VL-T5/src/modeling_bart.py:1320
↓ 11 callers
Method
__init__
(self, config: BartConfig)
image_video_text_understanding/VL-T5/src/my_transformers/modeling_bart.py:1294
↓ 11 callers
Method
__init__
(self, config, has_relative_attention_bias=False)
image_video_text_understanding/VL-T5/src/my_transformers/modeling_t5.py:645
↓ 11 callers
Method
_create_test_llama_config
Create a test config for a small Llama model for testing.
visual_instruction_tuning/peft/tests/test_adaption_prompt.py:61
↓ 11 callers
Method
get_prompt
Returns the virtual prompts to use for Peft. Only applicable when `peft_config.peft_type != PeftType.LORA`.
commonsense_reasoning/peft/src/peft/peft_model.py:246
↓ 10 callers
Method
embed_tokens
(self, x)
visual_instruction_tuning/llava/model/language_model/llava_mpt.py:41
↓ 10 callers
Method
evaluate
(self, loader, dump_path=None)
image_video_text_understanding/VL-T5/src/tvc.py:393
↓ 10 callers
Function
load_pretrained_model
(model_path, model_base, model_name, load_8bit=False, load_4bit=False, device_map="auto", device="cuda", **kwa
visual_instruction_tuning/llava/model/builder.py:30
↓ 10 callers
Function
reduce_dict
Reduce the values in the dictionary from all processes so that process with rank 0 has the reduced results. Args: input_dict (dic
image_video_text_understanding/VL-T5/src/dist_utils.py:267
↓ 9 callers
Method
__init__
( self, adapter_name: str, in_features: int, out_features: int, r: int
visual_instruction_tuning/peft/src/peft/tuners/lora.py:766
↓ 9 callers
Function
disable_torch_init
Disable the redundant torch default initialization to accelerate model creation.
visual_instruction_tuning/llava/utils.py:93
↓ 9 callers
Method
get
(cls, config_name: str)
image_video_text_understanding/CLIP-ViL/src/lxrt/adapters/adapter_configuration.py:64
↓ 9 callers
Function
get_peft_model_state_dict
Get the state dict of the Peft model. Args: model ([`PeftModel`]): The Peft model. When using torch.nn.DistributedDataParallel, Deep
visual_instruction_tuning/peft/src/peft/utils/save_and_load.py:26
↓ 9 callers
Function
resize_pos_embed
(posemb, posemb_new)
image_video_text_understanding/CLIP-ViL/src/lxrt/visual_transformers.py:17
↓ 9 callers
Function
to_image_list
tensors can be an ImageList, a torch.Tensor or an iterable of Tensors. It can't be a numpy array. When tensors is an iterable of Tensors,
image_video_text_understanding/CLIP-ViL/src/tasks/vision_helpers.py:97
↓ 9 callers
Method
tokenize
(self, text)
image_video_text_understanding/CLIP-ViL/src/lxrt/tokenization.py:105
↓ 8 callers
Function
_expand_mask
Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
image_video_text_understanding/VL-T5/src/my_transformers/modeling_bart.py:106
↓ 8 callers
Method
add_adapter
(self, adapter_name, config=None)
visual_instruction_tuning/peft/src/peft/tuners/ia3.py:135
↓ 8 callers
Method
backward
(ctx, do)
visual_instruction_tuning/llava/model/language_model/mpt/flash_attn_triton.py:475
↓ 8 callers
Method
decode
(self, tokens)
image_video_text_understanding/CLIP-ViL/clip/simple_tokenizer.py:129
↓ 8 callers
Method
disable_adapter
Disables the adapter module.
visual_instruction_tuning/peft/src/peft/peft_model.py:430
↓ 8 callers
Method
dump_result
Dump the result to a GQA-challenge submittable json file. GQA json file submission requirement: results = [result]
image_video_text_understanding/VL-T5/src/gqa_data.py:434
↓ 8 callers
Method
eval
(self)
commonsense_reasoning/peft/src/peft/tuners/dora.py:403
↓ 8 callers
Method
evaluate_raw
https://github.com/GT-Vision-Lab/VQA/blob/master/PythonEvaluationTools/vqaEvaluation/vqaEval.py
image_video_text_understanding/VL-T5/src/vqa_data.py:569
↓ 8 callers
Function
get_model_name_from_path
(model_path)
visual_instruction_tuning/llava/mm_utils.py:65
↓ 8 callers
Function
linear_layer
Generates a linear module and initializes it.
image_video_text_understanding/CLIP-ViL/src/lxrt/adapters/adapter_utils.py:22
↓ 8 callers
Function
linear_layer
Generates a linear module and initializes it.
image_video_text_understanding/VL-T5/src/adapters/adapter_utils.py:22
↓ 8 callers
Function
pad_list_tensors
location will always be cpu for np tensors
image_video_text_understanding/VL-T5/inference/modeling_frcnn.py:46
↓ 8 callers
Method
reset_parameters
(self)
commonsense_reasoning/peft/src/peft/tuners/dora.py:374
↓ 8 callers
Method
step
Performs a single optimization step. Arguments: closure (callable, optional): A closure that reevaluates the model
image_video_text_understanding/CLIP-ViL/src/lxrt/optimization.py:101
↓ 8 callers
Method
test_step
(self, batch, **kwargs)
image_video_text_understanding/VL-T5/src/multitask_model.py:55
↓ 8 callers
Method
to_dict
(self)
commonsense_reasoning/peft/src/peft/utils/config.py:61
↓ 8 callers
Method
train_step
(self, batch, **kwargs)
image_video_text_understanding/VL-T5/src/multitask_model.py:17
↓ 8 callers
Method
valid_step
(self, batch, **kwargs)
image_video_text_understanding/VL-T5/src/multitask_model.py:36
↓ 8 callers
Method
valid_step
(self, batch)
image_video_text_understanding/VL-T5/src/vcr_model.py:101
↓ 7 callers
Method
__init__
(self, embed_dim: int, # vision image_resolution: int,
image_video_text_understanding/CLIP-ViL/clip/model.py:325
↓ 7 callers
Method
__init__
(self, embed_dim: int, # vision image_resolution: int,
image_video_text_understanding/VL-T5/src/clip/model.py:383
↓ 7 callers
Method
__init__
( self, in_features: int, out_features: int, r: int = 0, lora_alpha: i
commonsense_reasoning/peft/src/peft/tuners/lora.py:290
next →
1–100 of 2,507, ranked by callers