MCPcopy Create free account

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

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

↓ 3 callersFunctiontimeout_limit
Decorator to add a timeout to a function. Args: seconds: The timeout duration in seconds. use_signals: (Deprecated) This is
verl/utils/py_functional.py:51
↓ 3 callersFunctionupdate_model_config
Update the module config with the override_config_kwargs. Args: module_config: The module config from Huggingface Transformers. ov
verl/utils/model.py:49
↓ 3 callersFunctionvocab_parallel_log_probs_from_logits
TODO(zhangchi.usc1992): We may change the implementation later
verl/utils/megatron/tensor_parallel.py:146
↓ 2 callersMethod__init__
(self, config)
verl/workers/megatron_workers.py:510
↓ 2 callersMethod__init__
(self, config)
verl/workers/fsdp_workers.py:833
↓ 2 callersMethod__init__
( self, input_size, num_heads, num_key_value_heads, head_dim,
verl/models/llama/megatron/layers/parallel_linear.py:21
↓ 2 callersMethod_balance_batch
Reorder the data on single controller such that each dp rank gets similar total tokens
verl/trainer/ppo/ray_trainer.py:910
↓ 2 callersFunction_broadcast_tp_shard_tensor_qkv
broadcast tensor in tp shards across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader_depracated.py:265
↓ 2 callersFunction_broadcast_tp_shard_tensor_qkv
broadcast tensor in tp shards across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:247
↓ 2 callersFunction_broadcast_tp_shard_tensor_qkv
broadcast tensor in tp shards across mp_group
verl/models/mcore/saver.py:259
↓ 2 callersFunction_broadcast_tp_shard_tensor_qkv
broadcast tensor in tp shards across mp_group
verl/models/mcore/loader.py:270
↓ 2 callersMethod_build_model_optimizer
(self, model_path, optim_config, override_model_config)
verl/workers/megatron_workers.py:138
↓ 2 callersMethod_build_model_optimizer
( self, model_path, fsdp_config, optim_config, override_model_config,
verl/workers/fsdp_workers.py:149
↓ 2 callersMethod_build_rollout
(self, trust_remote_code=False)
verl/workers/fsdp_workers.py:348
↓ 2 callersMethod_compute_loss_and_backward
Compute loss with optional sequence parallelism and remove padding features
verl/trainer/fsdp_sft_trainer.py:278
↓ 2 callersFunction_compute_response_info
Computes information about prompts and responses from a batch. This is an internal helper function that extracts masks and lengths for p
verl/trainer/ppo/metric_utils.py:50
↓ 2 callersMethod_download
(self, use_origin_parquet=False)
verl/utils/dataset/rl_dataset.py:100
↓ 2 callersMethod_dump_generations
Dump rollout/validation samples as JSONL.
verl/trainer/ppo/ray_trainer.py:508
↓ 2 callersFunction_fetch_tp_shard_tensor_qkv
fetch tensor in tp shards across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:152
↓ 2 callersMethod_forward_micro_batch
(self, micro_batch)
verl/workers/critic/dp_critic.py:54
↓ 2 callersFunction_is_frac
(expr: str)
verl/utils/reward_score/prime_math/__init__origin.py:86
↓ 2 callersFunction_is_frac
(expr: str)
verl/utils/reward_score/prime_math/__init__.py:748
↓ 2 callersMethod_load_checkpoint
(self)
verl/trainer/ppo/ray_trainer.py:859
↓ 2 callersFunction_load_hf_model
Helper function containing the loading hf model logic
verl/utils/model.py:284
↓ 2 callersFunction_materialize_futures
(*args, **kwargs)
verl/single_controller/base/decorator.py:477
↓ 2 callersFunction_normalize
Normalize answer expressions.
verl/utils/reward_score/prime_math/__init__origin.py:126
↓ 2 callersMethod_offload_params_to_cpu
(self, pp_rank, to_empty=False)
verl/workers/sharding_manager/megatron_vllm.py:142
↓ 2 callersFunction_pad_tensor
(x: Tensor, dim: int, padding_size: int)
verl/utils/ulysses.py:104
↓ 2 callersMethod_pad_to_length
(self, input_ids, attention_mask)
verl/utils/dataset/rm_dataset.py:99
↓ 2 callersFunction_parse
(s)
verl/utils/reward_score/prime_math/grader.py:283
↓ 2 callersFunction_parse
(s)
verl/utils/reward_score/prime_math/__init__.py:554
↓ 2 callersFunction_post_process_outputs
(tokenizer, output)
verl/workers/rollout/sglang_rollout/sglang_rollout.py:70
↓ 2 callersMethod_read_files_and_tokenize
(self)
verl/utils/dataset/rl_dataset.py:107
↓ 2 callersFunction_record_directory_structure
(folder_path)
verl/utils/fs.py:63
↓ 2 callersMethod_save_checkpoint
(self)
verl/trainer/ppo/ray_trainer.py:827
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
verl/models/qwen2/megatron/layers/parallel_attention.py:55
↓ 2 callersFunction_strip_properly_formatted_commas
(expr: str)
verl/utils/reward_score/prime_math/__init__origin.py:115
↓ 2 callersFunction_strip_properly_formatted_commas
(expr: str)
verl/utils/reward_score/prime_math/__init__.py:777
↓ 2 callersFunction_unpad_tensor
(x: Tensor, dim: int, padding_size: int)
verl/utils/ulysses.py:111
↓ 2 callersMethod_validate
(self)
verl/trainer/ppo/ray_trainer.py:571
↓ 2 callersFunctionall_to_all_tensor
( local_input: Tensor, scatter_dim: int, gather_dim: int, group: Optional[dist.ProcessGroup] =
verl/utils/ulysses.py:133
↓ 2 callersFunctionapply_kl_penalty
(data: DataProto, kl_ctrl: core_algos.AdaptiveKLController, kl_penalty="kl", multi_turn=False)
verl/trainer/ppo/ray_trainer.py:147
↓ 2 callersFunctionapply_kl_penalty_selective
(target_flat_idx, tgt_log_prob)
verl/trainer/ppo/core_algos.py:704
↓ 2 callersFunctionbootstrap_metric
Performs bootstrap resampling to estimate statistics of metrics. This function uses bootstrap resampling to estimate the mean and standard d
verl/trainer/ppo/metric_utils.py:247
↓ 2 callersFunctionbroadcast_from_megatron_pp
(tensor: torch.Tensor)
verl/utils/megatron_utils.py:570
↓ 2 callersFunctionbroadcast_str_from_megatron_pp
(obj: Any)
verl/utils/megatron_utils.py:605
↓ 2 callersFunctionbuild_memory_reference_from_module
(module: torch.nn.Module, memory_buffers: Dict[torch.dtype, MemoryBuffer], maintain_weight=True)
verl/utils/memory_buffer.py:99
↓ 2 callersFunctioncall_sandbox_api
Calls the remote sandbox API to execute code with retry logic for Gateway Timeout, using increasing delay between retries. Logs internal call
verl/utils/reward_score/sandbox_fusion/utils.py:37
↓ 2 callersMethodcheck_consistency
Check the consistency of the DataProto. Mainly for batch and non_tensor_batch We expose this function as a public one so that user can call th
verl/protocol.py:307
↓ 2 callersFunctioncompute_advantage
(data: DataProto, adv_estimator, gamma=1.0, lam=1.0, num_repeat=1, multi_turn=False, norm_adv_by_std_in_grpo=T
verl/trainer/ppo/ray_trainer.py:187
↓ 2 callersFunctioncompute_data_metrics
Computes various metrics from a batch of data for PPO training. This function calculates metrics related to scores, rewards, advantages, ret
verl/trainer/ppo/metric_utils.py:80
↓ 2 callersMethodcompute_entropy_for_every_source
(self, data: DataProto)
verl/workers/fsdp_workers.py:614
↓ 2 callersMethodcompute_log_prob
(self, data: DataProto)
verl/workers/fsdp_workers.py:691
↓ 2 callersMethodcompute_log_prob
Compute logits given a batch of data. Args: data (DataProto): a batch of data represented by DataProto. It must contain key ```in
verl/workers/actor/base.py:40
↓ 2 callersFunctioncompute_policy_loss
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:358
↓ 2 callersMethodcompute_ref_log_prob
(self, data: DataProto)
verl/workers/fsdp_workers.py:777
↓ 2 callersFunctioncompute_reward
Compute reward for a batch of data. Args: data: DataProto object containing the input data. reward_fn: Reward function to com
verl/trainer/ppo/reward.py:114
↓ 2 callersMethodcompute_rm_score
(self, data: DataProto)
verl/workers/fsdp_workers.py:1381
↓ 2 callersFunctioncompute_throughout_metrics
Computes throughput metrics for PPO training. This function calculates performance metrics related to token processing speed, includ
verl/trainer/ppo/metric_utils.py:211
↓ 2 callersFunctioncompute_timing_metrics
Computes timing metrics for different processing stages in PPO training. This function calculates both raw timing metrics (in seconds) a
verl/trainer/ppo/metric_utils.py:172
↓ 2 callersMethodcompute_values
(self, data: DataProto)
verl/workers/fsdp_workers.py:1055
↓ 2 callersFunctionconvert_megatron_model_to_transformers_model
Convert megatron model to transformers model.
verl/utils/megatron_utils.py:430
↓ 2 callersFunctionconvert_serializable
Recursively convert a data structure to JSON-serializable format. - Convert numpy arrays and torch tensors to lists. - Skip u
verl/utils/save_dataproto_plaintext.py:17
↓ 2 callersFunctioncopy_local_path_from_hdfs
Deprecated. Please use copy_to_local instead.
verl/utils/fs.py:110
↓ 2 callersFunctioncreate_and_sync_state
(param_name, state, is_param)
verl/utils/fsdp_utils.py:318
↓ 2 callersFunctioncreate_rl_dataset
Create a dataset. Arguments: data_config: The data config. tokenizer (Tokenizer): The tokenizer. processor (Processor): T
recipe/dapo/main_dapo.py:187
↓ 2 callersFunctioncreate_rl_sampler
Create a sampler for the dataset. Arguments: data_config: The data config. dataset (Dataset): The dataset. Returns:
verl/trainer/main_ppo.py:221
↓ 2 callersFunctioncreate_sft_dataset
Create a dataset.
verl/trainer/fsdp_sft_trainer.py:524
↓ 2 callersMethoddefault_tp_concat_fn
name: name of the parameter param: training parameters infer_params (Iterable[torch.Tensor]): a iterator towards list of para
verl/workers/sharding_manager/megatron_vllm.py:384
↓ 2 callersMethodenv_keys
The keys of the environment variables that are used to configure the Worker.
verl/single_controller/base/worker.py:120
↓ 2 callersMethodexecute_all_async
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:405
↓ 2 callersMethodforward
Args: input_ids: input ids. shape (batch_size, seq_length) attention_mask: attention_mask. shape (batch_size, seq_le
verl/models/qwen2/megatron/modeling_qwen2_megatron.py:115
↓ 2 callersMethodforward
Args: input_ids: input ids. shape (batch_size, seq_length) attention_mask: attention_mask. shape (batch_size, seq_le
verl/models/llama/megatron/modeling_llama_megatron.py:115
↓ 2 callersMethodforward_backward_batch
(self, data: DataProto, forward_only=False)
verl/workers/critic/megatron_critic.py:131
↓ 2 callersMethodforward_backward_batch
We assume: - The model takes input: (input_ids, attention_mask, position_ids). No rmpad for the input - The communication sha
verl/workers/actor/megatron_actor.py:260
↓ 2 callersFunctionfsdp2_clip_grad_norm_
torch.nn.utils.clip_grad_norm_ cann't run on cpu parameter DTensor
verl/utils/fsdp_utils.py:445
↓ 2 callersMethodget_checkpoint_name
Determine the directory name for this rank's checkpoint.
verl/utils/checkpoint/megatron_checkpoint_manager.py:128
↓ 2 callersFunctionget_common_default_kwargs_for_parallel_linear
()
verl/utils/megatron/tensor_parallel.py:48
↓ 2 callersFunctionget_constant_schedule_with_warmup
( optimizer: Optimizer, num_warmup_steps: int, last_epoch: int = -1, )
verl/utils/torch_functional.py:470
↓ 2 callersFunctionget_cosine_schedule_with_warmup
Create a schedule with a learning rate that decreases following the values of the cosine function between the initial lr set in the optimizer
verl/utils/torch_functional.py:426
↓ 2 callersFunctionget_generation_config
( model: str, trust_remote_code: bool = False, )
verl/utils/model.py:72
↓ 2 callersFunctionget_hf_model_checkpoint_path
(checkpoint_path)
verl/utils/megatron_utils.py:401
↓ 2 callersFunctionget_huggingface_actor_config
(model_name: str, override_config_kwargs=None, trust_remote_code=False)
verl/utils/model.py:62
↓ 2 callersFunctionget_mcore_weight_converter
Get the weight converter for given model architecture.
verl/models/mcore/registry.py:172
↓ 2 callersFunctionget_megatron_optimizer
( model, config: OptimizerConfig, no_weight_decay_cond=None, scale_lr_cond=None, lr_mult=1
verl/utils/megatron/optimizer.py:20
↓ 2 callersFunctionget_model_checkpoint_path
(checkpoint_path)
verl/utils/megatron_utils.py:396
↓ 2 callersFunctionget_model_config
(model)
verl/utils/megatron_utils.py:39
↓ 2 callersMethodget_n_gpus
Get the number of gpus in this cluster.
verl/trainer/ppo/ray_trainer.py:119
↓ 2 callersMethodget_openai_tool_schema
(self)
verl/tools/base_tool.py:38
↓ 2 callersFunctionget_optimizer_checkpoint_path
(checkpoint_path, use_distributed_optimizer=True)
verl/utils/megatron_utils.py:406
↓ 2 callersFunctionget_rng_states_checkpoint_path
(checkpoint_path, only_rank0_save=True)
verl/utils/megatron_utils.py:418
↓ 2 callersFunctionget_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 Parameter
verl/utils/seqlen_balancing.py:143
↓ 2 callersFunctionget_trajectory_tracker
()
verl/utils/debug/trajectory_tracker.py:79
↓ 2 callersFunctionget_weight_buffer_meta_from_module
Return a dictionary containing name to a shape and dtype.
verl/utils/memory_buffer.py:60
↓ 2 callersFunctiongrade
(model_answer: str, gt_answer: str, fast: bool = True)
verl/utils/reward_score/prime_math/__init__.py:1023
↓ 2 callersFunctiongrade_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
verl/utils/reward_score/prime_math/__init__origin.py:241
↓ 2 callersFunctionhf_to_mcore_config
(hf_config: PretrainedConfig, dtype: torch.dtype)
verl/models/mcore/registry.py:125
↓ 2 callersFunctioninit_megatron_optim_config
(optim_config: Dict)
verl/utils/megatron_utils.py:199
↓ 2 callersMethodinit_workers
Init resource pool and worker group
verl/trainer/ppo/ray_trainer.py:749
↓ 2 callersFunctionis_ipv6
Check if the given string is an IPv6 address Args: ip_str: The IP address string to check Returns: bool: Returns True i
verl/utils/net_utils.py:47
← previousnext →201–300 of 1,299, ranked by callers