MCPcopy Create free account

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

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

↓ 3 callersMethodssm_prefill
Performs SSM computation for inference prefill step. Args: zxBCdt: The input tensor of shape (l, b, d), which is a conca
Megatron-LM/megatron/core/ssm/mamba_mixer.py:642
↓ 3 callersMethodstart
(self)
slime/slime/utils/profile_utils.py:96
↓ 3 callersMethodstep
Override the step method to perform the following operations: 1. Sync the HDO param_groups to sub-optimizers. 2. Sync
Megatron-LM/megatron/core/optimizer/cpu_offloading/hybrid_optimizer.py:150
↓ 3 callersFunctionstrip_param_name_prefix
(name: str)
slime/slime/backends/megatron_utils/misc_utils.py:1
↓ 3 callersFunctionsum_of_token
(x: torch.Tensor, response_lengths: list[int], loss_masks: list[torch.Tensor])
slime/slime/backends/fsdp_utils/actor.py:1037
↓ 3 callersMethodsuspend
(self)
Megatron-LM/megatron/rl/server/api.py:18
↓ 3 callersFunctionswiglu_back
Computes the gradient for the SwiGLU activation function. Args: g (torch.Tensor): Gradient tensor from the subsequent layer. y (t
Megatron-LM/megatron/core/fusions/fused_bias_swiglu.py:55
↓ 3 callersFunctionswitch_load_balancing_loss_func
Calculate the auxiliary loss for load balancing. Refer to the Switch Transformer (https://arxiv.org/abs/2101.03961) and Global Load Balancing
Megatron-LM/megatron/core/transformer/moe/moe_utils.py:43
↓ 3 callersMethodsynchronize_param_gather
Synchronize parameter all-gather operations for all model parameters.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/megatron_fsdp.py:1069
↓ 3 callersFunctionte_general_gemm
Wrapper for TE's general_gemm function. It supports fp32, bf16, fp16, and fp8 GEMMs with TN, NN, and NT layouts. The output d
Megatron-LM/megatron/core/extensions/transformer_engine.py:2209
↓ 3 callersMethodteardown_method
(self, method)
Megatron-LM/tests/unit_tests/transformer/test_cuda_graphs.py:373
↓ 3 callersFunctiontelemetrics_and_exit
( success: bool, test_case: str, environment: str, pipeline_id: int, is_integration_test: bool )
Megatron-LM/tests/test_utils/python_scripts/launch_jet_workload.py:232
↓ 3 callersMethodtext_to_tokens
Converts text to tokens.
Megatron-LM/megatron/core/tokenizers/text/libraries/sentencepiece_tokenizer.py:92
↓ 3 callersMethodto_state_dict
Convert tensor-aware dict back to the original state_dict
Megatron-LM/megatron/core/dist_checkpointing/tensor_aware_state_dict.py:325
↓ 3 callersFunctionto_zz_mask_attn_bias
Convert the attention mask to the attention bias
Megatron-LM/megatron/core/transformer/dot_product_attention_context_parallel.py:135
↓ 3 callersMethodtokenize_conversation
Convert a conversation to tokens. Args: conversation (List[Dict]): Sequence of system/user/assistant messages. Mu
Megatron-LM/megatron/training/tokenizer/multimodal_tokenizer.py:220
↓ 3 callersFunctiontokens_to_string
(toks)
Megatron-LM/tests/unit_tests/data/test_preprocess_mmdata.py:94
↓ 3 callersFunctiontokens_to_string
(toks)
Megatron-LM/tests/unit_tests/data/test_preprocess_data.py:94
↓ 3 callersMethodtorch_linear_cross_entropy
( hidden: torch.Tensor, weight: torch.Tensor, labels: torch.Tensor, reduction:
Megatron-LM/tests/unit_tests/fusions/test_fused_linear_cross_entropy.py:269
↓ 3 callersMethodtouch
Update access time and count.
slime/slime/router/middleware_hub/radix_tree.py:86
↓ 3 callersFunctionunpermute
Restore the original order of tokens after permutation. If probs are provided, it will also apply them to the tokens before restoring the ord
Megatron-LM/megatron/core/transformer/moe/moe_utils.py:314
↓ 3 callersMethodupdate_content
Update the displayed content.
swe-rl/mini-swe-agent/src/minisweagent/run/inspector.py:136
↓ 3 callersMethodupdate_requests_pools
Update request pool status This method will full up the active request pool, if it has less than max batch size elements from the wai
Megatron-LM/megatron/core/inference/scheduler.py:154
↓ 3 callersFunctionvalidate_sharded_objects_handling
Checks if either of the passed strategies can handle sharded objects. Args: sharded_strategy (Union[SaveShardedStrategy, LoadShardedStrat
Megatron-LM/megatron/core/dist_checkpointing/validation.py:562
↓ 3 callersMethodvocab_size
(self)
Megatron-LM/megatron/training/tokenizer/tokenizer.py:839
↓ 3 callersMethodwake_up
(self)
slime/slime/backends/megatron_utils/actor.py:387
↓ 3 callersFunctionweighted_bias_swiglu_impl
Token-wise-weighted bias swiglu fusion.
Megatron-LM/megatron/core/fusions/fused_bias_swiglu.py:239
↓ 3 callersFunctionwhitespace_tokenize
Runs basic whitespace cleaning and splitting on a piece of text.
Megatron-LM/megatron/training/tokenizer/bert_tokenization.py:152
↓ 2 callersMethod__enter__
Enter context manager to enable activation offloading hooks.
Megatron-LM/megatron/core/pipeline_parallel/fine_grained_activation_offload.py:164
↓ 2 callersMethod__exit__
Exit context manager and restore original tensor saving behavior.
Megatron-LM/megatron/core/pipeline_parallel/fine_grained_activation_offload.py:179
↓ 2 callersMethod__init__
(self, hidden_size, init_method)
Megatron-LM/megatron/legacy/model/language_model.py:103
↓ 2 callersMethod__init__
(self, input_dim=2048, embed_dim=768)
Megatron-LM/megatron/legacy/model/vision/inpainting.py:74
↓ 2 callersMethod__init__
( self, input_size: int, output_size: int, *, config: ModelParallelCon
Megatron-LM/megatron/core/tensor_parallel/layers.py:1133
↓ 2 callersMethod__init__
( self, param_and_grad_buffer: ParamAndGradBuffer, ag_stream: Optional[torch.cuda.Stre
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/param_and_grad_buffer.py:3263
↓ 2 callersMethod__init__
(self, start: int = 0)
Megatron-LM/megatron/core/inference/utils.py:19
↓ 2 callersMethod__init__
Initializes a preprocessing node. Args: gpt_model: The GPT model instance. chunk_state (TransformerChunkState): State
Megatron-LM/megatron/core/models/gpt/fine_grained_callables.py:95
↓ 2 callersMethod__init__
(self, arg)
Megatron-LM/megatron/core/transformer/cuda_graphs.py:98
↓ 2 callersMethod__init__
( self, config: TransformerConfig, submodules: Union[SelfAttentionSubmodules, CrossAtt
Megatron-LM/megatron/core/transformer/attention.py:148
↓ 2 callersMethod__init__
(self, config: TransformerConfig, module: torch.nn.Module)
Megatron-LM/megatron/core/transformer/module.py:391
↓ 2 callersMethod__init__
Source & destination metas.
Megatron-LM/tests/functional_tests/test_cases/common/ckpt_converter/__main__.py:136
↓ 2 callersMethod__init__
( self, channels: int = 3, height: int = 10, width: int = 10, kernel_s
Megatron-LM/tests/unit_tests/distributed/fsdp/test_mfsdp_fully_shard.py:54
↓ 2 callersMethod__init__
( self, retrieval_method: str = "bm25", retrieval_topk: int = 10, index_path:
slime/examples/search-r1/local_dense_retriever/retrieval_server.py:290
↓ 2 callersMethod__init__
(self, source_getter: _SourceGetter)
slime/slime/utils/tensor_backper.py:18
↓ 2 callersMethod__iter__
Remove 'endoftext' string.
Megatron-LM/tools/bert_embedding/huggingface.py:16
↓ 2 callersMethod__str__
(self)
Megatron-LM/tests/functional_tests/test_cases/common/ckpt_converter/__main__.py:143
↓ 2 callersFunction_add_load_convert_hooks
Register some load_state_dict prehooks to handle some known state_dict key mismatch.
Megatron-LM/megatron/post_training/model_builder.py:37
↓ 2 callersFunction_add_request
Add request to engine. *Note: Using `prompt_text` instead of `prompt_tokens` for fair comparison.
Megatron-LM/examples/inference/gpt/gpt_dynamic_inference.py:275
↓ 2 callersMethod_add_scales_to_converter
Adds scaling factors to the distributed and single device converters. Args: converter (ModelWeightConverter): Converter, holding
Megatron-LM/megatron/core/export/trtllm/trtllm_helper.py:352
↓ 2 callersFunction_add_tokenizer_args
(parser)
Megatron-LM/megatron/training/arguments.py:2877
↓ 2 callersMethod_adjust_key_value_for_inference
Saves the generated key and value tensors to the end of the buffers in inference_context. Returns the full size keys and values from
Megatron-LM/megatron/core/transformer/attention.py:325
↓ 2 callersFunction_adv_diff_clip
Magnitude clamp on the per-candidate teacher-vs-old log-ratio. Applied as ``diff = (ell_T - ell_old).clamp(-t, t)`` before forming ``A_v = di
openclaw-combine/hint_opd_loss.py:244
↓ 2 callersMethod_allocate_memory
(self, inference_max_sequence_len, batch_size, num_attention_heads)
Megatron-LM/megatron/legacy/model/transformer.py:648
↓ 2 callersMethod_allocate_memory
Allocate memory to store kv cache during inference.
Megatron-LM/megatron/core/transformer/attention.py:300
↓ 2 callersFunction_allocate_vm
分配火山引擎虚拟机
gui-rl/desktop_env/providers/volcengine/manager.py:162
↓ 2 callersFunction_allocate_vm
Allocate a new Aliyun ECS instance
gui-rl/desktop_env/providers/aliyun/manager.py:48
↓ 2 callersFunction_allreduce_conditional_embedding_grads
All-reduce conditional embedding grads. Reduce grads across all the pp stages to ensure that parameters of the conditional embedders (e.
Megatron-LM/megatron/core/distributed/finalize_model_grads.py:89
↓ 2 callersFunction_allreduce_embedding_grad
Unified helper to all-reduce embedding parameters across pipeline stages. Args: model (List[torch.nn.Module]): A list of model chunks (PP
Megatron-LM/megatron/core/distributed/finalize_model_grads.py:204
↓ 2 callersFunction_allreduce_non_tensor_model_parallel_grads
All-reduce both layernorm grads (for sequence parallelism) and gradients from modules with average_gradients_across_tp_domain=True across
Megatron-LM/megatron/core/distributed/finalize_model_grads.py:318
↓ 2 callersFunction_allreduce_word_embedding_grads
All-reduce word-embedding gradients across the first and last PP stages. This ensures that the ``word_embeddings`` parameters stay in sync when t
Megatron-LM/megatron/core/distributed/finalize_model_grads.py:164
↓ 2 callersFunction_append_hint_to_messages
(messages: list[dict], hint: str)
openclaw-opd/openclaw_opd_api_server.py:140
↓ 2 callersMethod_append_prm_record
(self, record: dict[str, Any])
openclaw-opd/openclaw_opd_api_server.py:407
↓ 2 callersMethod_append_prm_record
(self, record)
openclaw-fireworks/fireworks_server.py:856
↓ 2 callersFunction_append_to_sample
( sample: Sample, response_tokens: list[int], tokens_to_add: list[int], logprobs: list[float],
slime/examples/geo3k_vlm_multi_turn/rollout.py:236
↓ 2 callersFunction_append_visible_static_text
(container)
swe-rl/mini-swe-agent/tests/agents/test_interactive_textual.py:17
↓ 2 callersMethod_apply_rope
Apply RoPE to the input tensor.
Megatron-LM/megatron/core/transformer/experimental_attention_variant/dsa.py:455
↓ 2 callersFunction_broadcast
(item)
Megatron-LM/megatron/core/pipeline_parallel/hybrid_cp_schedule.py:512
↓ 2 callersMethod_build_argparse_kwargs_from_field
Assemble kwargs for add_argument(). Args: attribute: dataclass attribute
Megatron-LM/megatron/training/argument_utils.py:136
↓ 2 callersFunction_build_datum
Build a Tinker Datum from prepared sequences.
openclaw-tinker/data_formatter.py:74
↓ 2 callersFunction_build_docker_pull_error_message
( *, image: str, cmd: list[str], return_code: int | None = None, timeout: float | None = N
terminal-rl/remote/docker_compose_utils.py:31
↓ 2 callersFunction_build_dynamic_history_samples
( args: Any, state: GenerateState, agent: Any, base_sample: Sample, step_snapshots: list[d
gui-rl/generate_with_gui.py:215
↓ 2 callersFunction_build_hint_judge_messages
(response_text: str, next_state_text: str, next_state_role: str = "user")
openclaw-opd/openclaw_opd_api_server.py:89
↓ 2 callersMethod_build_layer_schedule_plan
(self, module, comp_stream, comm_stream)
Megatron-LM/megatron/core/models/common/model_chunk_schedule_plan.py:372
↓ 2 callersMethod_build_megatron_datasets_parallel
Build the megatron datasets for a list of prefixes in parallel Args: prefixes (List[str]): The list of prefix strings
Megatron-LM/megatron/core/datasets/blended_megatron_dataset_builder.py:318
↓ 2 callersMethod_build_meta
Build docstring element. :param text: docstring element text :param title: title of section containing element :return:
Megatron-LM/tools/retro/config_utils.py:291
↓ 2 callersFunction_build_nccl_allocator
()
Megatron-LM/megatron/core/nccl_allocator.py:23
↓ 2 callersFunction_build_prm_eval_prompt
(response_text: str, next_state_text: str, next_state_role: str = "user")
openclaw-opd/openclaw_opd_api_server.py:159
↓ 2 callersFunction_build_request
(with_ttl: bool)
gui-rl/desktop_env/providers/aliyun/manager.py:125
↓ 2 callersFunction_build_result_dir
(args: Any, domain: str, example_id: str, sample: Sample)
gui-rl/generate_with_gui.py:146
↓ 2 callersMethod_build_sample_index
( self, sequence_length: int, min_sentences_per_sample: int )
Megatron-LM/megatron/core/datasets/masked_dataset.py:145
↓ 2 callersFunction_build_shuffle_index
Build the range [0, size) and shuffle Args: num_samples (int): The size of the first shuffle range [0, num_samples) total_size (
Megatron-LM/megatron/core/datasets/gpt_dataset.py:598
↓ 2 callersMethod_build_test_env
(cls, test_config)
Megatron-LM/tests/unit_tests/inference/test_data_parallel_inference_coordinator.py:175
↓ 2 callersFunction_calculate_color_difference
(rgb1, rgb2)
gui-rl/desktop_env/evaluators/metrics/docs.py:715
↓ 2 callersMethod_calculate_cuda_graph_token_counts
Calculate CUDA graph token counts for a given configuration. This method computes evenly-spaced token counts from step_size up to
Megatron-LM/megatron/core/inference/batch_dimensions_utils.py:138
↓ 2 callersFunction_call_nvtx_range
()
Megatron-LM/tests/unit_tests/test_utils.py:139
↓ 2 callersMethod_check_log_message_for_strict_handling
(self, text, strict, missing, unexpected)
Megatron-LM/tests/unit_tests/dist_checkpointing/test_strict.py:158
↓ 2 callersMethod_checkpointed_attention_forward
Forward method with selective activation checkpointing.
Megatron-LM/megatron/core/transformer/attention.py:260
↓ 2 callersFunction_clean_metadata_for_serialization
Create a clean copy of metadata for serialization by removing non-serializable objects. Args: metadata: Original metadata dict Retur
Megatron-LM/megatron/core/dist_checkpointing/utils.py:335
↓ 2 callersMethod_clean_node_subtree
Clean a node and all its descendants. This is the core cleanup function. Args: node: Node to clean (including all
slime/slime/router/middleware_hub/radix_tree.py:387
↓ 2 callersMethod_clip_kv_proj_weight
Clip kv_proj_weight
Megatron-LM/megatron/core/transformer/multi_latent_attention.py:1106
↓ 2 callersMethod_clip_linear_qkv
Apply qkclip to linear_qkv layer
Megatron-LM/megatron/core/transformer/attention.py:1333
↓ 2 callersMethod_clip_q_proj_weight
Clip q_proj_weight
Megatron-LM/megatron/core/transformer/multi_latent_attention.py:1079
↓ 2 callersFunction_compose_with_prm
(s: Sample)
gui-rl/generate_with_gui.py:735
↓ 2 callersFunction_compute_fqn
(name, vp_stage=vp_stage)
slime/slime/backends/megatron_utils/update_weight/common.py:161
↓ 2 callersMethod_compute_log_prob
Compute token log-probabilities for a list of packed batches. Parameters: model_tag: Which parameters to use, e.g. "actor" or "re
slime/slime/backends/fsdp_utils/actor.py:331
↓ 2 callersMethod_concat_embeddings
Concatenate the tokens before sending to transformer layer.
Megatron-LM/megatron/core/transformer/multi_token_prediction.py:734
↓ 2 callersFunction_configure_global_num_microbatches_calculator
Configure number of microbatches calculator. Can be used for initialization and reconfiguration. Args: rank (int): Rank o
Megatron-LM/megatron/core/num_microbatches_calculator.py:144
↓ 2 callersFunction_convert_to_moe_state_dict
Convert a dense model's state_dict to a MoE model's state_dict. This function takes the state dictionary of a dense model and modifies it to
Megatron-LM/megatron/core/transformer/moe/upcycling_utils.py:108
↓ 2 callersMethod_create_config_and_mtp_block_spec
(self, tp, cp, use_te=False)
Megatron-LM/tests/unit_tests/transformer/test_multi_token_prediction.py:60
↓ 2 callersMethod_create_masked_lm_predictions
Creates the predictions for the masked LM objective Args: token_ids (List[int]): The token ids target_sequence_length
Megatron-LM/megatron/core/datasets/masked_dataset.py:229
↓ 2 callersFunction_create_torch_profiler
(args, name)
slime/slime/utils/profile_utils.py:60
← previousnext →1,401–1,500 of 10,561, ranked by callers