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
↓ 6 callers
Function
need_reward_model
Given a role worker mapping, do we need reward model.
verl/verl/trainer/ppo/utils.py:79
↓ 6 callers
Function
patch_vlm_for_ulysses_input_slicing
Applies a monkey patch to the forward method of a given model class to enable Ulysses sequence parallelism input slicing.
verl/verl/models/transformers/monkey_patch.py:120
↓ 6 callers
Function
per_tensor_generator
( actor_module, model_config, weight_converter, transformer_config, layer_name_mapping,
verl/verl/utils/megatron_utils.py:894
↓ 6 callers
Method
release_memory_occupation
Release GPU occupation temporarily.
verl/verl/workers/rollout/sglang_rollout/sglang_rollout.py:139
↓ 6 callers
Function
remove_boxed
(s)
verl/verl/utils/reward_score/math_reward.py:49
↓ 6 callers
Function
replace_lora_wrapper
Replace LoRA parameter keys with base layer equivalents. Transforms LoRA parameter names to their corresponding base layer names for proper w
verl/verl/utils/fsdp_utils.py:669
↓ 6 callers
Method
reset_prefix_cache
(self)
verl/recipe/fully_async_policy/agent_loop/agent_loop.py:326
↓ 6 callers
Method
resume
Resume rollout weights or kv cache in GPU memory. Args: tags: weights or kv_cache.
verl/verl/workers/rollout/base.py:43
↓ 6 callers
Method
save_checkpoint
Save checkpoint using FSDPCheckpointManager with improved tracking
verl/verl/trainer/fsdp_sft_trainer.py:537
↓ 6 callers
Method
shutdown
Shutdown the HTTP server and clean up resources. This method performs the following cleanup operations: 1. Unregisters the worker fro
verl/verl/workers/rollout/sglang_rollout/http_server_engine.py:392
↓ 6 callers
Method
sleep
(self)
verl/verl/workers/rollout/sglang_rollout/async_sglang_server.py:214
↓ 6 callers
Function
split_resource_pool
Split a RayResourcePool into multiple SubRayResourcePool. resouce_pool can also be a SubRayResourcePool (have been splited) for multiple-time
verl/verl/single_controller/ray/base.py:188
↓ 6 callers
Function
timeout_limit
Decorator to add a timeout to a function. Args: seconds: The timeout duration in seconds. use_signals: (Deprecated) This is
verl/verl/utils/py_functional.py:52
↓ 6 callers
Method
to
Move model parameters, optimizer states, or both to the specified device. Args: device: Target device identifier.
verl/verl/workers/engine/megatron/transformer_impl.py:371
↓ 6 callers
Method
tokenize
Converts a string in a sequence of tokens. Args: text (`str`): The sequence to be encoded. a
demo/qwen_agent/utils/tokenization_qwen.py:149
↓ 6 callers
Function
truncatefn
(s, length=300)
verl/verl/utils/reward_score/prime_code/testing_util.py:39
↓ 6 callers
Method
update_weights_from_tensor
Update model weights from tensor data. The HTTP server will only post meta data, and the real weights will be copied directly from GP
verl/verl/workers/rollout/sglang_rollout/http_server_engine.py:350
↓ 5 callers
Method
__init__
(self)
verl/verl/single_controller/ray/base.py:895
↓ 5 callers
Method
__init__
(self, config: Qwen2Config, megatron_config: ModelParallelConfig)
verl/verl/models/qwen2/megatron/modeling_qwen2_megatron.py:83
↓ 5 callers
Method
__init__
(self, config: LlamaConfig, megatron_config: ModelParallelConfig)
verl/verl/models/llama/megatron/modeling_llama_megatron.py:82
↓ 5 callers
Function
_broadcast_tensor
broadcast tensor across mp_group
verl/verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:129
↓ 5 callers
Function
_broadcast_tensor
broadcast tensor across mp_group
verl/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:129
↓ 5 callers
Method
_build_model_optimizer
( self, model_path, fsdp_config: FSDPEngineConfig, optim_config, overr
verl/recipe/flowrl/flowrl_fsdp_worker.py:77
↓ 5 callers
Method
_call_tool
(self, tool_name: str, tool_args: Union[str, dict] = '{}', **kwargs)
demo/qwen_agent/agents/fncall_agent.py:110
↓ 5 callers
Method
_clear_search
(self)
verl/scripts/rollout_viewer.py:474
↓ 5 callers
Function
_hdfs_cmd
(cmd: str)
verl/verl/utils/hdfs_io.py:144
↓ 5 callers
Method
_run_all
(self, tasks: list[asyncio.Task])
verl/verl/experimental/reward/reward_model.py:112
↓ 5 callers
Function
_run_cmd
(cmd: str, timeout=None)
verl/verl/utils/hdfs_io.py:140
↓ 5 callers
Function
_try_acquire_or_429
(sem: "threading.Semaphore", name: str)
verl/tool_server/api_server_redis.py:542
↓ 5 callers
Method
acquire
Acquire a token from the bucket.
verl/verl/tools/map_tool.py:108
↓ 5 callers
Function
as_torch_index
Convert arbitrary group labels to a contiguous 1-D torch.long tensor (0..G-1). Args: index: Any iterable of labels or tensor/ndarray
verl/verl/utils/groupwise.py:91
↓ 5 callers
Function
build_optimizer
Build an optimizer based on the configuration. Dynamically imports and instantiates an optimizer class from the specified module. Args:
verl/verl/workers/config/optimizer.py:123
↓ 5 callers
Function
calculate_debug_metrics
calculate rollout vs actor logprobs diff, for debugging purpose Args: data: DataProto the data batch to calculate
verl/verl/utils/debug/metrics.py:63
↓ 5 callers
Method
check
(self)
verl/verl/utils/profiler/profile.py:88
↓ 5 callers
Function
check_and_construct_configs
Check and disable incompatible configurations for older Megatron version. Args: original_config (dict): The original model configura
verl/verl/models/mcore/config_converter.py:137
↓ 5 callers
Function
check_mutually_exclusive
(mbs, mbs_per_gpu, name: str)
verl/recipe/spin/utils.py:42
↓ 5 callers
Function
clean_traceback
(error_traceback)
verl/verl/utils/reward_score/prime_code/testing_util.py:81
↓ 5 callers
Function
collect_lora_params
collect lora params or full params if base model is not ready in vllm work with if isinstance(self.module._fsdp_wrapped_module, PeftModel)
verl/verl/utils/fsdp_utils.py:611
↓ 5 callers
Function
compute_offpolicy_metrics
Compute off-policy diagnostic metrics (helper function). This helper function operates on raw tensors and is used internally by: - compute_ro
verl/verl/trainer/ppo/rollout_corr_helper.py:707
↓ 5 callers
Method
convert_tokens_to_string
Converts a sequence of tokens in a single string.
demo/qwen_agent/utils/tokenization_qwen.py:179
↓ 5 callers
Function
default_compute_score
Compute the score for a given solution based on the data source. Args: data_source (str): The source dataset identifier which determines
verl/verl/utils/reward_score/__init__.py:19
↓ 5 callers
Function
deserialize_tensordict
(arr: Any)
verl/verl/protocol.py:286
↓ 5 callers
Method
dump_memory_snapshot
Generates a memory snapshot and saves it as a pickle file in a specified directory. The files are organized by timestamp in subdirect
verl/verl/utils/memory_utils.py:256
↓ 5 callers
Function
enable_activation_offloading
Enable activation offloading for the model. It groups activations by TransformerLayer and offloads activation groups asynchronously. This mea
verl/verl/utils/activation_offload.py:500
↓ 5 callers
Function
flash_attn_supports_top_left_mask
Fallback implementation for older transformers versions. Returns False to disable features that require this function.
verl/verl/utils/transformers_compat.py:32
↓ 5 callers
Function
get_adv_estimator_fn
Get the advantage estimator function with a given name. Args: name_or_enum: `(str)` or `(AdvantageEstimator)` The name or enu
verl/verl/trainer/ppo/core_algos.py:136
↓ 5 callers
Method
get_backend
(cls)
verl/verl/utils/rollout_trace.py:104
↓ 5 callers
Function
get_constant_schedule_with_warmup
Create a constant LR schedule with a linear warmup phase. Args: optimizer (Optimizer): Wrapped optimizer. num_warmup_steps (
verl/verl/utils/torch_functional.py:559
↓ 5 callers
Function
get_cosine_schedule_with_warmup
Create a schedule with a learning rate that decreases following the values of the cosine function between the initial lr set in the optimizer
verl/verl/utils/torch_functional.py:509
↓ 5 callers
Method
get_dispatch_collect
Get all registered dispatch and collect dp_ranks. Returns: dict[str, int]: A dictionary mapping mesh names to the
verl/verl/single_controller/base/worker.py:133
↓ 5 callers
Function
get_event_loop
()
verl/verl/utils/ray_utils.py:85
↓ 5 callers
Function
get_hf_model_checkpoint_path
(checkpoint_path)
verl/verl/utils/megatron_utils.py:598
↓ 5 callers
Function
get_model
Build the model.
verl/verl/utils/megatron_utils.py:49
↓ 5 callers
Function
get_named_tensor_buckets
Group tensors into buckets based on a specified size in megabytes. Args: iterable: An iterator of tuples containing tensor names and
verl/verl/workers/rollout/sglang_rollout/utils.py:71
↓ 5 callers
Function
get_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/verl/trainer/constants_ppo.py:38
↓ 5 callers
Method
get_resource_pool
Get the resource pool of the worker_cls
verl/recipe/transfer_queue/ray_trainer.py:127
↓ 5 callers
Method
get_resource_pool
Get the resource pool of the worker_cls
verl/verl/trainer/ppo/ray_trainer.py:95
↓ 5 callers
Function
get_rollout_class
Get the rollout class by name. Args: rollout_name: The name of the rollout. mode: The mode of the rollout, sync: spmd mode, async
verl/verl/workers/rollout/base.py:89
↓ 5 callers
Method
init_model
(self)
verl/recipe/one_step_off_policy/fsdp_workers.py:195
↓ 5 callers
Method
init_model
(self)
verl/tests/single_controller/detached_worker/server.py:74
↓ 5 callers
Method
init_standalone
Init standalone rollout server, create new resource pool for this rollout.
verl/verl/workers/rollout/replica.py:156
↓ 5 callers
Method
init_workers
Init resource pool and worker group
verl/recipe/spin/spin_trainer.py:614
↓ 5 callers
Function
last_boxed_only_string
(string)
verl/verl/utils/reward_score/math_reward.py:63
↓ 5 callers
Function
launch_server_process
Launch an SGLang HTTP server process and wait for it to be ready. This function starts a new process running an SGLang HTTP server, then waits
verl/verl/workers/rollout/sglang_rollout/http_server_engine.py:106
↓ 5 callers
Function
load_mcore_dist_weights
(parallel_model, dist_weight_path, is_value_model=False, prefix="")
verl/verl/utils/model.py:534
↓ 5 callers
Function
load_megatron_gptmodel_weights
Load weights for mcore GPT model.
verl/verl/utils/model.py:484
↓ 5 callers
Function
make_megatron_module
( wrap_config: McoreModuleWrapperConfig, tf_config: TransformerConfig, hf_config: PretrainedConfig
verl/verl/utils/megatron_utils.py:173
↓ 5 callers
Function
need_critic
Given a config, do we need critic
verl/recipe/one_step_off_policy/utils.py:22
↓ 5 callers
Method
on_batch_end
Generate data using the provided data generation strategy. Note: This method is intended to change the dataset after each training ba
verl/verl/experimental/dynamic_dataset/dynamicgen_dataset.py:106
↓ 5 callers
Method
postprocess_data
Get chunk data of this tp rank since we do all gather in preprocess.
verl/recipe/one_step_off_policy/vllm_sharding_manager.py:69
↓ 5 callers
Function
postprocess_packed_seqs
Postprocess packed sequences
verl/verl/models/mcore/util.py:118
↓ 5 callers
Method
reset
( self, env_idx: Optional[int | list[int] | np.ndarray] = None, reset_state_ids=None,
verl/recipe/vla/envs/libero_env/libero_env.py:276
↓ 5 callers
Method
run
Run agent loop to interact with LLM server and environment. Args: sampling_params (Dict[str, Any]): LLM sampling params.
verl/verl/experimental/agent_loop/agent_loop.py:224
↓ 5 callers
Function
serialize_tensordict
(batch: TensorDict)
verl/verl/protocol.py:258
↓ 5 callers
Method
set_dispatch_collect
Set the dispatch and collect dp_ranks for all registered meshes. Args: mesh_name (str): Mesh name to set dispatch and collect dp_
verl/verl/single_controller/base/worker.py:144
↓ 5 callers
Function
setup_distributed
Initialize distributed environment if not already initialized.
verl/tests/workers/rollout/test_sglang_multi_interaction.py:109
↓ 5 callers
Function
slice_input_tensor
(x: Tensor, dim: int, padding: bool = True, group: ProcessGroup = None)
verl/verl/utils/ulysses.py:117
↓ 5 callers
Method
update_result_options
(self, offset: int = 0, sort_desc: Optional[bool] = None)
verl/scripts/rollout_viewer.py:268
↓ 5 callers
Function
validate_config
Validate an OmegaConf DictConfig. Args: config (DictConfig): The OmegaConf DictConfig to validate. use_reference_policy (bool): i
verl/verl/utils/config.py:74
↓ 4 callers
Method
__init__
(self, config: McoreCriticConfig)
verl/verl/workers/megatron_workers.py:947
↓ 4 callers
Method
__init__
(self, config: FSDPCriticConfig)
verl/verl/workers/fsdp_workers.py:1138
↓ 4 callers
Method
__init__
(self, dim, max_position_embeddings=2048, base=10000, device=None)
verl/verl/models/llama/megatron/layers/parallel_attention.py:39
↓ 4 callers
Method
__init__
(self, cfg: Optional[Dict] = None)
demo/qwen_agent/tools/amap_api.py:36
↓ 4 callers
Function
_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:168
↓ 4 callers
Function
_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/verl/models/mcore/saver.py:180
↓ 4 callers
Function
_broadcast_tp_shard_tensor
broadcast tensor in tp shards across mp_group
verl/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:168
↓ 4 callers
Method
_build_multimodal_attention
Build multimodal embeddings and attention mask
verl/recipe/vla/models/openvla_oft/modeling_prismatic.py:477
↓ 4 callers
Method
_chat
( self, messages: List[Union[Message, Dict]], stream: bool, delta_stream: bool
demo/qwen_agent/llm/base.py:292
↓ 4 callers
Function
_check_dispatch_mode
(dispatch_mode)
verl/verl/single_controller/base/decorator.py:389
↓ 4 callers
Method
_compute_loss_and_backward
Compute loss with optional sequence parallelism and remove padding features
verl/verl/trainer/fsdp_sft_trainer.py:365
↓ 4 callers
Function
_compute_response_info
Computes information about prompts and responses from a batch. This is an internal helper function that extracts masks and lengths for promp
verl/verl/trainer/ppo/metric_utils.py:50
↓ 4 callers
Function
_conv_fname
(fname: str)
demo/qwen_agent/llm/qwenvl_dashscope.py:162
↓ 4 callers
Method
_create_dataloader
Creates the train and validation dataloaders.
verl/recipe/spin/spin_trainer.py:383
↓ 4 callers
Function
_get_attention_functions
Dynamically import attention functions based on available hardware.
verl/verl/utils/attention_utils.py:20
↓ 4 callers
Function
_get_cpu_tensor
(tensor: torch.Tensor)
verl/verl/models/qwen2/megatron/checkpoint_utils/qwen2_saver.py:122
↓ 4 callers
Function
_get_cpu_tensor
(tensor: torch.Tensor)
verl/verl/models/mcore/saver.py:134
↓ 4 callers
Function
_get_cpu_tensor
(tensor: torch.Tensor)
verl/verl/models/llama/megatron/checkpoint_utils/llama_saver.py:122
↓ 4 callers
Method
_get_gen_batch
(self, batch: DataProto)
verl/recipe/vla/rob_ray_trainer.py:182
↓ 4 callers
Function
_get_gpt_model
(model)
verl/verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader_depracated.py:67
↓ 4 callers
Function
_get_gpt_model
(model)
verl/verl/models/qwen2/megatron/checkpoint_utils/qwen2_loader.py:67
← previous
next →
301–400 of 4,735, ranked by callers