Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DLYuanGod/MegaTrain
/ functions
Functions
5,181 in github.com/DLYuanGod/MegaTrain
⨍
Functions
5,181
◇
Types & classes
739
↳
Endpoints
136
↓ 3 callers
Method
dump
(self, data: io.BytesIO, name)
verl/verl/utils/debug/trajectory_tracker.py:59
↓ 3 callers
Function
embeds_padding_2_no_padding
Convert TensorDict from prompt embeds with padding to no-padding format. For diffusion model training only. Currently we expect the prom
verl/verl/workers/utils/padding.py:146
↓ 3 callers
Function
entropy_from_logits
Calculate Shannon entropy from unnormalized logits. Computes H(p) = -sum(p * log(p)) using the numerically stable formula: entropy = logsumex
verl/verl/utils/torch_functional.py:224
↓ 3 callers
Method
evict
Copy back to CPU and release GPU slot.
infinity/runtime/tensor.py:59
↓ 3 callers
Method
execute_all_async
Execute a method on all workers asynchronously. Args: method_name: Name of the method to execute *args: Positional ar
verl/verl/single_controller/ray/base.py:860
↓ 3 callers
Method
from_detached
Create a worker group from existing detached workers. Args: name_prefix: Prefix for worker names worker_names: Names
verl/verl/single_controller/ray/base.py:684
↓ 3 callers
Function
fsdp_merge_unmerge
Merge or unmerge LoRA adapters in FSDP module. For FSDP (v1), it gathers all model parameters to each device, which may cause OOM. For FSDP2,
verl/verl/utils/fsdp_utils.py:823
↓ 3 callers
Method
generate_state_dict
( self, generate_model: bool = True, generate_optimizer: bool = True, generate
verl/verl/utils/checkpoint/megatron_checkpoint_manager.py:250
↓ 3 callers
Method
get_context_parallel_group
(self)
verl/verl/workers/engine/fsdp/transformer_impl.py:588
↓ 3 callers
Method
get_data_parallel_group
(self)
verl/verl/workers/engine/megatron/transformer_impl.py:536
↓ 3 callers
Method
get_data_parallel_group
(self)
verl/verl/workers/engine/fsdp/transformer_impl.py:579
↓ 3 callers
Method
get_data_parallel_group
(self)
verl/verl/workers/engine/automodel/transformer_impl.py:317
↓ 3 callers
Method
get_data_parallel_group
(self)
verl/verl/workers/engine/torchtitan/transformer_impl.py:289
↓ 3 callers
Method
get_data_parallel_size
(self)
verl/verl/workers/engine/torchtitan/transformer_impl.py:286
↓ 3 callers
Function
get_dataset_class
Get RLHF dataset class. Args: data_config: The data config. Returns: dataset_cls: The dataset class.
verl/verl/utils/dataset/rl_dataset.py:472
↓ 3 callers
Function
get_default_kwargs_for_model_parallel_config
()
verl/verl/utils/megatron/tensor_parallel.py:35
↓ 3 callers
Function
get_dist_checkpoint_path
(checkpoint_path)
verl/verl/utils/megatron_utils.py:720
↓ 3 callers
Function
get_fsdp_state_ctx
(model, state_type, state_cfg, optim_cfg)
verl/verl/utils/fsdp_utils.py:411
↓ 3 callers
Method
get_full_tags
()
verl/verl/workers/rollout/trtllm_rollout/trtllm_rollout.py:288
↓ 3 callers
Function
get_generation_config
( model: str, trust_remote_code: bool = False, )
verl/verl/utils/model.py:98
↓ 3 callers
Function
get_hf_model_path
(config)
verl/verl/utils/model.py:467
↓ 3 callers
Function
get_interaction_class
Dynamically import and return the interaction class.
verl/verl/interactions/utils/interaction_registry.py:27
↓ 3 callers
Function
get_max_position_embeddings
(hf_config)
verl/verl/workers/rollout/utils.py:24
↓ 3 callers
Function
get_megatron_last_lr
Get the last learning rate from the optimizer parameter scheduler.
verl/verl/utils/megatron/optimizer.py:116
↓ 3 callers
Function
get_megatron_optimizer_param_scheduler
Get the optimizer parameter scheduler for Megatron.
verl/verl/utils/megatron/optimizer.py:76
↓ 3 callers
Function
get_moe_num_layers_to_build
Count the number of MoE layers assigned to the current rank. When ``moe_layer_freq`` is 1 or unset, every transformer layer is an MoE layer, s
verl/verl/utils/megatron/router_replay_utils.py:187
↓ 3 callers
Method
get_node_id
(self)
verl/tests/single_controller/test_high_level_scheduling_api.py:30
↓ 3 callers
Method
get_num_images_in_input
Returns the number of input images for the vision backbone. Returns: Number of images expected in the input
verl/verl/experimental/vla/models/openvla_oft/modeling_prismatic.py:184
↓ 3 callers
Method
get_num_patches
Returns the number of vision patches output by the vision backbone. Returns: Number of patches per image
verl/verl/experimental/vla/models/openvla_oft/modeling_prismatic.py:175
↓ 3 callers
Method
get_pgs_and_bundle_indices
Get placement groups and bundle indices for the replica.
verl/verl/workers/rollout/trtllm_rollout/trtllm_async_server.py:349
↓ 3 callers
Function
get_ppo_ray_runtime_env
A filter function to return the PPO Ray runtime environment. To avoid repeat of some environment variables that are already set.
verl/verl/trainer/constants_ppo.py:38
↓ 3 callers
Method
get_ptr
csrc/memory_ops.cpp:49
↓ 3 callers
Function
get_supported_model
(model_type: str)
verl/verl/models/mcore/registry.py:222
↓ 3 callers
Function
get_tensordict
Create a TensorDict from tensors and non-tensor data. Automatically handles nested structures in lists by converting them to NonTensorStack.
verl/verl/utils/tensordict_utils.py:351
↓ 3 callers
Function
get_tokenizer
(model_path: str)
verl/tests/workers/rollout/rollout_trtllm/test_trtllm_rollout_utils.py:87
↓ 3 callers
Function
get_torch_profiler
( contents: list[str], save_path: str, role: Optional[str] = None, save_file_prefix: Optional[
verl/verl/utils/profiler/torch_profile.py:26
↓ 3 callers
Function
get_trajectory_info
Get trajectory info. Args: step (int): global steps in the trainer. index (list): form datastore extra_info.index column.
verl/verl/experimental/agent_loop/agent_loop.py:995
↓ 3 callers
Function
get_version
(pkg)
verl/verl/workers/rollout/vllm_rollout/__init__.py:20
↓ 3 callers
Function
glm4v_forward
( self: "Glm4vForConditionalGeneration", input_ids: torch.LongTensor, attention_mask: Optional[tor
verl/verl/models/transformers/glm4v.py:435
↓ 3 callers
Method
init
(self)
verl/tests/single_controller/test_ray_collectives.py:35
↓ 3 callers
Function
init_mcore_model
Initialize a Mcore model. Args: tfconfig: The transformer config. hf_config: The HuggingFace config. pre_process: Op
verl/verl/models/mcore/registry.py:250
↓ 3 callers
Method
init_model
(self)
verl/tests/single_controller/detached_worker/server.py:74
↓ 3 callers
Method
initialize
(self, test_case_idx: int)
verl/tests/utils/test_special_megatron_kl_loss_tp.py:43
↓ 3 callers
Function
initialize_global_process_group_ray
(timeout_second=None, backend=None)
verl/verl/utils/distributed.py:80
↓ 3 callers
Function
is_moe_layer
(tf_config, layer_idx)
verl/verl/utils/megatron/router_replay_utils.py:176
↓ 3 callers
Function
is_mxfp8_vllm_ascend
(quant_config)
verl/verl/utils/vllm/vllm_fp8_utils.py:123
↓ 3 callers
Function
is_nvtx_available
()
verl/verl/utils/import_utils.py:55
↓ 3 callers
Function
is_trl_available
()
verl/verl/utils/import_utils.py:64
↓ 3 callers
Function
list_of_dict_to_dict_of_list
(list_of_dict: list[dict])
verl/verl/utils/py_functional.py:359
↓ 3 callers
Function
load_class_from_fqn
Load a class from its fully qualified name. Args: fqn: Fully qualified class name (e.g., 'mypackage.module.ClassName'). descripti
verl/verl/utils/import_utils.py:208
↓ 3 callers
Function
load_dist_checkpointing
(sharded_state_dict, ckpt_dir)
verl/verl/utils/megatron/dist_checkpointing.py:56
↓ 3 callers
Function
load_docs
(corpus, doc_idxs)
verl/examples/sglang_multiturn/search_r1_like/local_dense_retriever/retrieval_server.py:39
↓ 3 callers
Function
load_megatron_gptmodel_weights
Load weights for mcore GPT model.
verl/verl/utils/model.py:498
↓ 3 callers
Function
load_tensor_to_gpu
(tensor)
verl/verl/utils/megatron_utils.py:622
↓ 3 callers
Function
make_map_fn
(split)
verl/examples/data_preprocess/hellaswag.py:62
↓ 3 callers
Function
mapping_string_to_attn_backend
(args: dict)
verl/verl/models/mcore/config_converter.py:396
↓ 3 callers
Function
mark_end_range
End a mark range in the profiler. Args: range_id (str): The id of the mark range to end.
verl/verl/utils/profiler/mstx_profile.py:40
↓ 3 callers
Function
mark_start_range
Start a mark range in the profiler. Args: message (str, optional): The message to be displayed in the profiler. Defaults to N
verl/verl/utils/profiler/mstx_profile.py:30
↓ 3 callers
Function
masked_sum
Compute sum of tensor values where mask is True. NaN values outside the mask are replaced with zeros to prevent contaminating the sum. A
verl/verl/utils/torch_functional.py:266
↓ 3 callers
Function
maybe_fix_3d_position_ids
(data: TensorDict)
verl/verl/utils/tensordict_utils.py:907
↓ 3 callers
Function
need_reward_model
Given the config, do we need reward model.
verl/verl/trainer/ppo/utils.py:89
↓ 3 callers
Function
offload_tensor_to_cpu
(tensor)
verl/verl/utils/megatron_utils.py:582
↓ 3 callers
Method
optimizer_step
Perform an optimization step using the optimizer.
verl/verl/workers/engine/base.py:83
↓ 3 callers
Function
process_image
(image: dict | Image.Image, image_patch_size: int = 14)
verl/verl/utils/dataset/vision_utils.py:22
↓ 3 callers
Method
process_vision_info
Extract images and videos from messages. Args: messages (list[dict]): Input messages. Returns: dict: Multi-m
verl/verl/experimental/agent_loop/agent_loop.py:308
↓ 3 callers
Method
processor
(self)
verl/tests/workers/rollout/rollout_trtllm/test_trtllm_rollout_utils.py:267
↓ 3 callers
Function
qwen2_vl_forward
( self: "Qwen2VLForConditionalGeneration", input_ids: torch.LongTensor, attention_mask: Optional[t
verl/verl/models/transformers/qwen2_vl.py:438
↓ 3 callers
Method
rank
Get the rank of this worker in the distributed setup.
verl/verl/single_controller/base/worker.py:316
↓ 3 callers
Method
receive_weights
Receive weights from sender and process each bucket via callback. Args: on_bucket_received: Callback function(weights: l
verl/verl/workers/rollout/vllm_rollout/bucketed_weight_transfer.py:228
↓ 3 callers
Method
record_call
(self)
verl/tests/experimental/reward_loop/test_rate_limited_reward_manager_on_cpu.py:37
↓ 3 callers
Method
record_event
Record an event on this stream.
infinity/runtime/stream.py:33
↓ 3 callers
Function
reduce_timing
Reduce timing information across all processes. This function uses distributed communication to gather and sum the timing information from al
verl/verl/utils/profiler/performance.py:198
↓ 3 callers
Function
register_adv_est
Decorator to register a advantage estimator function with a given name. Args: name_or_enum: `(str)` or `(AdvantageEstimator)`
verl/verl/trainer/ppo/core_algos.py:116
↓ 3 callers
Function
register_megatron_training_hooks
(model: list[torch.nn.Module], optimizer)
verl/verl/utils/megatron_utils.py:1312
↓ 3 callers
Method
replace_curr_new_batch
Replace the current new_batch's content with that from the dumped_new_batch. In case of [Answer] mismatch.
verl/verl/utils/rollout_skip.py:354
↓ 3 callers
Method
reset_envs_to_state_ids
Reset environments to specified state IDs. Args: state_ids: State IDs to reset environments to
verl/verl/experimental/vla/workers/env/env_worker.py:193
↓ 3 callers
Method
run
Run agent loop to interact with LLM server and environment. Args: sampling_params (Dict[str, Any]): LLM sampling params.
verl/verl/experimental/agent_loop/agent_loop.py:398
↓ 3 callers
Method
sac_forward_state_features
Compute state features needed for SAC actor and critic. Args: s: Dictionary of tensors representing the states, with keys
verl/verl/experimental/vla/sac/base.py:106
↓ 3 callers
Method
sac_get_named_actor_parameters
Get named actor parameters for optimization/EMA updates. Returns: A list of (name, parameter) tuples representing actor-side trai
verl/verl/experimental/vla/sac/base.py:51
↓ 3 callers
Method
sample
Sample a batch of data from the replay buffer. Args: partition_id (str): Partition of transfer queue, e.g. "train" or "val".
verl/verl/trainer/main_ppo_sync.py:233
↓ 3 callers
Method
sample_batch
Sample a batch from all task-specific pools.
verl/verl/experimental/vla/sac/replay_pool.py:110
↓ 3 callers
Method
save_to_disk
(self, filepath)
verl/verl/protocol.py:426
↓ 3 callers
Function
serialize_single_tensor
(obj: torch.Tensor)
verl/verl/protocol.py:241
↓ 3 callers
Function
setupNavigationFix
()
verl/docs/_static/js/resizable-sidebar.js:136
↓ 3 callers
Method
shared_embedding_or_output_weight
This is a convenience method to surface the language model's word embeddings, which is necessary for `finalize_model_grads._allreduce_word_emb
verl/verl/models/mcore/qwen2_5_vl/model.py:154
↓ 3 callers
Method
start
(self, **kwargs)
verl/verl/utils/profiler/torch_profile.py:110
↓ 3 callers
Method
stop
(self)
verl/verl/utils/profiler/torch_profile.py:128
↓ 3 callers
Function
timeout_limit
Decorator to add a timeout to a function. Args: seconds: The timeout duration in seconds. use_signals: (Deprecated) This is
verl/verl/utils/py_functional.py:56
↓ 3 callers
Function
topk_reduce_ratio_min_max
Calculate topk items take-up ratio, and min/max timing across all ranks.
verl/verl/utils/profiler/performance.py:226
↓ 3 callers
Method
train_mode
Context manager entry for switching the engine and model into training mode. Usage: with engine.train_mode():
verl/verl/workers/engine/base.py:57
↓ 3 callers
Method
trainer_mode
Context switch hybridengine to trainer mode.
verl/verl/experimental/vla/fsdp_workers.py:168
↓ 3 callers
Method
try_load
(self, step: int | None = None)
verl/verl/utils/rollout_skip.py:276
↓ 3 callers
Function
ulysses_pad
( input_ids_rmpad: torch.Tensor, position_ids_rmpad: Optional[torch.Tensor] = None, sp_size: int = 1, pad_
verl/verl/utils/ulysses.py:278
↓ 3 callers
Method
unfold_column_chunks
Split along the second dim into `n_split`, unfold it to the first dim (batch dim) Useful in passing grouped tensors that doesn't want to be sh
verl/verl/protocol.py:1015
↓ 3 callers
Function
union_tensor_dict
Union two tensordicts.
verl/verl/protocol.py:109
↓ 3 callers
Method
update_policy
Update the policy with an iterator of DataProto Args: data (DataProto): an iterator over the DataProto that returns by
verl/verl/workers/actor/base.py:54
↓ 3 callers
Method
update_weights
(self, global_steps: int = None)
verl/verl/checkpoint_engine/base.py:290
↓ 3 callers
Method
upper_method
(self)
verl/tests/utils/test_rollout_trace_on_cpu.py:65
↓ 3 callers
Method
validate
Validate critic configuration with runtime parameters. Args: n_gpus: Total number of GPUs available train_batch_size:
verl/verl/workers/config/critic.py:109
↓ 3 callers
Function
validate_config
Validate an OmegaConf DictConfig. Args: config (DictConfig): The OmegaConf DictConfig to validate. use_reference_policy (bool): i
verl/verl/utils/config.py:74
← previous
next →
601–700 of 5,181, ranked by callers