MCPcopy Create free account

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

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

Method__lt__
(self, other)
VRAG-RL/verl/utils/seqlen_balancing.py:81
Method__new__
(cls, *args, **kwargs)
VRAG-RL/verl/single_controller/base/worker.py:84
Method__post_init__
(self)
VRAG-RL/verl/protocol.py:187
Method__repr__
(self)
VRAG-RL/verl/utils/seqlen_balancing.py:89
Method__setstate__
(self, data)
VRAG-RL/verl/protocol.py:245
Function_default_compute_score
(data_source, solution_str, ground_truth, extra_info=None)
VRAG-RL/verl/utils/reward_score/__init__.py:17
Method_download_files
()
VRAG-RL/verl/utils/dataset/rm_dataset.py:72
Method_estimate_qwen2_flops
(self, tokens_sum, batch_seqlens, delta_time)
VRAG-RL/verl/utils/flops_counter.py:80
Method_estimate_unknown_flops
(self, tokens_sum, batch_seqlens, delta_time)
VRAG-RL/verl/utils/flops_counter.py:77
Method_forward_head
(self, hidden_states)
VRAG-RL/verl/models/qwen2/megatron/modeling_qwen2_megatron.py:381
Method_forward_head
(self, hidden_states)
VRAG-RL/verl/models/qwen2/megatron/modeling_qwen2_megatron.py:696
Method_forward_head
(self, hidden_states)
VRAG-RL/verl/models/llama/megatron/modeling_llama_megatron.py:382
Method_forward_head
(self, hidden_states)
VRAG-RL/verl/models/llama/megatron/modeling_llama_megatron.py:644
Method_get_pid
(self)
VRAG-RL/verl/single_controller/base/worker.py:64
Method_init_head
(self, config)
VRAG-RL/verl/models/qwen2/megatron/modeling_qwen2_megatron.py:372
Method_init_head
(self, config)
VRAG-RL/verl/models/qwen2/megatron/modeling_qwen2_megatron.py:687
Method_init_head
(self, config)
VRAG-RL/verl/models/llama/megatron/modeling_llama_megatron.py:373
Method_init_head
(self, config)
VRAG-RL/verl/models/llama/megatron/modeling_llama_megatron.py:635
Method_is_worker_alive
(self, worker: ray.actor.ActorHandle)
VRAG-RL/verl/single_controller/ray/base.py:225
Method_maybe_log_val_generations
Log a table of validation samples to the configured logger (wandb or swanlab)
VRAG-RL/verl/trainer/ppo/ray_trainer.py:480
Method_postprocess_responses_first
(self,batch)
VRAG-RL/vrag_agent/generation.py:82
Method_rebind_actor_methods
bind the method with actor_prefix to its original name
VRAG-RL/verl/single_controller/ray/base.py:318
Method_set_cos_sin_cache
(self, seq_len, device, dtype)
VRAG-RL/verl/models/qwen2/megatron/layers/parallel_attention.py:79
Method_set_cos_sin_cache
(self, seq_len, device, dtype)
VRAG-RL/verl/models/qwen2/megatron/layers/parallel_attention.py:98
Method_set_cos_sin_cache
(self, seq_len, device, dtype)
VRAG-RL/verl/models/llama/megatron/layers/parallel_attention.py:79
Method_set_cos_sin_cache
(self, seq_len, device, dtype)
VRAG-RL/verl/models/llama/megatron/layers/parallel_attention.py:98
Method_shape
(self, tensor: torch.Tensor, seq_len: int, bsz: int)
VRAG-RL/verl/models/qwen2/megatron/layers/parallel_attention.py:215
Method_shape
(self, tensor: torch.Tensor, seq_len: int, bsz: int)
VRAG-RL/verl/models/llama/megatron/layers/parallel_attention.py:231
Function_temp_run
(sample, generation, debug, result, metadata_list, timeout)
VRAG-RL/verl/utils/reward_score/prime_code/utils.py:25
Method_truncate_tokens
(self, token_ids: List[int], max_length: int)
search_engine/models/Qwen3_VL_Embedding/qwen3_vl_embedding.py:201
Functionadd_answer_node
添加答案节点
demo/vimrag_app.py:644
Methodadd_node
(self, process_count)
VRAG-RL/verl/single_controller/base/worker_group.py:36
Methodall_special_ids
`List[int]`: List the ids of the special tokens(`'<unk>'`, `'<cls>'`, etc.) mapped to class attributes.
VRAG-RL/verl/workers/rollout/tokenizer.py:53
Methodall_special_tokens
`List[str]`: A list of the unique special tokens (`'<unk>'`, `'<cls>'`, ..., etc.). Convert tokens of `tokenizers.AddedToken` type t
VRAG-RL/verl/workers/rollout/tokenizer.py:61
Functionapply_monkey_patch_to_llama
()
VRAG-RL/verl/models/transformers/monkey_patch.py:19
Functionapply_monkey_patch_to_qwen2
()
VRAG-RL/verl/models/transformers/monkey_patch.py:30
Functionapply_rotary_pos_emb_rmpad
(q, k, cos, sin, position_ids, indices, sequence_length)
VRAG-RL/verl/models/qwen2/megatron/layers/parallel_attention.py:283
Functionapply_rotary_pos_emb_rmpad
(q, k, cos, sin, position_ids, indices, sequence_length)
VRAG-RL/verl/models/llama/megatron/layers/parallel_attention.py:299
Methodbackward
(ctx: Any, *grad_output: Tensor)
VRAG-RL/verl/utils/ulysses.py:182
Methodbackward
(ctx, grad_output: torch.Tensor)
VRAG-RL/verl/utils/megatron/tensor_parallel.py:123
Methodbuild_memory_reference
(self)
VRAG-RL/verl/utils/memory_buffer.py:202
Functioncheck_correctness
Check correctness of code generation with a global timeout. The global timeout is to catch some extreme/rare cases not handled by the timeouts
VRAG-RL/verl/utils/reward_score/prime_code/utils.py:40
Methodcheck_mutually_exclusive
(mbs, mbs_per_gpu, name: str)
VRAG-RL/verl/trainer/ppo/ray_trainer.py:325
Functioncheck_workers_alive
(workers: List, is_alive: Callable, gap_time: float = 1)
VRAG-RL/verl/single_controller/base/worker_group.py:82
Methodchunk
(self, chunks: int)
VRAG-RL/verl/protocol.py:786
Functionclip_by_value
Tensor extenstion to torch.clamp https://github.com/pytorch/pytorch/issues/2793#issuecomment-428784713
VRAG-RL/verl/utils/torch_functional.py:97
Functioncollate_fn
(x: list['DataProtoItem'])
VRAG-RL/verl/protocol.py:154
Functioncollate_fn
(data_list: list[dict])
VRAG-RL/verl/utils/dataset/rl_dataset.py:31
Functioncollect_all_to_all
(worker_group, output)
VRAG-RL/verl/single_controller/base/decorator.py:70
Functioncollect_dp_compute_data_proto
(worker_group, output)
VRAG-RL/verl/single_controller/base/decorator.py:289
Functioncollect_megatron_compute_data_proto
Each output must be a DataProto. We concat the dim=0 of output
VRAG-RL/verl/single_controller/base/decorator.py:147
Functioncollect_megatron_pp_as_dp_data_proto
(worker_group, output)
VRAG-RL/verl/single_controller/base/decorator.py:246
Functioncollect_megatron_pp_only
Only collect output of megatron pp. This is useful when examine weight names as they are identical in tp/dp
VRAG-RL/verl/single_controller/base/decorator.py:223
Functioncompute_entropy_loss
Compute Categorical entropy loss Args: logits: `(torch.Tensor)` shape: (bs, response_length, vocab_size) eos_mask: `(
VRAG-RL/verl/trainer/ppo/core_algos.py:306
Functioncompute_gae_advantage_return
Adapted from https://github.com/huggingface/trl/blob/main/trl/trainer/ppo_trainer.py Args: token_level_rewards: `(torch.Tensor)`
VRAG-RL/verl/trainer/ppo/core_algos.py:70
Functioncompute_grad_norm
(model: nn.Module)
VRAG-RL/verl/utils/torch_functional.py:170
Functioncompute_grpo_outcome_advantage
Compute advantage for GRPO, operating only on Outcome reward (with only one scalar reward for each response). Args: token_level_
VRAG-RL/verl/trainer/ppo/core_algos.py:111
Methodcompute_log_prob
Compute the log probability of the responses given input_ids, attention_mask and position_ids Args: data (DataProto): a DataProto
VRAG-RL/verl/workers/actor/megatron_actor.py:142
Methodcompute_log_prob
Compute the log probability of the responses given input_ids, attention_mask and position_ids Args: data (DataProto): a DataProto
VRAG-RL/verl/workers/actor/dp_actor.py:171
Methodcompute_logprobs_fn
(output, data)
VRAG-RL/verl/workers/actor/megatron_actor.py:162
Functioncompute_policy_loss
Adapted from https://github.com/huggingface/trl/blob/main/trl/trainer/ppo_trainer.py#L1122 Args: old_log_prob: `(torch.Tensor)`
VRAG-RL/verl/trainer/ppo/core_algos.py:272
Methodcompute_ref_log_prob
(self, data: DataProto)
VRAG-RL/verl/workers/megatron_workers.py:406
Functioncompute_reinforce_plus_plus_outcome_advantage
Compute advantage for REINFORCE++. This implementation is based on the paper: https://arxiv.org/abs/2501.03262 Args: token_level
VRAG-RL/verl/trainer/ppo/core_algos.py:202
Functioncompute_remax_outcome_advantage
Compute advantage for ReMax, operating only on Outcome reward This implementation is based on the paper: https://arxiv.org/abs/2310.10505
VRAG-RL/verl/trainer/ppo/core_algos.py:236
Methodcompute_reward
(self, data: DataProto)
VRAG-RL/verl/workers/reward_model/megatron/reward_model.py:118
Functioncompute_rewards
(token_level_scores, old_log_prob, ref_log_prob, kl_ratio)
VRAG-RL/verl/trainer/ppo/core_algos.py:267
Functioncompute_rloo_outcome_advantage
Compute advantage for RLOO based on https://arxiv.org/abs/2402.14740 Args: token_level_rewards: `(torch.Tensor)` shape: (
VRAG-RL/verl/trainer/ppo/core_algos.py:157
Methodcompute_rm_score
(self, data: DataProto)
VRAG-RL/verl/workers/megatron_workers.py:812
Functioncompute_score
(predict_str: str, ground_truth: str)
VRAG-RL/verl/utils/reward_score/geo3k.py:30
Functioncompute_score
(predict_str: str, ground_truth: str, extra_info)
VRAG-RL/verl/utils/reward_score/vrag.py:48
Functioncompute_score
The scoring function for GSM8k. Reference: Trung, Luong, et al. "Reft: Reasoning with reinforced fine-tuning." Proceedings of the 62nd Annual Mee
VRAG-RL/verl/utils/reward_score/gsm8k.py:44
Functioncompute_score
(model_output: str, ground_truth: str)
VRAG-RL/verl/utils/reward_score/math_verify.py:19
Functioncompute_score
(completion, test_cases, continuous=False)
VRAG-RL/verl/utils/reward_score/prime_code/__init__.py:21
Functioncompute_score
(model_output: str, ground_truth: str)
VRAG-RL/verl/utils/reward_score/prime_math/__init__.py:408
Functioncompute_value_loss
Compute the value loss. Copied from https://github.com/huggingface/trl/blob/main/trl/trainer/ppo_trainer.py#L1151 Args: vpreds (`torch.Fl
VRAG-RL/verl/trainer/ppo/core_algos.py:325
Methodcompute_values
(self, data: DataProto)
VRAG-RL/verl/workers/megatron_workers.py:632
Methodcompute_values
Compute values
VRAG-RL/verl/workers/critic/base.py:33
Methodcompute_values
(self, data: DataProto)
VRAG-RL/verl/workers/critic/megatron_critic.py:83
Methodcompute_values
(self, data: DataProto)
VRAG-RL/verl/workers/critic/dp_critic.py:125
Methodconcat
(data: List[ray.ObjectRef])
VRAG-RL/verl/protocol.py:782
Methodconvert_ids_to_tokens
Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and added tokens.
VRAG-RL/verl/workers/rollout/tokenizer.py:116
Methodconvert_tokens_to_string
Converts a sequence of tokens in a single string. The most simple way to do it is `" ".join(tokens)` but we often want to remove sub-
VRAG-RL/verl/workers/rollout/tokenizer.py:147
Methodcot_collect
(self,sample)
VRAG-RL/scripts/data_construct_pipeline.py:192
Functioncreate_huggingface_critic
Args: model_name: override_config_kwargs: Returns:
VRAG-RL/verl/utils/model.py:98
Functioncreate_nccl_communicator_in_ray
(rank: int, world_size: int, group_nam
VRAG-RL/verl/utils/rendezvous/ray_backend.py:47
Functioncreate_random_mask
Create a random mask given input_ids. Support left padding and right padding. Process: - Sample valid token length - Sample left_padding l
VRAG-RL/verl/utils/model.py:153
Methoddecode
This method forwards all its arguments to Qwen2TokenizerFast's [`~PreTrainedTokenizer.decode`]. Please refer to the docstring of this
search_engine/models/GVE/qwen25vl/qwen25vl_processor.py:186
Functiondecorator
(func)
VRAG-RL/verl/utils/reward_score/prime_math/__init__.py:42
Functiondecorator
(func)
VRAG-RL/verl/single_controller/base/decorator.py:398
Functiondispatch_all_to_all
(worker_group, *args, **kwargs)
VRAG-RL/verl/single_controller/base/decorator.py:66
Functiondispatch_dp_compute
(worker_group, *args, **kwargs)
VRAG-RL/verl/single_controller/base/decorator.py:255
Functiondispatch_dp_compute_data_proto
(worker_group, *args, **kwargs)
VRAG-RL/verl/single_controller/base/decorator.py:272
Functiondispatch_dp_compute_data_proto_with_func
(worker_group, *args, **kwargs)
VRAG-RL/verl/single_controller/base/decorator.py:279
Functiondispatch_megatron_compute_data_proto
All the args and kwargs must be DataProto. The batch will be chunked by dp_size and passed to each rank
VRAG-RL/verl/single_controller/base/decorator.py:118
Functiondispatch_megatron_pp_as_dp_data_proto
(worker_group, *args, **kwargs)
VRAG-RL/verl/single_controller/base/decorator.py:237
Functiondispatch_one_to_all
(worker_group, *args, **kwargs)
VRAG-RL/verl/single_controller/base/decorator.py:60
Methoddp_size
(self)
VRAG-RL/verl/single_controller/base/megatron/worker_group.py:41
Functionentropy_from_logits
Calculate entropy from logits.
VRAG-RL/verl/utils/torch_functional.py:106
Methodeos_token_id
`Optional[int]`: Id of the end of sentence token in the vocabulary. Returns `None` if the token has not been set.
VRAG-RL/verl/workers/rollout/tokenizer.py:44
Methodexecute_all
(self, method_name: str, *args, **kwargs)
VRAG-RL/verl/single_controller/ray/base.py:349
← previousnext →701–800 of 1,037, ranked by callers