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
↓ 4 callers
Method
finish
(self)
VRAG-RL/verl/utils/tracking.py:122
↓ 4 callers
Method
generate_sequences
Generate sequences
VRAG-RL/verl/workers/rollout/base.py:35
↓ 4 callers
Method
get
(self)
VRAG-RL/verl/utils/rendezvous/ray_backend.py:30
↓ 4 callers
Function
get_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 callers
Function
get_micro_data_parallel_group
()
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:434
↓ 4 callers
Method
get_placement_groups
(self, strategy="STRICT_PACK", name=None)
VRAG-RL/verl/single_controller/ray/base.py:84
↓ 4 callers
Method
get_resource_pool
Get the resource pool of the worker_cls
VRAG-RL/verl/trainer/ppo/ray_trainer.py:97
↓ 4 callers
Function
is_digit
(s)
VRAG-RL/verl/utils/reward_score/prime_math/grader.py:107
↓ 4 callers
Function
load_megatron_model_weights
(config, model_config, parallel_model,
VRAG-RL/verl/utils/model.py:279
↓ 4 callers
Function
print_model_size
(model: nn.Module, name: str = None)
VRAG-RL/verl/utils/model.py:146
↓ 4 callers
Method
rank
(self)
VRAG-RL/verl/single_controller/base/worker.py:206
↓ 4 callers
Function
render_error_card
渲染错误卡片
demo/vimrag_app.py:863
↓ 4 callers
Function
rotate_half
Rotates half the hidden dims of the input.
VRAG-RL/verl/models/qwen2/megatron/layers/parallel_attention.py:116
↓ 4 callers
Function
rotate_half
Rotates half the hidden dims of the input.
VRAG-RL/verl/models/llama/megatron/layers/parallel_attention.py:116
↓ 4 callers
Method
save_checkpoint
(self, step)
VRAG-RL/verl/trainer/fsdp_sft_trainer.py:427
↓ 4 callers
Method
shared_embedding_or_output_weight
(self)
VRAG-RL/verl/models/qwen2/megatron/modeling_qwen2_megatron.py:604
↓ 3 callers
Method
__init__
(self)
VRAG-RL/verl/single_controller/ray/base.py:462
↓ 3 callers
Method
__init__
(self, dim, max_position_embeddings=2048, base=10000, device=None)
VRAG-RL/verl/models/qwen2/megatron/layers/parallel_attention.py:37
↓ 3 callers
Method
__init__
(self, dim, max_position_embeddings=2048, base=10000, device=None)
VRAG-RL/verl/models/llama/megatron/layers/parallel_attention.py:37
↓ 3 callers
Function
_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 callers
Function
_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 callers
Method
_build_param_references
(self, pp_rank, maintain_weight=False)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:101
↓ 3 callers
Function
_concat_data_proto_or_future
(output: List)
VRAG-RL/verl/single_controller/base/decorator.py:129
↓ 3 callers
Function
_get_gpt_model
(model)
VRAG-RL/verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:85
↓ 3 callers
Function
_get_gpt_model
(model)
VRAG-RL/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:88
↓ 3 callers
Function
_str_is_int
(x: str)
VRAG-RL/verl/utils/reward_score/prime_math/__init__.py:111
↓ 3 callers
Method
_update_right_side
Update right side state.
VRAG-RL/vrag_agent/generation.py:245
↓ 3 callers
Method
backward
(ctx: Any, grad_output: Tensor)
VRAG-RL/verl/utils/ulysses.py:226
↓ 3 callers
Function
build_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 callers
Function
calc_padded_numel
for cuda memory alignment, make sure alignment by 128-bits
VRAG-RL/verl/utils/memory_buffer.py:54
↓ 3 callers
Function
compute_transformers_input_shapes
(batches, meta_info)
VRAG-RL/verl/utils/megatron/pipeline_parallel.py:22
↓ 3 callers
Function
copy
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 callers
Function
create_device_mesh
(world_size, fsdp_size)
VRAG-RL/verl/workers/fsdp_workers.py:49
↓ 3 callers
Method
create_position_ids
Create position ids from attention mask.
VRAG-RL/vrag_agent/tensor_helper.py:36
↓ 3 callers
Method
execute_all_sync
(self, method_name: str, *args, **kwargs)
VRAG-RL/verl/single_controller/ray/base.py:352
↓ 3 callers
Function
full_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 callers
Function
get_default_kwargs_for_model_parallel_config
()
VRAG-RL/verl/utils/megatron/tensor_parallel.py:32
↓ 3 callers
Function
get_parallel_model_from_config
(config, megatron_config, pre_process=No
VRAG-RL/verl/utils/model.py:251
↓ 3 callers
Function
get_reverse_idx
(idx_map)
VRAG-RL/verl/utils/seqlen_balancing.py:259
↓ 3 callers
Function
get_sharding_strategy
(device_mesh)
VRAG-RL/verl/workers/fsdp_workers.py:59
↓ 3 callers
Method
gradient_checkpointing_enable
(self, **kwargs)
search_engine/models/GVE/models.py:186
↓ 3 callers
Function
hf_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 callers
Function
import_external_libs
(external_libs=None)
VRAG-RL/verl/utils/import_utils.py:50
↓ 3 callers
Function
init_model_parallel_config
(config: DictConfig)
VRAG-RL/verl/utils/megatron_utils.py:213
↓ 3 callers
Method
load_checkpoint
(self, path, del_local_after_load=True)
VRAG-RL/verl/workers/fsdp_workers.py:883
↓ 3 callers
Function
make_batch_generator
(batches, vpp_size)
VRAG-RL/verl/utils/megatron/pipeline_parallel.py:43
↓ 3 callers
Function
process_image
(image, max_pixels: int = 2048 * 2048, min_pixels: int = 512 * 512)
VRAG-RL/vrag_agent/generation.py:18
↓ 3 callers
Method
run
(self, question)
demo/vrag_agent.py:67
↓ 3 callers
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:462
↓ 3 callers
Function
set_random_seed
(seed)
VRAG-RL/verl/workers/megatron_workers.py:51
↓ 3 callers
Function
split_dict_tensor_into_batches
(tensors: TensorDict, batch_size)
VRAG-RL/verl/utils/torch_functional.py:222
↓ 3 callers
Function
time_limit
(seconds: float)
VRAG-RL/verl/utils/reward_score/prime_math/grader.py:345
↓ 3 callers
Method
to_str
(precision)
VRAG-RL/verl/utils/torch_dtypes.py:74
↓ 3 callers
Function
vocab_parallel_log_probs_from_logits
TODO(zhangchi.usc1992): We may change the implementation later
VRAG-RL/verl/utils/megatron/tensor_parallel.py:141
↓ 2 callers
Method
__init__
(self, config)
VRAG-RL/verl/workers/megatron_workers.py:488
↓ 2 callers
Method
__init__
(self, config)
VRAG-RL/verl/workers/fsdp_workers.py:618
↓ 2 callers
Method
_batch_tokenize
Tokenize a batch of responses.
VRAG-RL/vrag_agent/generation.py:73
↓ 2 callers
Function
_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 callers
Function
_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 callers
Method
_build_model_optimizer
(self, model_path, megatron_config: ModelParalle
VRAG-RL/verl/workers/megatron_workers.py:135
↓ 2 callers
Method
_build_model_optimizer
(self, model_path, fsdp_config,
VRAG-RL/verl/workers/fsdp_workers.py:141
↓ 2 callers
Method
_compute_loss_and_backward
Compute loss with optional sequence parallelism and remove padding features
VRAG-RL/verl/trainer/fsdp_sft_trainer.py:288
↓ 2 callers
Function
_compute_response_info
(batch: DataProto)
VRAG-RL/verl/trainer/ppo/metric_utils.py:30
↓ 2 callers
Method
_download
(self, use_origin_parquet=False)
VRAG-RL/verl/utils/dataset/rl_dataset.py:118
↓ 2 callers
Method
_example_level_pad
Pad responses for non-active examples with pad tokens.
VRAG-RL/vrag_agent/tensor_helper.py:47
↓ 2 callers
Method
_forward_micro_batch
(self, micro_batch)
VRAG-RL/verl/workers/critic/dp_critic.py:50
↓ 2 callers
Method
_forward_micro_batch
Returns: entropy: # (bs, response_len) log_probs: # (bs, response_len)
VRAG-RL/verl/workers/actor/dp_actor.py:61
↓ 2 callers
Method
_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 callers
Function
_is_frac
(expr: str)
VRAG-RL/verl/utils/reward_score/prime_math/__init__.py:107
↓ 2 callers
Function
_normalize
Normalize answer expressions.
VRAG-RL/verl/utils/reward_score/prime_math/__init__.py:147
↓ 2 callers
Method
_offload_params_to_cpu
(self, pp_rank, to_empty=False)
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:117
↓ 2 callers
Function
_pad_tensor
(x: Tensor, dim: int, padding_size: int)
VRAG-RL/verl/utils/ulysses.py:103
↓ 2 callers
Method
_pad_to_length
(self, input_ids, attention_mask)
VRAG-RL/verl/utils/dataset/rm_dataset.py:99
↓ 2 callers
Function
_parse
(s)
VRAG-RL/verl/utils/reward_score/prime_math/grader.py:312
↓ 2 callers
Method
_postprocess_responses
Process responses to stop at search operation or answer operation.
VRAG-RL/vrag_agent/generation.py:91
↓ 2 callers
Method
_process_image_to_base64
Process image to base64 string (in-memory, no disk I/O).
demo/vimrag_agent.py:180
↓ 2 callers
Method
_raw_prompt_ids
(self, rollings)
VRAG-RL/vrag_agent/generation.py:344
↓ 2 callers
Method
_read_files_and_tokenize
(self)
VRAG-RL/verl/utils/dataset/rl_dataset.py:124
↓ 2 callers
Method
_set_cos_sin_cache
(self, seq_len, device, dtype)
VRAG-RL/verl/models/qwen2/megatron/layers/parallel_attention.py:51
↓ 2 callers
Method
_set_cos_sin_cache
(self, seq_len, device, dtype)
VRAG-RL/verl/models/llama/megatron/layers/parallel_attention.py:51
↓ 2 callers
Function
_strip_properly_formatted_commas
(expr: str)
VRAG-RL/verl/utils/reward_score/prime_math/__init__.py:136
↓ 2 callers
Function
_unpad_tensor
(x: Tensor, dim: int, padding_size: int)
VRAG-RL/verl/utils/ulysses.py:110
↓ 2 callers
Function
_unwrap_ray_remote
(cls)
VRAG-RL/verl/single_controller/ray/base.py:434
↓ 2 callers
Method
_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 callers
Function
all_gather_data_proto
(data: DataProto, process_group)
VRAG-RL/verl/protocol.py:815
↓ 2 callers
Function
all_to_all_tensor
( local_input: Tensor, scatter_dim: int, gather_dim: int, group: Optional[dist.ProcessGroup] =
VRAG-RL/verl/utils/ulysses.py:132
↓ 2 callers
Method
allgather_params
allgather params of all pp ranks. Return a list of handles
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:133
↓ 2 callers
Function
convert_dataset
(USER_PROMPT,file_list,file_source_list,output_name)
VRAG-RL/scripts/hf_dataset_convert.py:14
↓ 2 callers
Function
create_and_sync_state
(param_name, state, is_param)
VRAG-RL/verl/utils/fsdp_utils.py:285
↓ 2 callers
Method
cut_to_effective_len
Cut tensors to their effective length based on attention mask.
VRAG-RL/vrag_agent/tensor_helper.py:13
↓ 2 callers
Function
dcg
计算折扣累积增益(DCG) :param relevance_scores: 一个列表,表示每个文档的相关性分数 :return: DCG 值
VRAG-RL/verl/workers/reward_manager/rm.py:71
↓ 2 callers
Method
deactivate_batch
(self, active_mask,rollings)
VRAG-RL/vrag_agent/generation.py:365
↓ 2 callers
Method
execute_all_async
(self, method_name: str, *args, **kwargs)
VRAG-RL/verl/single_controller/ray/base.py:355
↓ 2 callers
Method
execute_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 callers
Method
forward
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 callers
Method
forward
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 callers
Method
forward_backward_batch
(self, data: DataProto, forward_only=False)
VRAG-RL/verl/workers/critic/megatron_critic.py:119
↓ 2 callers
Method
forward_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 callers
Method
from_single_dict
(cls, data: Dict[str, Union[torch.Tensor, np.ndarray]], meta_info=None)
VRAG-RL/verl/protocol.py:307
↓ 2 callers
Method
get_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
← previous
next →
101–200 of 1,037, ranked by callers