MCPcopy Create free account

hub / github.com/McGill-NLP/the-markovian-thinker / functions

Functions2,081 in github.com/McGill-NLP/the-markovian-thinker

↓ 4 callersMethodsave_to_disk
(self, filepath)
verl/protocol.py:395
↓ 4 callersFunctionset_expandable_segments
Enable or disable expandable segments for cuda. Args: enable (bool): Whether to enable expandable segments. Used to avoid OOM.
verl/utils/device.py:89
↓ 4 callersMethodshared_embedding_or_output_weight
(self)
verl/models/qwen2/megatron/modeling_qwen2_megatron.py:622
↓ 4 callersMethodspawn
Spawn to a dictionary of worker groups, each with a subset of method with prefix. Args: prefix_set: Set of prefixes to create wor
verl/single_controller/ray/base.py:480
↓ 4 callersMethodstart_profile
Start profiling for the current rank in the current training step.
verl/workers/fsdp_workers.py:960
↓ 4 callersMethodstop
(self)
verl/utils/profiler/profile.py:98
↓ 4 callersMethodstop_profile
Stop profiling for the current rank in the current training step.
verl/workers/fsdp_workers.py:965
↓ 4 callersFunctiontopk_reduce_ratio_min_max
Calculate topk items take-up ratio, and min/max timing across all ranks.
verl/utils/profiler/performance.py:226
↓ 3 callersMethod__init__
(self, dim, max_position_embeddings=2048, base=10000, device=None)
verl/models/qwen2/megatron/layers/parallel_attention.py:43
↓ 3 callersMethod_bind_worker_method
Binds worker methods to the WorkerGroup based on registered attributes. Args: user_defined_cls (type): The class containing metho
verl/single_controller/base/worker_group.py:185
↓ 3 callersFunction_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader_depracated.py:186
↓ 3 callersFunction_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/models/mcore/loader.py:186
↓ 3 callersFunction_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/models/llama/megatron/checkpoint_utils/llama_loader_depracated.py:188
↓ 3 callersFunction_check_dispatch_mode
(dispatch_mode)
verl/single_controller/base/decorator.py:401
↓ 3 callersMethod_execute_remote_single_worker
Execute a method on a single worker remotely. Args: worker: The worker actor handle method_name: Name of the method t
verl/single_controller/ray/base.py:544
↓ 3 callersFunction_fetch_tp_shard_tensor
fetch tensor in tp shards
verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:126
↓ 3 callersFunction_fetch_tp_shard_tensor
fetch tensor in tp shards
verl/models/llama/megatron/checkpoint_utils/llama_loader.py:128
↓ 3 callersFunction_get_attr
(attr_name, default_value=None)
verl/utils/fsdp_utils.py:85
↓ 3 callersFunction_get_current_mem_info
Get current memory usage. Note that CPU device memory info is always 0. Args: unit (str, optional): The unit of memory measurement.
verl/utils/profiler/performance.py:29
↓ 3 callersFunction_get_gpt_model
(model)
verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:89
↓ 3 callersFunction_get_gpt_model
(model)
verl/models/mcore/saver.py:100
↓ 3 callersFunction_get_gpt_model
(model)
verl/models/llama/megatron/checkpoint_utils/llama_saver.py:89
↓ 3 callersMethod_init_hf_config_and_tf_config
( self, model_path, tokenizer_or_path, dtype, override_model_config,
verl/workers/megatron_workers.py:92
↓ 3 callersMethod_load_checkpoint
(self)
verl/trainer/ppo/ray_trainer.py:942
↓ 3 callersFunction_post_process_outputs
(processing_class, output)
verl/workers/rollout/sglang_rollout/sglang_rollout.py:200
↓ 3 callersMethod_process_message_tokens
Process tokens for a single message or a group of messages. Args: messages: List of message dictionaries sta
verl/utils/dataset/multiturn_sft_dataset.py:110
↓ 3 callersMethod_save_checkpoint
(self)
verl/trainer/ppo/ray_trainer.py:884
↓ 3 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
verl/models/llama/megatron/layers/parallel_attention.py:53
↓ 3 callersMethod_start_profiling
Start profiling for all worker groups if profiling is enabled.
verl/trainer/ppo/ray_trainer.py:999
↓ 3 callersMethod_stop_profiling
Stop profiling for all worker groups if profiling is enabled.
verl/trainer/ppo/ray_trainer.py:1010
↓ 3 callersFunction_str_is_int
(x: str)
verl/utils/reward_score/prime_math/__init__.py:90
↓ 3 callersFunction_unwrap_ray_remote
(cls)
verl/single_controller/ray/base.py:730
↓ 3 callersFunction_update_function
(fn)
verl/tasks/task.py:66
↓ 3 callersFunctionbroadcast_dict_tensor
TODO: optimize this. Technically, we only need one broadcast
verl/utils/torch_functional.py:257
↓ 3 callersFunctioncalc_padded_numel
for cuda memory alignment, make sure alignment by 128-bits
verl/utils/memory_buffer.py:55
↓ 3 callersMethodcollective_rpc
( self, method: str | Callable, timeout: Optional[float] = None, args: tuple =
verl/workers/rollout/vllm_rollout/vllm_async_server.py:105
↓ 3 callersMethodcollective_rpc
( self, method: str | Callable, timeout: Optional[float] = None, args: tuple =
verl/workers/rollout/vllm_rollout/vllm_async_server.py:154
↓ 3 callersFunctioncompute_advantage
Compute advantage estimates for policy optimization. This function computes advantage estimates using various estimators like GAE, GRPO, REINFORC
verl/trainer/ppo/ray_trainer.py:214
↓ 3 callersMethodcompute_log_prob
Compute logits given a batch of data. Args: data (DataProto): a batch of data represented by DataProto. It must contain key ```in
verl/workers/actor/base.py:39
↓ 3 callersMethodcompute_reward
Computing reward given input_ids. The transformers should output a tensor with shape [batch_size, sequence_length], and the value at [EOS]
verl/workers/reward_model/base.py:28
↓ 3 callersMethodcompute_rm_score
(self, data: DataProto)
verl/workers/fsdp_workers.py:1681
↓ 3 callersFunctioncompute_throughout_metrics
Computes throughput metrics for PPO training. This function calculates performance metrics related to token processing speed, including
verl/trainer/ppo/metric_utils.py:567
↓ 3 callersFunctionconvert_checkpoint_from_transformers_to_megatron
( hf_model, model, hf_config, layer_start_end: Optional[tuple[int, int]] = None )
scripts/converter_hf_to_mcore.py:118
↓ 3 callersFunctioncreate_colocated_worker_cls
This function should return a class instance that delegates the calls to every cls in cls_dict
verl/single_controller/ray/base.py:750
↓ 3 callersFunctioncreate_device_mesh
(world_size, fsdp_size)
verl/workers/fsdp_workers.py:87
↓ 3 callersMethodcreate_resource_pool
Create Ray resource pools for distributed training. Initializes resource pools based on the resource pool specification, with each po
verl/trainer/ppo/ray_trainer.py:92
↓ 3 callersFunctioncreate_rl_dataset
Create a dataset. Arguments: data_paths: List of paths to data files. data_config: The data config. tokenizer (Tokenizer)
verl/trainer/main_policy_iteration.py:348
↓ 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 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 callersMethodforward
( self, hidden_states: torch.FloatTensor, vocab_weights: torch.FloatTensor, in
verl/utils/experimental/torch_functional.py:202
↓ 3 callersMethodgenerate
Generate tokens from prompt ids. Args: request_id (str): request id for sticky session. prompt_ids (List[int]): List
verl/experimental/agent_loop/agent_loop.py:85
↓ 3 callersMethodget_backend
(cls)
verl/utils/rollout_trace.py:88
↓ 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:606
↓ 3 callersFunctionget_dataset_paths
Get the dataset paths for the given task configs and split. Args: task_configs: The task configs split: The dataset split Re
verl/tasks/task.py:288
↓ 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:508
↓ 3 callersFunctionget_fsdp_state_ctx
(model, state_type, state_cfg, optim_cfg)
verl/utils/fsdp_utils.py:407
↓ 3 callersFunctionget_mcore_forward_fn
Get the forward function for given model architecture.
verl/models/mcore/registry.py:212
↓ 3 callersMethodget_n_gpus
Get the number of gpus in this cluster.
verl/trainer/ppo/ray_trainer.py:116
↓ 3 callersMethodget_openai_tool_schema
(self)
verl/tools/base_tool.py:43
↓ 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:68
↓ 3 callersFunctionget_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/trainer/constants_ppo.py:31
↓ 3 callersFunctionget_shard_placement_fn
Choose the dimension that can divide fsdp_size to avoid padding
verl/utils/fsdp_utils.py:539
↓ 3 callersFunctionget_sharding_strategy
(device_mesh)
verl/workers/fsdp_workers.py:97
↓ 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 callersFunctioninit_mcore_model
Initialize a Mcore model. Args: tfconfig: The transformer config. hf_config: The HuggingFace config. pre_process: Op
verl/models/mcore/registry.py:174
↓ 3 callersFunctionis_nvtx_available
()
verl/utils/import_utils.py:55
↓ 3 callersFunctionis_trl_available
()
verl/utils/import_utils.py:64
↓ 3 callersMethodload_checkpoint
(self)
verl/trainer/fsdp_sft_trainer.py:595
↓ 3 callersFunctionload_tensor_to_gpu
(tensor)
verl/utils/megatron_utils.py:439
↓ 3 callersFunctionmake_batch_generator
Creates a batch generator suitable for Megatron pipeline parallelism, handling virtual pipeline parallelism (VPP). If VPP is used (vpp_s
verl/utils/megatron/pipeline_parallel.py:49
↓ 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 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:399
↓ 3 callersMethodpostprocess_data
(self, data: DataProto)
verl/workers/sharding_manager/base.py:34
↓ 3 callersMethodrelease
Release the tool instance. Args: instance_id: The instance id of the tool.
verl/tools/base_tool.py:87
↓ 3 callersMethodremove_previous_save_local_path
(self, path)
verl/utils/checkpoint/checkpoint_manager.py:134
↓ 3 callersFunctionrestore_dynamic_batch
Restore a batch from dynamic batching. Args: data (torch.Tensor): The input data. batch_idx_list (List[List[int]]): The list
verl/utils/seqlen_balancing.py:362
↓ 3 callersMethodsave_checkpoint
Save checkpoint using FSDPCheckpointManager with improved tracking
verl/trainer/fsdp_sft_trainer.py:525
↓ 3 callersFunctionset_random_seed
(seed)
verl/workers/megatron_workers.py:72
↓ 3 callersMethodsleep
(self)
verl/workers/sharding_manager/fsdp_sglang.py:181
↓ 3 callersFunctionslice_input_tensor
(x: Tensor, dim: int, padding: bool = True, group: ProcessGroup = None)
verl/utils/ulysses.py:117
↓ 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 callersMethodto
Move FSDP model and/or optimizer to CPU or GPU with offload support.
verl/workers/engine/fsdp/engine_impl.py:630
↓ 3 callersMethodupdate_actor
(self, data: DataProto)
verl/workers/roles/actor.py:34
↓ 3 callersFunctionupdate_model_config
Update the module config with the override_config_kwargs. Args: module_config: The module config from Huggingface Transformers. ov
verl/utils/model.py:54
↓ 3 callersMethodupdate_options
Update the Ray actor creation options. Args: options: Dictionary of options to update
verl/single_controller/ray/base.py:204
↓ 3 callersMethodvalidate
Validate actor configuration with runtime parameters.
verl/workers/config/actor.py:142
↓ 3 callersFunctionverify
Verify if the solution is correct. Args: solution_str: The solution string to verify answer: The ground truth answer stri
verl/utils/reward_score/math_dapo.py:220
↓ 3 callersMethodwrap_generate_sequences
(self)
verl/utils/rollout_skip.py:67
↓ 2 callersMethod__enter__
(self)
verl/workers/sharding_manager/base.py:25
↓ 2 callersMethod__exit__
(self, exc_type, exc_value, traceback)
verl/workers/sharding_manager/base.py:28
↓ 2 callersMethod__init__
(self)
verl/utils/activation_offload.py:93
↓ 2 callersMethod__init__
(self, config, tokenizer)
verl/workers/fsdp_workers_with_reward.py:50
↓ 2 callersMethod__init__
( self, *args, success_score: float = 1.0, failure_score: float = -1.0,
verl/workers/reward_manager/delethink.py:19
↓ 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
← previousnext →201–300 of 2,081, ranked by callers