Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/LLaVA-VL/LLaVA-NeXT
/ functions
Functions
1,515 in github.com/LLaVA-VL/LLaVA-NeXT
⨍
Functions
1,515
◇
Types & classes
291
↳
Endpoints
23
↓ 1 callers
Function
make_dpo_data_module
Make dataset and collator for supervised fine-tuning.
llava/train/train_dpo.py:1308
↓ 1 callers
Function
make_supervised_data_module
Make dataset and collator for supervised fine-tuning.
llava/train/train.py:1292
↓ 1 callers
Method
mask
(self, input_ids, vocab_size, device, targets=None, masked_indices=None, probability_matrix=None)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/hf_model.py:147
↓ 1 callers
Function
masked_var
Compute variance of tensor with masked values.
llava-critic-r1/EasyR1/verl/utils/torch_functional.py:77
↓ 1 callers
Function
maybe_zero_3
(param, ignore_status=False, name=None)
llava/train/llava_trainer.py:30
↓ 1 callers
Function
merge_by_placement
(tensors: List[torch.Tensor], placement: Placement)
llava-critic-r1/EasyR1/scripts/model_merger.py:34
↓ 1 callers
Function
merge_lora
(args)
scripts/archived/merge_lora_weights.py:6
↓ 1 callers
Function
pad_dataproto_to_divisor
Pad a DataProto to size divisible by size_divisor Args: data (DataProto): the unpadded DataProto size_divisor (int): size divisor
llava-critic-r1/EasyR1/verl/protocol.py:48
↓ 1 callers
Function
parse_args
()
scripts/archived/convert_vizwiz_for_submission.py:8
↓ 1 callers
Function
parse_args
()
scripts/archived/convert_vqav2_for_submission.py:8
↓ 1 callers
Function
parse_args
Parse command-line arguments.
playground/demo/video_demo.py:39
↓ 1 callers
Method
parse_tool_call
Parse request string. Expected format: <request><tool_name>query<call>
trl/environment/base_environment.py:328
↓ 1 callers
Function
peft_module_casting_to_bf16
(model)
trl/trainer/utils.py:630
↓ 1 callers
Function
pipeline_step
r""" Function invoked when calling the pipeline for generation. Args: prompt (`str` or `List[str]`, *optional*): The prompt or prompts to guide t
trl/models/modeling_sd_base.py:309
↓ 1 callers
Method
post_init
r""" Post initialization method. This method is called after the model is instantiated and loaded from a checkpoint. It can be used to
trl/models/modeling_base.py:533
↓ 1 callers
Method
prepare_dataloader
Prepare the dataloader for training. Args: dataset (Union[`torch.utils.data.Dataset`, `datasets.Dataset`]):
trl/trainer/ppo_trainer.py:351
↓ 1 callers
Function
prepare_fa2_from_position_ids
( query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, position_ids: torch.Tensor )
llava-critic-r1/EasyR1/verl/models/transformers/flash_attention_utils.py:43
↓ 1 callers
Method
prepare_model_inputs
(self, input_ids: torch.Tensor, attention_mask: torch.Tensor, labels: torch.Tensor)
trl/trainer/iterative_sft_trainer.py:130
↓ 1 callers
Method
prepare_model_inputs
(self, queries: torch.Tensor, responses: torch.Tensor)
trl/trainer/ppo_trainer.py:883
↓ 1 callers
Function
preprocess
Given a list of sources, each is a conversation list. This transform: 1. Add signal '### ' at the beginning each sentence, with end signal '\
llava/train/train.py:907
↓ 1 callers
Function
preprocess_gemma
(sources: List[List[Dict[str, str]]], tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
llava/train/train.py:484
↓ 1 callers
Function
preprocess_gemma
(sources: List[List[Dict[str, str]]], tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
llava/train/train_dpo.py:488
↓ 1 callers
Function
preprocess_llama3
( sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False, max_len=2048,
llava/train/train.py:639
↓ 1 callers
Function
preprocess_llama3
( sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False, max_len=2048,
llava/train/train_dpo.py:618
↓ 1 callers
Function
preprocess_llama_2
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
llava/train/train.py:409
↓ 1 callers
Function
preprocess_llama_2
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
llava/train/train_dpo.py:400
↓ 1 callers
Function
preprocess_mpt
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
llava/train/train.py:804
↓ 1 callers
Function
preprocess_mpt
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
llava/train/train_dpo.py:746
↓ 1 callers
Function
preprocess_multimodal_movie
(sources: Sequence[str], data_args: DataArguments, video_inputs: str)
llava/train/train_dpo.py:383
↓ 1 callers
Function
preprocess_plain
( sources: Sequence[str], tokenizer: transformers.PreTrainedTokenizer, )
llava/train/train.py:885
↓ 1 callers
Function
preprocess_plain
( sources: Sequence[str], tokenizer: transformers.PreTrainedTokenizer, )
llava/train/train_dpo.py:827
↓ 1 callers
Function
preprocess_qwen
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False, max_len=2048, system_message:
llava/train/train.py:563
↓ 1 callers
Function
preprocess_qwen
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False, max_len=2048, system_message:
llava/train/train_dpo.py:567
↓ 1 callers
Function
preprocess_v1
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
llava/train/train.py:725
↓ 1 callers
Function
preprocess_v1
(sources, tokenizer: transformers.PreTrainedTokenizer, has_image: bool = False)
llava/train/train_dpo.py:667
↓ 1 callers
Function
print_model_size
Print the model size.
llava-critic-r1/EasyR1/verl/utils/model_utils.py:66
↓ 1 callers
Method
processPunctuation
(self, inText)
llava/eval/evaluate_interleave.py:50
↓ 1 callers
Method
process_images
(self)
playground/data_checker.py:90
↓ 1 callers
Method
process_sample
(self,sample)
llava/eval/evaluate_interleave.py:117
↓ 1 callers
Function
process_video_with_decord
(video_file, data_args)
llava/utils.py:25
↓ 1 callers
Method
prune_heads
(self, heads)
llava/model/multimodal_resampler/qformer.py:260
↓ 1 callers
Method
push_to_hub
(self, *args, **kwargs)
trl/models/modeling_value_head.py:221
↓ 1 callers
Function
randn_tensor
A helper function to create random tensors on the desired `device` with the desired `dtype`. When passing a list of generators, you can seed each
trl/core.py:287
↓ 1 callers
Function
read_yaml_to_llava_data
(yaml_path, images_folder)
scripts/archived/quick_check.py:23
↓ 1 callers
Method
receive_heart_beat
(self, worker_name: str, queue_length: int)
llava/serve/controller.py:168
↓ 1 callers
Method
record_step_stats
Record training step statistics. Args: kl_coef (`float`): KL coefficient data (`dict`):
trl/trainer/ppo_trainer.py:1200
↓ 1 callers
Function
recurse
(nest: Dict, prefix: str, into: Dict)
trl/core.py:75
↓ 1 callers
Function
recursive_post_init
(dataclass_obj)
llava-critic-r1/EasyR1/verl/trainer/config.py:25
↓ 1 callers
Method
refresh_all_workers
(self)
llava/serve/controller.py:101
↓ 1 callers
Function
remove_checkpoints
(directory, pattern)
playground/remove_mid_ckpt.py:6
↓ 1 callers
Function
remove_obsolete_ckpt
Remove the obsolete checkpoints that exceed the save_limit.
llava-critic-r1/EasyR1/verl/utils/checkpoint/checkpoint_manager.py:138
↓ 1 callers
Method
remove_stable_workers_by_expiration
(self)
llava/serve/controller.py:178
↓ 1 callers
Method
reorder
Note that this operation is in-place
llava-critic-r1/EasyR1/verl/protocol.py:548
↓ 1 callers
Function
resize_and_center_crop
(image, shortest_edge_length)
llava/mm_utils.py:12
↓ 1 callers
Function
resize_and_pad_image
Resize and pad an image to a target resolution while maintaining aspect ratio. Args: image (PIL.Image.Image): The input image.
llava/mm_utils.py:152
↓ 1 callers
Function
resize_clip_pos_embed
(state_dict, model, interpolation: str = "bicubic", seq_dim=1)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/utils.py:14
↓ 1 callers
Function
resize_eva_pos_embed
(state_dict, model, interpolation: str = "bicubic", seq_dim=1)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/utils.py:110
↓ 1 callers
Function
resize_evaclip_pos_embed
(state_dict, model, interpolation: str = "bicubic", seq_dim=1)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/utils.py:80
↓ 1 callers
Function
resize_visual_pos_embed
(state_dict, model, interpolation: str = "bicubic", seq_dim=1)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/utils.py:47
↓ 1 callers
Method
rot_pos_emb
(self, grid_thw)
llava/model/multimodal_encoder/mlcd/vit_rope2d_hf.py:290
↓ 1 callers
Function
rotate_half
(x)
llava/model/multimodal_encoder/mlcd/vit_rope2d_hf.py:13
↓ 1 callers
Function
run_inference
Run inference on ActivityNet QA DataSet using the Video-ChatGPT model. Args: args: Command-line arguments.
playground/demo/video_demo.py:109
↓ 1 callers
Function
safe_load_tokenizer
(tokenizer_id)
llava/conversation.py:380
↓ 1 callers
Function
safe_save_model_for_hf_trainer
Collects the state dict and dump to disk.
llava/train/train.py:261
↓ 1 callers
Function
safe_save_model_for_hf_trainer
Collects the state dict and dump to disk.
llava/train/train_dpo.py:242
↓ 1 callers
Method
save_attention_map
(self, attention_map)
llava/model/multimodal_resampler/qformer.py:139
↓ 1 callers
Method
save_checkpoint
Light wrapper around accelerate's register_save_state_pre_hook which is run before saving state
trl/models/modeling_sd_base.py:143
↓ 1 callers
Method
scheduler_step
(self, *args, **kwargs)
trl/models/modeling_sd_base.py:80
↓ 1 callers
Function
slice_input_tensor
(x: Tensor, dim: int, padding: bool = True, group: ProcessGroup = None)
llava-critic-r1/EasyR1/verl/utils/ulysses.py:118
↓ 1 callers
Function
smart_tokenizer_and_embedding_resize
Resize tokenizer and embedding. Note: This is the unoptimized version that may make your embedding size not be divisible by 64.
llava/train/train.py:305
↓ 1 callers
Function
smart_tokenizer_and_embedding_resize
Resize tokenizer and embedding. Note: This is the unoptimized version that may make your embedding size not be divisible by 64.
llava/train/train_dpo.py:286
↓ 1 callers
Function
sort_placement_group_by_node_ip
Sort the placement groups by node ip, all bundles in a single placement group should be on the same node. FSDPCheckpointManager saves sharde
llava-critic-r1/EasyR1/verl/single_controller/ray/base.py:54
↓ 1 callers
Method
spawn
spawn to a dictionary of worker groups, each with a subset of method with prefix.
llava-critic-r1/EasyR1/verl/single_controller/ray/base.py:328
↓ 1 callers
Function
split_json_file
(input_file, n_splits)
playground/equal_splitter.py:5
↓ 1 callers
Function
split_list
Split a list into n (roughly) equal-sized chunks
llava/eval/model_vqa.py:23
↓ 1 callers
Function
split_list
Split a list into n (roughly) equal-sized chunks
playground/demo/video_demo.py:28
↓ 1 callers
Method
split_query_response_tokens
Split the tokens into query and response tokens.
trl/environment/base_environment.py:131
↓ 1 callers
Function
stack_dicts
Stack the values of a dict.
trl/core.py:103
↓ 1 callers
Method
stat_and_filter_data
(self, threshold)
playground/data_checker.py:248
↓ 1 callers
Method
stat_data
(self)
playground/data_checker.py:128
↓ 1 callers
Function
stats_to_np
Cast all torch.tensors in dict to numpy arrays.
trl/core.py:204
↓ 1 callers
Method
stem
(self, x)
llava/model/multimodal_encoder/dev_eva_clip/eva_clip/modified_resnet.py:164
↓ 1 callers
Method
step
Step the environment forward one turn. Args: history (`TextHistory`): The history to step forward.
trl/environment/base_environment.py:293
↓ 1 callers
Method
step
Run a PPO optimisation step given a list of queries, model responses, and rewards. Args: queries (List[`torch.LongTensor
trl/trainer/ppo_trainer.py:587
↓ 1 callers
Method
to_dict
(self)
llava-critic-r1/EasyR1/verl/single_controller/base/worker.py:80
↓ 1 callers
Method
to_dict
(self)
llava-critic-r1/EasyR1/verl/workers/rollout/config.py:46
↓ 1 callers
Method
to_str
(precision: torch.dtype)
llava-critic-r1/EasyR1/verl/utils/torch_dtypes.py:50
↓ 1 callers
Function
tokenize
(text)
scripts/archived/data_info.py:42
↓ 1 callers
Function
tokenize
(text)
playground/2d_hist.py:53
↓ 1 callers
Method
tokenize_batch_element
Tokenize a single batch element. At this stage, we don't convert to PyTorch tensors yet; we just handle the truncation in case th
llava/train/train_dpo.py:1239
↓ 1 callers
Function
top_k_top_p_filtering
Filter a distribution of logits using top-k and/or nucleus (top-p) filtering. Args: logits: logits distribution shape (batch size, v
trl/core.py:40
↓ 1 callers
Function
train
(attn_implementation=None)
llava/train/train_dpo.py:1484
↓ 1 callers
Method
train
Train the model for a given number of epochs
trl/trainer/ddpo_trainer.py:571
↓ 1 callers
Method
train_minibatch
Train one PPO minibatch Args: logprobs (`torch.FloatTensor`): Log probabilities of the model, shape [min
trl/trainer/ppo_trainer.py:988
↓ 1 callers
Function
unflatten_dict
(data: Dict[str, Any], sep: str = "/")
llava-critic-r1/EasyR1/verl/utils/py_functional.py:76
↓ 1 callers
Function
union_numpy_dict
(tensor_dict1: Dict[str, NDArray], tensor_dict2: Dict[str, NDArray])
llava-critic-r1/EasyR1/verl/protocol.py:100
↓ 1 callers
Function
union_tensor_dict
Union two tensordicts.
llava-critic-r1/EasyR1/verl/protocol.py:84
↓ 1 callers
Function
union_two_dict
Union two dict. Will throw an error if there is an item not the same object with the same key.
llava-critic-r1/EasyR1/verl/utils/py_functional.py:56
↓ 1 callers
Function
unit_convert
(number: float, level: str)
llava-critic-r1/EasyR1/verl/utils/flops_counter.py:28
↓ 1 callers
Function
unpad_dataproto
(data: "DataProto", pad_size: int)
llava-critic-r1/EasyR1/verl/protocol.py:77
← previous
next →
601–700 of 1,515, ranked by callers