MCPcopy Create free account

hub / github.com/DLYuanGod/MegaTrain / functions

Functions5,181 in github.com/DLYuanGod/MegaTrain

↓ 5 callersFunctionupdate_model_config
Update the module config with the override_config_kwargs. Args: module_config: The module config from Huggingface Transformers. ov
verl/verl/utils/model.py:73
↓ 5 callersMethodupdate_result_options
(self, offset: int = 0, sort_desc: Optional[bool] = None)
verl/scripts/rollout_viewer.py:268
↓ 5 callersMethodupdate_weights
(self, weights_iterator, **kwargs)
verl/verl/experimental/vla/naive_rollout_rob.py:197
↓ 5 callersFunctionvalid_mean
Compute the mean of tensor `x` over valid entries indicated by `valid` mask. Args: x: Tensor of shape (B, ...) containing values to avera
verl/verl/experimental/vla/sac/sac_actor.py:103
↓ 5 callersMethodwait_for_complete
Wait for the broadcast operation to complete. Returns: dict[str, TensorMeta]: The bucket meta after broadcast.
verl/verl/checkpoint_engine/nccl_checkpoint_engine.py:86
↓ 5 callersMethodwait_for_complete
Block until remote agent read complete.
verl/verl/checkpoint_engine/nixl_checkpoint_engine.py:164
↓ 5 callersMethodwait_for_complete
Wait for the broadcast operation to complete. Returns: dict[str, TensorMeta]: The bucket meta after broadcast.
verl/verl/checkpoint_engine/hccl_checkpoint_engine.py:87
↓ 4 callersMethod__setattr__
(self, name, value)
verl/verl/experimental/vla/workers/env/env_manager.py:285
↓ 4 callersMethod_balance_batch
Reorder the data on single controller such that each dp rank gets similar total tokens.
verl/verl/trainer/main_ppo_sync.py:998
↓ 4 callersFunction_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/verl/models/mcore/saver.py:180
↓ 4 callersMethod_build_async_session
( self, *, adapter: AsyncTRTLLMHttpAdapter, method: str, response: Asy
verl/tests/workers/rollout/rollout_trtllm/test_adapter.py:28
↓ 4 callersMethod_build_multimodal_attention
Build multimodal embeddings and attention mask
verl/verl/experimental/vla/models/openvla_oft/modeling_prismatic.py:477
↓ 4 callersMethod_build_sharded_state_dict_metadata
Builds metadata used for sharded_state_dict versioning. The whole content metadata is passed to ``sharded_state_dict`` model and optimizer m
verl/verl/utils/checkpoint/megatron_checkpoint_manager.py:310
↓ 4 callersMethod_compose_seed
(self, env_id: int, rollout_id: Optional[int] = None, stream_id: int = 0)
verl/verl/experimental/vla/envs/libero_env/libero_env.py:89
↓ 4 callersMethod_compute_reward_colocate
Compute the reward with colocate reward model.
verl/verl/trainer/main_ppo_sync.py:993
↓ 4 callersMethod_dump_generations
Dump rollout/validation samples as JSONL.
verl/verl/trainer/ppo/ray_trainer.py:409
↓ 4 callersMethod_extract_reward_from_rm_scores
Extract reward from already-computed rm_scores if available. This has been deprecated. Args: data: DataProto obj
verl/verl/workers/reward_manager/abstract.py:47
↓ 4 callersMethod_get_alpha
(self)
verl/verl/experimental/vla/sac/sac_actor.py:223
↓ 4 callersFunction_get_attention_functions
Dynamically import attention functions based on available hardware.
verl/verl/utils/attention_utils.py:20
↓ 4 callersFunction_get_cpu_tensor
(tensor: torch.Tensor)
verl/verl/models/mcore/saver.py:134
↓ 4 callersFunction_get_gpt_model
(model)
verl/verl/models/mcore/loader.py:68
↓ 4 callersFunction_get_patching_model
(model: torch.nn.Module)
verl/verl/models/mcore/mtp_patch.py:35
↓ 4 callersFunction_get_rollout_and_model_config
(config: DictConfig)
verl/verl/experimental/agent_loop/agent_loop.py:98
↓ 4 callersFunction_get_skip_attr
Get attribute from skip config, supporting both dict and SkipConfig dataclass.
verl/verl/utils/rollout_skip.py:23
↓ 4 callersFunction_get_stream_ptr
Get raw CUDA stream pointer.
infinity/csrc/__init__.py:19
↓ 4 callersMethod_init_server_adapter
(self)
verl/verl/workers/rollout/trtllm_rollout/trtllm_rollout.py:357
↓ 4 callersFunction_is_non_local
(path: str)
verl/verl/utils/hdfs_io.py:148
↓ 4 callersFunction_iter_opts
(opt)
verl/verl/utils/megatron_utils.py:577
↓ 4 callersMethod_next_rollout_batch
(self, train_iter)
verl/verl/experimental/vla/sac/sac_ray_trainer.py:204
↓ 4 callersMethod_prefetch
Async prefetch layer to GPU.
infinity/scheduler/sliding_window.py:42
↓ 4 callersFunction_preserve_attn_implementation
Ensure Flash Attention implementation is preserved when layer is moved to GPU. HuggingFace may reset _attn_implementation during .to(device) or d
infinity/model/cpu_master.py:40
↓ 4 callersMethod_run_all
(self, tasks: list[asyncio.Task])
verl/verl/experimental/reward_loop/reward_model.py:111
↓ 4 callersMethod_run_all
(self, tasks: list[asyncio.Task])
verl/verl/experimental/teacher_loop/teacher_model.py:145
↓ 4 callersFunction_run_async_in_temp_loop
(async_func: Callable[..., Any], *args, **kwargs)
verl/verl/utils/transferqueue_utils.py:74
↓ 4 callersMethod_save_checkpoint
(self)
verl/verl/experimental/fully_async_policy/fully_async_trainer.py:636
↓ 4 callersFunction_timer
Inner function that handles the core timing logic. Args: name (str): The name/identifier for this timing measurement. timing_raw
verl/verl/utils/profiler/performance.py:140
↓ 4 callersMethod_update_input_ids
Update the input_ids, attention_mask, position_ids, and loss_mask of the request in additive manner.
verl/verl/workers/rollout/schemas.py:299
↓ 4 callersFunction_update_ref_or_create
(layer, ref_name, new_data)
verl/verl/utils/modelopt/vllm_modelopt_patch.py:95
↓ 4 callersMethod_validate
(self)
verl/verl/trainer/main_ppo_sync.py:830
↓ 4 callersFunction_verify_group_integrity
Assert that every group of force_group_size consecutive samples stays together. Args: batch_idx_list: Index lists returned by prepare_mic
verl/tests/utils/test_prepare_micro_batches_with_group_size.py:70
↓ 4 callersMethodadd
Add items to the replay buffer. Args: partition_id (str): Partition of transfer queue, e.g. "train" or "val". items (
verl/verl/trainer/main_ppo_sync.py:206
↓ 4 callersFunctionapply_chat_template
apply_chat_template to messages with special attention to template requiring at least one user message, e.g. Qwen3.5. Args: processor
verl/verl/utils/chat_template.py:53
↓ 4 callersMethodasync_calls_finalize_fn_exec
(self, blocking=False)
verl/verl/workers/megatron_workers.py:985
↓ 4 callersFunctionbootstrap_metric
Performs bootstrap resampling to estimate statistics of metrics. This function uses bootstrap resampling to estimate the mean and standard d
verl/verl/trainer/ppo/metric_utils.py:423
↓ 4 callersMethodcheck_storage
(self, method_name, run_forward)
verl/tests/utils/test_linear_cross_entropy.py:323
↓ 4 callersMethodcleanup
(self)
verl/tests/utils/test_special_linear_cross_entropy_tp.py:199
↓ 4 callersFunctioncollect_lora_params
collect lora params or full params if base model is not ready in vllm work with if isinstance(self.module._fsdp_wrapped_module, PeftModel)
verl/verl/utils/fsdp_utils.py:646
↓ 4 callersFunctioncompute_response_mask
Compute the attention mask for the response part of the sequence. This function extracts the portion of the attention mask that corresponds to th
verl/verl/experimental/vla/rob_ray_trainer.py:51
↓ 4 callersFunctioncompute_topk
(scores, topk, num_groups=None, group_topk=None)
verl/verl/utils/megatron/router_replay_patch.py:162
↓ 4 callersMethodcompute_values
(self, data: DataProto)
verl/verl/workers/fsdp_workers.py:1678
↓ 4 callersFunctioncopy_local_path_from_hdfs
Deprecated. Please use copy_to_local instead.
verl/verl/utils/fs.py:232
↓ 4 callersFunctiondefault_compute_score
Compute the score for a given solution based on the data source. Args: data_source (str): The source dataset identifier which determines
verl/verl/utils/reward_score/__init__.py:19
↓ 4 callersMethoddenoise_step
Apply one denoising step of the noise x_t at a given timestep. Args: state: (B, state_dim) robot state. prefix_pad_ma
verl/verl/experimental/vla/models/pi0_torch/model/modeling_pi0.py:443
↓ 4 callersMethoddisable_adapter
Disable all adapters temporarily under the context in the model for LoRA
verl/verl/workers/engine/base.py:222
↓ 4 callersMethodembed_prefix
Embed visual and language inputs as the transformer prefix. Args: images: List of (B, C, H, W) tensors. img_masks: Li
verl/verl/experimental/vla/models/pi0_torch/model/modeling_pi0.py:228
↓ 4 callersFunctionenable_activation_offloading
Enable activation offloading for the model. It groups activations by TransformerLayer and offloads activation groups asynchronously. This mea
verl/verl/utils/activation_offload.py:500
↓ 4 callersFunctionensure_async_iterator
Convert an iterable to an async iterator.
verl/verl/workers/rollout/utils.py:76
↓ 4 callersFunctionextract_reward
Extract reward tensor and extra info from batch data.
verl/verl/trainer/ppo/reward.py:154
↓ 4 callersFunctionfsdp2_clip_grad_norm_
torch.nn.utils.clip_grad_norm_ cann't run on cpu parameter DTensor
verl/verl/utils/fsdp_utils.py:577
↓ 4 callersFunctionfsdp2_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/verl/utils/fsdp_utils.py:454
↓ 4 callersMethodgenerate
Generate tokens from prompt ids. Args: request_id (str): request id for sticky session. prompt_ids (List[int]): List
verl/verl/experimental/agent_loop/agent_loop.py:143
↓ 4 callersMethodgenerate_backward_inputs
(self)
verl/tests/utils/test_special_linear_cross_entropy_tp.py:256
↓ 4 callersMethodgenerate_forward_inputs
(self)
verl/tests/utils/test_special_linear_cross_entropy_tp.py:242
↓ 4 callersMethodgenerate_hyper
(self)
verl/tests/utils/test_special_linear_cross_entropy_tp.py:207
↓ 4 callersFunctionget_adv_estimator_fn
Get the advantage estimator function with a given name. Args: name_or_enum: `(str)` or `(AdvantageEstimator)` The name or enu
verl/verl/trainer/ppo/core_algos.py:137
↓ 4 callersMethodget_class
Return the registered subclass for ``model_config.architecture``.
verl/verl/models/diffusers_model/base.py:71
↓ 4 callersFunctionget_device_uuid
(device_id: int)
verl/verl/workers/rollout/vllm_rollout/utils.py:69
↓ 4 callersFunctionget_dynamic_pipeline_shards
Calculate the pipeline sharding configuration for Megatron-LM. Args: layer_num: Total number of layers in the model. pp_size: Num
verl/verl/model_merger/megatron_model_merger.py:57
↓ 4 callersFunctionget_group_balanced_partitions
Partition samples into k groups while keeping samples with the same uid together. Args: seqlen_list: List of sequence lengths for ea
verl/verl/utils/seqlen_balancing.py:554
↓ 4 callersFunctionget_init_weight_context_manager
(use_meta_tensor=True, mesh: DeviceMesh = None)
verl/verl/utils/fsdp_utils.py:60
↓ 4 callersFunctionget_megatron_optimizer
( model, config: OptimizerConfig, )
verl/verl/utils/megatron/optimizer.py:65
↓ 4 callersFunctionget_model_config
(model)
verl/verl/utils/megatron_utils.py:55
↓ 4 callersMethodget_n_gpus
Get the number of gpus in this cluster.
verl/verl/single_controller/ray/base.py:215
↓ 4 callersFunctionget_predefined_dispatch_fn
(dispatch_mode)
verl/verl/single_controller/base/decorator.py:334
↓ 4 callersFunctionget_rollout_class
Get the rollout class by name. Args: rollout_name: The name of the rollout. mode: The mode of the rollout, async: server mode.
verl/verl/workers/rollout/base.py:91
↓ 4 callersFunctiongroup_mean_std
Compute per-group mean/std/count in pure PyTorch. mean_g = sum / count std_g = sqrt( max( (sum2 - sum^2/count) / max(count-1, 1), eps )
verl/verl/utils/groupwise.py:164
↓ 4 callersFunctioninit_megatron_optim_config
( optim_config: dict, use_distributed_optimizer: bool = True, fp16: bool = False )
verl/verl/utils/megatron/optimizer.py:24
↓ 4 callersMethodinitialize
(self, **kwargs)
verl/verl/models/mcore/model_initializer.py:141
↓ 4 callersFunctionis_digit
(s)
verl/verl/utils/reward_score/prime_math/grader.py:109
↓ 4 callersMethodis_discrete_mode
(self)
verl/verl/utils/profiler/profile.py:146
↓ 4 callersMethodis_replay_forward_action
Return True if the current router_replay_action is REPLAY_FORWARD for the local router instances. This inspects the first local RouterReplay
verl/verl/utils/megatron/router_replay_utils.py:518
↓ 4 callersFunctionkl_penalty
Compute KL divergence given logprob and ref_logprob. Optionally using straight through to bind k2 on other kl penalty compute method for unbiased
verl/verl/trainer/ppo/core_algos.py:2126
↓ 4 callersFunctionlast_boxed_only_string
Extract the last LaTeX boxed expression from a string. Args: string: Input string containing LaTeX code Returns: The last bo
verl/verl/utils/reward_score/math_dapo.py:20
↓ 4 callersMethodlaunch_servers
Launch http server in each node.
verl/verl/workers/rollout/replica.py:252
↓ 4 callersFunctionload_automodel_model_to_gpu
Load model back to GPU.
verl/verl/workers/engine/automodel/utils.py:221
↓ 4 callersFunctionload_mcore_dist_weights
(parallel_model, dist_weight_path, is_value_model=False, prefix="")
verl/verl/utils/model.py:548
↓ 4 callersFunctionload_megatron_optimizer
(optimizers)
verl/verl/utils/megatron_utils.py:696
↓ 4 callersFunctionload_veomni_model_to_gpu
(model)
verl/verl/workers/engine/veomni/utils.py:58
↓ 4 callersFunctionmake_att_2d_masks
Copied from big_vision. Tokens can attend to valid inputs tokens which have a cumulative mask_ar smaller or equal to theirs. This way `mask_a
verl/verl/experimental/vla/models/pi0_torch/model/modeling_pi0.py:62
↓ 4 callersFunctionmake_megatron_module
( wrap_config: McoreModuleWrapperConfig, tf_config: TransformerConfig, hf_config: PretrainedConfig
verl/verl/utils/megatron_utils.py:214
↓ 4 callersFunctionnormalize_answer
(s)
verl/verl/utils/reward_score/search_r1_like_qa_em.py:23
↓ 4 callersFunctionoffload_automodel_model_to_cpu
Offload an FSDP2-wrapped model to CPU (reshard, move to CPU, optional cache clear).
verl/verl/workers/engine/automodel/utils.py:198
↓ 4 callersFunctionoffload_veomni_model_to_cpu
(model, empty_cache: bool = True)
verl/verl/workers/engine/veomni/utils.py:36
↓ 4 callersMethodon_batch_end
Generate data using the provided data generation strategy. Note: This method is intended to change the dataset after each training ba
verl/verl/experimental/dynamic_dataset/dynamicgen_dataset.py:106
↓ 4 callersFunctionpad_sequence_to_length
pad a 2D tensors (e.g. responses, logprobs) in the last dim to max_seq_length. input shape: [bs, seq_length] output shape: [bs, max_seq_l
verl/verl/utils/torch_functional.py:494
↓ 4 callersMethodprocess_tensor
(self, tensor, pad_id)
verl/verl/experimental/vla/dp_rob.py:57
↓ 4 callersFunctionreduce_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/verl/trainer/ppo/metric_utils.py:31
↓ 4 callersMethodregister
Register a new rollout replica type.
verl/verl/workers/rollout/replica.py:310
↓ 4 callersMethodreload
Reload.
verl/verl/utils/activation_offload.py:188
↓ 4 callersFunctionremove_boxed
Remove the LaTeX boxed command from a string. Args: s: String with format "\\boxed{content}" Returns: The content inside the
verl/verl/utils/reward_score/math_dapo.py:50
← previousnext →401–500 of 5,181, ranked by callers