MCPcopy Create free account

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

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

↓ 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 callersMethod_async_rollout_a_request
( self, req: AsyncRolloutRequest, do_sample: bool = True, is_validate: bool =
verl/workers/rollout/sglang_rollout/sglang_rollout.py:800
↓ 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:196
↓ 2 callersMethod_build_model_optimizer
( self, model_path, optim_config, override_model_config, override_transformer_config, override_ddp_con
verl/workers/megatron_workers.py:273
↓ 2 callersMethod_build_model_optimizer
( self, model_path, fsdp_config: FSDPEngineConfig, optim_config, overr
verl/workers/fsdp_workers.py:243
↓ 2 callersMethod_build_rollout
(self, trust_remote_code=False)
verl/workers/megatron_workers.py:376
↓ 2 callersMethod_build_rollout
(self, trust_remote_code=False)
verl/workers/fsdp_workers.py:494
↓ 2 callersMethod_compute_loss_and_backward
Compute loss with optional sequence parallelism and remove padding features
verl/trainer/fsdp_sft_trainer.py:355
↓ 2 callersFunction_concat_data_proto_or_future
(output: list)
verl/single_controller/base/decorator.py:137
↓ 2 callersMethod_convert_attention_param
(self, name: str, params: list[torch.Tensor])
verl/models/mcore/weight_converter.py:270
↓ 2 callersMethod_convert_mlp_param
(self, name: str, params: list[torch.Tensor])
verl/models/mcore/weight_converter.py:309
↓ 2 callersFunction_deep_equal
Recursively performs a deep comparison between two Python objects. - Handles NaN values correctly (NaN == NaN evaluates to True). - Handl
verl/protocol.py:187
↓ 2 callersMethod_download
(self, use_origin_parquet=False)
verl/utils/dataset/rl_dataset.py:124
↓ 2 callersFunction_fetch_tp_shard_tensor_qkv
fetch tensor in tp shards across mp_group
verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:168
↓ 2 callersMethod_filter_groups
( self, batch: DataProto, state: dict[str, Any] )
verl/trainer/treetune_ppo/ray_trainer.py:564
↓ 2 callersMethod_forward_micro_batch
(self, micro_batch)
verl/workers/critic/dp_critic.py:57
↓ 2 callersMethod_forward_micro_batch
(self, micro_batch)
verl/workers/engine/fsdp/engine_impl.py:404
↓ 2 callersMethod_forward_micro_batch
Returns: entropy: # (bs, response_len) log_probs: # (bs, response_len)
verl/workers/actor/dp_actor.py:92
↓ 2 callersMethod_get_gen_batch
(self, batch: DataProto)
verl/trainer/treetune_ppo/ray_trainer.py:872
↓ 2 callersMethod_get_gen_batch
(self, batch: DataProto)
verl/trainer/delethink_ppo/ray_trainer.py:1007
↓ 2 callersFunction_get_model_runner_workers
(vllm_config, init_ray: bool = True)
verl/workers/rollout/vllm_rollout/vllm_async_server.py:46
↓ 2 callersMethod_get_position_ids
( processing_class: PreTrainedTokenizer | PreTrainedTokenizerFast | ProcessorMixin, input_ids:
verl/workers/rollout/schemas.py:258
↓ 2 callersMethod_get_tp_pp_rank_from_sharded_dir
(self, sharded_dir: str)
scripts/legacy_model_merger.py:459
↓ 2 callersMethod_handle_engine_call
( self, _req: AsyncRolloutRequest, sampling_params: dict, image_data: Optional[list[Any]] = None )
verl/workers/rollout/sglang_rollout/sglang_rollout.py:1021
↓ 2 callersMethod_handle_engine_generate
( self, generation_prompt_ids: list[int], sampling_params: dict, image_data: Optional[list[Any]] = Non
verl/workers/rollout/sglang_rollout/sglang_rollout.py:1027
↓ 2 callersFunction_is_frac
(expr: str)
verl/utils/reward_score/prime_math/__init__.py:86
↓ 2 callersMethod_load_dataset_from_config
Load dataset from config data paths for the given split. Args: split: The dataset split to load Returns: The
verl/tasks/task.py:184
↓ 2 callersFunction_load_hf_model
Helper function containing the loading hf model logic
verl/utils/model.py:394
↓ 2 callersMethod_log_generations_to_wandb
Log samples to wandb as a table
verl/utils/tracking.py:307
↓ 2 callersFunction_map_each_response
(resp)
verl/workers/rollout/sglang_rollout/sglang_rollout.py:188
↓ 2 callersFunction_materialize_futures
(*args, **kwargs)
verl/single_controller/base/decorator.py:415
↓ 2 callersMethod_maybe_log_val_generations
Log a table of validation samples to the configured logger (wandb or swanlab)
verl/trainer/ppo/ray_trainer.py:604
↓ 2 callersFunction_normalize
Normalize answer expressions.
verl/utils/reward_score/prime_math/__init__.py:126
↓ 2 callersFunction_pad_tensor
(x: Tensor, dim: int, padding_size: int)
verl/utils/ulysses.py:104
↓ 2 callersMethod_pad_to_length
(self, input_ids, attention_mask)
verl/utils/dataset/rm_dataset.py:98
↓ 2 callersFunction_padding_and_split_data
(obj, chunks)
verl/single_controller/base/decorator.py:96
↓ 2 callersFunction_parse
(s)
verl/utils/reward_score/prime_math/grader.py:325
↓ 2 callersMethod_postprocess
Process the padded outputs from _run_agent_loop and combine them into a batch.
verl/experimental/agent_loop/agent_loop.py:551
↓ 2 callersMethod_read_files_and_tokenize
(self)
verl/utils/dataset/rl_dataset.py:131
↓ 2 callersFunction_record_directory_structure
(folder_path)
verl/utils/fs.py:164
↓ 2 callersMethod_remove_generation_prompt_ids_if_present
Remove generation prompt IDs from input tensors if they are present at the end.
verl/workers/rollout/schemas.py:534
↓ 2 callersMethod_sample_dataset
(self, dataset: Dataset)
verl/tasks/task.py:199
↓ 2 callersMethod_set_cos_sin_cache
(self, seq_len, device, dtype)
verl/models/qwen2/megatron/layers/parallel_attention.py:57
↓ 2 callersFunction_split_args_kwargs_data_proto
(chunks, *args, **kwargs)
verl/single_controller/base/decorator.py:74
↓ 2 callersFunction_strip_properly_formatted_commas
(expr: str)
verl/utils/reward_score/prime_math/__init__.py:115
↓ 2 callersFunction_unpad_tensor
(x: Tensor, dim: int, padding_size: int)
verl/utils/ulysses.py:111
↓ 2 callersMethod_validate
(self)
verl/trainer/treetune_ppo/ray_trainer.py:657
↓ 2 callersMethod_validate
(self)
verl/trainer/ppo/ray_trainer.py:628
↓ 2 callersMethod_validate
(self)
verl/trainer/delethink_ppo/ray_trainer.py:820
↓ 2 callersMethod_validate_bbox
Validate the bounding box dimensions and aspect ratio.
verl/tools/image_zoom_in_tool.py:181
↓ 2 callersFunctionadd_token2text
(self, result)
verl/utils/rollout_trace.py:154
↓ 2 callersMethodadd_tool_response_messages
( self, processing_class: PreTrainedTokenizer | PreTrainedTokenizerFast | ProcessorMixin,
verl/workers/rollout/schemas.py:410
↓ 2 callersFunctionall_to_all_tensor
( local_input: Tensor, scatter_dim: int, gather_dim: int, group: Optional[dist.ProcessGroup] =
verl/utils/ulysses.py:133
↓ 2 callersFunctionapply_kl_penalty
Apply KL penalty to the token-level rewards. This function computes the KL divergence between the reference policy and current policy, then a
verl/trainer/ppo/ray_trainer.py:154
↓ 2 callersFunctionapply_rotary_pos_emb_absolute
Reroute to the appropriate apply_rotary_pos_emb function depending on bshd (conventional) / thd (packed seq) format In Qwen2-VL, the sha
verl/models/mcore/qwen2_5_vl/rope_utils.py:239
↓ 2 callersFunctionasync_server_class
Get async server class. Args: rollout_backend: str, rollout backend type (alias), should be "vllm" or "sglang". rollout_backend_m
verl/workers/rollout/async_server.py:121
↓ 2 callersFunctionbootstrap_metric
Performs bootstrap resampling to estimate statistics of metrics. This function uses bootstrap resampling to estimate the mean and standard d
verl/trainer/ppo/metric_utils.py:603
↓ 2 callersFunctionbuild_memory_buffer
Build the memory buffer given weight_buffer_meta Args: weight_buffer_meta: contains mapping from name to a dictionary containing shape an
verl/utils/memory_buffer.py:72
↓ 2 callersMethodbuild_packed_seq_params
( self, grid_thw: Optional[torch.Tensor], cu_seqlens: Optional[torch.Tensor] = None,
verl/models/mcore/qwen2_5_vl/vision_model.py:289
↓ 2 callersMethodbulk_offload_group
Bulk offload group.
verl/utils/activation_offload.py:298
↓ 2 callersFunctioncalculate_log_prob_diff
(log_probs1: torch.Tensor, log_probs2: torch.Tensor, mask: torch.Tensor)
verl/utils/debug/metrics.py:58
↓ 2 callersFunctioncalculate_rollout_probs_diff_metrics
calculate rollout vs actor logprobs diff, for debugging purpose Args: data: DataProto the data batch to calculate
verl/utils/debug/metrics.py:112
↓ 2 callersFunctioncall_sandbox_api
Calls the remote sandbox API to execute code with retry logic for Gateway Timeout, using increasing delay between retries. Logs internal call
verl/utils/reward_score/sandbox_fusion/utils.py:67
↓ 2 callersFunctioncall_search_api
Calls the remote search API to perform retrieval with retry logic for various errors, using increasing delay between retries. Logs internal
verl/tools/utils/search_r1_like_utils.py:34
↓ 2 callersFunctioncheck_exclude_modules
A helper method to check if the passed module's key name matches any of the exclude modules in the adapter_config. Adapted from https://githu
verl/utils/model.py:244
↓ 2 callersFunctioncheck_target_modules
A helper method to check if the passed module's key name matches any of the target modules in the adapter_config. Adapted from https://github
verl/utils/model.py:267
↓ 2 callersFunctioncompute_data_metrics_with_distribution
Computes various metrics from a batch of data for PPO training. This function calculates metrics related to scores, rewards, advantages, ret
verl/trainer/ppo/metric_utils.py:227
↓ 2 callersFunctioncompute_group_metrics
Compute rollout group metrics for each episode. Args: batch: A DataProto object containing batch data with episode information.
verl/trainer/ppo/metric_utils.py:431
↓ 2 callersMethodcompute_log_prob
(self, data: DataProto)
verl/workers/fsdp_workers.py:813
↓ 2 callersFunctioncompute_per_scores_metrics
Compute per-score metrics for each trajectory.
verl/trainer/ppo/metric_utils.py:403
↓ 2 callersFunctioncompute_stats
(arr)
verl/trainer/ppo/metric_utils.py:416
↓ 2 callersFunctioncompute_timing_and_throughput_metrics
Computes timing metrics for different processing stages in PPO training. This function calculates both raw timing metrics (in seconds) and p
verl/trainer/ppo/metric_utils.py:521
↓ 2 callersMethodcompute_values
(self, data: DataProto)
verl/workers/fsdp_workers.py:1285
↓ 2 callersFunctionconvert_checkpoint_from_transformers_to_megatron_dpskv3
( hf_model, model, hf_config, tfconfig, layer_start_end: Optional[tuple[int, int]] = None,
scripts/converter_hf_to_mcore.py:314
↓ 2 callersMethodconvert_param
(self, name: str, params_one_group: list[torch.Tensor])
verl/models/mcore/weight_converter.py:30
↓ 2 callersFunctionconvert_weight_keys
(state_dict: dict[str, torch.Tensor], model: PreTrainedModel)
verl/utils/model.py:223
↓ 2 callersFunctioncopy_local_path_from_hdfs
Deprecated. Please use copy_to_local instead.
verl/utils/fs.py:219
↓ 2 callersFunctioncreate_and_sync_state
(param_name, state, is_param)
verl/utils/fsdp_utils.py:337
↓ 2 callersFunctioncreate_rl_sampler
Create a sampler for the dataset. Arguments: data_config: The data config. dataset (Dataset): The dataset. Returns:
verl/trainer/main_ppo.py:338
↓ 2 callersFunctioncreate_sft_dataset
Create a dataset.
verl/trainer/fsdp_sft_trainer.py:825
↓ 2 callersFunctiondefault_tp_concat_fn
name: name of the parameter train_params: training parameters infer_params (Iterable[torch.Tensor]): a iterator towards list of parameter
verl/utils/megatron_utils.py:728
↓ 2 callersMethoddump
(self, data: io.BytesIO, name)
verl/utils/debug/trajectory_tracker.py:59
↓ 2 callersFunctionensure_divisible
Ensure the DataProto is divisible by size_divisor by padding if necessary. Args: data: (DataProto): the DataProto to check size_d
verl/protocol.py:98
↓ 2 callersMethodenv_keys
The keys of the environment variables that are used to configure the Worker.
verl/single_controller/base/worker.py:130
↓ 2 callersMethodexecute
Execute the tool. Args: instance_id: The instance id of the tool. parameters: The json string of the parameters of th
verl/tools/base_tool.py:62
↓ 2 callersMethodexecute_all_async
Execute a method on all workers asynchronously. Args: method_name: Name of the method to execute *args: Positional ar
verl/single_controller/ray/base.py:628
↓ 2 callersMethodexecute_rank_zero_async
Execute a method on rank zero worker asynchronously. Args: method_name: Name of the method to execute *args: Position
verl/single_controller/ray/base.py:576
↓ 2 callersFunctionextract_solution
(solution_str, method="strict")
verl/utils/reward_score/gsm8k.py:20
↓ 2 callersFunctionextract_solution
Extract the equation from the solution string.
verl/utils/reward_score/search_r1_like_qa_em.py:66
↓ 2 callersFunctionextract_step
(path)
verl/trainer/fsdp_sft_trainer.py:86
↓ 2 callersMethodfit
The training loop of PPO. The driver process only need to call the compute functions of the worker group through RPC to const
verl/trainer/ppo/ray_trainer.py:1038
↓ 2 callersMethodforward
Args: input_ids: input ids. shape (batch_size, seq_length) attention_mask: attention_mask. shape (batch_size, seq_le
verl/models/qwen2/megatron/modeling_qwen2_megatron.py:124
↓ 2 callersMethodforward
Args: input_ids: input ids. shape (batch_size, seq_length) attention_mask: attention_mask. shape (batch_size, seq_le
verl/models/llama/megatron/modeling_llama_megatron.py:123
↓ 2 callersMethodforward_backward_batch
( self, data: DataProto, forward_only=False, use_dynamic_bsz=False, mi
verl/workers/critic/megatron_critic.py:154
↓ 2 callersMethodforward_backward_batch
We assume: - The model takes input: (input_ids, attention_mask, position_ids). No rmpad for the input - The communication sha
verl/workers/actor/megatron_actor.py:327
↓ 2 callersFunctionforward_base_model
r""" Copy paste LLaMa's forward https://github.com/linkedin/Liger-Kernel/blob/main/src/liger_kernel/transformers/model/llama.py This func
verl/models/transformers/dense_common.py:29
← previousnext →301–400 of 2,081, ranked by callers