Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Alibaba-NLP/VRAG
/ functions
Functions
1,037 in github.com/Alibaba-NLP/VRAG
⨍
Functions
1,037
◇
Types & classes
150
↳
Endpoints
26
Function
llama_flash_attn_forward
Adapted from transformers 4.47.1 to support Ulysses sequence parallelism. NOTE: This function is used for transformers versions in the range
VRAG-RL/verl/models/transformers/llama.py:31
Method
load_checkpoint
(self, path=None, del_local_after_load=False, *args, **kwargs)
VRAG-RL/verl/utils/checkpoint/fsdp_checkpoint_manager.py:61
Method
load_checkpoint
(self, *args, **kwargs)
VRAG-RL/verl/utils/checkpoint/checkpoint_manager.py:57
Method
load_checkpoint
(self, checkpoint_path, **kwargs)
VRAG-RL/verl/workers/megatron_workers.py:441
Method
load_checkpoint
(self, checkpoint_path, **kwargs)
VRAG-RL/verl/workers/megatron_workers.py:654
Method
load_checkpoint
(self, path, del_local_after_load=False)
VRAG-RL/verl/workers/fsdp_workers.py:603
Method
load_from_disk
(filepath)
VRAG-RL/verl/protocol.py:261
Method
load_pretrained
(self, output_path)
search_engine/models/GVE/models.py:199
Method
load_pretrained_model
(self, checkpoint_path, **kwargs)
VRAG-RL/verl/workers/megatron_workers.py:445
Function
load_state_dict_to_megatron_llama
Load merged state_dict to sharded Megatron module in training.
VRAG-RL/verl/models/llama/megatron/checkpoint_utils/llama_loader.py:54
Function
load_state_dict_to_megatron_qwen2
Load merged state_dict to sharded Megatron module in training.
VRAG-RL/verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:50
Method
local_rank_list
(self)
VRAG-RL/verl/single_controller/base/worker_group.py:56
Method
local_world_size_list
(self)
VRAG-RL/verl/single_controller/base/worker_group.py:50
Method
log
(self, data, step)
VRAG-RL/verl/utils/tracking.py:118
Method
log
(self, data, step)
VRAG-RL/verl/utils/tracking.py:128
Method
log
(self, loggers, samples, step)
VRAG-RL/verl/utils/tracking.py:170
Function
log_probs_from_logits_all_rmpad
Compute the log_probs from logits with rmpad input_ids and logits. Note that logits_rmpad = model(input_ids_rmpad). For each sentences, there is a
VRAG-RL/verl/utils/torch_functional.py:361
Function
log_probs_from_logits_response
Compute the response log_probs from full logits. Note that logits = model(input_ids) Args: input_ids: [batch_size, seqlen] logits
VRAG-RL/verl/utils/torch_functional.py:317
Function
log_probs_from_logits_response_rmpad
Compute the log_probs from logits with rmpad logits and pad input. Note that logits_rmpad = model(input_ids_rmpad). For each sentences, there is a
VRAG-RL/verl/utils/torch_functional.py:333
Function
log_to_file
(string)
VRAG-RL/verl/utils/logging_utils.py:27
Function
logprobs_from_logits_naive
(logits, labels)
VRAG-RL/verl/utils/torch_functional.py:71
Method
loss_func
(output, data, meta_info)
VRAG-RL/verl/workers/critic/megatron_critic.py:141
Method
loss_func
(output, data, meta_info)
VRAG-RL/verl/workers/actor/megatron_actor.py:264
Method
loss_func
(output)
VRAG-RL/verl/workers/reward_model/megatron/reward_model.py:214
Function
lr_lambda
(current_step)
VRAG-RL/verl/utils/torch_functional.py:445
Function
main_task
(config)
VRAG-RL/verl/trainer/main_generation.py:54
Method
make_minibatch_iterator
(self, data: DataProto)
VRAG-RL/verl/workers/critic/megatron_critic.py:112
Function
mark_parameter_as_sequence_parallel
(parameter)
VRAG-RL/verl/utils/megatron/sequence_parallel.py:21
Function
masked_sum
Compute mean of tensor with a masked values.
VRAG-RL/verl/utils/torch_functional.py:113
Function
masked_whiten
Whiten values with masked values.
VRAG-RL/verl/utils/torch_functional.py:141
Method
master_address
(self)
VRAG-RL/verl/single_controller/ray/base.py:374
Method
master_port
(self)
VRAG-RL/verl/single_controller/ray/base.py:378
Method
megatron_actor_model_provider
(pre_process, post_process)
VRAG-RL/verl/workers/megatron_workers.py:170
Method
megatron_critic_model_provider
(pre_process, post_process)
VRAG-RL/verl/workers/megatron_workers.py:556
Method
megatron_rm_model_provider
(pre_process, post_process)
VRAG-RL/verl/workers/megatron_workers.py:727
Method
memory_buffers
(self)
VRAG-RL/verl/utils/memory_buffer.py:216
Method
merge
(self, other)
VRAG-RL/verl/utils/seqlen_balancing.py:72
Function
merge_megatron_ckpt_llama
Merge sharded parameters of a Megatron module into a merged checkpoint. Args: wrapped_modelss (list of megatron.core.distributed.Distribu
VRAG-RL/verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:68
Function
merge_megatron_ckpt_llama
Merge sharded parameters of a Megatron module into a merged checkpoint. Args: wrapped_models (list of megatron.core.distributed.Distribut
VRAG-RL/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:71
Function
merge_resource_pool
(rp1: RayResourcePool, rp2: RayResourcePool)
VRAG-RL/verl/single_controller/ray/base.py:134
Function
meta_device_init
Create model parameters with meta device. Note buffers in model will still be initialized in default device (e.g., CPU), since the buffe
VRAG-RL/verl/utils/fsdp_utils.py:176
Method
model_input_names
(self)
search_engine/models/GVE/qwen25vl/qwen25vl_processor.py:210
Function
normalize_answer
(answer: Optional[str])
VRAG-RL/verl/utils/reward_score/prime_math/math_normalize.py:43
Function
pad_dataproto_to_divisor
Pad a DataProto to size divisible by size_divisor Args: size_divisor (int): size divisor Returns: data: (DataProto): the pad
VRAG-RL/verl/protocol.py:41
Function
pad_packed_inputs
pad the tokens such that the total length is a multiple of size. This function is useful when applying sequence parallel and context parallel
VRAG-RL/verl/utils/model.py:330
Method
pad_token_id
`Optional[int]`: Id of the padding token in the vocabulary. Returns `None` if the token has not been set.
VRAG-RL/verl/workers/rollout/tokenizer.py:36
Function
parallel_init_module_fn
Generate a function to initialize sub-modules in the `module` with `shard_states` from huggingface checkpoint. Args: module (tor
VRAG-RL/verl/utils/fsdp_utils.py:263
Function
parallel_load_safetensors
Parallel load safetensors from huggingface checkpoint Huggingface checkpoint contains: - config.json: a json file for model configurati
VRAG-RL/verl/utils/fsdp_utils.py:207
Function
parallel_put
(data_list, max_workers=None)
VRAG-RL/verl/utils/ray_utils.py:23
Method
post_process_image_text_to_text
Post-process the output of the model to decode the text. Args: generated_outputs (`torch.Tensor` or `np.ndarray`):
search_engine/models/GVE/qwen25vl/qwen25vl_processor.py:193
Function
post_process_logits
(input_ids, logits, temperature, top_k, top_p)
VRAG-RL/verl/utils/torch_functional.py:392
Method
postprocess_data
Get chunk data of this tp rank since we do all gather in preprocess.
VRAG-RL/verl/workers/sharding_manager/fsdp_vllm.py:154
Method
postprocess_data
(self, data: DataProto)
VRAG-RL/verl/workers/sharding_manager/fsdp_sglang.py:134
Method
postprocess_data
Split the data to follow FSDP partition
VRAG-RL/verl/workers/sharding_manager/fsdp_ulysses.py:70
Method
postprocess_data
(self, data: DataProto)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:410
Method
pp_group
(self)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:219
Method
pp_models
(self)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:223
Method
pp_rank
(self)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:215
Method
pp_size
(self)
VRAG-RL/verl/single_controller/base/megatron/worker_group.py:46
Method
pp_size
(self)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:211
Function
prepare_decoder_attention_mask
(attention_mask, input_shape, inputs_embeds)
VRAG-RL/verl/utils/torch_functional.py:467
Method
preprocess_data
All gather across tp group to make each rank has identical input.
VRAG-RL/verl/workers/sharding_manager/fsdp_vllm.py:140
Method
preprocess_data
(self, data: DataProto)
VRAG-RL/verl/workers/sharding_manager/fsdp_sglang.py:126
Method
preprocess_data
AllGather data from sp region This is because the data is first sharded along the FSDP dimension as we utilize the DP_COMPUTE
VRAG-RL/verl/workers/sharding_manager/fsdp_ulysses.py:57
Method
preprocess_data
(self, data: DataProto)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:394
Method
print_size
(self, prefix="")
VRAG-RL/verl/protocol.py:266
Function
process
(iter)
VRAG-RL/verl/utils/debug/trajectory_tracker.py:94
Function
process_fn
(example, idx)
VRAG-RL/scripts/hf_dataset_convert.py:60
Function
process_one_shard
(rank)
VRAG-RL/scripts/model_merger.py:85
Function
put_data
(index, data)
VRAG-RL/verl/utils/ray_utils.py:25
Function
qwen2_attn_forward
Adapted from transformers 4.49.0 to support Ulysses sequence parallelism for transformers >= 4.48.0. NOTE: This function has been tested onl
VRAG-RL/verl/models/transformers/qwen2.py:145
Function
qwen2_flash_attn_forward
Adapted from transformers 4.47.1 to support Ulysses sequence parallelism. NOTE: This function is only tested on transformers versions betwee
VRAG-RL/verl/models/transformers/qwen2.py:28
Function
register
(dispatch_mode=Dispatch.ALL_TO_ALL, execute_mode=Execute.ALL, blocking=True, materialize_futures=True)
VRAG-RL/verl/single_controller/base/decorator.py:394
Function
register_empty_parameter
(module, name, param)
VRAG-RL/verl/utils/fsdp_utils.py:188
Function
remove_boxed
(s)
VRAG-RL/verl/utils/reward_score/prime_math/__init__.py:323
Function
remove_pad_token
Remove the pad token. Args: input_ids shape: [bs, seq_length] attention_mask shape: [bs, seq_length] Returns: no_pad
VRAG-RL/verl/utils/torch_functional.py:302
Method
rename
Note that this function only rename the key in the batch
VRAG-RL/verl/protocol.py:519
Method
replace_consecutive_elements
(arr, target)
VRAG-RL/vrag_agent/generation.py:348
Method
resume_dataset_state
(self)
VRAG-RL/verl/utils/dataset/rl_dataset.py:144
Method
save_checkpoint
(self, local_path: str, global_step: int, remove_previous_ckpt=False, *args, **kwargs)
VRAG-RL/verl/utils/checkpoint/fsdp_checkpoint_manager.py:106
Method
save_checkpoint
(self, *args, **kwargs)
VRAG-RL/verl/utils/checkpoint/checkpoint_manager.py:60
Method
save_checkpoint
(self, checkpoint_path, hdfs_path=None, **kwargs)
VRAG-RL/verl/workers/megatron_workers.py:449
Method
save_checkpoint
(self, checkpoint_path, hdfs_path=None, **kwargs)
VRAG-RL/verl/workers/megatron_workers.py:658
Method
save_checkpoint
(self, local_path, hdfs_path=None, global_step=0, remove_previous_ckpt=False)
VRAG-RL/verl/workers/fsdp_workers.py:586
Method
save_to_disk
(self, filepath)
VRAG-RL/verl/protocol.py:256
Function
save_to_hdfs
(data: io.BytesIO, name, hdfs_dir, verbose)
VRAG-RL/verl/utils/debug/trajectory_tracker.py:33
Function
search
(request: Request)
search_engine/search_engine_api.py:15
Method
select_element
(A, B, C)
VRAG-RL/scripts/data_construct_pipeline.py:244
Method
series_to_item
(ls)
VRAG-RL/verl/utils/dataset/sft_dataset.py:75
Method
set_additional_resource
(self, additional_resource)
VRAG-RL/verl/single_controller/ray/base.py:156
Method
set_decoder
(self, decoder)
search_engine/models/Qwen3_VL_Embedding/qwen3_vl_embedding.py:58
Method
set_input_embeddings
(self, value)
search_engine/models/Qwen3_VL_Embedding/qwen3_vl_embedding.py:55
Method
set_input_tensor
Set input tensor to be used instead of forward()'s input. When doing pipeline parallelism the input from the previous stage comes fro
VRAG-RL/verl/models/qwen2/megatron/modeling_qwen2_megatron.py:539
Method
set_input_tensor
Set input tensor to be used instead of forward()'s input. When doing pipeline parallelism the input from the previous stage comes fro
VRAG-RL/verl/models/llama/megatron/modeling_llama_megatron.py:538
Function
signal_handler
(signum, frame)
VRAG-RL/verl/utils/reward_score/prime_math/grader.py:347
Method
spread
(self)
VRAG-RL/verl/utils/seqlen_balancing.py:60
Function
squeeze
(x)
VRAG-RL/verl/utils/model.py:38
Method
start_worker_aliveness_check
(self, every_n_seconds=1)
VRAG-RL/verl/single_controller/base/worker_group.py:123
Method
store
(self)
VRAG-RL/verl/single_controller/base/worker_group.py:47
Method
supported_type
(precision: Union[str, int])
VRAG-RL/verl/utils/torch_dtypes.py:43
← previous
next →
901–1,000 of 1,037, ranked by callers