Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Gen-Verse/OpenClaw-RL
/ functions
Functions
10,561 in github.com/Gen-Verse/OpenClaw-RL
⨍
Functions
10,561
◇
Types & classes
1,405
↳
Endpoints
144
↓ 4 callers
Function
get_index_dir
Create sub-directory for this index. Args: config (RetroPreprocessingConfig): Retro preprocessing config. Returns: Path to i
Megatron-LM/megatron/core/datasets/retro/index/utils.py:13
↓ 4 callers
Method
get_layer
(self, model, layer_idx)
Megatron-LM/tools/checkpoint/schema_base.py:68
↓ 4 callers
Method
get_leader_rank
Get the leader rank for a given grid and direction. We elect leader rank for each dp replica, the first tp-cp rank in the group in th
Megatron-LM/megatron/core/pipeline_parallel/bridge_communicator.py:149
↓ 4 callers
Method
get_main_grads_for_grad_norm
Get main_grads that should be taken into account to compute the grad norm. Filter parameters based on: - grad should not be
Megatron-LM/megatron/core/optimizer/optimizer.py:136
↓ 4 callers
Function
get_mlp_module_spec_for_backend
Helper function to get module spec for MLP/MoE
Megatron-LM/megatron/core/models/gpt/gpt_layer_specs.py:565
↓ 4 callers
Method
get_num_layers
(self, model)
Megatron-LM/tools/checkpoint/schema_base.py:57
↓ 4 callers
Function
get_nvtx_range
Create an NVTX range context manager.
Megatron-LM/megatron/training/utils.py:748
↓ 4 callers
Function
get_pos_emb_on_this_cp_rank
Get the position embedding on the current context parallel rank. Args: pos_emb (Tensor): Positional embedding tensor seq_dim (int
Megatron-LM/megatron/core/models/common/embeddings/rope_utils.py:48
↓ 4 callers
Function
get_rng_state
Collect rng state across data parallel ranks.
Megatron-LM/megatron/training/checkpointing.py:315
↓ 4 callers
Method
get_samples
Return num_samples samples
slime/slime/rollout/data_source.py:19
↓ 4 callers
Function
get_single_file
(_query, _path)
gui-rl/desktop_env/evaluators/getters/chrome.py:1193
↓ 4 callers
Function
get_slide_notes
(slide)
gui-rl/desktop_env/evaluators/metrics/slides.py:274
↓ 4 callers
Method
get_submesh
Retrieve an Megatron-FSDP-registered submesh by name(s).
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/utils.py:551
↓ 4 callers
Function
get_sum_of_sample_mean
Calculate correct sample mean for CP
slime/slime/backends/megatron_utils/cp_utils.py:53
↓ 4 callers
Function
get_t5_decoder_with_transformer_engine_block_spec
T5 decoder block spec for Transformer Engine Args: config (TransformerConfig): config, containing number of layers for decoder
Megatron-LM/megatron/core/models/T5/t5_spec.py:216
↓ 4 callers
Function
get_t5_encoder_with_transformer_engine_block_spec
T5 encoder block spec for Transformer Engine Args: config (TransformerConfig): config, containing number of layers for encoder
Megatron-LM/megatron/core/models/T5/t5_spec.py:202
↓ 4 callers
Function
get_te_version
Included for backwards compatibility.
Megatron-LM/megatron/core/models/bert/bert_model.py:31
↓ 4 callers
Method
get_tensors
Filter and flatten all tensors from args and kwargs.
Megatron-LM/megatron/core/transformer/cuda_graphs.py:1015
↓ 4 callers
Function
get_timestamp_in_ms
Helper function to get timestamp in ms Returns: [int]: [timestamp in ms]
Megatron-LM/megatron/training/one_logger_utils.py:9
↓ 4 callers
Method
get_user_email
Get user's email, prioritizing public profile, then recent commits.
Megatron-LM/tests/test_utils/python_scripts/auto_reminder_github.py:54
↓ 4 callers
Method
get_wd
Weight decay incr functions Args: param_group (dict): parameter group from the optimizer.
Megatron-LM/megatron/core/optimizer_param_scheduler.py:98
↓ 4 callers
Method
global_slice
Returns a tuple of int and slice objects representing a slice of the global tensor that this ShardedTensor corresponds to.
Megatron-LM/megatron/core/dist_checkpointing/mapping.py:166
↓ 4 callers
Method
init
(self, args, role, with_ref=False)
slime/slime/ray/train_actor.py:50
↓ 4 callers
Function
init_method_normal
Init method based on N(0, sigma).
Megatron-LM/megatron/legacy/model/utils.py:13
↓ 4 callers
Function
initialize_gpt_model
( seed, layer_spec_fn=gpt_te_spec, vocab_size=128, virtual_pipeline_model_parallel_size=None,
Megatron-LM/tests/unit_tests/dist_checkpointing/test_pipeline_parallel_layout.py:31
↓ 4 callers
Method
is_decode_only
Return if this iteration we run decode only implementation.
Megatron-LM/megatron/core/inference/contexts/dynamic_context.py:732
↓ 4 callers
Function
is_first_or_last_pipeline_stage
Return True if on first or last pipeline stage, taking into account virtual pipeline parallelism.
Megatron-LM/megatron/training/utils.py:435
↓ 4 callers
Function
is_first_rank
First tensor and pipeline parallel rank.
Megatron-LM/examples/multimodal/run_text_generation.py:46
↓ 4 callers
Function
load_checkpoint_no_arg_checks
(*args, **kwargs)
Megatron-LM/tests/unit_tests/dist_checkpointing/test_optimizer.py:330
↓ 4 callers
Method
load_common
Load common part of the checkpoint.
Megatron-LM/megatron/core/dist_checkpointing/strategies/base.py:117
↓ 4 callers
Function
load_dist_checkpoint_pt
Return {full_key: tensor} for every tensor whose key matches *pattern*.
Megatron-LM/tests/functional_tests/python_test_utils/test_optimizer_grads_match.py:252
↓ 4 callers
Function
load_rows_or_cols
Args: xlsx_file (Workbook): concerned excel book sheet_name (str): sheet name options (Dict[str, List[str]]): dict like
gui-rl/desktop_env/evaluators/metrics/utils.py:613
↓ 4 callers
Method
load_state_dict
(self, state_dict)
Megatron-LM/megatron/core/optimizer/optimizer.py:1001
↓ 4 callers
Function
loss_fn
( data: list[tinker.Datum], logprobs_list: list[torch.Tensor], )
openclaw-fireworks/fireworks_loss.py:61
↓ 4 callers
Method
make_object_verbose
Make index object verbose. Args: index (faiss.Index): Faiss object to set verbose. verbose (bool): Sets whether index
Megatron-LM/megatron/core/datasets/retro/index/index.py:48
↓ 4 callers
Function
make_thread_cooperative_group
Create a thread cooperative group.
Megatron-LM/megatron/core/fusions/linear_cross_entropy/blackwell/fwd_mainloop.py:21
↓ 4 callers
Function
make_thread_cooperative_group
Create a thread cooperative group.
Megatron-LM/megatron/core/fusions/linear_cross_entropy/blackwell/bwd_partial_dlogits.py:17
↓ 4 callers
Function
make_viewless
Make_viewless util func
Megatron-LM/megatron/core/pipeline_parallel/utils.py:77
↓ 4 callers
Method
mamba_states_cache
Returns the Mamba state tensors for the given layer.
Megatron-LM/megatron/core/inference/contexts/dynamic_context.py:849
↓ 4 callers
Function
map_reduce
Simple map-reduce implementation following `more_itertools.map_reduce` interface.
Megatron-LM/megatron/core/dist_checkpointing/dict_utils.py:244
↓ 4 callers
Method
mark_proxy_failed
Mark proxy as failed
gui-rl/desktop_env/providers/aws/proxy_pool.py:99
↓ 4 callers
Function
masked_sum
(x: torch.Tensor, loss_mask: torch.Tensor, expand: bool = False)
slime/examples/train_infer_mismatch_helper/mis.py:12
↓ 4 callers
Method
match_to_config_key
Gives an operator's context, return a configuration key if necessary, or sentinel (None) denoting no matchers matched.
Megatron-LM/megatron/core/quantization/quant_config.py:189
↓ 4 callers
Method
maybe_finalize_async_calls
Finalizes all available calls. This method must be called on all ranks. Args: blocking (bool, optional): if True, will w
Megatron-LM/megatron/core/dist_checkpointing/strategies/async_utils.py:552
↓ 4 callers
Function
maybe_load_config
Returns checkpoint config if `checkpoint_dir` is a distributed checkpoint and None otherwise Args: checkpoint_dir: checkpoint directory
Megatron-LM/megatron/core/dist_checkpointing/core.py:50
↓ 4 callers
Function
mtp_on_this_rank
Check if there is MTP on the current rank. Behavior: - If a custom pipeline model parallel layout is provided in the config:
Megatron-LM/megatron/core/transformer/multi_token_prediction.py:450
↓ 4 callers
Function
named_params_and_buffers
( args: Namespace, model: Sequence[torch.nn.Module], convert_to_global_name: bool = True, tran
slime/slime/backends/megatron_utils/update_weight/common.py:132
↓ 4 callers
Function
normalize
Do non-exponentiated normalization Args: weights (List[float]): The weights Returns: List[float]: The normalized weights
Megatron-LM/megatron/core/datasets/utils.py:33
↓ 4 callers
Function
normalize_answer
(s)
slime/examples/search-r1/qa_em_format.py:21
↓ 4 callers
Function
normalize_url
(url)
gui-rl/desktop_env/evaluators/metrics/utils.py:799
↓ 4 callers
Method
on_focus
Called when the container gains focus.
swe-rl/mini-swe-agent/src/minisweagent/agents/interactive_textual.py:158
↓ 4 callers
Method
pack_sequences
Pack sequences into bins using a greedy first-fit algorithm.
Megatron-LM/megatron/rl/rl_utils.py:364
↓ 4 callers
Function
permute
(w, n_heads=n_heads, dim1=dim, dim2=dim)
Megatron-LM/tools/checkpoint/loader_llama_mistral.py:128
↓ 4 callers
Method
post_conv_ssm
Method to be applied after the convolution and SSM
Megatron-LM/megatron/core/ssm/mamba_context_parallel.py:178
↓ 4 callers
Function
post_process_weights
Trigger post-process for int4/fp4 quantization on all rollout engines.
slime/slime/backends/megatron_utils/update_weight/update_weight_from_distributed.py:317
↓ 4 callers
Method
prep_inference_input
Prepares the inference input data. Args: prompts_tokens (torch.Tensor): A tensor of shape [batch_size, max_seq_len] e
Megatron-LM/megatron/core/inference/model_inference_wrappers/t5/t5_inference_wrapper.py:47
↓ 4 callers
Method
pretty_print
Print the trie structure in a readable format.
slime/slime/router/middleware_hub/radix_tree.py:551
↓ 4 callers
Function
queue_put
(name, msg)
Megatron-LM/tools/checkpoint/loader_mixtral_hf.py:286
↓ 4 callers
Function
queue_put
(name, msg)
Megatron-LM/tools/checkpoint/loader_llama_mistral.py:573
↓ 4 callers
Function
quick_geglu
Performs Quick-GELU-based GEGLU activation : quick_gelu(y1) * (y2 + offset). Args: y: Input tensor split into two halves on the last dime
Megatron-LM/megatron/core/fusions/fused_bias_geglu.py:191
↓ 4 callers
Method
rand_init_model_params
Randomly initialize model params.
Megatron-LM/tests/functional_tests/test_cases/common/ckpt_converter/__main__.py:381
↓ 4 callers
Method
recv_backward
Receive backward activation tensor. Args: tensor_shape: Expected gradient tensor shape Returns: A dictionary
Megatron-LM/megatron/core/pipeline_parallel/multimodule_communicator.py:371
↓ 4 callers
Method
recv_forward
Receive tensor from previous rank in pipeline (forward receive).
Megatron-LM/megatron/core/pipeline_parallel/p2p_communication.py:403
↓ 4 callers
Function
recv_from_prev_pipeline_rank_
Receive from previous pipeline stage and update the input buffer inplace. Args: recv_buffer: Buffer to receive data into pp_group
Megatron-LM/megatron/core/inference/communication_utils.py:83
↓ 4 callers
Method
release
Release the lock, allowing others to acquire.
slime/slime/ray/utils.py:53
↓ 4 callers
Method
release_state
Release reference, this helps avoid memory leak.
Megatron-LM/megatron/core/models/common/model_chunk_schedule_plan.py:91
↓ 4 callers
Function
remove_from_preds_file
Remove an instance from the predictions file.
swe-rl/mini-swe-agent/src/minisweagent/run/extra/swebench.py:111
↓ 4 callers
Method
request_input
Request input from user. Returns input text (empty string if confirmed without reason).
swe-rl/mini-swe-agent/src/minisweagent/agents/interactive_textual.py:165
↓ 4 callers
Method
reset
Reset timer.
Megatron-LM/megatron/core/timers.py:171
↓ 4 callers
Method
reset
Reset by removing all requests and reset all state.
Megatron-LM/megatron/core/inference/engines/dynamic_engine.py:207
↓ 4 callers
Method
reset
(self)
slime/examples/geo3k_vlm_multi_turn/env_geo3k.py:44
↓ 4 callers
Method
resume_submission
(self)
openclaw-tinker/rollout.py:85
↓ 4 callers
Function
rotate_activation
Apply Hadamard rotation activation. Reference: https://github.com/deepseek-ai/DeepSeek-V3.2-Exp/blob/main/inference/model.py#L424-L428
Megatron-LM/megatron/core/transformer/experimental_attention_variant/dsa.py:30
↓ 4 callers
Method
round_up
Deprecated in favor of round_up_tokens and round_up_requests.
Megatron-LM/megatron/core/inference/contexts/dynamic_context.py:719
↓ 4 callers
Method
run_test_with_cuda_graph
(self, tp_size, recipe, **kwargs)
Megatron-LM/tests/unit_tests/test_fp8_param.py:328
↓ 4 callers
Function
run_transformer_layer_a2a_overlap_with_capture
Runs the model with all-to-all overlap optimization and captures outputs and gradients. Args: model: The transformer model to run.
Megatron-LM/tests/unit_tests/a2a_overlap/test_schedule_layer_1f1b.py:55
↓ 4 callers
Function
run_transformer_layer_ref_with_capture
Runs the model in reference mode and captures outputs and gradients. Args: model: The transformer model to run. input_tensor
Megatron-LM/tests/unit_tests/a2a_overlap/test_schedule_layer_1f1b.py:29
↓ 4 callers
Function
safely_get_text_content
(selector)
gui-rl/desktop_env/evaluators/getters/chrome.py:1610
↓ 4 callers
Method
send_forward_recv_backward
Send forward activation tensor and receive backward activation tensor. Args: output_dict: A dictionary mapping module names to te
Megatron-LM/megatron/core/pipeline_parallel/multimodule_communicator.py:291
↓ 4 callers
Function
send_to_next_pipeline_rank
Send output to the next pipeline stage. Args: tensor: Tensor to send pp_group: Custom process group (if None, uses global state)
Megatron-LM/megatron/core/inference/communication_utils.py:114
↓ 4 callers
Method
serialize
Converts the instance into a serializable dictionary. Returns: (dict) A dictionary representation of the instance suitable for
Megatron-LM/megatron/core/inference/inference_request.py:94
↓ 4 callers
Function
set_current_microbatch
Set the current microbatch.
Megatron-LM/megatron/core/pipeline_parallel/schedules.py:194
↓ 4 callers
Function
set_decode_expert_padding
Toggle MoE drop-and-pad for decode. Applies ``capacity_factor`` to the router and all token dispatchers so decode runs with fixed shapes
Megatron-LM/megatron/core/inference/utils.py:73
↓ 4 callers
Method
set_item
Update a Tensor item managed by the `DataParallelBuffer` instance, i.e. store (a shard of) the Tensor in this buffer's datastore.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/param_and_grad_buffer.py:1103
↓ 4 callers
Method
set_layer
(self, state_dict, layer_idx, params)
Megatron-LM/tools/checkpoint/schema_hf.py:19
↓ 4 callers
Method
set_mode
Method to set the operating mode
Megatron-LM/megatron/core/rerun_state_machine.py:240
↓ 4 callers
Function
set_rounder
Utility function to set the DynamicInferenceContext rounder.
Megatron-LM/tests/unit_tests/inference/engines/test_dynamic_engine.py:68
↓ 4 callers
Method
set_symmetric_ar
Set symmetric all-reduce functionality across all eligible modules. This method traverses the model's module hierarchy to find all m
Megatron-LM/megatron/core/transformer/module.py:122
↓ 4 callers
Function
set_tensor_grad_fn_sequence_sr
Set sequence_sr for the grad_fn of a tensor to control the backward order. For older PyTorch version, do nothing (backward order is not chang
Megatron-LM/megatron/core/transformer/moe/shared_experts.py:279
↓ 4 callers
Method
setup_embeddings_and_output_layer
Sets up embedding layer in first stage and output layer in last stage. This function initalizes word embeddings in the final stage when we ar
Megatron-LM/megatron/core/models/common/language_module/language_module.py:244
↓ 4 callers
Method
sharded_state_dict
(self, *args, metadata: Optional[dict] = None, **kwargs)
Megatron-LM/tests/unit_tests/test_checkpointing.py:46
↓ 4 callers
Method
shared_embedding_or_output_weight
Gets the embedding weight or output logit weights when share input embedding and output weights set to True or when use Multi-Token Prediction
Megatron-LM/megatron/core/models/gpt/gpt_model.py:702
↓ 4 callers
Function
should_disable_forward_pre_hook
Block forward pre-hook for certain configurations.
slime/slime/backends/megatron_utils/model.py:502
↓ 4 callers
Method
shutdown
Shutdown NVML.
Megatron-LM/megatron/core/energy_monitor.py:43
↓ 4 callers
Method
sleep
Pause CUDA memory for all tracked tensors.
slime/slime/backends/fsdp_utils/actor.py:299
↓ 4 callers
Function
slice_with_cp
( tokens: torch.Tensor, pad_value: tuple[int, float, Callable], qkv_format: str = "thd", max_s
slime/slime/backends/megatron_utils/cp_utils.py:175
↓ 4 callers
Function
smart_resize
缩放后图片满足以下条件: 1. 长宽能被 factor 整除 2. pixels 总数被限制在 [min_pixels, max_pixels] 内 3. 最长边限制在 max_long_side 内 4. 保证其长宽比基本不变
gui-rl/agents/utils/qwen_vl_utils.py:19
↓ 4 callers
Method
start_listening_to_data_parallel_coordinator
Initializes ZMQ communication to connect the engine with an inference coordinator. This asynchronous method sets up the distributed communica
Megatron-LM/megatron/core/inference/engines/dynamic_engine.py:328
↓ 4 callers
Method
state_dict
The state dict contains all non-DP-rank-dependent (i.e., non-parameter- related) optimizer variables. The returned state dict can be
Megatron-LM/megatron/core/optimizer/distrib_optimizer.py:625
↓ 4 callers
Method
state_dict_for_save_checkpoint
For easy load.
Megatron-LM/megatron/legacy/model/language_model.py:255
← previous
next →
901–1,000 of 10,561, ranked by callers