MCPcopy Create free account

hub / github.com/Gen-Verse/OpenClaw-RL / functions

Functions10,561 in github.com/Gen-Verse/OpenClaw-RL

↓ 4 callersMethod_maybe_update_cuda_sync_point
Update the CUDA sync point if the priority of the new point is higher than the current sync point, which means the new point is reach
Megatron-LM/megatron/core/transformer/moe/token_dispatcher.py:854
↓ 4 callersFunction_multi_tensor_copy_this_to_that
Use multi-tensor-applier to copy values from one list to another. We don't have a bfloat16 implementation so for now if the overflow_
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/mixed_precision.py:117
↓ 4 callersFunction_normalize_messages_for_template
(messages: list[dict])
openclaw-opd/openclaw_opd_api_server.py:48
↓ 4 callersFunction_normalize_text
(text: str)
slime/slime/rollout/rm_hub/gpqa.py:18
↓ 4 callersMethod_notify_cond_for_new_request
Helper function to notify condition variable when a new request is added.
Megatron-LM/megatron/core/inference/engines/dynamic_engine.py:627
↓ 4 callersMethod_occupy_vm
(self, vm_path, pid, region=None)
gui-rl/desktop_env/providers/virtualbox/manager.py:341
↓ 4 callersMethod_occupy_vm
(self, vm_path, pid, region=None)
gui-rl/desktop_env/providers/vmware/manager.py:329
↓ 4 callersFunction_pick
(key: str, default: float)
terminal-rl/remote/pool_server.py:31
↓ 4 callersMethod_preprocess
Preprocesses inputs for the transformer decoder. Applies embeddings to input tokens, or uses `decoder_input` from a previous pipeline
Megatron-LM/megatron/core/models/gpt/gpt_model.py:280
↓ 4 callersMethod_prompt_and_handle_special
Prompts the user, takes care of /h (followed by requery) and sets the mode. Returns the user input.
swe-rl/mini-swe-agent/src/minisweagent/agents/interactive.py:118
↓ 4 callersMethod_py_string
(text: str)
gui-rl/agents/qwen35_agent.py:111
↓ 4 callersFunction_reduce_scatter_along_first_dim
Reduce-scatter the input tensor across model parallel group. Args: input_ (torch.Tensor): The input tensor to be reduce-scattered.
Megatron-LM/megatron/core/tensor_parallel/mappings.py:155
↓ 4 callersFunction_reset_cuda_memory
()
Megatron-LM/tests/unit_tests/pipeline_parallel/test_fine_grained_activation_offloading.py:14
↓ 4 callersFunction_save_image
(image_bytes: bytes, out_path: Path)
gui-rl/generate_with_gui.py:85
↓ 4 callersMethod_schedule_close
( self, task_key: str, run_lease_id: str, run_slot: RunSlot, *, reason: str )
terminal-rl/remote/pool_server.py:126
↓ 4 callersMethod_set_main_param_and_optimizer_states
Set the main param and optimizer states corresponding to the input model_param. The structure of the input `tensors`: tensors = {
Megatron-LM/megatron/core/optimizer/distrib_optimizer.py:902
↓ 4 callersFunction_shorten_output
(text: str | None, max_chars: int = 4000)
terminal-rl/remote/docker_compose_utils.py:22
↓ 4 callersFunction_shorten_str
(s: str, max_len: int, shorten_left=False)
swe-rl/mini-swe-agent/src/minisweagent/run/extra/utils/batch_progress.py:28
↓ 4 callersMethod_split_tensor_at_batch_dim
Split an aggregated tensor into multiple tensors at the batch dimension. Args: aggregated_tensor: The tensor to split
Megatron-LM/megatron/core/pipeline_parallel/bridge_communicator.py:901
↓ 4 callersFunction_transpose_first_dim
(t, num_splits, num_splits_first, model)
Megatron-LM/megatron/training/checkpointing.py:912
↓ 4 callersMethod_update_mode_display
Update the display based on current mode.
swe-rl/mini-swe-agent/src/minisweagent/agents/interactive_textual.py:201
↓ 4 callersFunction_yarn_get_mscale
(scale: float = 1, mscale: float = 1)
Megatron-LM/megatron/core/models/common/embeddings/yarn_rotary_pos_embedding.py:253
↓ 4 callersMethodacquire
Try to acquire the lock. Returns True if acquired, False otherwise. Caller should retry until it returns True.
slime/slime/ray/utils.py:43
↓ 4 callersMethodaction_toggle_mode
Switch from single-line to multi-line mode (one-way only).
swe-rl/mini-swe-agent/src/minisweagent/agents/interactive_textual.py:192
↓ 4 callersFunctionadd_item
(item_id, item, offset, item_index_map)
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/param_and_grad_buffer.py:284
↓ 4 callersFunctionapply_factories
Turn ShardedTensorFactories into ShardedTensors *in-place*. Args: sharded_state_dict (ShardedStateDict): state dict possibly
Megatron-LM/megatron/core/dist_checkpointing/mapping.py:662
↓ 4 callersFunctionapply_factory_merges
Apply merges defined by ShardedTensorFactories *in-place*. Args: x1 (StateDict): state dict loaded from the checkpoint x2 (Sharde
Megatron-LM/megatron/core/dist_checkpointing/mapping.py:681
↓ 4 callersFunctionapply_swiglu_sharded_factory
( original_sh_ten, sharded_offsets, singleton_local_shards: bool = False )
Megatron-LM/megatron/core/transformer/mlp.py:260
↓ 4 callersMethodbackward
Backward pass for DownProjFunction - Pure Python implementation. Forward: output = topk_weights * (input @ w2) (with topk_weight mul
slime/tests/test_fused_experts_backward.py:172
↓ 4 callersMethodbackward_dw
Compute weight gradients during the backward pass if delay_wgrad_compute is enabled.
Megatron-LM/megatron/core/extensions/transformer_engine.py:459
↓ 4 callersFunctionbatched_async_rm
( args, samples: list[Sample], **kwargs, )
slime/slime/rollout/rm_hub/__init__.py:69
↓ 4 callersFunctionbert_extended_attention_mask
(attention_mask)
Megatron-LM/megatron/legacy/model/bert_model.py:20
↓ 4 callersFunctionbuild_dataset
(name, data_prefix, max_num_samples, max_seq_length, seed, binary_head, ma
Megatron-LM/megatron/legacy/data/dataset_utils.py:534
↓ 4 callersFunctionbuild_pretraining_data_loader
Build dataloader given an input dataset.
Megatron-LM/megatron/training/datasets/data_samplers.py:19
↓ 4 callersMethodcalculate_log_probs
Calculate log probs for all active requests and return them. TODO: @wdykas support top-n log probs. Args: logits (Tensor
Megatron-LM/megatron/core/inference/contexts/dynamic_context.py:1907
↓ 4 callersMethodcleanup
(self)
Megatron-LM/tests/unit_tests/fusions/test_fused_linear_cross_entropy.py:1025
↓ 4 callersMethodcombine
Combines expert outputs via communication and adds shared expert output. This method uses the token dispatcher to combine the outputs from di
Megatron-LM/megatron/core/transformer/moe/moe_layer.py:260
↓ 4 callersFunctioncombined_forward_backward_step
Merged forward and backward step for combined 1f1b scheduler. Args: Need to accept the argument of both forward_step() and backward_step(
Megatron-LM/megatron/core/pipeline_parallel/combined_1f1b.py:237
↓ 4 callersFunctioncompute_dsa_indexer_loss
Compute KL divergence loss between index_scores and true attention_scores. This loss trains the indexer to predict which tokens are importan
Megatron-LM/megatron/core/transformer/experimental_attention_variant/dsa.py:161
↓ 4 callersFunctioncompute_topk
(scores, topk, num_groups=None, group_topk=None)
Megatron-LM/megatron/core/transformer/moe/moe_utils.py:577
↓ 4 callersMethodcompute_total_pipeline_stages
Compute the total number of pipeline stages across a multi-module chain. Interprets ``topology`` as a directed acyclic graph (DAG) where node
Megatron-LM/megatron/core/pipeline_parallel/multimodule_communicator.py:423
↓ 4 callersMethodconcat_and_pad_tokens
Concat with special tokens and pad sequence to self.max_seq_length
Megatron-LM/megatron/legacy/data/ict_dataset.py:143
↓ 4 callersFunctionconfigure_if_first_time
()
swe-rl/mini-swe-agent/src/minisweagent/run/extra/config.py:49
↓ 4 callersFunctioncontains_submesh
Check if a sub-mesh exists in the device mesh by name.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/utils.py:118
↓ 4 callersFunctionconvert_by_vocab
Converts a sequence of [tokens|ids] using the vocab.
Megatron-LM/megatron/training/tokenizer/bert_tokenization.py:136
↓ 4 callersFunctionconvert_to_hf
(args, model_name, name, param, quantization_config=None)
slime/slime/backends/megatron_utils/megatron_to_hf/__init__.py:22
↓ 4 callersMethodcount_zeros
(self)
Megatron-LM/megatron/core/optimizer/optimizer.py:1289
↓ 4 callersFunctioncreate_cudagraphs
Should be called at the end of each schedule function, (e.g. forward_backward_pipelining_with_interleaving) in `megatron.core.pipeline_paralle
Megatron-LM/megatron/core/transformer/cuda_graphs.py:357
↓ 4 callersMethodcreate_cudagraphs
Capture CUDA Graphs per TransformerLayer per microbatch.
Megatron-LM/megatron/core/transformer/cuda_graphs.py:1902
↓ 4 callersFunctioncreate_placement_groups
Create placement groups for actor and rollout engines.
slime/slime/ray/placement_group.py:79
↓ 4 callersFunctioncreate_rollout_manager
(args, pg, prm_pg=None)
slime/slime/ray/placement_group.py:203
↓ 4 callersMethodcu_query_lengths
Cumulative query sequence lengths.
Megatron-LM/megatron/core/inference/contexts/dynamic_context.py:746
↓ 4 callersMethoddecode
(self, ids)
Megatron-LM/megatron/training/tokenizer/tokenizer.py:252
↓ 4 callersMethoddecode
Convert list of token IDs to plaintext.
Megatron-LM/tests/unit_tests/test_tokenizer.py:210
↓ 4 callersMethoddeserialize
Deserialize request. Args: obj (dict): Serialized request data. Returns: (InferenceRequest) Deserialized req
Megatron-LM/megatron/core/inference/inference_request.py:115
↓ 4 callersFunctiondetach
(tensor)
Megatron-LM/megatron/legacy/data/realm_index.py:14
↓ 4 callersMethoddetermine_cross_rank_reads
( self, tp_size: int, ranks_placement: RanksPlacementT, tmp_path_dist_ckpt: Pa
Megatron-LM/tests/unit_tests/dist_checkpointing/test_fully_parallel.py:578
↓ 4 callersMethoddispatch
Dispatches tokens to assigned expert ranks via communication. This method performs the actual communication (e.g., All-to-All) to distribute
Megatron-LM/megatron/core/transformer/moe/moe_layer.py:205
↓ 4 callersMethoddispatcher_dropless_test
(self)
Megatron-LM/tests/unit_tests/transformer/moe/test_token_dispatcher.py:119
↓ 4 callersMethodembed_text_dataset
Embed a text dataset. Args: text_dataset (torch.utils.data.Dataset): Text dataset to embed. Each sample of the te
Megatron-LM/megatron/core/datasets/retro/config/bert_embedders.py:20
↓ 4 callersMethodenable
Enable the feature flag.
Megatron-LM/megatron/core/msc_utils.py:23
↓ 4 callersMethodenable_forward_pre_hook
Enable forward pre-hooks needed for param all-gather overlap with forward compute.
Megatron-LM/megatron/core/distributed/distributed_data_parallel.py:354
↓ 4 callersMethodencode
Convert text to a list of token IDs.
Megatron-LM/tests/unit_tests/test_tokenizer.py:206
↓ 4 callersMethodencoder
Megatron-LM/megatron/core/tokenizers/text/libraries/tiktoken_tokenizer.py:291
↓ 4 callersFunctionevaluate_and_print_results
Helper function to evaluate and dump results on screen.
Megatron-LM/megatron/training/training.py:2842
↓ 4 callersFunctionevaluate_personalization
Score a single (question, response) pair against a preference. Calls GPT-4.1 `num_votes` times in parallel and returns the average of al
openclaw-rl/oel/eval/personalization_evaluator.py:139
↓ 4 callersFunctionextract_answer
(passage: str)
slime/slime/rollout/rm_hub/math_utils.py:473
↓ 4 callersMethodfind_longest_prefix
Find the longest cached prefix for the given text. Args: text: Input string to find prefix for Returns:
slime/slime/router/middleware_hub/radix_tree.py:135
↓ 4 callersFunctionfine_grained_offloading_set_last_layer
Set the last layer flag.
Megatron-LM/megatron/core/pipeline_parallel/fine_grained_activation_offload.py:561
↓ 4 callersMethodfinish_grad_sync
Finishes grad sync (all-reduce or reduce-scatter) communication operations for all model gradients. When overlap_grad_reduce
Megatron-LM/megatron/core/distributed/data_parallel_base.py:49
↓ 4 callersFunctionfix_query_key_value_ordering
Fix up query/key/value matrix ordering if checkpoint version is smaller than 2.0
Megatron-LM/megatron/training/checkpointing.py:951
↓ 4 callersMethodforward
(self, encoder_input_ids, decoder_input_ids, encoder_attn_mask, decoder_attn_mask, encoder_dec
Megatron-LM/megatron/legacy/model/t5_model.py:116
↓ 4 callersMethodforward
Forward.
Megatron-LM/megatron/core/extensions/transformer_engine.py:426
↓ 4 callersFunctionforward_backward_helper_wrapper
wrap forward_helper, backward_helper, and combined_forward_backward_helper in a unified way
Megatron-LM/megatron/core/pipeline_parallel/schedules.py:1330
↓ 4 callersFunctionfp8_need_transpose_data
Check if a FP8 tensor needs transpose data.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/mixed_precision.py:167
↓ 4 callersMethodfrom_dict
(data: dict)
slime/slime/utils/types.py:126
↓ 4 callersMethodgenerate
The megatron core inference backend generate function This uses dynamic engine if available, otherwise uses legacy static engine. Ar
Megatron-LM/megatron/core/inference/engines/static_engine.py:295
↓ 4 callersMethodget_active_request_count
Returns the current number of active requests.
Megatron-LM/megatron/core/inference/contexts/dynamic_context.py:771
↓ 4 callersFunctionget_added_codes_dir
Get directory of saved encodings. Args: config (RetroPreprocessingConfig): Retro preprocessing config. Returns: Path to the
Megatron-LM/megatron/core/datasets/retro/index/utils.py:105
↓ 4 callersFunctionget_align_size_for_quantization
Get the alignment size for quantization.
Megatron-LM/megatron/core/transformer/moe/moe_utils.py:1026
↓ 4 callersFunctionget_all_true_mask
(size, device)
Megatron-LM/megatron/core/models/retro/utils.py:23
↓ 4 callersFunctionget_attention_mask
Constructs an attention mask given the input sequence length.
Megatron-LM/megatron/core/inference/utils.py:32
↓ 4 callersFunctionget_avlm_mimo_model
( hidden_size, vocab_size, seq_len, img_h, img_w, patch_dim, special_token_ids )
Megatron-LM/tests/unit_tests/models/test_mimo_model.py:140
↓ 4 callersFunctionget_batch_on_this_tp_rank
(data_iterator, mtp_on_this_rank: bool = False)
Megatron-LM/megatron/training/utils.py:518
↓ 4 callersFunctionget_bias_dropout_add
(training, fused)
Megatron-LM/megatron/core/fusions/fused_bias_dropout.py:81
↓ 4 callersMethodget_boundary_pp_stage_ranks
Get TP-CP ranks at boundary PP stage for each DP replica. Returns ranks at the last PP stage (if src) or first PP stage (if dest) for
Megatron-LM/megatron/core/pipeline_parallel/bridge_communicator.py:185
↓ 4 callersFunctionget_buffer
Get or create a buffer for all-to-all communication. Args: group (torch.distributed.ProcessGroup): Process group for communication
Megatron-LM/megatron/core/transformer/moe/fused_a2a.py:33
↓ 4 callersFunctionget_config_path
Get the path to a config file.
swe-rl/mini-swe-agent/src/minisweagent/config/__init__.py:9
↓ 4 callersMethodget_conv1d_bias
Returns a slice of the conv1d bias relevant to the current context parallel rank
Megatron-LM/megatron/core/ssm/mamba_context_parallel.py:217
↓ 4 callersMethodget_conv1d_weight
Returns a slice of the conv1d weight relevant to the current context parallel rank
Megatron-LM/megatron/core/ssm/mamba_context_parallel.py:212
↓ 4 callersMethodget_current_running_global_batch_size
Get current running global batch size. If decrease_batch_size_if_needed is False, this just equals global batch size.
Megatron-LM/megatron/core/num_microbatches_calculator.py:287
↓ 4 callersFunctionget_data_parallel_group
Get the data-parallel group the caller rank belongs to.
Megatron-LM/megatron/core/parallel_state.py:1383
↓ 4 callersMethodget_db_chunk_text
Get DB chunk as text.
Megatron-LM/tools/retro/cli/cli.py:125
↓ 4 callersMethodget_empty_index_path
Get file path to empty index (i.e., trained, but unpopulated). Args: config (RetroPreprocessingConfig): Retro preprocessing confi
Megatron-LM/megatron/core/datasets/retro/index/index.py:61
↓ 4 callersFunctionget_eos_id
Return the eos token id. We insert eos_token between two samples during packing. However, if the eos_token is used in message or after turns,
Megatron-LM/examples/post_training/modelopt/finetune.py:48
↓ 4 callersFunctionget_fp4_context
Return fp4 context manager.
Megatron-LM/megatron/core/fp4_utils.py:110
↓ 4 callersMethodget_fp8_context
Get the fp8 context for the transformer layer.
Megatron-LM/megatron/core/models/common/model_chunk_schedule_plan.py:197
↓ 4 callersFunctionget_gpt_modelopt_spec
Mix the native spec with TENorm. This is essentially the native local spec except for the layernorm implementation is using TENorm from Trans
Megatron-LM/megatron/core/post_training/modelopt/gpt/model_specs.py:35
↓ 4 callersFunctionget_grad_norm_fp32
Calculate the norm of gradients in fp32. This is adapted from torch.nn.utils.clip_grad.clip_grad_norm_ and added functionality to handle mode
Megatron-LM/megatron/core/optimizer/clip_grads.py:51
↓ 4 callersFunctionget_hidden_bytes
Calculate the number of hidden bytes for a tensor. Args: x (torch.Tensor): Input tensor Returns: int: Number of hidden bytes
Megatron-LM/megatron/core/transformer/moe/fused_a2a.py:21
← previousnext →801–900 of 10,561, ranked by callers