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
↓ 2 callers
Function
get_common_default_kwargs_for_parallel_linear
()
VRAG-RL/verl/utils/megatron/tensor_parallel.py:47
↓ 2 callers
Function
get_constant_schedule_with_warmup
( optimizer: Optimizer, num_warmup_steps: int, last_epoch: int = -1, )
VRAG-RL/verl/utils/torch_functional.py:455
↓ 2 callers
Function
get_generation_config
( model: str, trust_remote_code: bool = False, )
VRAG-RL/verl/utils/model.py:58
↓ 2 callers
Function
get_huggingface_actor_config
(model_name: str, override_config_kwargs=None, trust_remote_code=False)
VRAG-RL/verl/utils/model.py:47
↓ 2 callers
Function
get_megatron_optimizer
( model, config: OptimizerConfig, no_weight_decay_cond=None, scale_lr_cond=Non
VRAG-RL/verl/utils/megatron/optimizer.py:27
↓ 2 callers
Function
get_model_config
(model)
VRAG-RL/verl/utils/megatron_utils.py:38
↓ 2 callers
Function
get_num_pixels
(input_ids, token_id)
search_engine/models/GVE/model_utils.py:129
↓ 2 callers
Function
get_seqlen_balanced_partitions
get order of seq lengths to make partitions balanced, this is used in balacing sum of seqlength across dp ranks and microbatches Paramete
VRAG-RL/verl/utils/seqlen_balancing.py:152
↓ 2 callers
Function
get_trajectory_tracker
()
VRAG-RL/verl/utils/debug/trajectory_tracker.py:79
↓ 2 callers
Function
get_version
(pkg)
VRAG-RL/verl/workers/rollout/vllm_rollout/__init__.py:23
↓ 2 callers
Function
get_weight_buffer_meta_from_module
Return a dictionary containing name to a shape and dtype.
VRAG-RL/verl/utils/memory_buffer.py:61
↓ 2 callers
Function
grade_answer
The answer will be considered correct if: (a) it normalizes to the same string as the ground truth answer OR (b) sympy can simplify t
VRAG-RL/verl/utils/reward_score/prime_math/__init__.py:269
↓ 2 callers
Function
init_megatron_optim_config
(optim_config: Dict)
VRAG-RL/verl/utils/megatron_utils.py:200
↓ 2 callers
Function
is_tensor_parallel_param
(param)
VRAG-RL/verl/utils/megatron/tensor_parallel.py:86
↓ 2 callers
Function
is_vllm_available
()
VRAG-RL/verl/utils/import_utils.py:33
↓ 2 callers
Function
list_of_dict_to_dict_of_list
(list_of_dict: list[dict])
VRAG-RL/verl/protocol.py:103
↓ 2 callers
Function
load_fsdp_optimizer
(optimizer, device_id)
VRAG-RL/verl/utils/fsdp_utils.py:164
↓ 2 callers
Method
load_params_to_cuda
load all model params to cuda
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:127
↓ 2 callers
Method
log
(self, data, step)
VRAG-RL/verl/utils/logger/aggregate_logger.py:40
↓ 2 callers
Method
make_iterator
r"""Make an iterator from the DataProto. This is built upon that TensorDict can be used as a normal Pytorch dataset. See https://pytorch.org/t
VRAG-RL/verl/protocol.py:564
↓ 2 callers
Method
make_minibatch_iterator
Make minibatch iterator for updating the actor Args: data (DataProto): a DataProto containing keys ``input_ids``
VRAG-RL/verl/workers/actor/megatron_actor.py:203
↓ 2 callers
Function
makedirs
r"""Works like os.makedirs() but supports hdfs. Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except tha
VRAG-RL/verl/utils/hdfs_io.py:50
↓ 2 callers
Function
math_equal
Exact match of math if and only if: 1. numerical equal: both can convert to float and are equal 2. symbolic equal: both can convert to sy
VRAG-RL/verl/utils/reward_score/prime_math/grader.py:174
↓ 2 callers
Function
md5_encode
(path: str)
VRAG-RL/verl/utils/fs.py:36
↓ 2 callers
Method
merge
(self, other)
VRAG-RL/verl/utils/seqlen_balancing.py:37
↓ 2 callers
Function
normalize
(answer, pi)
VRAG-RL/verl/utils/reward_score/prime_math/grader.py:119
↓ 2 callers
Function
normalize_pp_vpp_params
Normalize the pp vpp params into a complete named parameters. This is useful when gather parameters from pp ranks and passed to a model witho
VRAG-RL/verl/utils/model.py:198
↓ 2 callers
Method
offload_params_to_cpu
(self)
VRAG-RL/verl/workers/reward_model/megatron/reward_model.py:254
↓ 2 callers
Method
process
(self, inputs: List[Dict[str, Any]], normalize: bool = True)
search_engine/models/Qwen3_VL_Embedding/qwen3_vl_embedding.py:373
↓ 2 callers
Method
process_image
(self, image)
demo/vrag_agent.py:31
↓ 2 callers
Function
process_image_to_base64
处理图片并转换为 base64 字符串。 确保图片体积不超过 38KB,同时尊重 max_pixels 限制。 Returns: (base64_str, img, actual_total_pixels)
demo/vimrag_utils.py:10
↓ 2 callers
Function
reduce_metrics
(metrics: Dict[str, List[Any]])
VRAG-RL/verl/trainer/ppo/metric_utils.py:24
↓ 2 callers
Function
remove_text_between_tags
(text)
VRAG-RL/verl/utils/reward_score/vrag.py:61
↓ 2 callers
Method
repeat_deepcopy
Repeat the batch data a specified number of times. Args: repeat_times (int): Number of times to repeat the data.
VRAG-RL/verl/protocol.py:712
↓ 2 callers
Function
repeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=1, repeats=n_rep). The hidden states go from (batch, num_key_value_heads, seqlen, he
VRAG-RL/verl/models/llama/megatron/layers/parallel_attention.py:131
↓ 2 callers
Method
run
Run the VimRAG agent on a sample query. Yields progress events in real-time. Args: sample: Dict with 'query' key
demo/vimrag_agent.py:339
↓ 2 callers
Method
run_llm_loop
Run main LLM generation loop.
VRAG-RL/vrag_agent/generation.py:372
↓ 2 callers
Function
set_ulysses_sequence_parallel_group
Set ulysses sequence parallel process group.
VRAG-RL/verl/utils/ulysses.py:29
↓ 2 callers
Function
split_tuple
Split the elements in a tuple/interval, while handling well-formatted commas in large numbers
VRAG-RL/verl/utils/reward_score/prime_math/__init__.py:254
↓ 2 callers
Function
stripped_string_compare
(s1, s2)
VRAG-RL/verl/utils/reward_score/prime_code/testing_util.py:611
↓ 2 callers
Function
typewriter_effect
(container, text, delay=0.02)
demo/app.py:14
↓ 2 callers
Method
update_options
(self, options: Dict)
VRAG-RL/verl/single_controller/ray/base.py:159
↓ 2 callers
Method
update_policy
Update the policy with an iterator of DataProto Args: data (DataProto): an iterator over the DataProto that returns by
VRAG-RL/verl/workers/actor/base.py:54
↓ 2 callers
Method
update_sampling_params
(self, **kwargs)
VRAG-RL/verl/workers/rollout/vllm_rollout/fire_vllm_rollout.py:86
↓ 2 callers
Method
validation_step
(self, batch: TensorDict)
VRAG-RL/verl/trainer/fsdp_sft_trainer.py:420
↓ 2 callers
Method
visual
(self)
search_engine/models/Qwen3_VL_Embedding/qwen3_vl_embedding.py:80
↓ 1 callers
Method
__init__
(self, numel: int, numel_padded: int, dtype: torch.dtype, source: Optional[torch.Tensor] = None)
VRAG-RL/verl/utils/memory_buffer.py:30
↓ 1 callers
Method
__init__
(self, resource_pool: RayResourcePool, ray_cls_with_init: RayClassWithInitAr
VRAG-RL/verl/single_controller/ray/megatron.py:44
↓ 1 callers
Method
__init__
(self, config: Qwen2Config, megatron_config: ModelParallelConfig)
VRAG-RL/verl/models/qwen2/megatron/layers/parallel_decoder.py:37
↓ 1 callers
Method
__init__
(self, input_size, num_heads, num_key_value_heads,
VRAG-RL/verl/models/qwen2/megatron/layers/parallel_linear.py:23
↓ 1 callers
Method
__init__
(self, config: LlamaConfig, megatron_config: ModelParallelConfig)
VRAG-RL/verl/models/llama/megatron/layers/parallel_decoder.py:37
↓ 1 callers
Method
__init__
(self, input_size, num_heads, num_key_value_heads,
VRAG-RL/verl/models/llama/megatron/layers/parallel_linear.py:23
↓ 1 callers
Method
__init__
( self, model_name_or_path: str, max_length: int = MAX_LENGTH, min_pixels: i
search_engine/models/Qwen3_VL_Embedding/qwen3_vl_embedding.py:161
↓ 1 callers
Method
_add_noisy_multi_modal_data
(self, rollings, original_right_side)
VRAG-RL/vrag_agent/generation.py:513
↓ 1 callers
Method
_balance_batch
Reorder the data on single controller such that each dp rank gets similar total tokens
VRAG-RL/verl/trainer/ppo/ray_trainer.py:658
↓ 1 callers
Method
_bind_worker_method
Bind the worker method to the WorkerGroup
VRAG-RL/verl/single_controller/base/worker_group.py:138
↓ 1 callers
Function
_bind_workers_method_to_parent
Binds the methods of each worker to the WorkerDict. Note that we only bind public methods that are decorated by register
VRAG-RL/verl/single_controller/ray/base.py:400
↓ 1 callers
Method
_block_until_all_workers_alive
(self)
VRAG-RL/verl/single_controller/base/worker_group.py:115
↓ 1 callers
Function
_broadcast_tp_shard_tensor_gate_up
broadcast tensor in tp shards across mp_group
VRAG-RL/verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:227
↓ 1 callers
Function
_broadcast_tp_shard_tensor_gate_up
broadcast tensor in tp shards across mp_group
VRAG-RL/verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:206
↓ 1 callers
Function
_broadcast_tp_shard_tensor_gate_up
broadcast tensor in tp shards across mp_group
VRAG-RL/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:209
↓ 1 callers
Function
_broadcast_tp_shard_tensor_gate_up
broadcast tensor in tp shards across mp_group
VRAG-RL/verl/models/llama/megatron/checkpoint_utils/llama_loader.py:231
↓ 1 callers
Function
_broadcast_tp_shard_tensor_qkv
broadcast tensor in tp shards across mp_group
VRAG-RL/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:262
↓ 1 callers
Function
_broadcast_tp_shard_tensor_qkv
broadcast tensor in tp shards across mp_group
VRAG-RL/verl/models/llama/megatron/checkpoint_utils/llama_loader.py:285
↓ 1 callers
Function
_broadcast_tp_shard_tensor_vocab
broadcast tensor in tp shards across mp_group
VRAG-RL/verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:134
↓ 1 callers
Function
_broadcast_tp_shard_tensor_vocab
broadcast tensor in tp shards across mp_group
VRAG-RL/verl/models/llama/megatron/checkpoint_utils/llama_loader.py:138
↓ 1 callers
Method
_build_critic_model_optimizer
(self, model_path, megatron_config
VRAG-RL/verl/workers/megatron_workers.py:526
↓ 1 callers
Method
_build_critic_model_optimizer
(self, config)
VRAG-RL/verl/workers/fsdp_workers.py:660
↓ 1 callers
Method
_build_dataloader
(self)
VRAG-RL/verl/trainer/fsdp_sft_trainer.py:121
↓ 1 callers
Method
_build_initial_messages
Build initial messages for the model.
demo/vimrag_agent.py:241
↓ 1 callers
Method
_build_model
(self, config)
VRAG-RL/verl/workers/fsdp_workers.py:935
↓ 1 callers
Method
_build_model_optimizer
(self)
VRAG-RL/verl/trainer/fsdp_sft_trainer.py:181
↓ 1 callers
Method
_build_param_buffer
Build the parameter buffer in each pp rank
VRAG-RL/verl/workers/sharding_manager/megatron_vllm.py:84
↓ 1 callers
Method
_build_rm_model
(self, model_path, megatron_config: ModelParallelConfig, override_model_config)
VRAG-RL/verl/workers/megatron_workers.py:703
↓ 1 callers
Method
_build_rollout
(self)
VRAG-RL/verl/workers/megatron_workers.py:238
↓ 1 callers
Method
_build_rollout
(self)
VRAG-RL/verl/workers/fsdp_workers.py:298
↓ 1 callers
Function
_check_and_sort_partitions
(partitions)
VRAG-RL/verl/utils/seqlen_balancing.py:170
↓ 1 callers
Function
_check_dispatch_mode
(dispatch_mode)
VRAG-RL/verl/single_controller/base/decorator.py:366
↓ 1 callers
Function
_check_execute_mode
(execute_mode)
VRAG-RL/verl/single_controller/base/decorator.py:375
↓ 1 callers
Method
_check_resource_available
Check if the resource pool can be satisfied in this ray cluster.
VRAG-RL/verl/trainer/ppo/ray_trainer.py:105
↓ 1 callers
Method
_compose_final_output
Compose final generation output.
VRAG-RL/vrag_agent/generation.py:545
↓ 1 callers
Function
_compute_mlflow_params_from_objects
(params)
VRAG-RL/verl/utils/tracking.py:133
↓ 1 callers
Method
_concat_multi_modal_data
(self, rollings, next_obs_multi_modal_data:list, next_obs_multi_modal_inputs:list)
VRAG-RL/vrag_agent/generation.py:191
↓ 1 callers
Method
_configure_before_init
(self, register_center_name: str, rank: int)
VRAG-RL/verl/single_controller/base/worker.py:101
↓ 1 callers
Method
_configure_with_meta
This function should only be called inside by WorkerGroup
VRAG-RL/verl/single_controller/base/worker.py:178
↓ 1 callers
Function
_copy
(from_path: str, to_path: str, timeout: int = None)
VRAG-RL/verl/utils/hdfs_io.py:113
↓ 1 callers
Method
_create_dataloader
(self)
VRAG-RL/verl/trainer/ppo/ray_trainer.py:405
↓ 1 callers
Method
_create_loss_mask
Create loss mask for state tokens.
VRAG-RL/verl/trainer/ppo/ray_trainer.py:887
↓ 1 callers
Method
_download
(self)
VRAG-RL/verl/utils/dataset/rm_dataset.py:70
↓ 1 callers
Method
_download
(self)
VRAG-RL/verl/utils/dataset/sft_dataset.py:69
↓ 1 callers
Function
_exists
hdfs capable to check whether a file_path is exists
VRAG-RL/verl/utils/hdfs_io.py:43
↓ 1 callers
Function
_expand_mask
Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
VRAG-RL/verl/utils/torch_functional.py:502
↓ 1 callers
Function
_expand_mask
Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
VRAG-RL/verl/models/qwen2/megatron/modeling_qwen2_megatron.py:59
↓ 1 callers
Function
_expand_mask
Expands attention_mask from `[bsz, seq_len]` to `[bsz, 1, tgt_seq_len, src_seq_len]`.
VRAG-RL/verl/models/llama/megatron/modeling_llama_megatron.py:60
↓ 1 callers
Method
_expand_to_token_level
(self, data: DataProto, scores: torch.Tensor)
VRAG-RL/verl/workers/fsdp_workers.py:1057
↓ 1 callers
Function
_fix_a_slash_b
(string)
VRAG-RL/verl/utils/reward_score/prime_math/math_normalize.py:89
↓ 1 callers
Function
_fix_fracs
(string)
VRAG-RL/verl/utils/reward_score/prime_math/math_normalize.py:57
↓ 1 callers
Function
_fix_sqrt
(string)
VRAG-RL/verl/utils/reward_score/prime_math/math_normalize.py:114
↓ 1 callers
Function
_flatten_dict
(raw: Dict[str, Any], *, sep: str)
VRAG-RL/verl/utils/tracking.py:160
↓ 1 callers
Method
_forward_head
(self, hidden_states)
VRAG-RL/verl/models/qwen2/megatron/modeling_qwen2_megatron.py:305
← previous
next →
201–300 of 1,037, ranked by callers