MCPcopy Create free account

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

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

↓ 1 callersMethod_update_causal_mask
(self, attention_mask, input_tensor)
llava/model/language_model/modeling_llama.py:1191
↓ 1 callersFunctionaccuracy_reward
(predict: str, ground_truth: str)
llava-critic-r1/EasyR1/examples/reward_function/math.py:27
↓ 1 callersFunctionaccuracy_reward
(predict: str, ground_truth: str)
llava-critic-r1/EasyR1/examples/reward_function/r1v.py:27
↓ 1 callersFunctionaccuracy_reward
(predict: str, ground_truth: str)
llava-critic-r1/EasyR1/examples/reward_function/caption.py:27
↓ 1 callersMethodadd_and_load_reward_modeling_adapter
r""" Add and load a reward modeling adapter. This method can only be used if the model is a `PeftModel` and if you have initialized th
trl/models/modeling_base.py:415
↓ 1 callersMethodadd_token_per_frame
(self, image_feature)
llava/model/llava_arch.py:245
↓ 1 callersFunctionallgather_dict_tensors
TODO: optimize this. - We can use async ops - We can use only one allgather
llava-critic-r1/EasyR1/verl/protocol.py:651
↓ 1 callersFunctionapply_delta
(base_model_path, target_model_path, delta_path)
llava/model/apply_delta.py:14
↓ 1 callersFunctionapply_kl_penalty
(data: DataProto, kl_ctrl: core_algos.KLController, kl_penalty="kl")
llava-critic-r1/EasyR1/verl/trainer/ray_trainer.py:114
↓ 1 callersFunctionapply_ulysses_patch
(model_type: str)
llava-critic-r1/EasyR1/verl/models/monkey_patch.py:22
↓ 1 callersMethodassistant
(self)
trl/models/utils.py:25
↓ 1 callersMethodbpe
(self, token)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/tokenizer.py:100
↓ 1 callersFunctionbroadcat
(tensors, dim=-1)
llava/model/multimodal_encoder/eva_clip/eva_vit.py:13
↓ 1 callersMethodbuild_Qformer
(self, vision_width, cross_attention_freq, num_query_token)
llava/model/multimodal_resampler/qformer.py:1117
↓ 1 callersMethodbuild_attention_mask
(self)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/transformer.py:660
↓ 1 callersFunctionbuild_demo
(embed_mode)
llava/serve/gradio_multi_image.py:333
↓ 1 callersFunctionbuild_demo
(embed_mode)
llava/serve/gradio_web_server.py:326
↓ 1 callersFunctioncalculate_image_dimensions_multiprocess
(filtered_data, images_folder, num_processes=256)
scripts/archived/data_info.py:35
↓ 1 callersFunctioncalculate_image_dimensions_multiprocess
(filtered_data, images_folder, num_processes=256)
playground/2d_hist.py:33
↓ 1 callersMethodcalculate_loss
Calculate the loss for a batch of an unpacked sample Args: latents (torch.Tensor): The latents sampled f
trl/trainer/ddpo_trainer.py:325
↓ 1 callersFunctioncalculate_tokenized_lengths
(data)
scripts/archived/data_info.py:46
↓ 1 callersFunctioncalculate_tokenized_lengths
(data)
playground/2d_hist.py:57
↓ 1 callersFunctionceildiv
(a, b)
llava-critic-r1/EasyR1/verl/utils/seqlen_balancing.py:218
↓ 1 callersMethodcheck_consistency
Check the consistency of the DataProto. Mainly for batch and non_tensor_batch We expose this function as a public one so that user can call th
llava-critic-r1/EasyR1/verl/protocol.py:241
↓ 1 callersMethodcheck_item_structure
(self, item)
playground/data_checker.py:62
↓ 1 callersFunctionclip_by_value
Tensor extension to torch.clamp https://github.com/pytorch/pytorch/issues/2793#issuecomment-428784713
trl/core.py:180
↓ 1 callersMethodcollate
(self, batch)
llava/train/train_dpo.py:1192
↓ 1 callersFunctioncollect_dp_compute
(worker_group: "WorkerGroup", outputs: List[DataProto])
llava-critic-r1/EasyR1/verl/single_controller/base/decorator.py:101
↓ 1 callersFunctioncompute_advantage
(data: DataProto, adv_estimator: AdvantageEstimator, gamma: float = 1.0, lam: float = 1.0)
llava-critic-r1/EasyR1/verl/trainer/ray_trainer.py:134
↓ 1 callersMethodcompute_advantages
( self, values: torch.FloatTensor, rewards: torch.FloatTensor, mask: torch.Flo
trl/trainer/ppo_trainer.py:1085
↓ 1 callersFunctioncompute_data_metrics
(batch: DataProto, use_critic: bool = False)
llava-critic-r1/EasyR1/verl/trainer/metrics.py:27
↓ 1 callersMethodcompute_log_probs
(self, data: DataProto)
llava-critic-r1/EasyR1/verl/workers/fsdp_workers.py:589
↓ 1 callersMethodcompute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: Dict[str, Union[torch.Tensor
trl/trainer/reward_trainer.py:196
↓ 1 callersMethodcompute_ref_log_probs
(self, data: DataProto)
llava-critic-r1/EasyR1/verl/workers/fsdp_workers.py:624
↓ 1 callersMethodcompute_reward
Compute the reward for a list of histories.
trl/environment/base_environment.py:353
↓ 1 callersMethodcompute_rewards
(self, prompt_image_pairs, is_async=False)
trl/trainer/ddpo_trainer.py:212
↓ 1 callersFunctioncompute_throughout_metrics
(batch: DataProto, timing_raw: Dict[str, float], num_gpus: int)
llava-critic-r1/EasyR1/verl/trainer/metrics.py:113
↓ 1 callersFunctioncompute_timing_metrics
(batch: DataProto, timing_raw: Dict[str, float])
llava-critic-r1/EasyR1/verl/trainer/metrics.py:97
↓ 1 callersMethodcompute_values
(self, data: DataProto)
llava-critic-r1/EasyR1/verl/workers/fsdp_workers.py:656
↓ 1 callersMethodconcatenated_inputs
Concatenate the chosen and rejected inputs into a single tensor. Args: batch: A batch of data. Must contain the keys 'chosen_inpu
trl/trainer/dpo_trainer.py:663
↓ 1 callersFunctionconsolidate_ckpt
(src_path, dst_path)
llava/model/consolidate.py:14
↓ 1 callersFunctionconvert_format
(original_data, dimension="Visual Faithfulness")
scripts/archived/dpo_data_info.py:12
↓ 1 callersFunctionconvert_to_custom_text_state_dict
(state_dict: dict)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/model.py:358
↓ 1 callersFunctionconvert_to_scalar
Converts the stats from a flattened dict to single scalar dicts
trl/core.py:89
↓ 1 callersFunctionconvert_weights_to_lp
Convert applicable model parameters to low-precision (bf16 or fp16)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/model.py:326
↓ 1 callersMethodcount_items
(self)
playground/data_checker.py:103
↓ 1 callersFunctioncreate_colocated_worker_cls
This function should return a class instance that delegates the calls to every cls in cls_dict
llava-critic-r1/EasyR1/verl/single_controller/ray/base.py:453
↓ 1 callersFunctioncreate_dataloader
(config: DataConfig, tokenizer: PreTrainedTokenizer, processor: Optional[ProcessorMixin])
llava-critic-r1/EasyR1/verl/trainer/data_loader.py:26
↓ 1 callersFunctioncreate_model_and_transforms
( model_name: str, pretrained: Optional[str] = None, precision: str = "fp32", device: Union[st
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/factory.py:442
↓ 1 callersMethodcreate_model_card
Creates and saves a model card for a TRL model. Args: path (`str`): The path to save the model card to. model_name (`
trl/trainer/ddpo_trainer.py:581
↓ 1 callersMethodcreate_model_card
Creates and saves a model card for a TRL model. Args: path (`str`): The path to save the model card to. model_name (`
trl/trainer/ppo_trainer.py:1332
↓ 1 callersFunctioncreate_norm_layer_factory
(use_fused_ln, eps=1e-6)
llava/model/multimodal_encoder/eva_clip/eva_vit.py:795
↓ 1 callersFunctioncreate_one_example_chatbot
(format, question, context, choice, answer, lecture, solution, test_example=True)
scripts/archived/convert_sqa_to_llava_base_prompt.py:41
↓ 1 callersMethodcreate_optimizer
Setup the optimizer. We provide a reasonable default that works well. If you want to use something else, you can pass a tuple in the
llava/train/llava_trainer.py:577
↓ 1 callersMethodcreate_resource_pool
(self)
llava-critic-r1/EasyR1/verl/trainer/ray_trainer.py:86
↓ 1 callersFunctioncreate_worker_group_register_center
(name, info)
llava-critic-r1/EasyR1/verl/single_controller/base/register_center/ray.py:27
↓ 1 callersMethoddeep_post_init
(self)
llava-critic-r1/EasyR1/verl/trainer/config.py:119
↓ 1 callersFunctiondefault_bpe
()
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/tokenizer.py:23
↓ 1 callersFunctiondirect_check_llava_data
(json_path, images_folder)
scripts/archived/quick_check.py:38
↓ 1 callersMethoddispatch_fn
(x, i, chunks)
llava-critic-r1/EasyR1/verl/protocol.py:630
↓ 1 callersFunctiondivide_to_patches
Divides an image into patches of a specified size. Args: image (PIL.Image.Image): The input image. patch_size (int): The siz
llava/mm_utils.py:191
↓ 1 callersFunctiondownload_json
(url: str, dest: Path)
predict.py:51
↓ 1 callersFunctiondownload_weights
(baseurl: str, basedest: str, files: list[str])
predict.py:59
↓ 1 callersMethoddpo_loss
Compute the DPO loss for a batch of policy and reference model log probabilities. Args: policy_chosen_logps: Log probabilities of
trl/trainer/dpo_trainer.py:730
↓ 1 callersMethodencode_image
(self, image, normalize: bool = False)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/model.py:257
↓ 1 callersMethodencode_image
(self, image, normalize: bool = False)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/model.py:312
↓ 1 callersMethodencode_text
(self, text, normalize: bool = False)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/model.py:261
↓ 1 callersMethodencode_text
(self, text, normalize: bool = False)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/model.py:316
↓ 1 callersFunctionentropy_from_logits
Calculate entropy from logits.
trl/core.py:189
↓ 1 callersFunctioneval_model
(args)
llava/eval/model_vqa.py:86
↓ 1 callersMethodevaluate
(self, evaluate_args)
llava/train/llava_trainer_eval.py:8
↓ 1 callersMethodevaluate_multi_choice_image
(self,preditions)
llava/eval/evaluate_interleave.py:133
↓ 1 callersMethodevaluate_multichoice
(self, preditions)
llava/eval/evaluate_interleave.py:121
↓ 1 callersMethodevaluate_rouge
(self,preds)
llava/eval/evaluate_interleave.py:74
↓ 1 callersFunctionexact_div
(a, b, a_str, b_str, custom_error_message="")
trl/trainer/utils.py:552
↓ 1 callersFunctionfilter_data
(data)
scripts/archived/data_info.py:14
↓ 1 callersFunctionfilter_data
(data)
playground/2d_hist.py:17
↓ 1 callersMethodfilter_data
(self)
playground/data_checker.py:191
↓ 1 callersFunctionfind_all_linear_names
(model)
llava/train/train.py:245
↓ 1 callersFunctionfind_all_linear_names
(model)
llava/train/train_dpo.py:226
↓ 1 callersMethodfit
The training loop of PPO. The driver process only need to call the compute functions of the worker group through RPC to construct the
llava-critic-r1/EasyR1/verl/trainer/ray_trainer.py:459
↓ 1 callersMethodfix_init_weight
(self)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/eva_vit_model.py:483
↓ 1 callersMethodfix_init_weight
(self)
llava/model/multimodal_encoder/eva_clip/eva_vit.py:619
↓ 1 callersFunctionflash_attention_forward
( module: torch.nn.Module, query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, at
llava-critic-r1/EasyR1/verl/models/transformers/flash_attention_utils.py:153
↓ 1 callersFunctionformat_reward
(predict: str)
llava-critic-r1/EasyR1/examples/reward_function/math.py:21
↓ 1 callersFunctionformat_reward
(predict: str)
llava-critic-r1/EasyR1/examples/reward_function/r1v.py:21
↓ 1 callersFunctionformat_reward
(predict: str)
llava-critic-r1/EasyR1/examples/reward_function/caption.py:21
↓ 1 callersMethodfrom_detached
(cls, worker_names=None, ray_cls_with_init=None)
llava-critic-r1/EasyR1/verl/single_controller/ray/base.py:322
↓ 1 callersMethodfrom_str
(cls, name)
llava/serve/controller.py:34
↓ 1 callersFunctionfunc_generator
(self, method_name, dispatch_fn, collect_fn, execute_fn, blocking)
llava-critic-r1/EasyR1/verl/single_controller/ray/base.py:42
↓ 1 callersFunctiongather_features
(image_features, text_features, local_loss=False, gather_with_grad=False, rank=0, world_size=1, use_horovod=Fa
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/loss.py:22
↓ 1 callersFunctiongather_heads_scatter_seq
A func to sync attention result with alltoall in sequence parallel gather head dimension and scatter seq dim: e.g. seq_dim: 1, head_dim:
llava-critic-r1/EasyR1/verl/utils/ulysses.py:87
↓ 1 callersMethodgather_stats
Gather stats from all processes. Useful in the context of distributed training. Args: stats (dict[str, Any]):
trl/trainer/ppo_trainer.py:860
↓ 1 callersMethodgenerate
r""" A simple wrapper around the `generate` method of the wrapped model. Please refer to the [`generate`](https://huggingface.co/docs/
trl/models/modeling_value_head.py:191
↓ 1 callersFunctiongenerate_function
(name)
llava-critic-r1/EasyR1/verl/single_controller/ray/base.py:429
↓ 1 callersMethodgenerate_stream
(self, params)
llava/serve/model_worker.py:108
↓ 1 callersMethodgenerate_stream
(self, params)
llava/serve/sglang_worker.py:126
↓ 1 callersMethodgenerate_stream_gate
(self, params)
llava/serve/model_worker.py:192
↓ 1 callersMethodgenerate_stream_gate
(self, params)
llava/serve/sglang_worker.py:172
↓ 1 callersFunctiongeometric_progression
(a, r, n)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/utils.py:161
← previousnext →401–500 of 1,515, ranked by callers