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
↓ 3 callers
Function
_pad_bucket_if_needed
(numel_unpadded)
Megatron-LM/tests/unit_tests/distributed/test_param_and_grad_buffer.py:96
↓ 3 callers
Method
_param_name
Get the name of the parameter.
Megatron-LM/megatron/core/optimizer/distrib_optimizer.py:1145
↓ 3 callers
Function
_populate_embedding_and_position_groups
Create *new* embedding-related process groups from *pp_group* ranks.
Megatron-LM/tests/unit_tests/pipeline_parallel/test_schedules.py:21
↓ 3 callers
Method
_populate_vocab
(self)
Megatron-LM/megatron/training/tokenizer/tokenizer.py:379
↓ 3 callers
Method
_postprocess
Postprocesses decoder hidden states to generate logits or compute loss. Applies Multi-Token Prediction if enabled, generates output logits th
Megatron-LM/megatron/core/models/gpt/gpt_model.py:515
↓ 3 callers
Function
_process_image_bytes_like_policy
Exactly copy the policy-side image processing: - smart_resize with same max_pixels - PNG encode - base64
gui-rl/agents/qwen3vl_reward_agent.py:94
↓ 3 callers
Function
_quantize_param
(name, weight, weight_block_size)
slime/slime/backends/megatron_utils/megatron_to_hf/processors/quantizer_fp8.py:86
↓ 3 callers
Method
_query
(self, messages: list[dict[str, str]], **kwargs)
swe-rl/mini-swe-agent/src/minisweagent/models/openrouter_model.py:64
↓ 3 callers
Method
_query_document_sample_shuffle_indices
Get the text (token ids) and document ids for a given index Args: idx (int): The index into the dataset Returns:
Megatron-LM/megatron/core/datasets/gpt_dataset.py:247
↓ 3 callers
Function
_read_cell_style
(style_name: str, cell: Union[Cell, MergedCell], diff_style: Optional[DifferentialStyle] = None)
gui-rl/desktop_env/evaluators/metrics/utils.py:370
↓ 3 callers
Function
_read_file_bytes
(path: str)
gui-rl/agents/qwen3vl_reward_agent.py:89
↓ 3 callers
Function
_reduce
All-reduce the input tensor across model parallel group.
Megatron-LM/megatron/core/tensor_parallel/mappings.py:22
↓ 3 callers
Function
_reduce_scatter_along_last_dim
Reduce-scatter tensors on the last dimension.
Megatron-LM/megatron/core/tensor_parallel/mappings.py:99
↓ 3 callers
Function
_replace_module_parameter
Replace a module's parameter with a new parameter, preserving the hierarchy.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/megatron_fsdp.py:1264
↓ 3 callers
Method
_safe_create_task
(self, coro)
openclaw-fireworks/fireworks_server.py:884
↓ 3 callers
Function
_safe_read_file
Safely read a file with multiple encoding attempts. Args: file_path: Path to the file to read Returns: List of lines fr
gui-rl/desktop_env/evaluators/metrics/table.py:124
↓ 3 callers
Method
_save_to_state_dict
Save the state dict of the router.
Megatron-LM/megatron/core/transformer/moe/router.py:580
↓ 3 callers
Function
_set_all_rng_states
Set all the rng states.
Megatron-LM/megatron/core/tensor_parallel/random.py:454
↓ 3 callers
Function
_set_cuda_rng_state
Sets the random number generator state of the current GPU. Arguments: new_state (torch.ByteTensor): The desired state device (int
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/utils.py:164
↓ 3 callers
Function
_set_elem
(target, k, v)
Megatron-LM/megatron/core/dist_checkpointing/dict_utils.py:31
↓ 3 callers
Method
_set_mips_index
Create a Faiss Flat index with inner product as the metric to search against
Megatron-LM/megatron/legacy/data/realm_index.py:131
↓ 3 callers
Method
_sharegpt_to_openai_conversations
(cls, data)
Megatron-LM/examples/post_training/modelopt/finetune.py:315
↓ 3 callers
Function
_should_log_qwen35_bridge_debug
()
slime/slime_plugins/megatron_bridge/qwen35_vl.py:46
↓ 3 callers
Method
_slice_vector_param
Slices a cp_size=1 vector parameter along the first dimension, returning the part of the parameter needed on the current context para
Megatron-LM/megatron/core/ssm/mamba_context_parallel.py:269
↓ 3 callers
Function
_split_along_first_dim
Split the tensor along its first dimension and keep the corresponding slice.
Megatron-LM/megatron/core/tensor_parallel/mappings.py:56
↓ 3 callers
Function
_split_along_last_dim
Split the tensor along its last dimension and keep the corresponding slice.
Megatron-LM/megatron/core/tensor_parallel/mappings.py:36
↓ 3 callers
Method
_step_image_path
(self, step_idx: int)
gui-rl/agents/qwen3vl_reward_agent.py:148
↓ 3 callers
Function
_str_is_int
(x: str)
slime/slime/rollout/rm_hub/math_utils.py:214
↓ 3 callers
Method
_sync_hdo_state_to_sub_optimizers
(self)
Megatron-LM/megatron/core/optimizer/cpu_offloading/hybrid_optimizer.py:323
↓ 3 callers
Method
_teacher_evaluate
Compute teacher log-probs using experience-augmented prompts. In all modes, the teacher sees the same prompt as the student but with
openclaw-rl/oel/openclaw_oel_api_server.py:800
↓ 3 callers
Method
_tokenize_turn
Shared tokenization logic for a main-line turn. Uses raw tokens/logprobs from Tinker (via output["_raw_*"]) to guarantee strict align
openclaw-tinker/api_server.py:355
↓ 3 callers
Method
_unreserve_node
(self, node: ExecNode)
swe-rl/server/swe_env_pool_server.py:96
↓ 3 callers
Function
_unshard_if_dtensor
Unshards the input tensor if it is a DTensor and otherwise returns the tensor unmodified. Args: tensor (Union[torch.Tensor, DTen
Megatron-LM/megatron/core/distributed/finalize_model_grads.py:40
↓ 3 callers
Method
_update_bucket_weights_from_distributed
Lock → broadcast → clear → unlock → pbar++. Lock prevents NCCL deadlock.
slime/slime/backends/megatron_utils/update_weight/update_weight_from_distributed.py:220
↓ 3 callers
Function
add_common_inference_args
Common inference arguments.
Megatron-LM/examples/inference/gpt/utils.py:21
↓ 3 callers
Method
add_finalize_fn
Adds a new finalize function to the request. Args: fn (Callable): function to add to the async request. This function
Megatron-LM/megatron/core/dist_checkpointing/strategies/async_utils.py:63
↓ 3 callers
Method
add_item
Add a single item to the dataset Args: tensor (torch.Tensor): The item to add to the data file mode (int, optional):
Megatron-LM/megatron/core/datasets/indexed_dataset.py:857
↓ 3 callers
Function
add_prefix_for_sharding
Prepend a given prefix to all ShardedBase objects in a given state dict *in-place*. Args: sharded_state_dict (ShardedStateDict): sharded
Megatron-LM/megatron/core/dist_checkpointing/utils.py:165
↓ 3 callers
Method
add_request
Add an incoming request This method will add the request to either the active pool or the waiting pool depending on the batch size.
Megatron-LM/megatron/core/inference/scheduler.py:42
↓ 3 callers
Method
add_token
(self, token)
Megatron-LM/megatron/training/tokenizer/tokenizer.py:224
↓ 3 callers
Method
all_gather_and_wait_parameters_ready
All-gather parameters across the data parallel group and wait for the all-gather operation to complete.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/megatron_fsdp.py:402
↓ 3 callers
Method
allocate
allocate a temporary bucket.
Megatron-LM/megatron/core/distributed/fsdp/src/megatron_fsdp/param_and_grad_buffer.py:709
↓ 3 callers
Function
allocate_train_group
(args, num_nodes, num_gpus_per_node, pg)
slime/slime/ray/placement_group.py:142
↓ 3 callers
Function
apply_rotary_pos_emb_with_cos_sin
This function applies rotary positional embedding to the target tensor t using precomputed cos and sin of size (seq_len, d_rot / 2)
Megatron-LM/megatron/core/models/common/embeddings/rope_utils.py:314
↓ 3 callers
Function
assert_observations_match
Compare expected observations with actual observations from agent messages Args: expected_observations: List of expected observation stri
swe-rl/mini-swe-agent/tests/run/test_github_issue.py:19
↓ 3 callers
Method
async_init
Allocate GPU resourced and initialize model, optimzier, local ckpt, etc.
slime/slime/ray/actor_group.py:108
↓ 3 callers
Method
attach_and_log_load_balancing_loss
Attach aux loss function to activation and add to logging.
Megatron-LM/megatron/core/transformer/moe/router.py:383
↓ 3 callers
Method
aux_loss_test
(self, input, baseline_grad, loss_name)
Megatron-LM/tests/unit_tests/transformer/moe/test_aux_loss.py:51
↓ 3 callers
Method
backward_dw
Computes the weight gradients for the transformer layer node.
Megatron-LM/megatron/core/models/gpt/fine_grained_callables.py:292
↓ 3 callers
Method
backward_dw
Performs backward pass for weight gradients in Experts. Empty implementation for compatibility with SequentialMLP and TEGroupedMLP.
Megatron-LM/megatron/core/transformer/moe/experts.py:726
↓ 3 callers
Function
bias_swiglu_impl
Implementation of biased SwiGLU that handles different input shapes. This function reshapes the input if necessary, applies the SwiGLU activation
Megatron-LM/megatron/core/fusions/fused_bias_swiglu.py:209
↓ 3 callers
Method
bos_id
Returns id of beginning of sentence token. Need for NeMo.
Megatron-LM/megatron/core/tokenizers/text/text_tokenizer.py:191
↓ 3 callers
Function
broadcast
Broadcast data from TP rank 0 to other ranks.
Megatron-LM/tests/functional_tests/test_cases/common/ckpt_converter/__main__.py:51
↓ 3 callers
Function
broadcast_int_list
Broadcast a list of integer values. Args: data_parallel (bool): Broadcast across a single data parallel model replica.
Megatron-LM/megatron/core/inference/communication_utils.py:190
↓ 3 callers
Function
build_data_loader
Data loader. Note that batch-size is the local (per GPU) batch-size.
Megatron-LM/tasks/finetune_utils.py:72
↓ 3 callers
Method
build_generic_dataset
Build the DistributedDataset Return None if and only if the underlying dataset class is not built on the current rank and torch.distr
Megatron-LM/megatron/core/datasets/blended_megatron_dataset_builder.py:467
↓ 3 callers
Function
build_hf_model
Builds Huggingface wrapper model given config and model path.
Megatron-LM/megatron/core/models/huggingface/module.py:82
↓ 3 callers
Function
build_non_trainable_sample
( sample: Sample, status: Sample.Status, *, reward: float | None = None, )
terminal-rl/sample_builders.py:26
↓ 3 callers
Function
build_prm_eval_prompt
PRM eval prompt — used by RL (primary), OPD (eval_mode), Combined.
openclaw-tinker/scorers.py:37
↓ 3 callers
Function
build_requests
( args: Namespace, tokenizer: Any, sampling_params: Optional[SamplingParams] = None )
Megatron-LM/examples/inference/gpt/utils.py:348
↓ 3 callers
Function
build_split_dataset
(index, name)
Megatron-LM/megatron/legacy/data/dataset_utils.py:501
↓ 3 callers
Function
build_toy_model_and_optimizer
Helper function to build a toy model and optimizer for testing Megatron-FSDP.
Megatron-LM/tests/unit_tests/distributed/fsdp/test_mfsdp_fully_shard.py:131
↓ 3 callers
Method
build_train_data
( self, *, args: Any, state: GenerateState, train_messages: List[Dict[
gui-rl/agents/qwen35_agent.py:417
↓ 3 callers
Function
build_train_valid_datasets
(data_path, image_size=224)
Megatron-LM/megatron/legacy/data/vit_dataset.py:217
↓ 3 callers
Function
build_train_valid_test_data_iterators
Build pretraining data iterators.
Megatron-LM/megatron/training/training.py:3051
↓ 3 callers
Function
check_files_exist
(in_ss_out_names, key, num_partitions)
Megatron-LM/tools/preprocess_data.py:259
↓ 3 callers
Function
checkpoint_exists
(checkpoints_path)
Megatron-LM/megatron/training/checkpointing.py:263
↓ 3 callers
Method
cleanup
(self)
Megatron-LM/tests/unit_tests/fusions/test_fused_linear_cross_entropy.py:260
↓ 3 callers
Method
cleanup
(self, override_sync: Optional[bool] = None)
Megatron-LM/tests/unit_tests/dist_checkpointing/__init__.py:49
↓ 3 callers
Method
close
(self)
terminal-rl/remote/terminal_env.py:296
↓ 3 callers
Method
close
(self, lease_id: str)
swe-rl/swe_env_client.py:130
↓ 3 callers
Method
column_parallel_layer_norm_linear
Which module for sequential layernorm and linear
Megatron-LM/megatron/core/models/backends.py:156
↓ 3 callers
Method
column_parallel_linear
Which column parallel linear module TE backend uses
Megatron-LM/megatron/core/models/backends.py:144
↓ 3 callers
Method
combine_embeddings
(self, embeddings: List[torch.Tensor])
Megatron-LM/tests/unit_tests/models/test_mimo_submodules.py:28
↓ 3 callers
Method
combined_ocr_encoder
Encode OCR samples.
Megatron-LM/examples/multimodal/dataset_helpers.py:663
↓ 3 callers
Function
compare_urls
(url1, url2, full=True)
gui-rl/desktop_env/evaluators/metrics/utils.py:783
↓ 3 callers
Method
compute_language_model_loss
Computes the language model loss (Cross entropy across vocabulary) Args: labels (Tensor): The labels of dimension [batch size, se
Megatron-LM/megatron/core/models/common/language_module/language_module.py:199
↓ 3 callers
Method
compute_output_layer_and_language_model_loss
Computes the language model logits and loss (Cross entropy across vocabulary) Args: hidden (Tensor): The hidden states from the t
Megatron-LM/megatron/core/models/common/language_module/language_module.py:129
↓ 3 callers
Function
construct_prompt
(sample, config)
Megatron-LM/examples/multimodal/evaluation/mmmu_utils.py:98
↓ 3 callers
Function
convert_cuda_rng_state
Convert the cuda rng state tensor to the graphable version, or from the graphable version to the non-graphable tensor version.
Megatron-LM/megatron/core/tensor_parallel/random.py:114
↓ 3 callers
Method
convert_ids_to_tokens
Converts a sequence of ids in BPE tokens using the vocab.
Megatron-LM/megatron/training/tokenizer/gpt2_tokenization.py:272
↓ 3 callers
Function
convert_qwen2_to_hf
(args, name, param)
slime/slime/backends/megatron_utils/megatron_to_hf/qwen2.py:5
↓ 3 callers
Function
convert_to_unicode
Converts `text` to Unicode (if it's not already), assuming utf-8 input.
Megatron-LM/megatron/training/tokenizer/bert_tokenization.py:78
↓ 3 callers
Function
count_zeros_fp32
Counts the number of zeros in gradients associated with the passed-in list of parameters. Args: parameters (Iterable[Tensor] or Tenso
Megatron-LM/megatron/core/optimizer/clip_grads.py:180
↓ 3 callers
Method
create
(args, model, **kwargs)
slime/slime/backends/megatron_utils/update_weight/hf_weight_iterator_base.py:6
↓ 3 callers
Method
create_cuda_graphs
Create cuda graphs. This method iterates the dynamic context's `cuda_graph_request_counts` to record and capture cuda graphs.
Megatron-LM/megatron/core/inference/engines/dynamic_engine.py:242
↓ 3 callers
Method
create_ddp_model
Wrap model in DDP. Args: model: Model to wrap Returns: DDP-wrapped model
Megatron-LM/tests/unit_tests/test_muon_optimizer.py:118
↓ 3 callers
Method
create_fwd_graph
Create a fwd cudagraph for this runner. Should be called inside 'create_cudagraphs()'.
Megatron-LM/megatron/core/transformer/cuda_graphs.py:646
↓ 3 callers
Method
create_local_plan
Adds IOBytes write request on non-coordinator ranks.
Megatron-LM/megatron/core/dist_checkpointing/strategies/torch.py:511
↓ 3 callers
Function
create_training_models
(args, pgs, rollout_manager)
slime/slime/ray/placement_group.py:152
↓ 3 callers
Method
cuda_graph_set_manual_hooks
Set CUDA Graph manual hooks for the modules that contain direct parameters and are covered by cudagraphs.
Megatron-LM/megatron/core/transformer/cuda_graphs.py:1934
↓ 3 callers
Method
cur_backward_chunk
Get the current backward pass chunk handler.
Megatron-LM/megatron/core/pipeline_parallel/fine_grained_activation_offload.py:160
↓ 3 callers
Method
cur_forward_chunk
Get the current forward pass chunk handler.
Megatron-LM/megatron/core/pipeline_parallel/fine_grained_activation_offload.py:156
↓ 3 callers
Function
destroy_process_groups
Destroy all reloadable process groups.
slime/slime/utils/reloadable_process_group.py:265
↓ 3 callers
Function
determine_main_replica_uniform_distribution
Computes the save distribution. Should be used in conjunction with `distribute_main_replicas_with_precomputed_distribution` which applies the
Megatron-LM/megatron/core/dist_checkpointing/exchange_utils.py:177
↓ 3 callers
Function
disable_forward_pre_hook
Disable forward pre-hooks for provided DDP-wrapped model chunks. Args: model_chunks (Sequence[DDP]): Sequence of DDP modules to disable h
slime/slime/backends/megatron_utils/model.py:140
↓ 3 callers
Method
disable_forward_pre_hook
Disable forward pre-hooks needed for param all-gather overlap with forward compute. Skip synchronous param all-gather if `param_sync`
Megatron-LM/megatron/core/distributed/distributed_data_parallel.py:366
↓ 3 callers
Function
disable_grad_sync
Disable asynchronous grad reductions
Megatron-LM/megatron/core/pipeline_parallel/schedules.py:982
↓ 3 callers
Method
drain_eval_scores
(self)
openclaw-tinker/rollout.py:92
↓ 3 callers
Function
dummy_jsonl
(odir)
Megatron-LM/tests/unit_tests/data/test_preprocess_data.py:33
← previous
next →
1,101–1,200 of 10,561, ranked by callers