MCPcopy Create free account

hub / github.com/DataArcTech/DataArc-SynData-Toolkit / functions

Functions2,774 in github.com/DataArcTech/DataArc-SynData-Toolkit

↓ 3 callersFunctionenable_activation_offloading
Enable activation offloading for the model. It groups activations by TransformerLayer and offloads activation groups asynchronously. This mea
verl/utils/activation_offload.py:500
↓ 3 callersMethodfinalize
( self, processing_class: PreTrainedTokenizer | PreTrainedTokenizerFast | ProcessorMixin,
verl/workers/rollout/schemas.py:551
↓ 3 callersFunctionfind_latest_ckpt_path
Return the most recent checkpoint directory based on a tracker file. Args: path (str): Base directory containing the checkpoint trac
verl/utils/checkpoint/checkpoint_manager.py:167
↓ 3 callersMethodflush
(self)
verl/utils/logger/aggregate_logger.py:46
↓ 3 callersMethodfrom_single_dict
Create a DataProto from a dict of tensors and non_tensors
verl/protocol.py:491
↓ 3 callersMethodfrom_tensordict
Create a DataProto from a TensorDict. This assumes that 1. All the tensor in tensor_dict have the same dim0 2. Only dim0 is the batch
verl/protocol.py:557
↓ 3 callersMethodgenerate
Generate synthetic data samples using batch generation. Args: demo_examples: Optional list of demo examples (dict with '
sdgsystem/distillation/sdg_distill.py:39
↓ 3 callersMethodgenerate
Generate responses from LLM model. Args: prompts: Single prompt string or list of prompts n: Number of respo
sdgsystem/models/client.py:25
↓ 3 callersMethodgenerate_state_dict
( self, generate_model: bool = True, generate_optimizer: bool = True, generate
verl/utils/checkpoint/megatron_checkpoint_manager.py:241
↓ 3 callersFunctionget
(tensordict: TensorDict, key: str, default=None)
verl/utils/tensordict_utils.py:347
↓ 3 callersFunctiongetCurrentStepIndex
()
sdgsystem/webui/src/components/generation-core-modal/index.tsx:76
↓ 3 callersMethodget_backend
(cls)
verl/utils/rollout_trace.py:104
↓ 3 callersFunctionget_checkpoint_tracker_filename
Tracker file rescords the latest chckpoint during training to restart from.
verl/utils/checkpoint/checkpoint_manager.py:200
↓ 3 callersFunctionget_config_class
Get the appropriate config class for a training method.
sdgsystem/trainer/config.py:315
↓ 3 callersFunctionget_constant_schedule_with_warmup
Create a constant LR schedule with a linear warmup phase. Args: optimizer (Optimizer): Wrapped optimizer. num_warmup_steps (
verl/utils/torch_functional.py:585
↓ 3 callersFunctionget_custom_reward_fn
Load and return a custom reward function from external file. Dynamically imports a reward function from a specified file path and wraps it wi
verl/trainer/ppo/reward.py:63
↓ 3 callersMethodget_data_parallel_group
(self)
verl/workers/engine/megatron/transformer_impl.py:443
↓ 3 callersMethodget_data_parallel_group
(self)
verl/workers/engine/fsdp/transformer_impl.py:481
↓ 3 callersFunctionget_default_kwargs_for_model_parallel_config
()
verl/utils/megatron/tensor_parallel.py:35
↓ 3 callersFunctionget_dist_checkpoint_path
(checkpoint_path)
verl/utils/megatron_utils.py:595
↓ 3 callersFunctionget_fsdp_state_ctx
(model, state_type, state_cfg, optim_cfg)
verl/utils/fsdp_utils.py:408
↓ 3 callersFunctionget_generation_config
( model: str, trust_remote_code: bool = False, )
verl/utils/model.py:87
↓ 3 callersFunctionget_mcore_forward_fn
Get the forward function for given model architecture.
verl/models/mcore/registry.py:239
↓ 3 callersFunctionget_megatron_last_lr
Get the last learning rate from the optimizer parameter scheduler.
verl/utils/megatron/optimizer.py:116
↓ 3 callersFunctionget_megatron_optimizer
( model, config: OptimizerConfig, )
verl/utils/megatron/optimizer.py:65
↓ 3 callersFunctionget_megatron_optimizer_param_scheduler
Get the optimizer parameter scheduler for Megatron.
verl/utils/megatron/optimizer.py:76
↓ 3 callersFunctionget_policy_loss_fn
Get the policy loss with a given name. Args: name: `(str)` The name of the policy loss. Returns: `(callable)`: T
verl/trainer/ppo/core_algos.py:70
↓ 3 callersMethodget_processor
(self)
verl/workers/config/model.py:160
↓ 3 callersFunctionget_random_string
(length: int)
verl/single_controller/ray/base.py:38
↓ 3 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/workers/rollout/base.py:87
↓ 3 callersFunctionget_rollout_replica_class
(rollout: str)
verl/workers/rollout/replica.py:274
↓ 3 callersFunctionget_rope_index
Gets the position ids for Qwen2-VL, it should be generated before sharding the sequence. The batch dim has been removed and the input_ids sho
verl/models/transformers/qwen2_vl.py:64
↓ 3 callersFunctionget_seqlen_balanced_partitions
Calculates partitions of indices from seqlen_list such that the sum of sequence lengths in each partition is balanced. Uses the Karmarkar-Kar
verl/utils/seqlen_balancing.py:161
↓ 3 callersFunctionget_shard_placement_fn
Choose the dimension that can divide fsdp_size to avoid padding
verl/utils/fsdp_utils.py:540
↓ 3 callersFunctionget_sharding_strategy
(device_mesh)
verl/workers/fsdp_workers.py:109
↓ 3 callersFunctionget_version
(pkg)
verl/workers/rollout/vllm_rollout/__init__.py:20
↓ 3 callersFunctionget_visible_devices_keyword
Function that gets visible devices keyword name. Returns: 'CUDA_VISIBLE_DEVICES' or `ASCEND_RT_VISIBLE_DEVICES`
verl/utils/device.py:32
↓ 3 callersFunctionglm4v_forward
( self: "Glm4vForConditionalGeneration", input_ids: torch.LongTensor, attention_mask: Optional[tor
verl/models/transformers/glm4v.py:428
↓ 3 callersMethodinfer_batch
(self, data: TensorDict)
verl/workers/engine_workers.py:222
↓ 3 callersFunctioninit_megatron_optim_config
( optim_config: dict, use_distributed_optimizer: bool = True, fp16: bool = False )
verl/utils/megatron/optimizer.py:24
↓ 3 callersMethodinit_standalone
Init standalone rollout server, create new resource pool for this rollout.
verl/workers/rollout/replica.py:160
↓ 3 callersFunctioninitialize_global_process_group_ray
(timeout_second=None)
verl/utils/distributed.py:74
↓ 3 callersMethodis_r2_record_action
Return True if the current router_replay_action is RECORD (R2) for the local router instances. This inspects the first local RouterReplay ins
verl/utils/megatron/router_replay_utils.py:412
↓ 3 callersFunctionis_trl_available
()
verl/utils/import_utils.py:64
↓ 3 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/trainer/ppo/core_algos.py:1442
↓ 3 callersMethodlaunch_servers
Launch http server in each node.
verl/workers/rollout/replica.py:195
↓ 3 callersFunctionlist_of_dict_to_dict_of_list
(list_of_dict: list[dict])
verl/protocol.py:201
↓ 3 callersFunctionload_fsdp_optimizer
(optimizer, device_id)
verl/utils/fsdp_utils.py:216
↓ 3 callersFunctionload_megatron_optimizer
(optimizers)
verl/utils/megatron_utils.py:571
↓ 3 callersFunctionload_reward_manager
Load and initialize a reward manager based on the configuration. Args: config: PPO trainer configuration object containing reward_mo
verl/trainer/ppo/reward.py:120
↓ 3 callersFunctionload_tensor_to_gpu
(tensor)
verl/utils/megatron_utils.py:522
↓ 3 callersFunctionmakedirs
r"""Works like os.makedirs() but supports hdfs. Super-mkdir; create a leaf directory and all intermediate ones. Works like mkdir, except tha
verl/utils/hdfs_io.py:50
↓ 3 callersFunctionmark_end_range
End a mark range in the profiler. Args: range_id (str): The id of the mark range to end.
verl/utils/profiler/mstx_profile.py:39
↓ 3 callersFunctionmark_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/utils/profiler/mstx_profile.py:29
↓ 3 callersFunctionmasked_sum
Compute mean of tensor with a masked values.
verl/utils/torch_functional.py:163
↓ 3 callersFunctionnormalize_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:124
↓ 3 callersFunctionoffload_tensor_to_cpu
(tensor)
verl/utils/megatron_utils.py:482
↓ 3 callersFunctionprocess_image
(image: dict | Image.Image, image_patch_size: int = 14)
verl/utils/dataset/vision_utils.py:23
↓ 3 callersFunctionprocess_video
Converts a video dict into a [n_frames, 3, H, W] tensor Add video sample FPS in a future MR
verl/utils/dataset/vision_utils.py:62
↓ 3 callersFunctionqwen2_vl_forward
( self: "Qwen2VLForConditionalGeneration", input_ids: torch.LongTensor, attention_mask: Optional[t
verl/models/transformers/qwen2_vl.py:431
↓ 3 callersFunctionregister_megatron_training_hooks
(model: list[torch.nn.Module], optimizer)
verl/utils/megatron_utils.py:1187
↓ 3 callersMethodrelease
Release weights and kv cache in GPU memory.
verl/workers/rollout/base.py:65
↓ 3 callersMethodrelease_memory_occupation
Release GPU memory occupation temporarily. Args: tags (Optional[List[str]], optional): List of tags to specify which memory to re
verl/workers/rollout/sglang_rollout/http_server_engine.py:535
↓ 3 callersFunctionreplace_lora_wrapper
Replace LoRA parameter keys with base layer equivalents. Transforms LoRA parameter names to their corresponding base layer names for proper w
verl/utils/fsdp_utils.py:669
↓ 3 callersMethodrun_job
Run job task in background thread.
sdgsystem/app/core/job_manager.py:45
↓ 3 callersMethodselect_idxs
Select specific indices from the DataProto. Args: idxs (torch.Tensor or numpy.ndarray or list): Indices to select
verl/protocol.py:646
↓ 3 callersMethodset_global_router_replay_action
Sets the router replay action for all router instances.
verl/utils/megatron/router_replay_patch.py:116
↓ 3 callersFunctionset_random_seed
(seed, only_rollout=False)
verl/workers/megatron_workers.py:86
↓ 3 callersMethodset_router_replay_action
Sets the router replay action for this layer.
verl/utils/megatron/router_replay_patch.py:107
↓ 3 callersMethodsleep
Sleep all rollout replica instances.
verl/experimental/agent_loop/agent_loop.py:876
↓ 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:52
↓ 3 callersMethodtrain_batch
Perform a training step on a batch of data. Args: data: The input data for training, typically containing tensors and me
verl/workers/engine/base.py:110
↓ 3 callersMethodtrainer_mode
Context switch hybridengine to trainer mode.
verl/workers/megatron_workers.py:703
↓ 3 callersMethodtrainer_mode
Context switch hybridengine to trainer mode.
verl/workers/fsdp_workers.py:737
↓ 3 callersFunctionulysses_pad
(input_ids_rmpad: torch.Tensor, position_ids_rmpad: Optional[torch.Tensor] = None, sp_size: int = 1)
verl/utils/ulysses.py:278
↓ 3 callersMethodupdate_options
Update the Ray actor creation options. Args: options: Dictionary of options to update
verl/single_controller/ray/base.py:274
↓ 3 callersMethodvalidate_sample
Validate if a sample has the correct format. For structured generation samples (from Outlines), validation is minimal since Outlines
sdgsystem/dataset/dataset.py:39
↓ 3 callersFunctionvocab_parallel_log_probs_from_logits
TODO(zhangchi.usc1992): We may change the implementation later
verl/utils/megatron/tensor_parallel.py:154
↓ 2 callersMethod__enter__
(self)
verl/workers/engine/fsdp/transformer_impl.py:681
↓ 2 callersMethod__exit__
(self, exc_type, exc_value, traceback)
verl/workers/engine/fsdp/transformer_impl.py:687
↓ 2 callersMethod__init__
(self)
verl/utils/activation_offload.py:93
↓ 2 callersMethod__init__
(self, config: CriticConfig)
verl/workers/engine_workers.py:273
↓ 2 callersMethod__init__
( self, model_config: HFModelConfig, engine_config: McoreEngineConfig, optimiz
verl/workers/engine/megatron/transformer_impl.py:66
↓ 2 callersMethod__init__
Initialize the FSDPEngine. Sets up distributed device meshes, LoRA, and offload policies based on config. Args:
verl/workers/engine/fsdp/transformer_impl.py:87
↓ 2 callersMethod__init__
( self, replica_rank: int, config: RolloutConfig, model_config: HFModelConfig,
verl/workers/rollout/vllm_rollout/vllm_async_server.py:624
↓ 2 callersMethod__init__
( self, patch_size: int = 14, temporal_patch_size: int = 2, in_channels: int =
verl/models/mcore/qwen2_5_vl/vision_model.py:35
↓ 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__init__
(self, tokenizer)
verl/experimental/agent_loop/tool_parser.py:45
↓ 2 callersMethod__post_init__
Validate actor configuration parameters.
verl/workers/config/actor.py:168
↓ 2 callersMethod__post_init__
(self)
verl/workers/config/engine.py:69
↓ 2 callersMethod__setattr__
Set the value of an attribute. Check if the attr is mutable before setting the value.
verl/base_config.py:33
↓ 2 callersFunction_async_batchmeta_to_dataproto
(batchmeta: "BatchMeta")
verl/utils/transferqueue_utils.py:98
↓ 2 callersFunction_batchmeta_to_dataproto
(batchmeta: "BatchMeta")
verl/utils/transferqueue_utils.py:110
↓ 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:288
↓ 2 callersFunction_broadcast_tp_shard_tensor_qkv
broadcast tensor in tp shards across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:257
↓ 2 callersFunction_broadcast_tp_shard_tensor_qkv
broadcast tensor in tp shards across mp_group
verl/models/mcore/saver.py:271
↓ 2 callersFunction_broadcast_tp_shard_tensor_qkv
broadcast tensor in tp shards across mp_group
verl/models/mcore/loader.py:288
↓ 2 callersMethod_build_messages
(self, example: dict)
verl/utils/dataset/rl_dataset.py:269
↓ 2 callersMethod_build_model_optimizer
( self, model_path, optim_config, override_model_config, override_transformer_config, override_ddp_con
verl/workers/megatron_workers.py:356
↓ 2 callersMethod_build_model_optimizer
( self, model_path, fsdp_config: FSDPEngineConfig, optim_config, overr
verl/workers/fsdp_workers.py:269
← previousnext →301–400 of 2,774, ranked by callers