Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AMAP-ML/Thinking-with-Map
/ functions
Functions
4,735 in github.com/AMAP-ML/Thinking-with-Map
⨍
Functions
4,735
◇
Types & classes
687
↳
Endpoints
185
↓ 1 callers
Function
masked_var
Compute variance of tensor with masked values.
verl/verl/utils/torch_functional.py:188
↓ 1 callers
Function
match_answer
(response)
verl/verl/utils/reward_score/prime_math/__init__.py:347
↓ 1 callers
Function
maybe_copy_to_hdfs
(local_dir: str, hdfs_dir: Optional[str])
verl/recipe/collabllm/process_dataset.py:132
↓ 1 callers
Method
maybe_resize_bbox
Resize bbox to ensure it's valid
demo/qwen_agent/tools/image_zoom_in_qwen3vl.py:95
↓ 1 callers
Function
mcore_model_parallel_config
( sequence_parallel: bool, params_dtype: torch.dtype, )
verl/verl/utils/megatron_utils.py:375
↓ 1 callers
Method
merge_and_save
(self)
verl/scripts/legacy_model_merger.py:661
↓ 1 callers
Method
merge_and_save
(self)
verl/verl/model_merger/megatron_model_merger.py:491
↓ 1 callers
Function
merge_flat_dicts
合并多个 flat dict: {"api:query": value} keep: - "first": key 冲突保留先出现的 - "last": key 冲突保留后出现的
verl/tool_server/merge_cache.py:38
↓ 1 callers
Function
merge_from_files
(input_paths: List[str], output_path: str, keep: str = "first")
verl/tool_server/merge_cache.py:58
↓ 1 callers
Function
merge_resource_pool
(rp1: RayResourcePool, rp2: RayResourcePool)
verl/verl/single_controller/ray/base.py:234
↓ 1 callers
Method
method
(setup)
verl/tests/workers/reward_manager/test_registry_on_cpu.py:90
↓ 1 callers
Method
middle_method
(self, a, b="default")
verl/tests/utils/test_rollout_trace_on_cpu.py:56
↓ 1 callers
Function
modify_hf_config
(name: str, hf_config: PretrainedConfig)
verl/tests/special_distributed/test_mcore_config_converter.py:67
↓ 1 callers
Method
monkey_patch_mcp_create_platform_compatible_process
(self)
demo/qwen_agent/tools/mcp_manager.py:57
↓ 1 callers
Method
my_method
(self, x)
verl/tests/utils/test_rollout_trace_on_cpu.py:73
↓ 1 callers
Function
names_missing_doc
Return fully-qualified names that need docstrings.
verl/tests/special_sanity/check_api_docs.py:72
↓ 1 callers
Function
normalize_gripper_action
Normalize gripper action from [0,1] to [-1,+1] range. This is necessary for some environments because the dataset wrapper standardizes g
verl/recipe/vla/envs/libero_env/utils.py:88
↓ 1 callers
Function
np__b
(g: np.ndarray, K: int)
verl/verl/trainer/ppo/unit_test.py:59
↓ 1 callers
Function
np_delta
(N: int, K: int, i: int)
verl/verl/trainer/ppo/unit_test.py:33
↓ 1 callers
Function
np_s
(g: np.ndarray, K: int)
verl/verl/trainer/ppo/unit_test.py:51
↓ 1 callers
Function
np_sloo_minus_one
(g: np.ndarray, K: int)
verl/verl/trainer/ppo/unit_test.py:68
↓ 1 callers
Function
numeric_equal
(prediction: float, reference: float)
verl/recipe/entropy/reward_score/entropy_math/__init__.py:542
↓ 1 callers
Function
offload_fsdp2_model_to_cpu
(model, empty_cache: bool = True)
verl/verl/utils/fsdp_utils.py:171
↓ 1 callers
Function
offload_group_to_cpu
(group)
verl/verl/utils/megatron_utils.py:484
↓ 1 callers
Function
offload_megatron_copy_params
Offload optimizer parameters to CPU. Supports both Megatron optimizers and `ChainedOptimizer`, which wraps a list of underlying optimizers.
verl/verl/utils/megatron_utils.py:465
↓ 1 callers
Method
offload_model_weights
(self)
verl/recipe/r1_ascend/vllm_rollout_spmd.py:244
↓ 1 callers
Function
old_handler
(*args, **kwargs)
demo/qwen_agent/utils/utils.py:50
↓ 1 callers
Method
on_group_commit_backward
On group commit backward.
verl/verl/utils/activation_offload.py:167
↓ 1 callers
Method
onload_model_weights
(self)
verl/recipe/r1_ascend/vllm_rollout_spmd.py:237
↓ 1 callers
Function
only_int_check
(val)
verl/verl/utils/reward_score/prime_code/testing_util.py:69
↓ 1 callers
Method
optimizer_step
Perform an optimization step using the optimizer.
verl/verl/workers/engine/base.py:68
↓ 1 callers
Method
optimizer_zero_grad
Zero the gradients of the optimizer.
verl/verl/workers/engine/base.py:62
↓ 1 callers
Method
optimizer_zero_grad
Zero gradients and enforce FSDP grad-clipping logic.
verl/verl/workers/engine/fsdp/transformer_impl.py:510
↓ 1 callers
Function
pad_to_sequence_parallel
pad the tokens such that the total length is a multiple of sp world size Args: unpad_tokens: (total_nnz, ...). Tokens after removing padd
verl/verl/utils/megatron/sequence_parallel.py:29
↓ 1 callers
Function
parallel_exec
Executes a given function `fn` in parallel, using multiple threads, on a list of argument tuples. The function limits the number of concurren
demo/qwen_agent/utils/parallel_executor.py:21
↓ 1 callers
Function
parse_ans
( solution_str: str, total_steps: int, )
verl/recipe/fapo/reward_fn_genrm.py:20
↓ 1 callers
Function
parse_args
Parse arguments.
verl/scripts/diagnose.py:263
↓ 1 callers
Function
parse_args
()
verl/verl/model_merger/base_model_merger.py:34
↓ 1 callers
Function
parse_args_from_env_or_cli
()
verl/tool_server/api_server_redis.py:688
↓ 1 callers
Function
parse_arguments
()
verl/recipe/r1_ascend/json_to_parquet.py:27
↓ 1 callers
Function
parse_array
(s, pos)
verl/recipe/collabllm/collabllm_interation.py:300
↓ 1 callers
Function
parse_array
(s, pos)
verl/recipe/collabllm/utils.py:146
↓ 1 callers
Function
parse_csv
(file_path: str, extract_image: bool = False)
demo/qwen_agent/tools/simple_doc_parser.py:166
↓ 1 callers
Function
parse_html_bs
(path: str, extract_image: bool = False)
demo/qwen_agent/tools/simple_doc_parser.py:202
↓ 1 callers
Function
parse_key
(s, pos)
verl/recipe/collabllm/collabllm_interation.py:264
↓ 1 callers
Function
parse_key
(s, pos)
verl/recipe/collabllm/utils.py:110
↓ 1 callers
Function
parse_keyword
(text)
demo/qwen_agent/tools/search_tools/keyword_search.py:169
↓ 1 callers
Function
parse_number
(s, pos)
verl/recipe/collabllm/collabllm_interation.py:221
↓ 1 callers
Function
parse_number
(s, pos)
verl/recipe/collabllm/utils.py:67
↓ 1 callers
Function
parse_object
(s, pos)
verl/recipe/collabllm/collabllm_interation.py:272
↓ 1 callers
Function
parse_object
(s, pos)
verl/recipe/collabllm/utils.py:118
↓ 1 callers
Function
parse_pdf
(pdf_path: str, extract_image: bool = False)
demo/qwen_agent/tools/simple_doc_parser.py:240
↓ 1 callers
Function
parse_ppt
(path: str, extract_image: bool = False)
demo/qwen_agent/tools/simple_doc_parser.py:80
↓ 1 callers
Function
parse_tool_response_content
Parse tool response content for both text and images.
demo/qwen_agent/utils/output_beautify.py:77
↓ 1 callers
Function
parse_triple_quoted_string
(s, pos)
verl/recipe/collabllm/collabllm_interation.py:321
↓ 1 callers
Function
parse_triple_quoted_string
(s, pos)
verl/recipe/collabllm/utils.py:167
↓ 1 callers
Function
parse_tsv
(file_path: str, extract_image: bool = False)
demo/qwen_agent/tools/simple_doc_parser.py:184
↓ 1 callers
Function
parse_txt
(path: str)
demo/qwen_agent/tools/simple_doc_parser.py:116
↓ 1 callers
Function
parse_word
(docx_path: str, extract_image: bool = False)
demo/qwen_agent/tools/simple_doc_parser.py:59
↓ 1 callers
Function
patch_forward_with_backends
Choose the forward function based on the model and backend. Args: model (PreTrainedModel): The model to apply the monkey patch.
verl/verl/models/transformers/monkey_patch.py:196
↓ 1 callers
Function
patch_fused_forward
(model: torch.nn.Module)
verl/verl/models/mcore/model_forward_fused.py:51
↓ 1 callers
Method
patch_model_generation_config
The generation_config created from model config may be different to the pretrained model, this may lead to error when generating: htt
verl/scripts/legacy_model_merger.py:139
↓ 1 callers
Method
patch_model_generation_config
The generation_config created from model config may be different to the pretrained model, this may lead to error when generating: htt
verl/verl/model_merger/base_model_merger.py:218
↓ 1 callers
Function
patch_valuehead_model
(model)
verl/verl/utils/model.py:589
↓ 1 callers
Function
pearson_correlation_coefficient
(tensor1: torch.Tensor, tensor2: torch.Tensor, mask: torch.Tensor)
verl/verl/utils/debug/metrics.py:48
↓ 1 callers
Function
perf_rollout
(mode, backend, n_gpus_per_node, num_steps)
verl/tests/workers/rollout/perf/vllm_async_rollout.py:107
↓ 1 callers
Function
perform_single_search_batch
Performs a single batch search for multiple queries (original search tool behavior). Args: retrieval_service_url: The URL of the
verl/verl/tools/utils/search_r1_like_utils.py:141
↓ 1 callers
Method
ping
(self)
verl/tests/workers/rollout/test_sglang_async_rollout_sf_tools.py:490
↓ 1 callers
Function
pooling
(pooler_output, last_hidden_state, attention_mask=None, pooling_method="mean")
verl/examples/sglang_multiturn/search_r1_like/local_dense_retriever/retrieval_server.py:54
↓ 1 callers
Function
post_chat_completions
( session: aiohttp.ClientSession, base_url: str, api_key: str, model: str, messages: List[
parallel_tts/verifier_test_multi.py:226
↓ 1 callers
Method
post_forward
(self, module)
verl/verl/utils/activation_offload.py:433
↓ 1 callers
Function
postprocess_data
Process tokenizer outputs to consistent shapes via padding/truncation. Args: input_ids: Token indices [batch_size, seq_len] atten
verl/verl/utils/torch_functional.py:331
↓ 1 callers
Method
postprocess_fncall_messages
( self, messages: List[Message], parallel_function_calls: bool = True, functio
demo/qwen_agent/llm/fncall_prompts/nous_fncall_prompt.py:103
↓ 1 callers
Function
postprocess_page_content
(page_content: list)
demo/qwen_agent/tools/simple_doc_parser.py:292
↓ 1 callers
Method
pre_forward
(self, module)
verl/verl/utils/activation_offload.py:428
↓ 1 callers
Function
pre_process_html
(s)
demo/qwen_agent/tools/simple_doc_parser.py:206
↓ 1 callers
Method
predict_action
Predict actions from input sequence, with options for different prediction methods. Args: input_ids: Input token ids
verl/recipe/vla/models/openvla_oft/modeling_prismatic.py:1715
↓ 1 callers
Function
prepare_actions_simplevla
( raw_chunk_actions, )
verl/recipe/vla/envs/action_utils.py:28
↓ 1 callers
Function
prepare_fa2_from_position_ids
( query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, position_ids: torch.Tensor )
verl/verl/models/transformers/glm4v.py:184
↓ 1 callers
Function
prepare_fa2_from_position_ids
( query: torch.Tensor, key: torch.Tensor, value: torch.Tensor, position_ids: torch.Tensor )
verl/verl/models/transformers/qwen2_vl.py:164
↓ 1 callers
Function
prepare_fsdp_model
(model, world_size)
verl/tests/workers/rollout/test_hf_rollout.py:75
↓ 1 callers
Function
prepare_input_dataproto
(tokenizer, config, validate)
verl/tests/workers/rollout/test_hf_rollout.py:48
↓ 1 callers
Function
prepare_input_dataproto
(tokenizer, config, validate, do_sample=False)
verl/tests/workers/rollout/rollout_vllm/test_vllm_model_rope_scaling.py:104
↓ 1 callers
Method
prepare_model_inputs
(self, micro_batch: TensorDict)
verl/verl/workers/engine/fsdp/transformer_impl.py:719
↓ 1 callers
Method
prepare_model_outputs
(self, output: dict, data: TensorDict)
verl/verl/workers/engine/megatron/transformer_impl.py:628
↓ 1 callers
Method
prepare_model_outputs
(self, output, output_args, micro_batch: TensorDict)
verl/verl/workers/engine/fsdp/transformer_impl.py:833
↓ 1 callers
Function
prepare_single_generation_data
Similar to the logic of ray_trainer._prepare_generate_batch, but for a single sample. Separate the data used for generation from the original
verl/recipe/fully_async_policy/detach_utils.py:60
↓ 1 callers
Function
preprocess
single(multi) image(s) preprocess, the image(s) will be placed at the top of the conversation
verl/recipe/minicpmo/rl_dataset.py:70
↓ 1 callers
Method
preprocess
Preprocess an image (or batch of images); note that unlike the `transformers :: BaseImageProcessor` we explicitly only handle PIL.Ima
verl/recipe/vla/models/openvla_oft/processing_prismatic.py:164
↓ 1 callers
Method
preprocess_fncall_messages
(self, messages: List[Message], function
demo/qwen_agent/llm/fncall_prompts/nous_fncall_prompt.py:29
↓ 1 callers
Method
preprocess_fncall_messages
Preprocesss the messages and add the function calling prompt, assuming the input and output messages are in the multimodal format.
demo/qwen_agent/llm/fncall_prompts/base_fncall_prompt.py:24
↓ 1 callers
Function
print_adapter_info
Print information about adapter parameters in the model.
verl/verl/utils/megatron_peft_utils.py:215
↓ 1 callers
Method
process_generation_to_code
(self, gens: str)
demo/qwen_agent/tools/python_executor.py:145
↓ 1 callers
Function
process_input
(task_descriptions, images_and_states, processor)
verl/recipe/vla/naive_rollout_rob.py:58
↓ 1 callers
Function
process_minicpmo_data
Process data for MiniCPM-o model
verl/recipe/minicpmo/rl_dataset.py:358
↓ 1 callers
Function
process_position_ids
(position_ids: torch.Tensor)
verl/verl/models/transformers/glm4v.py:393
↓ 1 callers
Function
process_single_row
Process a single row of data for SearchR1-like format. Args: row: DataFrame row containing the original data current_sp
verl/examples/data_preprocess/preprocess_search_r1_dataset.py:45
↓ 1 callers
Function
process_single_row
根据 jsonl 每行构建输出结构
verl/examples/data_preprocess/preprocess_thinking_with_map.py:63
↓ 1 callers
Function
put_text_on_image
Put text lines on an image with automatic line wrapping. Args: image: Input image as numpy array lines: List of text lines t
verl/recipe/vla/envs/action_utils.py:155
↓ 1 callers
Method
put_validate
(self, data)
verl/recipe/fully_async_policy/message_queue.py:190
← previous
next →
2,101–2,200 of 4,735, ranked by callers