Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/CarlanLark/Lp-Reg-dev
/ functions
Functions
1,299 in github.com/CarlanLark/Lp-Reg-dev
⨍
Functions
1,299
◇
Types & classes
184
↳
Endpoints
27
↓ 4 callers
Function
_get_cpu_tensor
(tensor: torch.Tensor)
verl/models/mcore/saver.py:122
↓ 4 callers
Function
_get_cpu_tensor
(tensor: torch.Tensor)
verl/models/llama/megatron/checkpoint_utils/llama_saver.py:112
↓ 4 callers
Function
_get_gpt_model
(model)
verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader_depracated.py:60
↓ 4 callers
Function
_get_gpt_model
(model)
verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:60
↓ 4 callers
Function
_get_gpt_model
(model)
verl/models/mcore/loader.py:63
↓ 4 callers
Function
_get_gpt_model
(model)
verl/models/llama/megatron/checkpoint_utils/llama_loader.py:62
↓ 4 callers
Function
_get_gpt_model
(model)
verl/models/llama/megatron/checkpoint_utils/llama_loader_depracated.py:62
↓ 4 callers
Function
_is_non_local
(path: str)
verl/utils/hdfs_io.py:148
↓ 4 callers
Function
_normalize
Normalize answer expressions.
verl/utils/reward_score/prime_math/__init__.py:788
↓ 4 callers
Function
_pre_process_inputs
(pad_token_id, prompt_token_ids: torch.Tensor)
verl/workers/rollout/sglang_rollout/sglang_rollout.py:60
↓ 4 callers
Method
add_assistant_message
Currently, we only support chatml format.
verl/workers/rollout/schemas.py:105
↓ 4 callers
Function
all_gather_data_proto
(data: DataProto, process_group)
verl/protocol.py:800
↓ 4 callers
Function
apply_monkey_patch
Replace _flash_attention_forward to _ulysses_flash_attention_forward
verl/models/transformers/monkey_patch.py:109
↓ 4 callers
Function
autocorr_at_lag
Compute autocorrelation at specific lag with better error handling
verl/utils/stat_utils.py:297
↓ 4 callers
Function
broadcast_dict_tensor
TODO: optimize this. Technically, we only need one broadcast
verl/utils/torch_functional.py:186
↓ 4 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
verl/utils/hdfs_io.py:84
↓ 4 callers
Function
create_rl_dataset
Create a dataset. Arguments: data_config: The data config. tokenizer (Tokenizer): The tokenizer. processor (Processor): T
verl/trainer/main_ppo.py:186
↓ 4 callers
Method
dump
(self, data: io.BytesIO, name)
verl/utils/debug/trajectory_tracker.py:59
↓ 4 callers
Method
estimate_flops
Estimate the FLOPS based on the number of valid tokens in the current batch and the time taken. Args: batch_seqlens (Lis
verl/utils/flops_counter.py:198
↓ 4 callers
Method
execute_rank_zero_async
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:393
↓ 4 callers
Method
finish
(self)
verl/utils/tracking.py:145
↓ 4 callers
Method
from_single_dict
Create a DataProto from a dict of tensors and non_tensors
verl/protocol.py:328
↓ 4 callers
Method
generate_sequences
Generate sequences
verl/workers/rollout/base.py:33
↓ 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
verl/utils/fsdp_utils.py:64
↓ 4 callers
Function
get_init_weight_context_manager
(use_meta_tensor=True, mesh: DeviceMesh = None)
verl/utils/fsdp_utils.py:48
↓ 4 callers
Method
get_placement_groups
(self, strategy="STRICT_PACK", name=None)
verl/single_controller/ray/base.py:98
↓ 4 callers
Method
get_resource_pool
Get the resource pool of the worker_cls
verl/trainer/ppo/ray_trainer.py:115
↓ 4 callers
Function
get_reverse_idx
(idx_map)
verl/utils/seqlen_balancing.py:263
↓ 4 callers
Function
get_supported_model
(model_type: str)
verl/models/mcore/registry.py:117
↓ 4 callers
Function
hf_processor
Create a huggingface processor to process multimodal data. Args: name_or_path (str): The name of the processor. Returns: tra
verl/utils/tokenizer.py:64
↓ 4 callers
Function
is_digit
(s)
verl/utils/reward_score/prime_math/grader.py:110
↓ 4 callers
Function
kl_penalty
Compute KL divergence given logprob and ref_logprob. Copied from https://github.com/huggingface/trl/blob/main/trl/trainer/ppo_trainer.py#L1104
verl/trainer/ppo/core_algos.py:843
↓ 4 callers
Function
latex_eval
(latex)
verl/utils/reward_score/prime_math/__init__.py:537
↓ 4 callers
Function
load_mcore_dist_weights
(parallel_model, dist_weight_path, is_value_model=False)
verl/utils/model.py:405
↓ 4 callers
Function
load_megatron_gptmodel_weights
Load weights for mcore GPT model.
verl/utils/model.py:355
↓ 4 callers
Function
mathd_normalize_answer
(answer: Optional[str])
verl/utils/reward_score/prime_math/__init__.py:65
↓ 4 callers
Function
print_model_size
(model: nn.Module, name: str = None)
verl/utils/model.py:154
↓ 4 callers
Function
reduce_metrics
Reduces a dictionary of metric lists by computing the mean of each list. Args: metrics: A dictionary mapping metric names to lists o
verl/trainer/ppo/metric_utils.py:30
↓ 4 callers
Function
rotate_half
Rotates half the hidden dims of the input.
verl/models/qwen2/megatron/layers/parallel_attention.py:119
↓ 4 callers
Function
rotate_half
Rotates half the hidden dims of the input.
verl/models/llama/megatron/layers/parallel_attention.py:142
↓ 4 callers
Function
safe_mean
(tensor)
verl/utils/stat_utils.py:124
↓ 4 callers
Method
save_checkpoint
(self, step)
verl/trainer/fsdp_sft_trainer.py:412
↓ 4 callers
Method
shared_embedding_or_output_weight
(self)
verl/models/qwen2/megatron/modeling_qwen2_megatron.py:601
↓ 3 callers
Method
__init__
(self, dim, max_position_embeddings=2048, base=10000, device=None)
verl/models/qwen2/megatron/layers/parallel_attention.py:43
↓ 3 callers
Method
_bind_worker_method
Bind the worker method to the WorkerGroup
verl/single_controller/base/worker_group.py:143
↓ 3 callers
Function
_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader_depracated.py:172
↓ 3 callers
Function
_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/models/mcore/loader.py:177
↓ 3 callers
Function
_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/models/llama/megatron/checkpoint_utils/llama_loader_depracated.py:174
↓ 3 callers
Method
_build_param_references
(self, pp_rank, maintain_weight=False)
verl/workers/sharding_manager/megatron_vllm.py:126
↓ 3 callers
Function
_check_dispatch_mode
(dispatch_mode)
verl/single_controller/base/decorator.py:465
↓ 3 callers
Function
_concat_data_proto_or_future
(output: List)
verl/single_controller/base/decorator.py:194
↓ 3 callers
Method
_execute_remote_single_worker
(self, worker, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:382
↓ 3 callers
Function
_fetch_tp_shard_tensor
fetch tensor in tp shards
verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:114
↓ 3 callers
Function
_fetch_tp_shard_tensor
fetch tensor in tp shards
verl/models/llama/megatron/checkpoint_utils/llama_loader.py:116
↓ 3 callers
Function
_get_attr
(attr_name, default_value=None)
verl/utils/fsdp_utils.py:76
↓ 3 callers
Function
_get_current_mem_info
Get current memory usage.
verl/utils/debug/performance.py:24
↓ 3 callers
Function
_get_gpt_model
(model)
verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:83
↓ 3 callers
Function
_get_gpt_model
(model)
verl/models/mcore/saver.py:92
↓ 3 callers
Function
_get_gpt_model
(model)
verl/models/llama/megatron/checkpoint_utils/llama_saver.py:83
↓ 3 callers
Method
_init_hf_config_and_tf_config
(self, model_path, dtype, override_model_config)
verl/single_controller/base/megatron/worker.py:42
↓ 3 callers
Method
_set_cos_sin_cache
(self, seq_len, device, dtype)
verl/models/llama/megatron/layers/parallel_attention.py:51
↓ 3 callers
Function
_split_args_kwargs_data_proto
(chunks, *args, **kwargs)
verl/single_controller/base/decorator.py:64
↓ 3 callers
Function
_str_is_int
(x: str)
verl/utils/reward_score/prime_math/__init__origin.py:90
↓ 3 callers
Function
_str_is_int
(x: str)
verl/utils/reward_score/prime_math/__init__.py:752
↓ 3 callers
Function
_unwrap_ray_remote
(cls)
verl/single_controller/ray/base.py:487
↓ 3 callers
Method
_validate
(self)
verl/utils/debug/profile.py:49
↓ 3 callers
Function
apply_fsdp2
model: AutoModelForCausalLM
verl/utils/fsdp_utils.py:423
↓ 3 callers
Method
apply_min_p
Filters logits using adaptive probability thresholding.
verl/workers/actor/dp_actor.py:76
↓ 3 callers
Method
backward
(ctx: Any, grad_output: Tensor)
verl/utils/ulysses.py:224
↓ 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
verl/utils/memory_buffer.py:70
↓ 3 callers
Function
calc_padded_numel
for cuda memory alignment, make sure alignment by 128-bits
verl/utils/memory_buffer.py:53
↓ 3 callers
Method
collective_rpc
( self, method: Union[str, Callable], timeout: Optional[float] = None, args: T
verl/workers/rollout/vllm_rollout/vllm_async_server.py:83
↓ 3 callers
Function
compute_entropy_statistics
Compute comprehensive statistics for entropy sequences using vectorized operations with chunked processing. Args: entropy_tensor
verl/utils/stat_utils.py:7
↓ 3 callers
Function
compute_response_mask
(data: DataProto)
verl/trainer/ppo/ray_trainer.py:180
↓ 3 callers
Method
convert_param
(self, name: str, params_one_group: list[torch.Tensor])
verl/models/mcore/weight_converter.py:30
↓ 3 callers
Function
create_device_mesh
(world_size, fsdp_size)
verl/workers/fsdp_workers.py:62
↓ 3 callers
Method
execute_all_sync
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:402
↓ 3 callers
Function
extract_answer
(passage: str)
verl/utils/reward_score/prime_math/__init__.py:1012
↓ 3 callers
Function
fsdp2_load_full_state_dict
Loads the full state dict (could be only on rank 0) into the sharded model. This is done by broadcasting the parameters from rank 0 to all ot
verl/utils/fsdp_utils.py:392
↓ 3 callers
Function
get_default_kwargs_for_model_parallel_config
()
verl/utils/megatron/tensor_parallel.py:33
↓ 3 callers
Function
get_fsdp_state_ctx
(model, state_type, state_cfg, optim_cfg)
verl/utils/fsdp_utils.py:385
↓ 3 callers
Function
get_mcore_forward_fn
Get the forward function for given model architecture.
verl/models/mcore/registry.py:163
↓ 3 callers
Function
get_sharding_strategy
(device_mesh)
verl/workers/fsdp_workers.py:70
↓ 3 callers
Function
import_external_libs
(external_libs=None)
verl/utils/import_utils.py:51
↓ 3 callers
Function
init_mcore_model
Initialize a Mcore model. Args: tfconfig: The transformer config. hf_config: The HuggingFace config. pre_process: Op
verl/models/mcore/registry.py:131
↓ 3 callers
Method
initialize
(self, freeze_moe_router: bool = False, **kwargs)
verl/models/mcore/model_initializer.py:131
↓ 3 callers
Method
is_padding_enabled
Check if padding is enabled for the DataProto. Returns: bool: True if padding is enabled, False otherwise.
verl/protocol.py:622
↓ 3 callers
Method
load_checkpoint
(self, local_path, hdfs_path=None, del_local_after_load=True)
verl/workers/fsdp_workers.py:1127
↓ 3 callers
Function
load_extern_type
Load a external data type based on the file path and type name
verl/utils/import_utils.py:62
↓ 3 callers
Function
load_tensor_to_gpu
(tensor)
verl/utils/megatron_utils.py:339
↓ 3 callers
Method
log
(self, func, *args, **kwargs)
verl/utils/debug/performance.py:82
↓ 3 callers
Function
make_batch_generator
(batches, vpp_size)
verl/utils/megatron/pipeline_parallel.py:49
↓ 3 callers
Function
normalize_final_answer
Normalize a final answer to a quantitative reasoning question. Args: final_answer: The answer string to normalize Returns: N
verl/utils/reward_score/math_dapo.py:125
↓ 3 callers
Function
normalize_model_name
Transform the model name in each model_chunk in each pp stage into the name in inference engine
verl/utils/model.py:208
↓ 3 callers
Function
offload_tensor_to_cpu
(tensor)
verl/utils/megatron_utils.py:305
↓ 3 callers
Function
pad_dataproto_to_divisor
Pad a DataProto to size divisible by size_divisor Args: size_divisor (int): size divisor Returns: data: (DataProto): the pad
verl/protocol.py:69
↓ 3 callers
Method
select_idxs
Select specific indices from the DataProto. Args: idxs (torch.Tensor or numpy.ndarray or list): Indices to select
verl/protocol.py:429
↓ 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
verl/models/qwen2/megatron/modeling_qwen2_megatron.py:453
↓ 3 callers
Function
set_random_seed
(seed)
verl/workers/megatron_workers.py:51
↓ 3 callers
Function
split_dict_tensor_into_batches
(tensors: TensorDict, batch_size)
verl/utils/torch_functional.py:229
← previous
next →
101–200 of 1,299, ranked by callers