MCPcopy Create free account

hub / github.com/AMAP-ML/Thinking-with-Map / functions

Functions4,735 in github.com/AMAP-ML/Thinking-with-Map

Functionmock_slow_api_function
Slow mock API function for timeout testing.
verl/tests/experimental/reward/test_rate_limited_reward_manager_on_cpu.py:96
Functionmock_sync_reward_function
Synchronous mock reward function that simulates API call.
verl/tests/experimental/reward/test_rate_limited_reward_manager_on_cpu.py:69
Functionmock_test_fn
()
verl/tests/trainer/ppo/test_core_algos_on_cpu.py:34
Functionmock_weave_client
Mocks the weave module and its client, yielding the mock client.
verl/tests/utils/test_rollout_trace_on_cpu.py:31
Methodmodel_dump_json
(self, **kwargs)
demo/qwen_agent/llm/schema.py:50
Functionmodel_forward
Forward pass for models with sequence packing.
verl/verl/models/mcore/model_forward.py:29
Methodmodel_input_names
(self)
verl/recipe/vla/models/openvla_oft/processing_prismatic.py:265
Functionmoe_block_forward
verl/verl/models/transformers/npu_patch.py:116
Methodmul_reduce
(a, b)
verl/verl/utils/megatron/tensor_parallel.py:113
Functionmultimodal_typewriter_print
Enhanced typewriter print function that displays text and images in Jupyter notebooks.
demo/qwen_agent/utils/output_beautify.py:51
Methodmy_function
(*inputs)
verl/verl/utils/activation_offload.py:457
Methodname
(self)
verl/tool_server/api_server_redis.py:325
Methodname_for_human
(self)
demo/qwen_agent/tools/base.py:175
Methodnames
(cls)
verl/verl/utils/py_functional.py:230
Functionnew_collect
(worker_group, output)
verl/tests/single_controller/base/test_decorator.py:68
Functionnew_dispatch
(worker_group, *args, **kwargs)
verl/tests/single_controller/base/test_decorator.py:65
Functionnew_handler
(*args, **kwargs)
demo/qwen_agent/utils/utils.py:57
Functionnon_master_adapter_kwargs
Provide kwargs for creating non-master node adapters.
verl/tests/workers/rollout/rollout_sglang/test_http_server_engine.py:95
Methodnonuser_agents
(self)
demo/qwen_agent/multi_agent_hub.py:48
Functionnoop_context
()
verl/scripts/converter_hf_to_mcore.py:434
Functionnoop_context
()
verl/verl/model_merger/megatron_model_merger.py:53
Functionnormalize_answer
(answer: Optional[str])
verl/recipe/entropy/reward_score/entropy_math/math_normalize.py:44
Functionnormalize_answer
(answer: Optional[str])
verl/verl/utils/reward_score/prime_math/math_normalize.py:44
Functionnormalize_pp_vpp_params
Normalize the pp vpp params into a complete named parameters. This is useful when gather parameters from pp ranks and passed to a model witho
verl/verl/utils/model.py:347
Functionnp__sorted_apply
(func)
verl/verl/trainer/ppo/unit_test.py:41
Functionnp_rho
(g: np.ndarray, K: int)
verl/verl/trainer/ppo/unit_test.py:29
Functionnull_decorator
(*args, **kwargs)
verl/verl/utils/kernel/kernels.py:56
Methodon_get_saved_tensor
(self, saved_state: Any)
verl/verl/utils/activation_offload.py:85
Methodon_group_commit_backward
(self)
verl/verl/utils/activation_offload.py:373
Methodon_group_commit_forward
This function will cause host device synchronization
verl/verl/utils/activation_offload.py:347
Methodon_mount
(self)
verl/scripts/rollout_viewer.py:250
Methodon_reqid_submitted
Jump to the sample that has a matching `request_id`.
verl/scripts/rollout_viewer.py:332
Methodon_save_for_backward
(self, tensor: torch.Tensor)
verl/verl/utils/activation_offload.py:81
Methodon_search_submitted
(self, event: Input.Submitted)
verl/scripts/rollout_viewer.py:480
Functionon_shutdown
()
verl/tool_server/api_server_redis.py:756
Functionon_startup
()
verl/tool_server/api_server_redis.py:713
Functionoptimize_memory_for_inference
Optimize GPU memory usage for inference
verl/verl/utils/memory_utils.py:118
Functionoptimize_memory_for_training
Optimize GPU memory usage for training
verl/verl/utils/memory_utils.py:132
Methodoptimizer_step
Perform an optimization step to update model parameters based on accumulated gradients. Returns: grad_norm (float): The
verl/verl/workers/engine/megatron/transformer_impl.py:342
Methodoptimizer_step
Clip gradients, skip update if non-finite, and step optimizer. Returns: grad_norm (float): Norm of gradients before clip
verl/verl/workers/engine/fsdp/transformer_impl.py:516
Methodoptimizer_zero_grad
Zero out gradients of all parameters before starting a new backward pass.
verl/verl/workers/engine/megatron/transformer_impl.py:332
Functionpad_input
Arguments: hidden_states: (total_nnz, ...), where total_nnz = number of tokens in selected in attention_mask. indices: (total_nnz
verl/verl/utils/npu_flash_attn_utils.py:81
Functionpad_packed_inputs
pad the tokens such that the total length is a multiple of size. This function is useful when applying sequence parallel and context parallel
verl/verl/utils/model.py:501
Functionpad_to_divisor
Pad a TensorDict to size divisible by size_divisor Args: size_divisor (int): size divisor Returns: data: (TensorDict): the p
verl/verl/utils/tensordict_utils.py:394
Methodpad_token_id
`Optional[int]`: Id of the padding token in the vocabulary. Returns `None` if the token has not been set.
verl/verl/workers/rollout/tokenizer.py:39
Functionparallel_init_module_fn
Generate a function to initialize sub-modules in the `module` with `shard_states` from huggingface checkpoint. Args: module (tor
verl/verl/utils/fsdp_utils.py:315
Functionparallel_load_safetensors
Parallel load safetensors from huggingface checkpoint Huggingface checkpoint contains: - config.json: a json file for model configurati
verl/verl/utils/fsdp_utils.py:259
Functionpatch_get_query_key_value_tensors
Derives `query`, `key` and `value` tensors from `hidden_states`.
verl/verl/models/mcore/patch_v012.py:32
Functionpatched_get_task_init_states
(self, i)
verl/recipe/vla/prepare_libero_dataset.py:29
Functionpatched_get_task_init_states
(self, i)
verl/recipe/vla/envs/libero_env/libero_env.py:44
Methodpause
pause rollout
verl/recipe/fully_async_policy/fully_async_rollouter.py:669
Functionpeft_pre_wrap_hook
Pre-wrap hook that applies PEFT transformation.
verl/verl/utils/megatron_utils.py:215
Methodpg_is
Policy Gradient with IS Correction. Uses policy gradient loss with explicit IS correction. No PPO clipping. Args:
verl/verl/trainer/config/algorithm.py:270
Methodpg_rs
Policy Gradient with Rejection Sampling. Policy gradient with rejection sampling (no IS weights) using geometric mean in bypass mode.
verl/verl/trainer/config/algorithm.py:291
Methodping
Health check method.
verl/verl/tools/map_tool.py:143
Methodping
Health check method.
verl/verl/tools/image_zoom_in_tool_qwen3vl.py:82
Methodping
Health check method.
verl/verl/tools/image_zoom_in_tool.py:82
Methodping
(self)
verl/verl/tools/sandbox_fusion_tools.py:73
Methodping
Health check method.
verl/verl/tools/search_tool.py:84
Functionplain_quick_task_logic
()
verl/tests/utils/test_timeout_decorator_cpu.py:131
Functionplain_slow_task_logic
()
verl/tests/utils/test_timeout_decorator_cpu.py:143
Functionpop
(tensordict: TensorDict, key: str, default=None)
verl/verl/utils/tensordict_utils.py:361
Functionpop_keys
(tensordict: TensorDict, keys: Iterable[str])
verl/verl/utils/tensordict_utils.py:376
Functionpost_process_logits
(input_ids, logits, temperature, top_k, top_p)
verl/verl/utils/torch_functional.py:493
Methodpostprocess_data
Get chunk data of this tp rank since we do all gather in preprocess.
verl/recipe/one_step_off_policy/sglang_sharding_manager.py:65
Methodpostprocess_data
Get chunk data of this tp rank since we do all gather in preprocess.
verl/verl/workers/sharding_manager/fsdp_vllm.py:276
Methodpostprocess_data
Get chunk data of this tp rank since we do all gather in preprocess.
verl/verl/workers/sharding_manager/fsdp_sglang.py:218
Methodpostprocess_data
Split the data to follow FSDP partition
verl/verl/workers/sharding_manager/fsdp_ulysses.py:64
Methodpostprocess_data
(self, data: DataProto)
verl/verl/workers/sharding_manager/megatron_sglang.py:223
Methodpostprocess_data
(self, data: DataProto)
verl/verl/workers/sharding_manager/megatron_vllm.py:223
Methodpostprocess_fncall_messages
Transform the plaintext model output into structured function call messages, return in the multimodal format for consistency.
demo/qwen_agent/llm/fncall_prompts/base_fncall_prompt.py:38
Methodpostprocess_fncall_messages
(messages: List[Message], parallel_function_calls: bool = True,
demo/qwen_agent/llm/fncall_prompts/qwen_fncall_prompt.py:113
Methodpostprocess_micro_batch_func
(self, output, data: TensorDict, forward_only: bool, loss_function)
verl/verl/workers/engine/megatron/transformer_impl.py:542
Methodpostprocess_micro_batch_func
(self, output, data: TensorDict, forward_only: bool, loss_function)
verl/verl/workers/engine/megatron/transformer_impl.py:696
Methodppo_is_bypass
PPO with IS Correction in Bypass Mode. Skips old_log_prob computation by reusing rollout_log_prob. PPO clips against rollout policy i
verl/verl/trainer/config/algorithm.py:249
Functionppo_loss
(config: ActorConfig, model_output, data: TensorDict, dp_group=None)
verl/verl/workers/roles/utils/losses.py:95
Functionprepare_actions
( simulator_type, raw_chunk_actions, num_action_chunks, action_dim, action_scale: float =
verl/recipe/vla/envs/action_utils.py:38
Functionprepare_decoder_attention_mask
(attention_mask, input_shape, inputs_embeds)
verl/verl/utils/torch_functional.py:584
Methodprepare_inputs_for_generation
Borrowed from `LlamaForCausalLM` and simplified for batch size = 1; mirrors original PrismaticVLM logic.
verl/recipe/vla/models/openvla_oft/modeling_prismatic.py:701
Methodprepare_model_outputs
(self, output: dict | torch.Tensor, data: TensorDict)
verl/verl/workers/engine/megatron/transformer_impl.py:745
Methodprepare_model_outputs
(self, output, output_args, micro_batch: TensorDict)
verl/verl/workers/engine/fsdp/transformer_impl.py:979
Methodpreprocess_data
All gather across tp group to make each rank has identical input.
verl/recipe/one_step_off_policy/sglang_sharding_manager.py:53
Methodpreprocess_data
All gather across tp group to make each rank has identical input.
verl/verl/workers/sharding_manager/fsdp_vllm.py:264
Methodpreprocess_data
(self, data: DataProto)
verl/verl/workers/sharding_manager/base.py:31
Methodpreprocess_data
All gather across tp group to make each rank has identical input.
verl/verl/workers/sharding_manager/fsdp_sglang.py:207
Methodpreprocess_data
(self, data: DataProto)
verl/verl/workers/sharding_manager/megatron_sglang.py:215
Methodpreprocess_data
(self, data: DataProto)
verl/verl/workers/sharding_manager/megatron_vllm.py:211
Methodpreprocess_fncall_messages
(messages: List[Message], functions: List[dict],
demo/qwen_agent/llm/fncall_prompts/qwen_fncall_prompt.py:27
Functionprint_pkg_error
(pkg_name)
verl/tests/special_sanity/check_api_docs.py:61
Methodprint_size
(self, prefix="")
verl/verl/protocol.py:443
Functionprint_with_rank
_summary_ Print a message with rank information. This function prints the message only if `log_only_rank_0` is False or if the rank is 0.
verl/verl/utils/logger/aggregate_logger.py:98
Functionprint_with_rank_and_timer
_summary_ Print a message with rank information and a timestamp. This function prints the message only if `log_only_rank_0` is False or if the
verl/verl/utils/logger/aggregate_logger.py:112
Functionprocess
(iter)
verl/verl/utils/debug/trajectory_tracker.py:95
Functionprocess_aime2024
(example)
verl/recipe/r1/data_process.py:40
Functionprocess_aime2024
(example)
verl/recipe/fapo/prepare_fapo_data.py:40
Functionprocess_aime2025
(example)
verl/recipe/fapo/prepare_fapo_data.py:54
Methodprocess_batch
()
verl/verl/experimental/reward/reward_loop/limited.py:456
Functionprocess_cnmo2024
(example)
verl/recipe/r1/data_process.py:85
Functionprocess_dapo
(example)
verl/recipe/fapo/prepare_fapo_data.py:108
Functionprocess_fn
(example, idx)
verl/recipe/open_math_reasoning/prepare_nvidia-OpenMathReasoning_sft.py:47
← previousnext →3,801–3,900 of 4,735, ranked by callers