MCPcopy Create free account

hub / github.com/CarlanLark/Lp-Reg-dev / functions

Functions1,299 in github.com/CarlanLark/Lp-Reg-dev

↓ 1 callersFunctionbuild_memory_reference
Build the memory references. The memory buffers are built using the build_memory_buffer API. This API will allocate a weight buffer pointer to the
verl/utils/memory_buffer.py:113
↓ 1 callersFunctioncalc_pass_at_k_bool
Calculate pass@k metric for boolean pass indicators. Pass@k is the probability that at least one sample in a random subset of k samples
verl/trainer/ppo/metric_utils.py:324
↓ 1 callersMethodcalc_reward
Calculate the reward of the tool. Args: instance_id: The instance id of the tool. Returns: The reward of the
verl/tools/base_tool.py:69
↓ 1 callersMethodcalc_reward
(self, instance_id: str, **kwargs)
verl/tools/gsm8k_tool.py:94
↓ 1 callersFunctioncall_method
(method, inputs)
verl/utils/reward_score/prime_code/testing_util.py:530
↓ 1 callersFunctionceildiv
(a, b)
verl/utils/seqlen_balancing.py:211
↓ 1 callersFunctioncheck_correctness
Checks the correctness of code generation using the remote sandbox API, processing test cases concurrently. Args: sandbox_fusion
verl/utils/reward_score/sandbox_fusion/utils.py:367
↓ 1 callersFunctioncollect_dp_compute
(worker_group, output)
verl/single_controller/base/decorator.py:342
↓ 1 callersFunctioncollect_megatron_compute
Only collect the data from the tp=0 and pp=last and every dp ranks
verl/single_controller/base/decorator.py:166
↓ 1 callersFunctioncollect_megatron_pp_as_dp
treat pp as dp. Only collect data on tp=0
verl/single_controller/base/decorator.py:281
↓ 1 callersMethodcompute_log_prob
(self, data: DataProto)
verl/workers/megatron_workers.py:464
↓ 1 callersMethodcompute_minp_log_prob
(self, data: DataProto)
verl/workers/fsdp_workers.py:737
↓ 1 callersFunctioncompute_policy_loss_8020_split
Adapted from https://github.com/huggingface/trl/blob/main/trl/trainer/ppo_trainer.py#L1122 Args: old_log_prob: `(torch.Tensor)`
verl/trainer/ppo/core_algos.py:497
↓ 1 callersFunctioncompute_policy_loss_clip_cov
( old_log_prob, log_prob, advantages, response_mask, cliprange=None, cliprange_low=Non
verl/trainer/ppo/core_algos.py:747
↓ 1 callersFunctioncompute_policy_loss_gspo
Compute the clipped policy objective and related metrics for GSPO. See https://arxiv.org/pdf/2507.18071 for more details. Args:
verl/trainer/ppo/core_algos.py:433
↓ 1 callersFunctioncompute_policy_loss_kl_cov
( old_log_prob, log_prob, advantages, response_mask, cliprange=None, cliprange_low=Non
verl/trainer/ppo/core_algos.py:591
↓ 1 callersFunctioncompute_policy_loss_lp_reg
( old_log_prob, log_prob, pos_tgt_log_prob, neg_tgt_log_prob, advantages, response_mas
verl/trainer/ppo/core_algos.py:648
↓ 1 callersMethodcompute_reward
Computing reward given input_ids. The transformers should output a tensor with shape [batch_size, sequence_length], and the value at [EOS]
verl/workers/reward_model/base.py:28
↓ 1 callersFunctioncompute_score
(solution_str, ground_truth)
verl/utils/reward_score/math.py:17
↓ 1 callersFunctionconcat_dict_to_str
(dict: Dict, step)
verl/utils/logger/aggregate_logger.py:23
↓ 1 callersFunctionconvert_gate_up_shard
(full_tensor, gate_name, up_name)
verl/utils/megatron_utils.py:489
↓ 1 callersFunctionconvert_qkv_shard
(full_tensor, q_name, k_name, v_name)
verl/utils/megatron_utils.py:441
↓ 1 callersFunctionconvert_to_regular_types
Convert Hydra configs and other special types to regular Python types.
verl/trainer/fsdp_sft_trainer.py:71
↓ 1 callersFunctioncount_unknown_letters_in_expr
(expr: str)
verl/utils/reward_score/prime_math/__init__origin.py:193
↓ 1 callersFunctioncount_unknown_letters_in_expr
(expr: str)
verl/utils/reward_score/prime_math/__init__.py:861
↓ 1 callersFunctioncreate_colocated_worker_cls
This function should return a class instance that delegates the calls to every cls in cls_dict
verl/single_controller/ray/base.py:507
↓ 1 callersFunctioncreate_colocated_worker_raw_cls
This function returns a FusedWorker class. `FusedWorker.{class_name}` -> FusedClass Use `class_name` as a param to directly access t
verl/single_controller/ray/base.py:550
↓ 1 callersFunctioncreate_huggingface_actor
Args: model_name: override_config_kwargs: Returns:
verl/utils/model.py:89
↓ 1 callersMethodcreate_resource_pool
(self)
verl/trainer/ppo/ray_trainer.py:104
↓ 1 callersFunctioncreate_rl_sampler
Create a sampler for the dataset. Arguments: data_config: The data config. dataset (Dataset): The dataset. Returns:
recipe/dapo/main_dapo.py:222
↓ 1 callersFunctioncreate_worker_group_register_center
(name, info)
verl/single_controller/base/register_center/ray.py:37
↓ 1 callersFunctioncustom_compare_
(output, ground_truth)
verl/utils/reward_score/prime_code/testing_util.py:509
↓ 1 callersFunctiondefault_tp_concat_fn
name: name of the parameter train_params: training parameters infer_params (Iterable[torch.Tensor]): a iterator towards list of parameter
verl/utils/megatron_utils.py:628
↓ 1 callersMethoddispatch_fn
(x, i, chunks)
verl/protocol.py:783
↓ 1 callersFunctiondispatch_megatron_compute
User passes in dp data. The data is dispatched to all tp/pp ranks with the same dp
verl/single_controller/base/decorator.py:137
↓ 1 callersFunctiondispatch_megatron_pp_as_dp
treat pp as dp.
verl/single_controller/base/decorator.py:228
↓ 1 callersFunctiondownload_files_distributed
(download_fn)
verl/utils/dataset/rm_dataset.py:25
↓ 1 callersFunctiondump_data
(data, name)
verl/utils/debug/trajectory_tracker.py:69
↓ 1 callersMethodexecute
Execute the tool. Args: instance_id: The instance id of the tool. parameters: The json string of the parameters of th
verl/tools/base_tool.py:55
↓ 1 callersFunctionextract_boxed_answer
Extract the answer from inside a LaTeX \\boxed{} command
verl/utils/reward_score/prime_math/__init__.py:955
↓ 1 callersFunctionextract_solution
(solution_str, method="strict")
verl/utils/reward_score/gsm8k.py:18
↓ 1 callersMethodfinalize
( self, tokenizer: PreTrainedTokenizer, reward_scores: Dict[str, float], finis
verl/workers/rollout/schemas.py:190
↓ 1 callersFunctionfind_latest_ckpt_path
(path, directory_format="global_step_{}")
verl/utils/checkpoint/checkpoint_manager.py:124
↓ 1 callersMethodfit
The training loop of PPO. The driver process only need to call the compute functions of the worker group through RPC to const
recipe/dapo/dapo_ray_trainer.py:49
↓ 1 callersMethodfit
(self)
verl/trainer/fsdp_sft_trainer.py:431
↓ 1 callersMethodfit
The training loop of PPO. The driver process only need to call the compute functions of the worker group through RPC to const
verl/trainer/ppo/ray_trainer.py:923
↓ 1 callersFunctionfix_a_slash_b
(string)
verl/utils/reward_score/math.py:122
↓ 1 callersFunctionfix_fracs
(string)
verl/utils/reward_score/math.py:90
↓ 1 callersFunctionfix_sqrt
(string)
verl/utils/reward_score/math.py:147
↓ 1 callersFunctionflash_attention_forward
Patches flash attention forward to handle 3D position ids in mrope. (3, batch_size, seq_length)
verl/models/transformers/qwen2_vl.py:159
↓ 1 callersFunctionformat_intervals
(prediction)
verl/utils/reward_score/prime_math/grader.py:319
↓ 1 callersFunctionformat_reward
(predict_str: str)
verl/utils/reward_score/geo3k.py:20
↓ 1 callersMethodforward
(self, *inputs, **kwargs)
verl/workers/sharding_manager/megatron_vllm.py:168
↓ 1 callersMethodforward_batch
We assume: - The model takes input: (input_ids, attention_mask, position_ids). No rmpad for the input - The communication sha
verl/workers/reward_model/megatron/reward_model.py:187
↓ 1 callersMethodfrom_detached
( cls, name_prefix, worker_names=None, worker_handles=None, ray_cls_wi
verl/single_controller/ray/base.py:323
↓ 1 callersMethodfrom_openai_function_parsed_schema
(parsed_schema: OpenAIFunctionParsedSchema)
verl/tools/schemas.py:67
↓ 1 callersMethodfrom_str
(cls, value: str)
verl/workers/rollout/schemas.py:35
↓ 1 callersFunctionfunc_generator
(self, method_name, dispatch_fn, collect_fn, execute_fn, blocking)
verl/single_controller/ray/base.py:43
↓ 1 callersFunctiongather_from_labels
Gather the label from data. The value in label should be [0, vocab_size) Args: data: (..., vocab_size) label (torch.IntTensor) :
verl/utils/torch_functional.py:39
↓ 1 callersFunctiongenerate_function
(name, key=key)
verl/single_controller/ray/base.py:463
↓ 1 callersMethodgenerate_sequences_with_tools
(self, prompts: DataProto, **kwargs)
verl/workers/rollout/sglang_rollout/async_sglang_rollout.py:572
↓ 1 callersMethodget_availale_master_addr_port
(self)
verl/single_controller/base/worker.py:67
↓ 1 callersFunctionget_checkpoint_tracker_filename
Tracker file rescords the latest chckpoint during training to restart from.
verl/utils/checkpoint/checkpoint_manager.py:144
↓ 1 callersFunctionget_custom_reward_fn
(config)
verl/trainer/main_eval.py:31
↓ 1 callersFunctionget_custom_reward_fn
(config)
verl/trainer/ppo/reward.py:25
↓ 1 callersFunctionget_default_model_parallel_config
()
verl/utils/megatron/tensor_parallel.py:44
↓ 1 callersFunctionget_device_flops
(unit="T")
verl/utils/flops_counter.py:21
↓ 1 callersMethodget_generation_prompt
(self, tokenizer: PreTrainedTokenizer)
verl/workers/rollout/schemas.py:97
↓ 1 callersFunctionget_local_temp_path
Generate a unique local cache path for an HDFS resource. Creates a MD5-hashed subdirectory in cache_dir to avoid name conflicts, then returns
verl/utils/fs.py:42
↓ 1 callersMethodget_megatron_global_info
(self)
verl/single_controller/base/megatron/worker.py:22
↓ 1 callersFunctionget_model_size
(model: nn.Module, scale="auto")
verl/utils/model.py:127
↓ 1 callersFunctionget_nccl_id_store_by_name
(name)
verl/utils/rendezvous/ray_backend.py:32
↓ 1 callersMethodget_partitions
(self)
verl/utils/seqlen_balancing.py:56
↓ 1 callersFunctionget_predefined_dispatch_fn
(dispatch_mode)
verl/single_controller/base/decorator.py:430
↓ 1 callersFunctionget_predefined_execute_fn
Note that here we only asks execute_all and execute_rank_zero to be implemented Leave the choice of how these two functions handle argument '
verl/single_controller/base/decorator.py:453
↓ 1 callersFunctionget_random_string
(length: int)
verl/single_controller/ray/base.py:35
↓ 1 callersMethodget_rng_state
collect rng state across data parallel ranks
verl/utils/checkpoint/megatron_checkpoint_manager.py:94
↓ 1 callersFunctionget_rope_index
Gets the position ids for Qwen2-VL, it should be generated before sharding the sequence. The batch dim has been removed and the input_ids sho
verl/models/transformers/qwen2_vl.py:43
↓ 1 callersMethodget_rope_scaling_args
Get rope scaling args.
verl/models/mcore/model_initializer.py:39
↓ 1 callersMethodget_supported_archs
()
verl/models/registry.py:57
↓ 1 callersFunctionget_tool_call_parser_type
(tokenizer: PreTrainedTokenizer)
verl/workers/rollout/sglang_rollout/async_sglang_rollout.py:65
↓ 1 callersMethodget_transformer_layer_spec
Get the transformer layer specification. https://github.com/NVIDIA/Megatron-LM/blob/main/megatron/core/models/gpt/gpt_layer_specs.py
verl/models/mcore/model_initializer.py:34
↓ 1 callersFunctionget_ulysses_sequence_parallel_rank
Get ulysses sequence parallel rank.
verl/utils/ulysses.py:54
↓ 1 callersFunctionget_version
(pkg)
verl/workers/rollout/vllm_rollout/__init__.py:20
↓ 1 callersFunctionget_weight_loader
(arch: str)
verl/models/weight_loader_registry.py:16
↓ 1 callersFunctionget_weight_saver
(arch: str)
verl/models/weight_loader_registry.py:29
↓ 1 callersFunctionget_wsd_schedule_with_warmup
Create a Warmup-Stable-Decay learning rate scheduler. The schedule follows three phases: 1. Warmup: Learning rate increases linearly fro
verl/utils/torch_functional.py:540
↓ 1 callersFunctiongrade_answer_mathd
(given_answer: str, ground_truth: str)
verl/utils/reward_score/prime_math/__init__.py:1002
↓ 1 callersFunctiongrade_answer_sympy
(given_answer: str, ground_truth: str)
verl/utils/reward_score/prime_math/__init__.py:962
↓ 1 callersFunctionhandle_base
(x)
verl/utils/reward_score/prime_math/grader.py:140
↓ 1 callersFunctionhandle_pi
(string, pi)
verl/utils/reward_score/prime_math/grader.py:149
↓ 1 callersMethodinit_megatron
(self, default_megatron_kwargs: Optional[Dict] = None)
verl/single_controller/ray/megatron.py:61
↓ 1 callersFunctioninit_predefined_dispatch_mode
()
verl/single_controller/base/decorator.py:32
↓ 1 callersFunctioninit_predefined_execute_mode
()
verl/single_controller/base/decorator.py:54
↓ 1 callersMethodinit_worker
Initialize worker engine.
verl/workers/rollout/vllm_rollout/vllm_rollout_spmd.py:362
↓ 1 callersFunctioninitialize_global_process_group
(timeout_second=36000)
verl/utils/distributed.py:19
↓ 1 callersFunctionis_correct_minerva
Check if the solution is correct according to Minerva criteria. Args: solution_str: The solution string to check gt: The ground t
verl/utils/reward_score/math_dapo.py:166
↓ 1 callersFunctionis_correct_strict_box
Check if the prediction is correct using strict boxed answer criteria. Args: pred: The prediction string gt: The ground truth ans
verl/utils/reward_score/math_dapo.py:192
↓ 1 callersFunctionis_equiv
(str1, str2, verbose=False)
verl/utils/reward_score/math.py:32
↓ 1 callersFunctionis_latex_equal
(given_answer: str, ground_truth: str)
verl/utils/reward_score/prime_math/__init__.py:629
← previousnext →501–600 of 1,299, ranked by callers