MCPcopy Create free account

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

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

↓ 4 callersMethodfinish
(self)
VRAG-RL/verl/utils/tracking.py:122
↓ 4 callersMethodgenerate_sequences
Generate sequences
VRAG-RL/verl/workers/rollout/base.py:35
↓ 4 callersMethodget
(self)
VRAG-RL/verl/utils/rendezvous/ray_backend.py:30
↓ 4 callersFunctionget_fsdp_wrap_policy
Get FSDP wrap policy for the module. Args: module: The module to get wrap policy for config: Configuration for wrap policy
VRAG-RL/verl/utils/fsdp_utils.py:54
↓ 4 callersFunctionget_micro_data_parallel_group
()
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:434
↓ 4 callersMethodget_placement_groups
(self, strategy="STRICT_PACK", name=None)
VRAG-RL/verl/single_controller/ray/base.py:84
↓ 4 callersMethodget_resource_pool
Get the resource pool of the worker_cls
VRAG-RL/verl/trainer/ppo/ray_trainer.py:97
↓ 4 callersFunctionis_digit
(s)
VRAG-RL/verl/utils/reward_score/prime_math/grader.py:107
↓ 4 callersFunctionload_megatron_model_weights
(config, model_config, parallel_model,
VRAG-RL/verl/utils/model.py:279
↓ 4 callersFunctionprint_model_size
(model: nn.Module, name: str = None)
VRAG-RL/verl/utils/model.py:146
↓ 4 callersMethodrank
(self)
VRAG-RL/verl/single_controller/base/worker.py:206
↓ 4 callersFunctionrender_error_card
渲染错误卡片
demo/vimrag_app.py:863
↓ 4 callersFunctionrotate_half
Rotates half the hidden dims of the input.
VRAG-RL/verl/models/qwen2/megatron/layers/parallel_attention.py:116
↓ 4 callersFunctionrotate_half
Rotates half the hidden dims of the input.
VRAG-RL/verl/models/llama/megatron/layers/parallel_attention.py:116
↓ 4 callersMethodsave_checkpoint
(self, step)
VRAG-RL/verl/trainer/fsdp_sft_trainer.py:427
↓ 4 callersMethodshared_embedding_or_output_weight
(self)
VRAG-RL/verl/models/qwen2/megatron/modeling_qwen2_megatron.py:604
↓ 3 callersMethod__init__
(self)
VRAG-RL/verl/single_controller/ray/base.py:462
↓ 3 callersMethod__init__
(self, dim, max_position_embeddings=2048, base=10000, device=None)
VRAG-RL/verl/models/qwen2/megatron/layers/parallel_attention.py:37
↓ 3 callersMethod__init__
(self, dim, max_position_embeddings=2048, base=10000, device=None)
VRAG-RL/verl/models/llama/megatron/layers/parallel_attention.py:37
↓ 3 callersFunction_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
VRAG-RL/verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:181
↓ 3 callersFunction_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
VRAG-RL/verl/models/llama/megatron/checkpoint_utils/llama_loader.py:185
↓ 3 callersMethod_build_param_references
(self, pp_rank, maintain_weight=False)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:101
↓ 3 callersFunction_concat_data_proto_or_future
(output: List)
VRAG-RL/verl/single_controller/base/decorator.py:129
↓ 3 callersFunction_get_gpt_model
(model)
VRAG-RL/verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:85
↓ 3 callersFunction_get_gpt_model
(model)
VRAG-RL/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:88
↓ 3 callersFunction_str_is_int
(x: str)
VRAG-RL/verl/utils/reward_score/prime_math/__init__.py:111
↓ 3 callersMethod_update_right_side
Update right side state.
VRAG-RL/vrag_agent/generation.py:245
↓ 3 callersMethodbackward
(ctx: Any, grad_output: Tensor)
VRAG-RL/verl/utils/ulysses.py:226
↓ 3 callersFunctionbuild_memory_buffer
Build the memory buffer given weight_buffer_meta Args: weight_buffer_meta: contains mapping from name to a dictionary containing shape an
VRAG-RL/verl/utils/memory_buffer.py:71
↓ 3 callersFunctioncalc_padded_numel
for cuda memory alignment, make sure alignment by 128-bits
VRAG-RL/verl/utils/memory_buffer.py:54
↓ 3 callersFunctioncompute_transformers_input_shapes
(batches, meta_info)
VRAG-RL/verl/utils/megatron/pipeline_parallel.py:22
↓ 3 callersFunctioncopy
r"""Works like shutil.copy() for file, and shutil.copytree for dir, and supports hdfs. Copy data and mode bits ("cp src dst"). Return the file's
VRAG-RL/verl/utils/hdfs_io.py:84
↓ 3 callersFunctioncreate_device_mesh
(world_size, fsdp_size)
VRAG-RL/verl/workers/fsdp_workers.py:49
↓ 3 callersMethodcreate_position_ids
Create position ids from attention mask.
VRAG-RL/vrag_agent/tensor_helper.py:36
↓ 3 callersMethodexecute_all_sync
(self, method_name: str, *args, **kwargs)
VRAG-RL/verl/single_controller/ray/base.py:352
↓ 3 callersFunctionfull_contrastive_scores_and_labels
( query: torch.Tensor, key: torch.Tensor, use_all_pairs: bool = True, only_self_neg: bool
search_engine/models/GVE/model_utils.py:48
↓ 3 callersFunctionget_default_kwargs_for_model_parallel_config
()
VRAG-RL/verl/utils/megatron/tensor_parallel.py:32
↓ 3 callersFunctionget_parallel_model_from_config
(config, megatron_config, pre_process=No
VRAG-RL/verl/utils/model.py:251
↓ 3 callersFunctionget_reverse_idx
(idx_map)
VRAG-RL/verl/utils/seqlen_balancing.py:259
↓ 3 callersFunctionget_sharding_strategy
(device_mesh)
VRAG-RL/verl/workers/fsdp_workers.py:59
↓ 3 callersMethodgradient_checkpointing_enable
(self, **kwargs)
search_engine/models/GVE/models.py:186
↓ 3 callersFunctionhf_processor
Create a huggingface processor to process multimodal data. Args: name_or_path (str): The name of the processor. Returns: tra
VRAG-RL/verl/utils/tokenizer.py:62
↓ 3 callersFunctionimport_external_libs
(external_libs=None)
VRAG-RL/verl/utils/import_utils.py:50
↓ 3 callersFunctioninit_model_parallel_config
(config: DictConfig)
VRAG-RL/verl/utils/megatron_utils.py:213
↓ 3 callersMethodload_checkpoint
(self, path, del_local_after_load=True)
VRAG-RL/verl/workers/fsdp_workers.py:883
↓ 3 callersFunctionmake_batch_generator
(batches, vpp_size)
VRAG-RL/verl/utils/megatron/pipeline_parallel.py:43
↓ 3 callersFunctionprocess_image
(image, max_pixels: int = 2048 * 2048, min_pixels: int = 512 * 512)
VRAG-RL/vrag_agent/generation.py:18
↓ 3 callersMethodrun
(self, question)
demo/vrag_agent.py:67
↓ 3 callersMethodset_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:462
↓ 3 callersFunctionset_random_seed
(seed)
VRAG-RL/verl/workers/megatron_workers.py:51
↓ 3 callersFunctionsplit_dict_tensor_into_batches
(tensors: TensorDict, batch_size)
VRAG-RL/verl/utils/torch_functional.py:222
↓ 3 callersFunctiontime_limit
(seconds: float)
VRAG-RL/verl/utils/reward_score/prime_math/grader.py:345
↓ 3 callersMethodto_str
(precision)
VRAG-RL/verl/utils/torch_dtypes.py:74
↓ 3 callersFunctionvocab_parallel_log_probs_from_logits
TODO(zhangchi.usc1992): We may change the implementation later
VRAG-RL/verl/utils/megatron/tensor_parallel.py:141
↓ 2 callersMethod__init__
(self, config)
VRAG-RL/verl/workers/megatron_workers.py:488
↓ 2 callersMethod__init__
(self, config)
VRAG-RL/verl/workers/fsdp_workers.py:618
↓ 2 callersMethod_batch_tokenize
Tokenize a batch of responses.
VRAG-RL/vrag_agent/generation.py:73
↓ 2 callersFunction_broadcast_tp_shard_tensor_qkv
broadcast tensor in tp shards across mp_group
VRAG-RL/verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:281
↓ 2 callersFunction_broadcast_tp_shard_tensor_qkv
broadcast tensor in tp shards across mp_group
VRAG-RL/verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:259
↓ 2 callersMethod_build_model_optimizer
(self, model_path, megatron_config: ModelParalle
VRAG-RL/verl/workers/megatron_workers.py:135
↓ 2 callersMethod_build_model_optimizer
(self, model_path, fsdp_config,
VRAG-RL/verl/workers/fsdp_workers.py:141
↓ 2 callersMethod_compute_loss_and_backward
Compute loss with optional sequence parallelism and remove padding features
VRAG-RL/verl/trainer/fsdp_sft_trainer.py:288
↓ 2 callersFunction_compute_response_info
(batch: DataProto)
VRAG-RL/verl/trainer/ppo/metric_utils.py:30
↓ 2 callersMethod_download
(self, use_origin_parquet=False)
VRAG-RL/verl/utils/dataset/rl_dataset.py:118
↓ 2 callersMethod_example_level_pad
Pad responses for non-active examples with pad tokens.
VRAG-RL/vrag_agent/tensor_helper.py:47
↓ 2 callersMethod_forward_micro_batch
(self, micro_batch)
VRAG-RL/verl/workers/critic/dp_critic.py:50
↓ 2 callersMethod_forward_micro_batch
Returns: entropy: # (bs, response_len) log_probs: # (bs, response_len)
VRAG-RL/verl/workers/actor/dp_actor.py:61
↓ 2 callersMethod_generate_with_gpu_padding
Wrapper for generation that handles multi-GPU padding requirements. if num_gpus <= 1, return self.actor_rollout_wg.generate_s
VRAG-RL/vrag_agent/generation.py:267
↓ 2 callersFunction_is_frac
(expr: str)
VRAG-RL/verl/utils/reward_score/prime_math/__init__.py:107
↓ 2 callersFunction_normalize
Normalize answer expressions.
VRAG-RL/verl/utils/reward_score/prime_math/__init__.py:147
↓ 2 callersMethod_offload_params_to_cpu
(self, pp_rank, to_empty=False)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:117
↓ 2 callersFunction_pad_tensor
(x: Tensor, dim: int, padding_size: int)
VRAG-RL/verl/utils/ulysses.py:103
↓ 2 callersMethod_pad_to_length
(self, input_ids, attention_mask)
VRAG-RL/verl/utils/dataset/rm_dataset.py:99
↓ 2 callersFunction_parse
(s)
VRAG-RL/verl/utils/reward_score/prime_math/grader.py:312
↓ 2 callersMethod_postprocess_responses
Process responses to stop at search operation or answer operation.
VRAG-RL/vrag_agent/generation.py:91
↓ 2 callersMethod_process_image_to_base64
Process image to base64 string (in-memory, no disk I/O).
demo/vimrag_agent.py:180
↓ 2 callersMethod_raw_prompt_ids
(self, rollings)
VRAG-RL/vrag_agent/generation.py:344
↓ 2 callersMethod_read_files_and_tokenize
(self)
VRAG-RL/verl/utils/dataset/rl_dataset.py:124
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
VRAG-RL/verl/models/qwen2/megatron/layers/parallel_attention.py:51
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
VRAG-RL/verl/models/llama/megatron/layers/parallel_attention.py:51
↓ 2 callersFunction_strip_properly_formatted_commas
(expr: str)
VRAG-RL/verl/utils/reward_score/prime_math/__init__.py:136
↓ 2 callersFunction_unpad_tensor
(x: Tensor, dim: int, padding_size: int)
VRAG-RL/verl/utils/ulysses.py:110
↓ 2 callersFunction_unwrap_ray_remote
(cls)
VRAG-RL/verl/single_controller/ray/base.py:434
↓ 2 callersMethod_validate
The training loop of PPO with global metric computation. Accumulates metrics across all batches before computing final statistics.
VRAG-RL/verl/trainer/ppo/ray_trainer.py:964
↓ 2 callersFunctionall_gather_data_proto
(data: DataProto, process_group)
VRAG-RL/verl/protocol.py:815
↓ 2 callersFunctionall_to_all_tensor
( local_input: Tensor, scatter_dim: int, gather_dim: int, group: Optional[dist.ProcessGroup] =
VRAG-RL/verl/utils/ulysses.py:132
↓ 2 callersMethodallgather_params
allgather params of all pp ranks. Return a list of handles
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:133
↓ 2 callersFunctionconvert_dataset
(USER_PROMPT,file_list,file_source_list,output_name)
VRAG-RL/scripts/hf_dataset_convert.py:14
↓ 2 callersFunctioncreate_and_sync_state
(param_name, state, is_param)
VRAG-RL/verl/utils/fsdp_utils.py:285
↓ 2 callersMethodcut_to_effective_len
Cut tensors to their effective length based on attention mask.
VRAG-RL/vrag_agent/tensor_helper.py:13
↓ 2 callersFunctiondcg
计算折扣累积增益(DCG) :param relevance_scores: 一个列表,表示每个文档的相关性分数 :return: DCG 值
VRAG-RL/verl/workers/reward_manager/rm.py:71
↓ 2 callersMethoddeactivate_batch
(self, active_mask,rollings)
VRAG-RL/vrag_agent/generation.py:365
↓ 2 callersMethodexecute_all_async
(self, method_name: str, *args, **kwargs)
VRAG-RL/verl/single_controller/ray/base.py:355
↓ 2 callersMethodexecute_predictions
Execute predictions across multiple environments. NOTE: the function is the actual `step` function in the environment NOTE pe
VRAG-RL/vrag_agent/generation.py:574
↓ 2 callersMethodforward
Args: input_ids: input ids. shape (batch_size, seq_length) attention_mask: attention_mask. shape (batch_size, seq_le
VRAG-RL/verl/models/qwen2/megatron/modeling_qwen2_megatron.py:119
↓ 2 callersMethodforward
Args: input_ids: input ids. shape (batch_size, seq_length) attention_mask: attention_mask. shape (batch_size, seq_le
VRAG-RL/verl/models/llama/megatron/modeling_llama_megatron.py:120
↓ 2 callersMethodforward_backward_batch
(self, data: DataProto, forward_only=False)
VRAG-RL/verl/workers/critic/megatron_critic.py:119
↓ 2 callersMethodforward_backward_batch
We assume: - The model takes input: (input_ids, attention_mask, position_ids). No rmpad for the input - The communication sha
VRAG-RL/verl/workers/actor/megatron_actor.py:233
↓ 2 callersMethodfrom_single_dict
(cls, data: Dict[str, Union[torch.Tensor, np.ndarray]], meta_info=None)
VRAG-RL/verl/protocol.py:307
↓ 2 callersMethodget_all_params
Get all the parameters of the models in all pp ranks Returns: params: List[List[Dict[str, Tensor]]]: a list of parameters in all
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:179
← previousnext →101–200 of 1,037, ranked by callers