Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Unakar/Logic-RL
/ functions
Functions
858 in github.com/Unakar/Logic-RL
⨍
Functions
858
◇
Types & classes
113
↳
Endpoints
30
↓ 3 callers
Function
apply_monkey_patch
(config: PretrainedConfig, verbose=True)
verl/models/transformers/monkey_patch.py:42
↓ 3 callers
Function
apply_rotary_pos_emb
(q, k, cos, sin, position_ids)
verl/models/llama/megatron/layers/parallel_attention.py:123
↓ 3 callers
Function
build_memory_buffer
Build the memory buffer given weight_buffer_meta Args: weight_buffer_meta: contains mapping from name to a dictionary containing shape an
verl/utils/memory_buffer.py:68
↓ 3 callers
Function
calc_padded_numel
for cuda memory alignment, make sure alignment by 128-bits
verl/utils/memory_buffer.py:51
↓ 3 callers
Function
check_model_support_rmpad
(model_type: str)
verl/models/registry.py:27
↓ 3 callers
Function
compute_transformers_input_shapes
(batches, meta_info)
verl/utils/megatron/pipeline_parallel.py:22
↓ 3 callers
Method
execute_rank_zero_async
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:322
↓ 3 callers
Method
fit
The training loop of PPO. The driver process only need to call the compute functions of the worker group through RPC to construct the
verl/trainer/ppo/ray_trainer.py:581
↓ 3 callers
Method
from_detached
(cls, worker_names=None, ray_cls_with_init=None)
verl/single_controller/ray/base.py:285
↓ 3 callers
Function
get_constant_schedule_with_warmup
( optimizer: Optimizer, num_warmup_steps: int, last_epoch: int = -1, )
verl/utils/torch_functional.py:422
↓ 3 callers
Function
get_default_kwargs_for_model_parallel_config
()
verl/utils/megatron/tensor_parallel.py:32
↓ 3 callers
Function
get_megatron_optimizer
( model, config: OptimizerConfig, no_weight_decay_cond=None, scale_lr_cond=Non
verl/utils/megatron/optimizer.py:26
↓ 3 callers
Function
get_parallel_model_from_config
(config, megatron_config, pre_process=None, post_process=None, value=False)
verl/utils/model.py:234
↓ 3 callers
Function
import_external_libs
(external_libs=None)
verl/utils/import_utils.py:41
↓ 3 callers
Function
init_megatron_optim_config
(optim_config: Dict)
verl/utils/megatron_utils.py:185
↓ 3 callers
Method
init_workers
Init resource pool and worker group
verl/trainer/ppo/ray_trainer.py:476
↓ 3 callers
Function
initialize_global_process_group
(timeout_second=36000)
verl/utils/distributed.py:18
↓ 3 callers
Function
make_batch_generator
(batches, vpp_size)
verl/utils/megatron/pipeline_parallel.py:43
↓ 3 callers
Function
make_map_fn
(split)
examples/data_preprocess/hellaswag.py:53
↓ 3 callers
Function
pad_dataproto_to_divisor
Pad a DataProto to size divisible by size_divisor Args: size_divisor (int): size divisor Returns: data: (DataProto): the pad
verl/protocol.py:40
↓ 3 callers
Method
reorder
Note that this operation is in-place
verl/protocol.py:539
↓ 3 callers
Method
save_checkpoint
(self, step)
verl/trainer/fsdp_sft_trainer.py:295
↓ 3 callers
Method
set_input_tensor
Set input tensor to be used instead of forward()'s input. When doing pipeline parallelism the input from the previous stage comes fro
verl/models/llama/megatron/modeling_llama_megatron.py:457
↓ 3 callers
Function
set_random_seed
(seed)
verl/workers/megatron_workers.py:47
↓ 3 callers
Function
split_dict_tensor_into_batches
(tensors: TensorDict, batch_size)
verl/utils/torch_functional.py:203
↓ 3 callers
Method
sub
(self, data: DataProto)
tests/ray/test_colocated_workers.py:44
↓ 3 callers
Method
to_str
(precision)
verl/utils/torch_dtypes.py:74
↓ 3 callers
Function
union_numpy_dict
(tensor_dict1: dict[np.ndarray], tensor_dict2: dict[np.ndarray])
verl/protocol.py:80
↓ 3 callers
Function
union_tensor_dict
Union two tensordicts.
verl/protocol.py:66
↓ 3 callers
Function
unpad_dataproto
(data: 'DataProto', pad_size)
verl/protocol.py:60
↓ 3 callers
Function
vocab_parallel_log_probs_from_logits
TODO(zhangchi.usc1992): We may change the implementation later
verl/utils/megatron/tensor_parallel.py:136
↓ 2 callers
Method
__init__
(self, config)
verl/workers/megatron_workers.py:410
↓ 2 callers
Method
__init__
(self, config)
verl/workers/fsdp_workers.py:509
↓ 2 callers
Method
_build_model_optimizer
(self, model_path, megatron_config: ModelParalle
verl/workers/megatron_workers.py:124
↓ 2 callers
Method
_build_model_optimizer
(self, model_path, fsdp_config,
verl/workers/fsdp_workers.py:111
↓ 2 callers
Method
_compute_loss
(self, batch)
verl/trainer/fsdp_sft_trainer.py:218
↓ 2 callers
Function
_compute_response_info
(batch)
verl/trainer/ppo/ray_trainer.py:168
↓ 2 callers
Method
_forward_micro_batch
(self, micro_batch)
verl/workers/critic/dp_critic.py:53
↓ 2 callers
Method
_forward_micro_batch
Returns: entropy: # (bs, response_len) log_probs: # (bs, response_len)
verl/workers/actor/dp_actor.py:58
↓ 2 callers
Function
_is_non_local
(path)
verl/utils/fs.py:29
↓ 2 callers
Method
_offload_params_to_cpu
(self, pp_rank, to_empty=False)
verl/workers/sharding_manager/megatron_vllm.py:102
↓ 2 callers
Function
_pad_tensor
(x: Tensor, dim: int, padding_size: int)
verl/utils/ulysses.py:103
↓ 2 callers
Method
_pad_to_length
(self, input_ids, attention_mask)
verl/utils/dataset/rm_dataset.py:99
↓ 2 callers
Method
_save_checkpoint
(self)
verl/trainer/ppo/ray_trainer.py:550
↓ 2 callers
Method
_set_cos_sin_cache
(self, seq_len, device, dtype)
verl/models/llama/megatron/layers/parallel_attention.py:51
↓ 2 callers
Function
_unpad_tensor
(x: Tensor, dim: int, padding_size: int)
verl/utils/ulysses.py:110
↓ 2 callers
Function
_unwrap_ray_remote
(cls)
verl/single_controller/ray/base.py:414
↓ 2 callers
Method
add
(self, data: DataProto)
tests/ray/test_colocated_workers.py:31
↓ 2 callers
Method
add
(self, a, b)
tests/e2e/envs/digit_completion/task.py:78
↓ 2 callers
Method
all_gather
(self)
tests/ray/test_worker_group_torch.py:40
↓ 2 callers
Function
all_to_all_tensor
( local_input: Tensor, scatter_dim: int, gather_dim: int, group: Optional[dist.ProcessGroup] =
verl/utils/ulysses.py:132
↓ 2 callers
Method
allgather_params
allgather params of all pp ranks. Return a list of handles
verl/workers/sharding_manager/megatron_vllm.py:118
↓ 2 callers
Function
apply_kl_penalty
(data: DataProto, kl_ctrl: core_algos.AdaptiveKLController, kl_penalty='kl')
verl/trainer/ppo/ray_trainer.py:85
↓ 2 callers
Function
compute_advantage
(data: DataProto, adv_estimator, gamma=1.0, lam=1.0, num_repeat=1)
verl/trainer/ppo/ray_trainer.py:117
↓ 2 callers
Function
compute_data_metrics
(batch, use_critic=True)
verl/trainer/ppo/ray_trainer.py:184
↓ 2 callers
Method
compute_ref_log_prob
(self, data: DataProto)
verl/workers/fsdp_workers.py:449
↓ 2 callers
Method
compute_rm_score
(self, data: DataProto)
verl/workers/fsdp_workers.py:984
↓ 2 callers
Method
compute_values
(self, data: DataProto)
verl/workers/fsdp_workers.py:674
↓ 2 callers
Function
create_and_sync_state
(param_name, state, is_param)
verl/utils/fsdp_utils.py:243
↓ 2 callers
Function
create_colocated_worker_cls
This function should return a class instance that delegates the calls to every cls in cls_dict
verl/single_controller/ray/base.py:420
↓ 2 callers
Method
encode
Converts a string to a sequence of ids (integer), using the tokenizer and vocabulary. Args: text (`str`, `List[str]` or
verl/workers/rollout/tokenizer.py:70
↓ 2 callers
Method
estimate_flops
Estimate the FLOPS based on the number of valid tokens in the current batch and the time taken. Args: batch_seqlens (Lis
verl/utils/flops_counter.py:107
↓ 2 callers
Method
forward
Args: input_ids: input ids. shape (batch_size, seq_length) attention_mask: attention_mask. shape (batch_size, seq_le
verl/models/llama/megatron/modeling_llama_megatron.py:117
↓ 2 callers
Method
forward_backward_batch
(self, data: DataProto, forward_only=False)
verl/workers/critic/megatron_critic.py:113
↓ 2 callers
Method
forward_backward_batch
We assume: - The model takes input: (input_ids, attention_mask, position_ids). No rmpad for the input - The communication sha
verl/workers/actor/megatron_actor.py:218
↓ 2 callers
Function
gather_heads_scatter_seq
A func to sync attention result with alltoall in sequence parallel gather head dimension and scatter seq dim: e.g. seq_dim: 1, head_dim:
verl/utils/ulysses.py:85
↓ 2 callers
Method
get_all_params
Get all the parameters of the models in all pp ranks Returns: params: List[List[Dict[str, Tensor]]]: a list of parameters in all
verl/workers/sharding_manager/megatron_vllm.py:163
↓ 2 callers
Function
get_common_default_kwargs_for_parallel_linear
()
verl/utils/megatron/tensor_parallel.py:47
↓ 2 callers
Function
get_cosine_schedule_with_warmup
Create a schedule with a learning rate that decreases following the values of the cosine function between the initial lr set in the optimizer
verl/utils/torch_functional.py:379
↓ 2 callers
Function
get_eos_mask
e.g. end of sentence token=1 response_id: [0, 0, 2, 42, 3, 5, 1, 0, 0] eos_mask: [1, 1, 1, 1, 1, 1, 1, 0, 0]
verl/utils/torch_functional.py:139
↓ 2 callers
Function
get_gsm8k_data
()
tests/verl/utils/dataset/test_sft_dataset.py:21
↓ 2 callers
Function
get_random_num
()
examples/data_preprocess/multiply.py:39
↓ 2 callers
Function
get_random_num
()
examples/data_preprocess/arth.py:45
↓ 2 callers
Function
get_seqlen_balanced_partitions
get order of seq lengths to make partitions balanced, this is used in balacing sum of seqlength across dp ranks and microbatches Paramete
verl/utils/seqlen_balancing.py:152
↓ 2 callers
Function
get_trajectory_tracker
()
verl/utils/debug/trajectory_tracker.py:79
↓ 2 callers
Function
get_weight_buffer_meta_from_module
Return a dictionary containing name to a shape and dtype.
verl/utils/memory_buffer.py:58
↓ 2 callers
Method
init
(self)
tests/ray/test_worker_group_torch.py:35
↓ 2 callers
Function
is_tensor_parallel_param
(param)
verl/utils/megatron/tensor_parallel.py:86
↓ 2 callers
Function
is_vllm_available
()
verl/utils/import_utils.py:33
↓ 2 callers
Function
judge_string
(input_str, reformat_gold_conditions, wrong_reason, finish_patterns)
eval_kk/kk_processor.py:20
↓ 2 callers
Function
last_boxed_only_string
(string)
verl/utils/reward_score/math.py:63
↓ 2 callers
Function
list_of_dict_to_dict_of_list
(list_of_dict: list[dict])
verl/protocol.py:92
↓ 2 callers
Function
load_fsdp_optimizer
(optimizer, device_id)
verl/utils/fsdp_utils.py:123
↓ 2 callers
Method
load_params_to_cuda
load all model params to cuda
verl/workers/sharding_manager/megatron_vllm.py:112
↓ 2 callers
Method
log
(self, data, step)
verl/utils/logger/aggregate_logger.py:40
↓ 2 callers
Function
log_probs_from_logits_all_rmpad
Compute the log_probs from logits with rmpad input_ids and logits. Note that logits_rmpad = model(input_ids_rmpad). For each sentences, there is a
verl/utils/torch_functional.py:328
↓ 2 callers
Function
logprobs_from_logits_naive
(logits, labels)
verl/utils/torch_functional.py:70
↓ 2 callers
Function
make_map_fn
(split)
examples/data_preprocess/countdown.py:94
↓ 2 callers
Function
make_map_fn
(split)
examples/data_preprocess/kk.py:46
↓ 2 callers
Function
make_map_fn
(split)
examples/data_preprocess/gsm8k.py:52
↓ 2 callers
Function
make_map_fn
(split)
examples/data_preprocess/multiply.py:98
↓ 2 callers
Function
make_map_fn
(split)
examples/data_preprocess/arth.py:109
↓ 2 callers
Function
make_map_fn
(split)
examples/data_preprocess/math_dataset.py:48
↓ 2 callers
Method
make_minibatch_iterator
Make minibatch iterator for updating the actor Args: data (DataProto): a DataProto containing keys ``input_ids``
verl/workers/actor/megatron_actor.py:190
↓ 2 callers
Function
md5_encode
(path: str)
verl/utils/fs.py:33
↓ 2 callers
Method
merge
(self, other)
verl/utils/seqlen_balancing.py:37
↓ 2 callers
Function
normalize_pp_vpp_params
Normalize the pp vpp params into a complete named parameters. This is useful when gather parameters from pp ranks and passed to a model with
verl/utils/model.py:181
↓ 2 callers
Method
offload_params_to_cpu
(self)
verl/workers/reward_model/megatron/reward_model.py:262
↓ 2 callers
Function
preprocess
(text)
examples/data_preprocess/hellaswag.py:27
↓ 2 callers
Method
preprocess_data
AllGather data from sp region This is because the data is first sharded along the FSDP dimension as we utilize the DP_COMPUTE
verl/workers/sharding_manager/fsdp_ulysses.py:58
← previous
next →
101–200 of 858, ranked by callers