MCPcopy Create free account

hub / github.com/Alibaba-NLP/VRAG / functions

Functions1,037 in github.com/Alibaba-NLP/VRAG

Functionllama_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
Methodload_checkpoint
(self, path=None, del_local_after_load=False, *args, **kwargs)
VRAG-RL/verl/utils/checkpoint/fsdp_checkpoint_manager.py:61
Methodload_checkpoint
(self, *args, **kwargs)
VRAG-RL/verl/utils/checkpoint/checkpoint_manager.py:57
Methodload_checkpoint
(self, checkpoint_path, **kwargs)
VRAG-RL/verl/workers/megatron_workers.py:441
Methodload_checkpoint
(self, checkpoint_path, **kwargs)
VRAG-RL/verl/workers/megatron_workers.py:654
Methodload_checkpoint
(self, path, del_local_after_load=False)
VRAG-RL/verl/workers/fsdp_workers.py:603
Methodload_from_disk
(filepath)
VRAG-RL/verl/protocol.py:261
Methodload_pretrained
(self, output_path)
search_engine/models/GVE/models.py:199
Methodload_pretrained_model
(self, checkpoint_path, **kwargs)
VRAG-RL/verl/workers/megatron_workers.py:445
Functionload_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
Functionload_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
Methodlocal_rank_list
(self)
VRAG-RL/verl/single_controller/base/worker_group.py:56
Methodlocal_world_size_list
(self)
VRAG-RL/verl/single_controller/base/worker_group.py:50
Methodlog
(self, data, step)
VRAG-RL/verl/utils/tracking.py:118
Methodlog
(self, data, step)
VRAG-RL/verl/utils/tracking.py:128
Methodlog
(self, loggers, samples, step)
VRAG-RL/verl/utils/tracking.py:170
Functionlog_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
Functionlog_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
Functionlog_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
Functionlog_to_file
(string)
VRAG-RL/verl/utils/logging_utils.py:27
Functionlogprobs_from_logits_naive
(logits, labels)
VRAG-RL/verl/utils/torch_functional.py:71
Methodloss_func
(output, data, meta_info)
VRAG-RL/verl/workers/critic/megatron_critic.py:141
Methodloss_func
(output, data, meta_info)
VRAG-RL/verl/workers/actor/megatron_actor.py:264
Methodloss_func
(output)
VRAG-RL/verl/workers/reward_model/megatron/reward_model.py:214
Functionlr_lambda
(current_step)
VRAG-RL/verl/utils/torch_functional.py:445
Functionmain_task
(config)
VRAG-RL/verl/trainer/main_generation.py:54
Methodmake_minibatch_iterator
(self, data: DataProto)
VRAG-RL/verl/workers/critic/megatron_critic.py:112
Functionmark_parameter_as_sequence_parallel
(parameter)
VRAG-RL/verl/utils/megatron/sequence_parallel.py:21
Functionmasked_sum
Compute mean of tensor with a masked values.
VRAG-RL/verl/utils/torch_functional.py:113
Functionmasked_whiten
Whiten values with masked values.
VRAG-RL/verl/utils/torch_functional.py:141
Methodmaster_address
(self)
VRAG-RL/verl/single_controller/ray/base.py:374
Methodmaster_port
(self)
VRAG-RL/verl/single_controller/ray/base.py:378
Methodmegatron_actor_model_provider
(pre_process, post_process)
VRAG-RL/verl/workers/megatron_workers.py:170
Methodmegatron_critic_model_provider
(pre_process, post_process)
VRAG-RL/verl/workers/megatron_workers.py:556
Methodmegatron_rm_model_provider
(pre_process, post_process)
VRAG-RL/verl/workers/megatron_workers.py:727
Methodmemory_buffers
(self)
VRAG-RL/verl/utils/memory_buffer.py:216
Methodmerge
(self, other)
VRAG-RL/verl/utils/seqlen_balancing.py:72
Functionmerge_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
Functionmerge_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
Functionmerge_resource_pool
(rp1: RayResourcePool, rp2: RayResourcePool)
VRAG-RL/verl/single_controller/ray/base.py:134
Functionmeta_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
Methodmodel_input_names
(self)
search_engine/models/GVE/qwen25vl/qwen25vl_processor.py:210
Functionnormalize_answer
(answer: Optional[str])
VRAG-RL/verl/utils/reward_score/prime_math/math_normalize.py:43
Functionpad_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
Functionpad_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
Methodpad_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
Functionparallel_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
Functionparallel_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
Functionparallel_put
(data_list, max_workers=None)
VRAG-RL/verl/utils/ray_utils.py:23
Methodpost_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
Functionpost_process_logits
(input_ids, logits, temperature, top_k, top_p)
VRAG-RL/verl/utils/torch_functional.py:392
Methodpostprocess_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
Methodpostprocess_data
(self, data: DataProto)
VRAG-RL/verl/workers/sharding_manager/fsdp_sglang.py:134
Methodpostprocess_data
Split the data to follow FSDP partition
VRAG-RL/verl/workers/sharding_manager/fsdp_ulysses.py:70
Methodpostprocess_data
(self, data: DataProto)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:410
Methodpp_group
(self)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:219
Methodpp_models
(self)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:223
Methodpp_rank
(self)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:215
Methodpp_size
(self)
VRAG-RL/verl/single_controller/base/megatron/worker_group.py:46
Methodpp_size
(self)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:211
Functionprepare_decoder_attention_mask
(attention_mask, input_shape, inputs_embeds)
VRAG-RL/verl/utils/torch_functional.py:467
Methodpreprocess_data
All gather across tp group to make each rank has identical input.
VRAG-RL/verl/workers/sharding_manager/fsdp_vllm.py:140
Methodpreprocess_data
(self, data: DataProto)
VRAG-RL/verl/workers/sharding_manager/fsdp_sglang.py:126
Methodpreprocess_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
Methodpreprocess_data
(self, data: DataProto)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:394
Methodprint_size
(self, prefix="")
VRAG-RL/verl/protocol.py:266
Functionprocess
(iter)
VRAG-RL/verl/utils/debug/trajectory_tracker.py:94
Functionprocess_fn
(example, idx)
VRAG-RL/scripts/hf_dataset_convert.py:60
Functionprocess_one_shard
(rank)
VRAG-RL/scripts/model_merger.py:85
Functionput_data
(index, data)
VRAG-RL/verl/utils/ray_utils.py:25
Functionqwen2_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
Functionqwen2_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
Functionregister
(dispatch_mode=Dispatch.ALL_TO_ALL, execute_mode=Execute.ALL, blocking=True, materialize_futures=True)
VRAG-RL/verl/single_controller/base/decorator.py:394
Functionregister_empty_parameter
(module, name, param)
VRAG-RL/verl/utils/fsdp_utils.py:188
Functionremove_boxed
(s)
VRAG-RL/verl/utils/reward_score/prime_math/__init__.py:323
Functionremove_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
Methodrename
Note that this function only rename the key in the batch
VRAG-RL/verl/protocol.py:519
Methodreplace_consecutive_elements
(arr, target)
VRAG-RL/vrag_agent/generation.py:348
Methodresume_dataset_state
(self)
VRAG-RL/verl/utils/dataset/rl_dataset.py:144
Methodsave_checkpoint
(self, local_path: str, global_step: int, remove_previous_ckpt=False, *args, **kwargs)
VRAG-RL/verl/utils/checkpoint/fsdp_checkpoint_manager.py:106
Methodsave_checkpoint
(self, *args, **kwargs)
VRAG-RL/verl/utils/checkpoint/checkpoint_manager.py:60
Methodsave_checkpoint
(self, checkpoint_path, hdfs_path=None, **kwargs)
VRAG-RL/verl/workers/megatron_workers.py:449
Methodsave_checkpoint
(self, checkpoint_path, hdfs_path=None, **kwargs)
VRAG-RL/verl/workers/megatron_workers.py:658
Methodsave_checkpoint
(self, local_path, hdfs_path=None, global_step=0, remove_previous_ckpt=False)
VRAG-RL/verl/workers/fsdp_workers.py:586
Methodsave_to_disk
(self, filepath)
VRAG-RL/verl/protocol.py:256
Functionsave_to_hdfs
(data: io.BytesIO, name, hdfs_dir, verbose)
VRAG-RL/verl/utils/debug/trajectory_tracker.py:33
Functionsearch
(request: Request)
search_engine/search_engine_api.py:15
Methodselect_element
(A, B, C)
VRAG-RL/scripts/data_construct_pipeline.py:244
Methodseries_to_item
(ls)
VRAG-RL/verl/utils/dataset/sft_dataset.py:75
Methodset_additional_resource
(self, additional_resource)
VRAG-RL/verl/single_controller/ray/base.py:156
Methodset_decoder
(self, decoder)
search_engine/models/Qwen3_VL_Embedding/qwen3_vl_embedding.py:58
Methodset_input_embeddings
(self, value)
search_engine/models/Qwen3_VL_Embedding/qwen3_vl_embedding.py:55
Methodset_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
Methodset_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
Functionsignal_handler
(signum, frame)
VRAG-RL/verl/utils/reward_score/prime_math/grader.py:347
Methodspread
(self)
VRAG-RL/verl/utils/seqlen_balancing.py:60
Functionsqueeze
(x)
VRAG-RL/verl/utils/model.py:38
Methodstart_worker_aliveness_check
(self, every_n_seconds=1)
VRAG-RL/verl/single_controller/base/worker_group.py:123
Methodstore
(self)
VRAG-RL/verl/single_controller/base/worker_group.py:47
Methodsupported_type
(precision: Union[str, int])
VRAG-RL/verl/utils/torch_dtypes.py:43
← previousnext →901–1,000 of 1,037, ranked by callers