MCPcopy Create free account

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

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

↓ 11 callersMethodinitialize_distributed
()
Megatron-LM/tests/unit_tests/test_utilities.py:36
↓ 11 callersFunctionis_float8tensor
Check if a tensor is a Transformer Engine Float8Tensor
Megatron-LM/megatron/core/dist_checkpointing/exchange_utils.py:32
↓ 11 callersFunctionis_last_rank
()
Megatron-LM/megatron/training/utils.py:422
↓ 11 callersFunctionlinear_cross_entropy
helper function for linear cross entropy.
Megatron-LM/megatron/core/fusions/fused_linear_cross_entropy.py:226
↓ 11 callersMethodnarrow
This is an analogue of torch.narrow for ShardedTensors. Narrowing assumes that we narrow a local tensor on each rank. This has conseq
Megatron-LM/megatron/core/dist_checkpointing/mapping.py:373
↓ 11 callersMethodon_instance_start
(self, instance_id: str)
swe-rl/mini-swe-agent/src/minisweagent/run/extra/utils/batch_progress.py:136
↓ 11 callersMethodqueue_get
(self, name=None)
Megatron-LM/tools/checkpoint/saver_hf_llava.py:45
↓ 11 callersMethodreload_model_params
(self, state_dict=None)
Megatron-LM/megatron/core/optimizer/optimizer.py:995
↓ 11 callersMethodrender
(self, mode='rgb_array')
gui-rl/desktop_env/desktop_env.py:490
↓ 11 callersFunctionreward_adjustment
(samples, reward_weight)
slime/examples/multi_agent/agent_system.py:206
↓ 11 callersFunctionsetup_model_and_optimizer
Setup model and optimizer.
Megatron-LM/megatron/training/training.py:1217
↓ 11 callersFunctionshorten_str
(s: str, n: int)
Megatron-LM/tools/retro/cli/cli.py:22
↓ 11 callersFunctionsum_of_sample_mean
(x: torch.Tensor)
slime/slime/backends/megatron_utils/cp_utils.py:67
↓ 11 callersFunctiontensor_swap
Swap x[src_idxs] and x[dst_idxs]
Megatron-LM/megatron/core/inference/utils.py:135
↓ 11 callersMethodvalidate_result
This method verifies a result and possibly triggers a re-run. Args: result: result to verify. rejection_func: functio
Megatron-LM/megatron/core/rerun_state_machine.py:436
↓ 11 callersMethodwait
Wait until communication (and associated computation) is completed.
Megatron-LM/megatron/core/distributed/reduce_scatter_with_fp32_accumulation.py:26
↓ 11 callersMethodwithout_data
Returns a new ShardedBase instance with data=None.
Megatron-LM/megatron/core/dist_checkpointing/mapping.py:47
↓ 11 callersMethodwrite
Write the index (.idx) file Args: sequence_lengths (List[int]): The length of each sequence sequence_modes (Optional
Megatron-LM/megatron/core/datasets/indexed_dataset.py:174
↓ 10 callersMethod__init__
( self, input_size: int, output_size: int, *, parallel_mode: Optional[
Megatron-LM/megatron/core/extensions/transformer_engine.py:255
↓ 10 callersMethod_extract_type
Determine the type, nargs, and choices settings for this argument. Args: config_type: attribute type from dataclass
Megatron-LM/megatron/training/argument_utils.py:96
↓ 10 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_buf
Megatron-LM/megatron/core/optimizer/optimizer.py:78
↓ 10 callersFunctionadd_modelopt_args
Add additional arguments for using TensorRT Model Optimizer (modelopt) features.
Megatron-LM/megatron/post_training/arguments.py:4
↓ 10 callersFunctionaverage_losses_across_data_parallel_group
Reduce a tensor of losses across all GPUs.
Megatron-LM/megatron/training/utils.py:234
↓ 10 callersMethodbackward
Backward function.
Megatron-LM/megatron/core/tensor_parallel/mappings.py:454
↓ 10 callersFunctioncondition_init_method
Condition TE init_method on config.perform_initialization.
Megatron-LM/megatron/core/extensions/transformer_engine.py:79
↓ 10 callersMethodcreate_marker_embeddings
Create embeddings with marker values at specific positions. Args: num_embeddings: Number of embeddings to create mark
Megatron-LM/tests/unit_tests/models/test_mimo_embedding_alignment.py:36
↓ 10 callersMethodcreate_model_and_optimizer
Create model, DDP wrapper, and optimizer. Args: model_class: Model class to instantiate clip_grad: Optional gradient
Megatron-LM/tests/unit_tests/test_layer_wise_optimizer.py:77
↓ 10 callersMethoddetokenize
(self, tokens)
Megatron-LM/tests/unit_tests/test_rl_utils.py:56
↓ 10 callersMethoddisable
Disable the feature flag.
Megatron-LM/megatron/core/msc_utils.py:27
↓ 10 callersFunctionfine_grained_offloading_group_commit
Specify the tensors to be released after offloading. forced_released_tensors is a list of tensors to be released after offloading. The te
Megatron-LM/megatron/core/pipeline_parallel/fine_grained_activation_offload.py:512
↓ 10 callersFunctionfine_grained_offloading_group_start
Mark the start of a layer group and prepare for offload/reload.
Megatron-LM/megatron/core/pipeline_parallel/fine_grained_activation_offload.py:550
↓ 10 callersMethodfrom_config
Create a WeightedMultiTask from a config list. Args: config: List of dicts with keys: - agent_type: String path t
Megatron-LM/megatron/rl/agent/weighted_multi_task.py:69
↓ 10 callersMethodgenerate_all_output_tokens_static_batch
Utility to generate all the output tokens and probabilities for the prompts. This utility generates the output tokens for a static batch. It
Megatron-LM/megatron/core/inference/text_generation_controllers/text_generation_controller.py:989
↓ 10 callersFunctionget_default_save_sharded_strategy
Get default save sharded strategy.
Megatron-LM/megatron/core/dist_checkpointing/serialization.py:438
↓ 10 callersMethodget_item
Retrieve a tensor item managed by the `DataParallelBuffer` instance, i.e. get all the item data stored in this sharded or unsharded b
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/param_and_grad_buffer.py:1138
↓ 10 callersMethodget_local_model
Get the local model for a certain (pp,ep,tp).
Megatron-LM/tools/checkpoint/saver_base.py:299
↓ 10 callersFunctionget_log_probs_and_entropy
Compute per-token log-probabilities (and optionally entropy) on responses. For each sample, extracts response-aligned logits and tokens, then com
slime/slime/backends/megatron_utils/loss.py:170
↓ 10 callersFunctionget_rank_monitor_client
Returns the underlying fault tolerance client instance Returns: RankMonitorClient: rank monitor client instance, or None if FT was not in
Megatron-LM/megatron/training/ft_integration.py:66
↓ 10 callersFunctionget_screen_text
Extract all text content from the app's UI.
swe-rl/mini-swe-agent/tests/run/test_inspector.py:12
↓ 10 callersFunctionget_test_config
(num_layers=1, num_moe_experts=8, extra_kwargs={}, moe_grouped_gemm=True)
Megatron-LM/tests/unit_tests/a2a_overlap/utils.py:198
↓ 10 callersMethodget_trtllm_pretrained_config_and_model_weights
Get TRTLLM Config and Converted Model Weights This function returns the trtllm model weights as a list. There are two modes for conve
Megatron-LM/megatron/core/export/trtllm/trtllm_helper.py:264
↓ 10 callersMethodkill
(self)
Megatron-LM/megatron/rl/server/api.py:24
↓ 10 callersMethodlayer_norm
Which module to use for layer norm
Megatron-LM/megatron/core/models/backends.py:104
↓ 10 callersMethodmake_prefix
Take a string math problem and return the prompt. Supports requesting tagged or boxed answers. Supports chat mode prompts.
Megatron-LM/examples/rl/environments/math/math_agent.py:67
↓ 10 callersFunctionmaybe_finalize_async_save
Finalizes active async save calls. Args: blocking (bool, optional): if True, will wait until all active requests are done. Ot
Megatron-LM/megatron/training/async_utils.py:37
↓ 10 callersMethodon_instance_end
(self, instance_id: str, exit_status: str | None)
swe-rl/mini-swe-agent/src/minisweagent/run/extra/utils/batch_progress.py:145
↓ 10 callersFunctionparse
(action)
gui-rl/desktop_env/evaluators/getters/replay.py:6
↓ 10 callersMethodqueue_put
(self, name, msg)
Megatron-LM/tools/checkpoint/loader_base.py:252
↓ 10 callersMethodrun
(self, coro)
slime/slime/utils/async_utils.py:18
↓ 10 callersMethodsave
(self, rollout_id)
slime/slime/ray/rollout.py:173
↓ 10 callersMethodscatter
(self, *a, **kw)
slime/slime/utils/reloadable_process_group.py:214
↓ 10 callersFunctionset_save_original_input
Set the module to save the original input tensors. Some transformer-engine modules would save the quantized tensors by default in fp8 traini
Megatron-LM/megatron/core/extensions/transformer_engine.py:2262
↓ 10 callersMethodsetup_model
( self, dtype, symmetric_ar_type=None, fp8: bool = False, tensor_model
Megatron-LM/tests/unit_tests/inference/text_generation_controllers/test_simple_text_generation_controller.py:47
↓ 10 callersFunctionshould_disable_forward_pre_hook
Block forward pre-hook for certain configurations.
Megatron-LM/megatron/training/training.py:3126
↓ 10 callersFunctionslice_log_prob_with_cp
( log_prob: list[float] | torch.Tensor, total_length: int, response_length: int, qkv_format: s
slime/slime/backends/megatron_utils/cp_utils.py:219
↓ 10 callersMethodstep
Set lr for all parameters groups. Args: increment (int): number of steps to increment
Megatron-LM/megatron/core/optimizer_param_scheduler.py:198
↓ 10 callersMethodtokens_to_ids
Converts list of tokens to it's ids.
Megatron-LM/megatron/core/tokenizers/text/libraries/huggingface_tokenizer.py:226
↓ 9 callersMethod_add_request
( self, request: DynamicInferenceRequest )
Megatron-LM/megatron/core/inference/engines/dynamic_engine.py:647
↓ 9 callersMethod_build_test_env
(cls, test_config)
Megatron-LM/tests/unit_tests/inference/engines/test_dynamic_engine.py:242
↓ 9 callersMethod_check_and_set
Auxiliary function for checking the values in the checkpoint and setting them. Args: cls_value (float): class value
Megatron-LM/megatron/core/optimizer_param_scheduler.py:225
↓ 9 callersMethod_communicate
Communicate tensors between stages. Used as helper method in other communication methods that are used in megatron/schedules.py. Args
Megatron-LM/megatron/core/pipeline_parallel/p2p_communication.py:254
↓ 9 callersFunction_docker
(*args: str, timeout: int = 300)
swe-rl/server/swe_exec_server.py:40
↓ 9 callersFunction_ensure_var_is_not_initialized
Make sure the input variable is not None.
Megatron-LM/megatron/training/global_vars.py:282
↓ 9 callersMethod_format_arg_name
Convert dataclass name into appropriate argparse flag name. Args: config_attr_name: dataclass attribute name prefix:
Megatron-LM/megatron/training/argument_utils.py:71
↓ 9 callersFunction_load_sheet
(book: BOOK, index: str)
gui-rl/desktop_env/evaluators/metrics/table.py:92
↓ 9 callersMethodadvance
Method to drop all the buffered microbatches and jump to the next iteration.
Megatron-LM/megatron/core/rerun_state_machine.py:1073
↓ 9 callersFunctionall_gather_with_cp
Gather tensors across all ranks in the context parallel group. The first dimension of the output tensor will be the `response_length`.
slime/slime/backends/megatron_utils/cp_utils.py:123
↓ 9 callersFunctionapply_rules_to_timeFormat
(timeFormat: str, absoluteDay: datetime)
gui-rl/desktop_env/evaluators/getters/misc.py:341
↓ 9 callersMethodclose
(self)
Megatron-LM/tests/unit_tests/data/test_bin_reader.py:99
↓ 9 callersMethodclose
(self)
slime/tests/ci/gpu_lock_exec.py:165
↓ 9 callersFunctionensure_metadata_has_dp_cp_group
Ensure `metadata` is a dict containing `dp_cp_group` entry. If `metadata` is None, a new dict is returned with `dp_cp_group` set. If `metadat
Megatron-LM/megatron/core/transformer/utils.py:194
↓ 9 callersMethodfrom_pretrained
Args: path (str): path to tokenizer file with metadata.json in folder. metadata_path (Optional[str]): path to the tok
Megatron-LM/megatron/core/tokenizers/megatron_tokenizer.py:36
↓ 9 callersMethodget_aux_loss_coeff
Return the aux loss coeff for the given auxiliary loss type. If the auxiliary loss type is not found, return 0.0.
Megatron-LM/megatron/core/transformer/moe/router.py:251
↓ 9 callersFunctionget_curr_time
Get synchronized time across ranks.
Megatron-LM/examples/inference/gpt/utils.py:158
↓ 9 callersFunctionget_linear_layer
Simple linear layer with weight initialization.
Megatron-LM/megatron/legacy/model/utils.py:36
↓ 9 callersFunctionget_rl_runtime_state
Get the global RL runtime state.
Megatron-LM/megatron/rl/rl_utils.py:114
↓ 9 callersMethodget_rotary_seq_len
Function to get the rotary sequence length. Args: inference_context : Used during Inference time transformer (Transfo
Megatron-LM/megatron/core/models/common/embeddings/rotary_pos_embedding.py:211
↓ 9 callersFunctionget_torch_version
Get pytorch version from __version__; if not available use pip's. Use caching.
Megatron-LM/megatron/core/utils.py:292
↓ 9 callersMethodinit
Initialize Megatron, tokenizers, and datasets.
Megatron-LM/tools/retro/cli/cli.py:36
↓ 9 callersFunctioninitialize_rng_tracker
Create the RNG tracker. 'use_te_rng_tracker' determines whether to use Megatron or TransformerEngine's implementation. In particular, Transfor
Megatron-LM/megatron/core/tensor_parallel/random.py:286
↓ 9 callersFunctionload_modelopt_checkpoint
Load a sharded (untar .nemo or megatron --use-dist-ckpt) or unsharded checkpoint. Essentially, the function is detecting whether the checkpoint i
Megatron-LM/megatron/post_training/checkpointing.py:128
↓ 9 callersFunctionmerge
Merges dicts and lists recursively.
Megatron-LM/megatron/core/dist_checkpointing/dict_utils.py:220
↓ 9 callersMethodnormalize
Shift start/end indexes to start at new start index. Both start and end indexes will be shifted by [new start] - [old start]. Args:
Megatron-LM/megatron/core/optimizer/distrib_optimizer.py:74
↓ 9 callersFunctionopen_file
Open a file with the appropriate method based on whether MSC is enabled.
Megatron-LM/megatron/core/msc_utils.py:60
↓ 9 callersFunctionprint_rank_last
If distributed is initialized, print only on last rank.
Megatron-LM/megatron/training/utils.py:426
↓ 9 callersFunctionqueue_get
(name=None)
Megatron-LM/tools/checkpoint/saver_legacy.py:49
↓ 9 callersMethodqueue_get
Receive a message over the multiprocessing queue.
Megatron-LM/tools/checkpoint/saver_base.py:184
↓ 9 callersFunctionreduce_scatter_to_sequence_parallel_region
Wrapper for autograd function: forward: RS, backward AG <fisrt dim>
Megatron-LM/megatron/core/tensor_parallel/mappings.py:513
↓ 9 callersMethodrun
run() is the protocol between our schedule logic and model, which is used to schedule the forward and backward schedule plans for the models.
Megatron-LM/megatron/core/pipeline_parallel/utils.py:301
↓ 9 callersMethodsample_from_logits
Samples the logits to generate outputs Given the logits of the last token, this function samples it according to the parameters defin
Megatron-LM/megatron/core/inference/text_generation_controllers/text_generation_controller.py:303
↓ 9 callersMethodsize
(self)
Megatron-LM/tools/checkpoint/utils.py:63
↓ 9 callersFunctionunset
Unset a key in the global config file.
swe-rl/mini-swe-agent/src/minisweagent/run/extra/config.py:98
↓ 8 callersMethod__init__
(self, drop_prob=0.)
Megatron-LM/megatron/legacy/model/transformer.py:81
↓ 8 callersMethod__init__
(self, vocab_size)
Megatron-LM/megatron/training/tokenizer/tokenizer.py:819
↓ 8 callersMethod__post_init__
(self)
Megatron-LM/tests/unit_tests/inference/engines/test_dynamic_engine.py:123
↓ 8 callersFunction_as_iter
(x: TensorLike)
Megatron-LM/tests/functional_tests/python_test_utils/test_optimizer_grads_match.py:13
↓ 8 callersFunction_get_extra_te_kwargs
(config: TransformerConfig)
Megatron-LM/megatron/core/extensions/transformer_engine.py:66
↓ 8 callersMethod_get_slot_by_lease_locked
(self, lease_id: str)
gui-rl/env_pool_server.py:200
↓ 8 callersFunction_initialize_affine_weight_cpu
Initialize affine weight for model parallel. Build the master weight on all processes and scatter the relevant chunk.
Megatron-LM/megatron/core/tensor_parallel/layers.py:149
↓ 8 callersMethod_make_request
Make a POST request to the specified endpoint with the given payload. Args: endpoint: The API endpoint to call payloa
slime/slime/backends/sglang_utils/sglang_engine.py:228
← previousnext →301–400 of 10,561, ranked by callers