MCPcopy Create free account

hub / github.com/LLaVA-VL/LLaVA-NeXT / functions

Functions1,515 in github.com/LLaVA-VL/LLaVA-NeXT

↓ 216 callersMethodto
move the batch to device Args: device (torch.device, str): torch device Returns: DataProto: the current Data
llava-critic-r1/EasyR1/verl/protocol.py:311
↓ 126 callersMethodfrom_pretrained
(cls, pretrained_model_name_or_path: Union[str, os.PathLike], **kwargs)
llava/model/multimodal_encoder/siglip_encoder.py:103
↓ 126 callersMethodsplit
(self, split_size: int)
llava-critic-r1/EasyR1/verl/protocol.py:521
↓ 108 callersFunctionrank0_print
(*args)
llava/utils.py:73
↓ 89 callersMethodsize
(self)
llava/model/multimodal_encoder/eva_clip/eva_clip_processors.py:71
↓ 81 callersMethodget
(self)
llava-critic-r1/EasyR1/verl/protocol.py:639
↓ 74 callersMethodpop
Pop a subset of the DataProto via `batch_keys` and `meta_info_keys` Args: batch_keys (list, optional): a list of strings indicati
llava-critic-r1/EasyR1/verl/protocol.py:367
↓ 54 callersFunction_pcfg
(url="", hf_hub="", filename="", mean=None, std=None)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/pretrained.py:18
↓ 54 callersMethodupdate
Update kl_coef according to current KL.
llava-critic-r1/EasyR1/verl/trainer/core_algos.py:41
↓ 38 callersFunctiontokenizer_image_token
(prompt, tokenizer, image_token_index=IMAGE_TOKEN_INDEX, return_tensors=None)
llava/mm_utils.py:341
↓ 32 callersMethodappend_message
(self, role, message)
llava/conversation.py:180
↓ 31 callersMethodcopy
(self)
llava/conversation.py:290
↓ 28 callersMethodget_model
(self)
llava/model/llava_arch.py:165
↓ 26 callersMethodsave_pretrained
r""" Save the pretrained model to a directory. This method is a wrapper around `transformers.PreTrainedModel.save_pretrained`. Please
trl/models/modeling_base.py:498
↓ 25 callersMethodstate_dict
r""" Return the state_dict of the pretrained model.
trl/models/modeling_base.py:527
↓ 24 callersMethodto_gradio_chatbot
(self)
llava/conversation.py:252
↓ 20 callersFunctionis_peft_available
()
trl/import_utils.py:24
↓ 19 callersMethoddecode
(self, tokens)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/tokenizer.py:149
↓ 19 callersMethodget_prompt
(self)
llava/conversation.py:47
↓ 18 callersMethodlog
(self, data: Dict[str, Any], step: int)
llava-critic-r1/EasyR1/verl/utils/logger/logger.py:49
↓ 17 callersFunctionmasked_mean
Compute mean of tensor with a masked values.
trl/core.py:147
↓ 16 callersMethodchunk
Split the batch among dim=0 into chunks. The meta_info is passed to each DataProto after split. Args: chunks (int): the number of
llava-critic-r1/EasyR1/verl/protocol.py:488
↓ 16 callersMethodencode
(self, text)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/tokenizer.py:141
↓ 16 callersMethodtokenizer
Returns the tokenizer used for tokenizing text inputs
trl/models/modeling_sd_base.py:98
↓ 15 callersMethod__init__
(self, model_args, vision_tower)
llava/model/multimodal_resampler/qformer.py:1103
↓ 15 callersMethodpreprocess
(self, images, return_tensors)
llava/model/multimodal_encoder/siglip_encoder.py:47
↓ 15 callersMethodrepeat
Repeat the batch data a specified number of times. Args: repeat_times (int): Number of times to repeat the data.
llava-critic-r1/EasyR1/verl/protocol.py:556
↓ 15 callersMethodwrite
(self, buf)
llava/utils.py:143
↓ 14 callersMethodpost_init
(self)
llava-critic-r1/EasyR1/verl/trainer/config.py:110
↓ 13 callersMethodget_input_embeddings
(self)
llava/model/multimodal_resampler/qformer.py:637
↓ 13 callersMethodprepare_inputs_labels_for_multimodal
(self, input_ids, position_ids, attention_mask, past_key_values, labels, images, modalities=["image"], image_s
llava/model/llava_arch.py:251
↓ 13 callersMethodupdate
Updates running moments from batch's moments computed across ranks
trl/trainer/utils.py:473
↓ 12 callersMethodadd
(self, idx: int, val: int)
llava-critic-r1/EasyR1/verl/utils/seqlen_balancing.py:29
↓ 12 callersFunctionprint_gpu_memory_usage
Report the current GPU VRAM usage.
llava-critic-r1/EasyR1/verl/utils/model_utils.py:31
↓ 12 callersFunctiontimer
(name: str, timing_raw: Dict[str, float])
llava-critic-r1/EasyR1/verl/utils/py_functional.py:109
↓ 10 callersMethod__init__
(self, config)
llava/model/language_model/modeling_llama.py:202
↓ 10 callersMethod__init__
(self, dim, num_heads=8, qkv_bias=True, scaled_cosine=False, scale_heads=False, logit_scale_max=math.log(1.0 /
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/transformer.py:156
↓ 10 callersMethod__init__
( self, in_features, hidden_features=None, out_features=None, act_laye
llava/model/multimodal_encoder/eva_clip/eva_vit.py:184
↓ 10 callersMethodfrom_pretrained
r""" Instantiates a new model from a pretrained model from `transformers`. The pretrained model is loaded using the `from_pretrained`
trl/models/modeling_base.py:103
↓ 10 callersFunctionget_ulysses_sequence_parallel_group
Get ulysses sequence parallel process group.
llava-critic-r1/EasyR1/verl/utils/ulysses.py:39
↓ 10 callersMethodget_vision_tower
(self)
llava/model/llava_arch.py:48
↓ 9 callersMethod__init__
(self, config)
llava/model/multimodal_encoder/siglip_encoder.py:244
↓ 9 callersMethodembed_tokens
(self, x)
llava/model/language_model/llava_mpt.py:35
↓ 9 callersMethodget_images
(self, return_pil=False, return_path=False)
llava/conversation.py:229
↓ 9 callersFunctionoffload_fsdp_model
(model: FSDP, empty_cache: bool = True)
llava-critic-r1/EasyR1/verl/utils/fsdp_utils.py:70
↓ 8 callersMethod__init__
(self, config: MLCDVisionConfig)
llava/model/multimodal_encoder/mlcd/vit_rope2d_hf.py:52
↓ 8 callersFunctionall_gather_tensor
(local_tensor: Tensor, group: Optional[dist.ProcessGroup] = None, async_op: bool = False)
llava-critic-r1/EasyR1/verl/utils/ulysses.py:156
↓ 8 callersMethodgenerate
Generate response with the model given the query tensor. call the `generate` method of the model. Args: query_te
trl/trainer/ppo_trainer.py:406
↓ 8 callersFunctionis_package_available
(name: str)
llava-critic-r1/EasyR1/verl/utils/py_functional.py:52
↓ 8 callersFunctionload_fsdp_model
(model: FSDP, empty_cache: bool = True)
llava-critic-r1/EasyR1/verl/utils/fsdp_utils.py:94
↓ 8 callersFunctionload_pretrained_model
(model_path, model_base, model_name, load_8bit=False, load_4bit=False, device_map="auto", torch_dtype="float16
llava/model/builder.py:27
↓ 8 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
llava/model/language_model/modeling_llama.py:231
↓ 8 callersMethodto_dtype
(precision: str)
llava-critic-r1/EasyR1/verl/utils/torch_dtypes.py:39
↓ 8 callersMethodtrain
(self, mode=True)
llava/model/multimodal_encoder/imagebind.py:35
↓ 7 callersMethod__init__
( self, in_features, hidden_features=None, out_features=None, act_laye
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/eva_vit_model.py:48
↓ 7 callersMethodfrom_dict
Create a DataProto from a dict of tensors. This assumes that 1. All the tensor in tensors have the same dim0 2. Only dim0 is the batch
llava-critic-r1/EasyR1/verl/protocol.py:274
↓ 7 callersMethodlog
Log `logs` on the various objects watching training, including stored metrics. Args: logs (`Dict[str, float]`):
trl/trainer/dpo_trainer.py:1162
↓ 7 callersMethodstep
Performs a single optimization step. Args: closure (callable, optional): A closure that reevaluates the model and return
llava-critic-r1/EasyR1/verl/utils/torch_functional.py:264
↓ 7 callersMethodtranspose_for_scores
(self, x)
llava/model/multimodal_resampler/qformer.py:145
↓ 7 callersMethodunion
Union with another DataProto. Union batch and meta_info separately. Throw an error if - there are conflict keys in batch and they are
llava-critic-r1/EasyR1/verl/protocol.py:429
↓ 6 callersFunctionexpand2square
(pil_img, background_color)
llava/mm_utils.py:300
↓ 6 callersMethodpreprocess_data
(self, data: DataProto)
llava-critic-r1/EasyR1/verl/workers/sharding_manager/base.py:28
↓ 6 callersMethodprint_rank0
(self, *args, **kwargs)
llava-critic-r1/EasyR1/verl/single_controller/base/worker.py:182
↓ 6 callersMethodprocess
(self, answer)
llava/eval/evaluate_interleave.py:62
↓ 5 callersFunction_ntuple
(n)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/utils.py:273
↓ 5 callersFunctionapply_rotary_pos_emb
Applies Rotary Position Embedding to the query and key tensors. Args: q (`torch.Tensor`): The query tensor. k (`torch.Tensor`): T
llava/model/language_model/modeling_llama.py:174
↓ 5 callersMethodbackward
(ctx: Any, grad_output: Tensor)
llava-critic-r1/EasyR1/verl/utils/ulysses.py:228
↓ 5 callersFunctionbuild_logger
(logger_name, logger_filename)
llava/utils.py:87
↓ 5 callersMethodconcat
Concat a list of DataProto. The batch is concatenated among dim=0. The meta_info is assumed to be identical and will use the first one.
llava-critic-r1/EasyR1/verl/protocol.py:526
↓ 5 callersMethodconcatenated_forward
Run the given model on the given batch of inputs, concatenating the chosen and rejected inputs together. We do this to avoid doing two forwar
trl/trainer/dpo_trainer.py:846
↓ 5 callersMethoddevice
(self)
llava/model/multimodal_encoder/imagebind.py:68
↓ 5 callersMethoddict
(self)
llava/conversation.py:293
↓ 5 callersFunctionget_answer
(problem, options)
scripts/archived/convert_sqa_to_llava_base_prompt.py:25
↓ 5 callersFunctionget_choice_text
(probelm, options)
scripts/archived/convert_sqa_to_llava_base_prompt.py:15
↓ 5 callersFunctionget_context_text
(problem, use_caption)
scripts/archived/convert_sqa_to_llava_base_prompt.py:6
↓ 5 callersFunctionget_lecture_text
(problem)
scripts/archived/convert_sqa_to_llava_base_prompt.py:29
↓ 5 callersMethodget_output_embeddings
(self)
llava/model/multimodal_resampler/qformer.py:878
↓ 5 callersFunctionget_question_text
(problem)
scripts/archived/convert_sqa_to_llava_base_prompt.py:1
↓ 5 callersMethodget_rng_state
()
llava-critic-r1/EasyR1/verl/utils/checkpoint/checkpoint_manager.py:93
↓ 5 callersFunctionget_solution_text
(problem)
scripts/archived/convert_sqa_to_llava_base_prompt.py:35
↓ 5 callersMethodget_vision_tower
(self)
llava/model/llava_arch.py:168
↓ 5 callersFunctionis_xpu_available
()
trl/import_utils.py:84
↓ 5 callersMethodload_json_data
(self, json_path)
playground/data_checker.py:29
↓ 5 callersFunctionload_state_dict
(checkpoint_path: str, map_location: str = "cpu", model_key: str = "model|module|state_dict", is_openai: bool
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/factory.py:84
↓ 5 callersFunctionoffload_fsdp_optimizer
(optimizer: Optimizer, empty_cache: bool = True)
llava-critic-r1/EasyR1/verl/utils/fsdp_utils.py:112
↓ 5 callersMethodpostprocess_data
(self, data: DataProto)
llava-critic-r1/EasyR1/verl/workers/sharding_manager/base.py:31
↓ 5 callersMethodpreprocess_multi_modal_data
(self, data: DataProto)
llava-critic-r1/EasyR1/verl/workers/fsdp_workers.py:443
↓ 5 callersMethodrun
(self, config: PPOConfig)
llava-critic-r1/EasyR1/verl/trainer/main.py:34
↓ 5 callersMethodselect
Select a subset of the DataProto via batch_keys and meta_info_keys Args: batch_keys (list, optional): a list of strings indicatin
llava-critic-r1/EasyR1/verl/protocol.py:326
↓ 4 callersFunction_clean_tag
(tag: str)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/pretrained.py:174
↓ 4 callersMethod_make_layer
(self, planes, blocks, stride=1)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/modified_resnet.py:130
↓ 4 callersFunctionappend_to_dict
Append dict to a dict of list.
llava-critic-r1/EasyR1/verl/utils/py_functional.py:67
↓ 4 callersFunctionexists
(val)
llava/model/multimodal_resampler/perceiver.py:16
↓ 4 callersFunctionflatten_dict
Flatten dictionary and concatenate nested keys with separator.
trl/core.py:72
↓ 4 callersMethodflush
(self)
llava/utils.py:157
↓ 4 callersMethodforward_features
(self, x, return_all_features=False)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/eva_vit_model.py:529
↓ 4 callersFunctionfunc
(*args, **kwargs)
llava-critic-r1/EasyR1/verl/single_controller/ray/base.py:43
↓ 4 callersMethodgenerate
( self, inputs: Optional[torch.Tensor] = None, images: Optional[torch.Tensor] = None,
llava/model/language_model/llava_qwen.py:117
↓ 4 callersFunctionget_length_grouped_indices_auto_single
(lengths, batch_size, world_size, generator=None)
llava/train/llava_trainer.py:168
↓ 4 callersFunctionget_model_name_from_path
(model_path)
llava/mm_utils.py:363
next →1–100 of 1,515, ranked by callers