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
Function
compute_attention_mask
(prompts, pad_token_id)
tests/e2e/envs/digit_completion/task.py:107
Function
compute_entropy_loss
Compute Categorical entropy loss Args: logits: `(torch.Tensor)` shape: (bs, response_length, vocab_size) eos_mask: `(
verl/trainer/ppo/core_algos.py:234
Function
compute_gae_advantage_return
Adapted from https://github.com/huggingface/trl/blob/main/trl/trainer/ppo_trainer.py Args: token_level_rewards: `(torch.Tensor)`
verl/trainer/ppo/core_algos.py:70
Function
compute_grad_norm
(model: nn.Module)
verl/utils/torch_functional.py:151
Function
compute_grpo_outcome_advantage
Compute advantage for GRPO, operating only on Outcome reward (with only one scalar reward for each response). Args: token_level_
verl/trainer/ppo/core_algos.py:111
Method
compute_log_prob
Compute the log probability of the responses given input_ids, attention_mask and position_ids Args: data (DataProto): a DataProto
verl/workers/actor/megatron_actor.py:129
Method
compute_log_prob
Compute the log probability of the responses given input_ids, attention_mask and position_ids Args: data (DataProto): a DataProto
verl/workers/actor/dp_actor.py:153
Method
compute_logprobs_fn
(output, data)
verl/workers/actor/megatron_actor.py:149
Function
compute_policy_loss
Adapted from https://github.com/huggingface/trl/blob/main/trl/trainer/ppo_trainer.py#L1122 Args: old_log_prob: `(torch.Tensor)`
verl/trainer/ppo/core_algos.py:200
Function
compute_position_id_with_mask
(mask)
tests/e2e/envs/digit_completion/task.py:113
Method
compute_ref_log_prob
(self, data: DataProto)
verl/workers/megatron_workers.py:376
Function
compute_reinforce_plus_plus_outcome_advantage
Compute advantage for Reinforce++, operating on Outcome reward (with only one scalar reward for each response). Args: token_leve
verl/trainer/ppo/core_algos.py:158
Method
compute_reward
(self, data: DataProto)
verl/workers/reward_model/megatron/reward_model.py:123
Function
compute_rewards
(token_level_scores, old_log_prob, ref_log_prob, kl_ratio)
verl/trainer/ppo/core_algos.py:195
Method
compute_rm_score
(self, data: DataProto)
verl/workers/megatron_workers.py:723
Function
compute_score
The scoring function for countdown task. Args: solution_str: the solution text ground_truth: dictionary containing target num
verl/utils/reward_score/countdown.py:59
Function
compute_score
Computes comprehensive score for model response. Args: solution_str: Raw model response string ground_truth: Dictionary conta
verl/utils/reward_score/kk.py:141
Function
compute_score
The scoring function for GSM8k. Reference: Trung, Luong, et al. "Reft: Reasoning with reinforced fine-tuning." Proceedings of the 62nd Annual Mee
verl/utils/reward_score/gsm8k.py:44
Function
compute_score
(solution_str, ground_truth)
verl/utils/reward_score/math.py:17
Function
compute_score
The scoring function for GSM8k. Reference: Trung, Luong, et al. "Reft: Reasoning with reinforced fine-tuning." Proceedings of the 62nd Annual Mee
verl/utils/reward_score/multiply.py:27
Function
compute_value_loss
Compute the value loss. Copied from https://github.com/huggingface/trl/blob/main/trl/trainer/ppo_trainer.py#L1151 Args: vpreds (`torch.Fl
verl/trainer/ppo/core_algos.py:253
Method
compute_values
(self, data: DataProto)
verl/workers/megatron_workers.py:551
Method
compute_values
Compute values
verl/workers/critic/base.py:33
Method
compute_values
(self, data: DataProto)
verl/workers/critic/megatron_critic.py:77
Method
compute_values
(self, data: DataProto)
verl/workers/critic/dp_critic.py:113
Method
concat
(data: List[ray.ObjectRef])
verl/protocol.py:613
Function
convert_config
(hf_config: PretrainedConfig, megatron_config)
verl/utils/megatron_utils.py:140
Method
convert_ids_to_tokens
Converts a single index or a sequence of indices in a token or a sequence of tokens, using the vocabulary and added tokens.
verl/workers/rollout/tokenizer.py:116
Method
convert_tokens_to_string
(self, tokens)
tests/e2e/envs/digit_completion/tokenizer.py:101
Method
convert_tokens_to_string
Converts a sequence of tokens in a single string. The most simple way to do it is `" ".join(tokens)` but we often want to remove sub-
verl/workers/rollout/tokenizer.py:147
Function
create_huggingface_critic
Args: model_name: override_config_kwargs: Returns:
verl/utils/model.py:81
Function
decorator
(func)
verl/single_controller/base/decorator.py:398
Function
dispatch_all_to_all
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:66
Function
dispatch_dp_compute
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:255
Function
dispatch_dp_compute_data_proto
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:272
Function
dispatch_dp_compute_data_proto_with_func
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:279
Function
dispatch_megatron_compute_data_proto
All the args and kwargs must be DataProto. The batch will be chunked by dp_size and passed to each rank
verl/single_controller/base/decorator.py:118
Function
dispatch_megatron_pp_as_dp_data_proto
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:237
Function
dispatch_one_to_all
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:60
Method
dp_size
(self)
verl/single_controller/base/megatron/worker_group.py:41
Function
entropy_from_logits
Calculate entropy from logits.
verl/utils/torch_functional.py:95
Method
eos_token_id
`Optional[int]`: Id of the end of sentence token in the vocabulary. Returns `None` if the token has not been set.
verl/workers/rollout/tokenizer.py:44
Method
execute_all
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:329
Method
execute_rank_zero
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:326
Method
execute_rank_zero_sync
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:319
Function
exists
r"""Works like os.path.exists() but supports hdfs. Test whether a path exists. Returns False for broken symbolic links. Args: path (
verl/utils/hdfs_io.py:27
Function
extract_pg_from_exist
(resource_pools: Dict[str, RayResourcePool], src_role_names: List[str], resource_poo
verl/single_controller/ray/base.py:91
Function
extract_solution
(solution_str, *args)
examples/data_preprocess/multiply.py:62
Function
extract_step
(path)
verl/trainer/fsdp_sft_trainer.py:51
Function
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 PPO dat
examples/split_placement/split_monkey_patch.py:25
Method
flush
(self)
verl/utils/logger/aggregate_logger.py:37
Method
foo
(self, y)
tests/ray/test_worker_group_basics.py:48
Method
forward
( ctx: Any, group: dist.ProcessGroup, local_input: Tensor, scatter_dim: int,
verl/utils/ulysses.py:167
Method
forward
(ctx: Any, group: dist.ProcessGroup, local_tensor: Tensor, gat
verl/utils/ulysses.py:200
Method
forward
(self, *args, **kwargs)
verl/utils/model.py:34
Method
forward
(ctx, vocab_parallel_logits: torch.Tensor)
verl/utils/megatron/tensor_parallel.py:103
Method
forward
r""" Args: labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing
verl/models/llama/megatron/modeling_llama_megatron.py:174
Method
forward
Args: input_ids: input ids. shape (1, totol_nnz) position_ids: position ids. shape (batch_size, seq_length)
verl/models/llama/megatron/modeling_llama_megatron.py:240
Method
forward
r""" Args: labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing
verl/models/llama/megatron/modeling_llama_megatron.py:308
Method
forward
( self, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor] = N
verl/models/llama/megatron/modeling_llama_megatron.py:384
Method
forward
Args: input_ids: input ids. shape (1, totol_nnz) position_ids: position ids. shape (batch_size, seq_length)
verl/models/llama/megatron/modeling_llama_megatron.py:467
Method
forward
r""" Args: labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing
verl/models/llama/megatron/modeling_llama_megatron.py:562
Method
forward
( self, *, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.
verl/models/llama/megatron/modeling_llama_megatron.py:644
Method
forward
Args: hidden_states (`torch.FloatTensor`): input to the layer of shape `(batch, seq_len, embed_dim)` attention_mask (
verl/models/llama/megatron/layers/parallel_decoder.py:44
Method
forward
( self, hidden_states: torch.Tensor, position_ids: Optional[torch.LongTensor] = None,
verl/models/llama/megatron/layers/parallel_decoder.py:112
Method
forward
(self, x)
verl/models/llama/megatron/layers/parallel_mlp.py:71
Method
forward
(self, x, seq_len=None)
verl/models/llama/megatron/layers/parallel_attention.py:61
Method
forward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
verl/models/llama/megatron/layers/parallel_attention.py:234
Method
forward
(self, hidden_states: torch.Tensor, position_ids: Optional[torch.LongTensor] =
verl/models/llama/megatron/layers/parallel_attention.py:340
Method
forward
(self, hidden_states)
verl/models/llama/megatron/layers/parallel_rmsnorm.py:41
Method
forward_step
(batch_iter, model)
verl/workers/critic/megatron_critic.py:165
Method
forward_step
(batch_iter, model)
verl/workers/actor/megatron_actor.py:286
Method
forward_step
(batch_iter, model)
verl/workers/reward_model/megatron/reward_model.py:222
Function
gen_dataset
Generate dataset for countdown task. Args: num_samples: Number of samples to generate num_operands: Number of numbers provide
examples/data_preprocess/countdown.py:15
Function
gen_from_jsonl
(path)
examples/data_preprocess/kk.py:34
Method
gen_test_prompt
(self, ntrain, test_records, idx, model_name=None)
eval_kk/kk_processor.py:172
Method
generate_sequences
(self, prompts: DataProto)
verl/workers/megatron_workers.py:345
Method
generate_sequences
(self, prompts: DataProto)
verl/workers/fsdp_workers.py:401
Method
generate_sequences
(self, prompts: DataProto)
verl/workers/rollout/hf_rollout.py:42
Method
generate_sequences
Generate sequences
verl/workers/rollout/naive/naive_rollout.py:52
Method
generate_sequences
(self, prompts: DataProto, **kwargs)
verl/workers/rollout/vllm_rollout/vllm_rollout.py:142
Method
get_added_vocab
Returns the added tokens in the vocabulary as a dictionary of token to index. Results might be different from the fast call because f
verl/workers/rollout/tokenizer.py:135
Method
get_cuda_visible_devices
(self)
verl/single_controller/base/worker.py:165
Method
get_data
()
verl/protocol.py:474
Function
get_default_kwargs_for_column_parallel_linear
()
verl/utils/megatron/tensor_parallel.py:58
Function
get_default_kwargs_for_parallel_embedding
()
verl/utils/megatron/tensor_parallel.py:77
Function
get_default_kwargs_for_row_parallel_linear
()
verl/utils/megatron/tensor_parallel.py:72
Function
get_kl_controller
(config)
verl/trainer/ppo/core_algos.py:56
Method
get_master_addr_port
(self)
verl/single_controller/base/worker.py:162
Method
get_megatron_global_info
(self)
verl/single_controller/base/megatron/worker_group.py:50
Method
get_megatron_rank_info
(self, rank: int)
verl/single_controller/base/megatron/worker_group.py:31
Method
get_memory_buffers
(self)
verl/utils/memory_buffer.py:153
Method
get_node_id
(self)
tests/ray/test_high_level_scheduling_api.py:29
Method
get_node_ip_by_sdk
()
verl/single_controller/base/worker.py:41
Method
get_rank_zero_info
(self)
verl/single_controller/base/register_center/ray.py:24
Method
get_special_tokens_mask
( self, token_ids_0: List[int], token_ids_1: Optional[List[int]] = None, alrea
tests/e2e/envs/digit_completion/tokenizer.py:114
Method
get_state
(self)
tests/e2e/envs/digit_completion/task.py:61
Function
get_tensor_parallel_partition_dim
(param)
verl/utils/megatron/tensor_parallel.py:90
Function
get_tensor_parallel_partition_stride
(param)
verl/utils/megatron/tensor_parallel.py:95
Function
get_unpad_data
(attention_mask)
verl/utils/torch_functional.py:483
← previous
next →
601–700 of 858, ranked by callers