MCPcopy Create free account

hub / github.com/DLYuanGod/MegaTrain / functions

Functions5,181 in github.com/DLYuanGod/MegaTrain

↓ 2 callersFunctionparallel_compute_score_async
( evaluation_func, completions, references, tasks, extra_info=None, num_processes=64 )
verl/verl/workers/reward_manager/prime.py:45
↓ 2 callersMethodparameters
(self)
infinity/model/transformer.py:124
↓ 2 callersFunctionparse_args
()
verl/verl/model_merger/base_model_merger.py:37
↓ 2 callersFunctionparse_multi_modal_type
(messages: list[dict])
verl/tests/experimental/agent_loop/test_multi_modal.py:32
↓ 2 callersFunctionpatch_fused_forward
(model: torch.nn.Module)
verl/verl/models/mcore/model_forward_fused.py:52
↓ 2 callersFunctionpatch_mtp_layer_get_embeddings
Patch the _get_embeddings method of MultiTokenPredictionLayer
verl/verl/models/mcore/mtp_patch.py:172
↓ 2 callersFunctionpatch_postprocess
(model: torch.nn.Module)
verl/verl/models/mcore/mtp_patch.py:47
↓ 2 callersFunctionpatch_provider_for_qat
Patch the Megatron-Bridge provider to support QAT quantized layers.
verl/verl/utils/modelopt/qat_utils.py:19
↓ 2 callersFunctionpatch_vllm_moe_model_weight_loader
(model)
verl/verl/utils/vllm/patch.py:77
↓ 2 callersFunctionpostprocess_bshd
Recover left padding from result return result
verl/verl/models/mcore/util.py:235
↓ 2 callersFunctionpostprocess_bshd_engine
Postprocess bshd sequences
verl/verl/models/mcore/util.py:655
↓ 2 callersFunctionpostprocess_packed_seqs_for_dict_output
_summary_ For fused kernels, the output is a dictionary with keys like 'log_probs', 'entropy', etc. This function post-processes each tensor i
verl/verl/models/mcore/util.py:257
↓ 2 callersFunctionpp_gather
Gather local router maps from all PP ranks into a global router map. Args: local_layers_router_map (torch.Tensor): Local router map
verl/verl/utils/megatron/router_replay_utils.py:408
↓ 2 callersMethodprepare_model_inputs
(self, batch: TensorDict)
verl/verl/workers/engine/megatron/transformer_impl.py:785
↓ 2 callersFunctionpreprocess
(text)
verl/examples/data_preprocess/hellaswag.py:28
↓ 2 callersFunctionpreprocess_bshd
Remove left padding from input_ids, attention_mask and position_ids return new_input_ids, new_attention_mask, new_position_ids
verl/verl/models/mcore/util.py:194
↓ 2 callersMethodpreprocess_data
AllGather data from sp region This is because the data is first sharded along the FSDP dimension as we utilize the DP_COMPUTE
verl/verl/workers/sharding_manager/fsdp_ulysses.py:52
↓ 2 callersFunctionprint_header
(title: str)
scripts/calc_resource.py:151
↓ 2 callersFunctionprocess_position_ids
(position_ids: torch.Tensor)
verl/verl/models/transformers/qwen2_vl.py:402
↓ 2 callersFunctionprocess_video
Converts a video dict into a [n_frames, 3, H, W] tensor Add video sample FPS in a future MR
verl/verl/utils/dataset/vision_utils.py:67
↓ 2 callersFunctionput_info_on_image
Put information dictionary and extra lines on an image. Args: image: Input image info: Dictionary of key-value pairs to disp
verl/verl/experimental/vla/envs/action_utils.py:203
↓ 2 callersMethodput_sample
Put a batch sample into the queue Args: sample: Sample data Returns: bool: Whether the sample was s
verl/verl/experimental/fully_async_policy/message_queue.py:55
↓ 2 callersFunctionput_tensor_cpu
(data_dict)
verl/verl/experimental/vla/workers/env/env_worker.py:34
↓ 2 callersMethodquant_weights_by_name
FP8 quantization based on parameter name using a memory-efficient generator. Args: weights: Generator, AsyncGenerator, or iterab
verl/verl/utils/fp8_utils.py:70
↓ 2 callersMethodquantize_with_fusion
Streaming quantize: consume input layer by layer, yield (name, tensor) pairs.
verl/verl/utils/qat/quantizer.py:262
↓ 2 callersMethodquery_collect_info
Query the collect info for a given mesh name. Args: mesh_name (str): Name of the mesh to query collect info for.
verl/verl/single_controller/base/worker.py:122
↓ 2 callersFunctionqwen2_5_vl_dedup_image_tokens
Deduplicate consecutive image tokens in prompt_ids for Qwen2.5-VL, since vLLM will replicate the <|image_pad|> and <|video_pad|> token by image_da
verl/verl/workers/rollout/utils.py:86
↓ 2 callersMethodraw
Access underlying torch stream.
infinity/runtime/stream.py:23
↓ 2 callersMethodread_metadata
Block until the remote agent sends the metadata. Returns: dict: Metadata from the remote agent.
verl/verl/checkpoint_engine/nixl_checkpoint_engine.py:194
↓ 2 callersMethodrebuild_gpu_buffers
Rebuild GPU-resident buffers from CPU state. Call this before training resumes after release_gpu_buffers().
infinity/model/cpu_master.py:689
↓ 2 callersMethodrelease
Release weights and kv cache in GPU memory.
verl/verl/workers/rollout/trtllm_rollout/trtllm_rollout.py:397
↓ 2 callersMethodrelease_gpu_buffers
Release all GPU-resident buffers to free GPU memory. Call this when the GPU is needed for other purposes (e.g., inference engine). Us
infinity/model/cpu_master.py:633
↓ 2 callersMethodremove
Remove items from the replay buffer. Args: partition_id (str): Partition of transfer queue, e.g. "train" or "val". ke
verl/verl/trainer/main_ppo_sync.py:220
↓ 2 callersFunctionremove_boxed
(s)
verl/verl/utils/reward_score/math_reward.py:49
↓ 2 callersMethodremove_previous_save_local_path
(self, path)
verl/verl/utils/checkpoint/checkpoint_manager.py:134
↓ 2 callersMethodremove_remote_agent
(self, agent_name: str)
verl/verl/checkpoint_engine/nixl_checkpoint_engine.py:113
↓ 2 callersFunctionreorder_and_merge_vpp_layers
Reorder and merge per-VPP layer blocks into a contiguous layer dimension. Given a tensor shaped as [bs*vpp_size, max_token_len, layer_num_pe
verl/verl/utils/megatron/router_replay_utils.py:327
↓ 2 callersFunctionrepeat_kv
This is the equivalent of torch.repeat_interleave(x, dim=2, repeats=n_rep). The hidden states go from (batch, seqlen, num_key_value_heads, he
verl/verl/models/transformers/monkey_patch.py:75
↓ 2 callersMethodreset
Reset all statistics.
infinity/profiler.py:164
↓ 2 callersMethodreset
(self, env_idx: Optional[int | list[int] | np.ndarray] = None, options: Optional[dict] = None)
verl/verl/experimental/vla/envs/isaac_env/isaac_env.py:151
↓ 2 callersFunctionresolve_config_path
Resolve agent loop configuration file path. In multi-node Ray training, relative paths may not resolve correctly because the working director
verl/verl/experimental/agent_loop/utils.py:19
↓ 2 callersFunctionresponse_to_nested
Convert padded response tensor to nested tensor. Args: tensor: a tensor with shape (bsz, response_len) response_mask: a nested te
verl/verl/workers/utils/padding.py:205
↓ 2 callersFunctionrestore_base_model_weights
Restore base model weights from CPU backup. This function restores the base model weights from the CPU backup, effectively undoing any LoRA m
verl/verl/utils/fsdp_utils.py:967
↓ 2 callersMethodrestore_model_from_cpu
Restore the model state from CPU memory. Args: n: Identifier/Key for the saved model state to restore.
verl/verl/experimental/separation/engine_workers.py:104
↓ 2 callersMethodrollout_mode
Context switch hybridengine to rollout mode.
verl/verl/workers/megatron_workers.py:704
↓ 2 callersMethodrollout_mode
Context switch hybridengine to rollout mode.
verl/verl/workers/fsdp_workers.py:759
↓ 2 callersMethodrollout_worker_use_gpu
(self)
verl/verl/workers/rollout/replica.py:272
↓ 2 callersFunctionrun
()
verl/verl/experimental/vla/workers/env/env_loop_wg_test.py:134
↓ 2 callersMethodrun
Execute the graph in topological order.
infinity/scheduler/executor.py:21
↓ 2 callersMethodrun
(self, config)
verl/verl/experimental/fully_async_policy/fully_async_main.py:45
↓ 2 callersFunctionrun_forward_backward
Run forward and backward pass, return logits and gradients.
verl/tests/models/test_tiled_mlp_accuracy.py:59
↓ 2 callersMethodrun_single
(self, data: DataProto)
verl/verl/experimental/reward_loop/reward_manager/gdpo.py:35
↓ 2 callersMethodsac_forward_actor
Compute actions and their log probabilities from state features. Args: state_features: Any data structure representing the proces
verl/verl/experimental/vla/sac/base.py:85
↓ 2 callersMethodsac_get_critic_parameters
Get the parameters of the critic head for optimization. Returns: A list of torch.nn.Parameter objects representing the critic hea
verl/verl/experimental/vla/sac/base.py:42
↓ 2 callersMethodsample_level_repeat
Repeat each row of the batch data a specified number of times. Args: repeat_times (torch.tensor, list, tuple, ndarray):
verl/verl/protocol.py:1054
↓ 2 callersMethodsample_noise
Generate Gaussian noise for the action trajectory. Args: shape: Desired output shape, typically (B, n_action_steps, action_dim).
verl/verl/experimental/vla/models/pi0_torch/model/modeling_pi0.py:209
↓ 2 callersMethodsample_previous_step
( self, sample: torch.Tensor, model_output: torch.Tensor, timestep: Optional[t
verl/examples/flowgrpo_trainer/scheduler/scheduling_flow_match_sde_discrete.py:147
↓ 2 callersMethodsample_str_prompts
(self)
verl/tests/special_e2e/envs/digit_completion/task.py:93
↓ 2 callersFunctionsaveWidth
(width)
verl/docs/_static/js/resizable-sidebar.js:23
↓ 2 callersMethodsave_checkpoint
Save an FSDP checkpoint for this rank. Writes: - model & optimizer shard files - extra state dict (scheduler + R
verl/verl/utils/checkpoint/fsdp_checkpoint_manager.py:184
↓ 2 callersMethodsave_checkpoint
(self, local_global_step_folder: str)
verl/verl/experimental/fully_async_policy/fully_async_rollouter.py:270
↓ 2 callersFunctionsave_dist_checkpointing
( sharded_state_dict, ckpt_path, async_save=False, content_metadata=None, )
verl/verl/utils/megatron/dist_checkpointing.py:29
↓ 2 callersMethodsave_hf_model_and_tokenizer
(self, merged_state_dict)
verl/verl/model_merger/megatron_model_merger.py:422
↓ 2 callersMethodsave_model_to_cpu
Save the current model state to CPU memory. Args: n: Identifier/Key for the saved model state.
verl/verl/experimental/separation/engine_workers.py:91
↓ 2 callersFunctionsave_rollout_video
Saves an MP4 replay of an episode. Args: rollout_images: List of images from the episode output_dir: Directory to save the v
verl/verl/experimental/vla/envs/action_utils.py:247
↓ 2 callersFunctionscaled_fp8_blockwise
Cast tensor from high precision to FP8 with blockwise quantization. This function automatically selects the best available implementation: 1.
verl/verl/utils/kernel/fp8_kernel.py:312
↓ 2 callersMethodsend_weights
Send the weights of the model. Args: weights: A generator that yields the name of the weight tensor and the tensor itself.
verl/verl/checkpoint_engine/base.py:163
↓ 2 callersFunctionset_death_signal
Kill the current process when the parent process exits.
verl/verl/workers/rollout/vllm_rollout/utils.py:59
↓ 2 callersFunctionset_random_seed
(seed, only_rollout=False)
verl/verl/workers/megatron_workers.py:88
↓ 2 callersFunctionset_reshard_after_forward
Sets if the module should reshard parameters after forward. This can be used to change the ``reshard_after_forward`` FSDP arg at runtime. For
verl/verl/utils/fsdp_utils.py:734
↓ 2 callersFunctionset_router_replay_data
Scatter the packed router top-k indices back to sequence-parallel ranks and update each local RouterReplay instance with target indices for r
verl/verl/utils/megatron/router_replay_utils.py:269
↓ 2 callersMethodset_state
(self, state)
verl/tests/special_e2e/envs/digit_completion/task.py:66
↓ 2 callersMethodset_target_indices
Sets the target topk indices for replay.
verl/verl/utils/megatron/router_replay_patch.py:92
↓ 2 callersMethodset_timesteps
Set timesteps and sigmas on the scheduler and move them to *device*. Args: scheduler (SchedulerMixin): the scheduler used for the
verl/verl/models/diffusers_model/base.py:101
↓ 2 callersFunctionshift_next
(tensor: torch.Tensor)
verl/verl/experimental/vla/sac/sac_ray_trainer.py:79
↓ 2 callersFunctionshould_check_type
(arg_name: str)
verl/tests/special_sanity/type_coverage_check.py:61
↓ 2 callersMethodsleep
Sleep all rollout replica instances.
verl/verl/experimental/teacher_loop/teacher_model.py:140
↓ 2 callersFunctionslow_task_in_thread
()
verl/tests/utils/test_timeout_decorator_cpu.py:164
↓ 2 callersFunctionsort_placement_group_by_node_ip
Sort the placement groups by node ip, all bundles in a single placement group should be on the same node. FSDPCheckpointManager saves sharde
verl/verl/single_controller/ray/base.py:69
↓ 2 callersFunctionsplit_tuple
Split the elements in a tuple/interval, while handling well-formatted commas in large numbers
verl/verl/utils/reward_score/prime_math/__init__.py:227
↓ 2 callersFunctionstrip_string
(string)
verl/verl/utils/reward_score/math_reward.py:162
↓ 2 callersFunctionstripped_string_compare
(s1, s2)
verl/verl/utils/reward_score/prime_code/testing_util.py:571
↓ 2 callersMethodsub
(self, data: DataProto)
verl/tests/single_controller/test_colocated_workers_fused.py:47
↓ 2 callersMethodsub
(self, x)
verl/tests/single_controller/test_fused_workers_on_cpu.py:45
↓ 2 callersFunctionsupport_distributed_convert
(hf_config: AutoConfig)
verl/scripts/converter_hf_to_mcore.py:438
↓ 2 callersFunctionsync_model_parameters_global
(layer)
verl/tests/models/test_transformers_ulysses.py:92
↓ 2 callersMethodsynchronize
Block until all ops on this stream complete.
infinity/runtime/stream.py:28
↓ 2 callersFunctiontile_images
Copied from maniskill https://github.com/haosulab/ManiSkill Tile multiple images to a single image comprised of nrows and an appropriate
verl/verl/experimental/vla/envs/action_utils.py:87
↓ 2 callersMethodto
Move working copy to device.
infinity/optimizer.py:18
↓ 2 callersMethodto
Manual control of load/offload
verl/verl/workers/engine_workers.py:156
↓ 2 callersMethodto_nested
(self, tensor: torch.Tensor)
verl/tests/utils/test_special_megatron_kl_loss_tp.py:120
↓ 2 callersMethodunload_lora_adapter
(self, lora_name: str)
verl/verl/workers/rollout/sglang_rollout/http_server_engine.py:787
↓ 2 callersMethodupdate_shared_flats
Refresh shared-memory weight flats from CPU master params. Called by main process after optimizer.step().
infinity/model/mp_state.py:218
↓ 2 callersMethodupdate_weights
(self, global_steps: int = None)
verl/verl/workers/megatron_workers.py:1018
↓ 2 callersMethodupdate_weights
(self, global_steps: int = None)
verl/verl/workers/fsdp_workers.py:1766
↓ 2 callersMethodupload_to_huggingface
(self)
verl/scripts/legacy_model_merger.py:243
↓ 2 callersMethodupload_to_huggingface
(self)
verl/verl/model_merger/base_model_merger.py:407
↓ 2 callersFunctionverify
Verify if the solution is correct. Args: solution_str: The solution string to verify answer: The ground truth answer stri
verl/verl/utils/reward_score/math_dapo.py:220
↓ 2 callersFunctionverify
( solution_str: str, gt: str, )
verl/examples/fapo_trainer/reward_fn.py:29
↓ 2 callersMethodwait_for_complete
Wait for the broadcast operation to complete. Returns: list[ParameterMeta]: The bucket meta after broadcast.
verl/verl/checkpoint_engine/kimi_checkpoint_engine.py:212
← previousnext →1,101–1,200 of 5,181, ranked by callers