MCPcopy Create free account

hub / github.com/Unakar/Logic-RL / functions

Functions858 in github.com/Unakar/Logic-RL

Functioncompute_attention_mask
(prompts, pad_token_id)
tests/e2e/envs/digit_completion/task.py:107
Functioncompute_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
Functioncompute_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
Functioncompute_grad_norm
(model: nn.Module)
verl/utils/torch_functional.py:151
Functioncompute_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
Methodcompute_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
Methodcompute_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
Methodcompute_logprobs_fn
(output, data)
verl/workers/actor/megatron_actor.py:149
Functioncompute_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
Functioncompute_position_id_with_mask
(mask)
tests/e2e/envs/digit_completion/task.py:113
Methodcompute_ref_log_prob
(self, data: DataProto)
verl/workers/megatron_workers.py:376
Functioncompute_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
Methodcompute_reward
(self, data: DataProto)
verl/workers/reward_model/megatron/reward_model.py:123
Functioncompute_rewards
(token_level_scores, old_log_prob, ref_log_prob, kl_ratio)
verl/trainer/ppo/core_algos.py:195
Methodcompute_rm_score
(self, data: DataProto)
verl/workers/megatron_workers.py:723
Functioncompute_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
Functioncompute_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
Functioncompute_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
Functioncompute_score
(solution_str, ground_truth)
verl/utils/reward_score/math.py:17
Functioncompute_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
Functioncompute_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
Methodcompute_values
(self, data: DataProto)
verl/workers/megatron_workers.py:551
Methodcompute_values
Compute values
verl/workers/critic/base.py:33
Methodcompute_values
(self, data: DataProto)
verl/workers/critic/megatron_critic.py:77
Methodcompute_values
(self, data: DataProto)
verl/workers/critic/dp_critic.py:113
Methodconcat
(data: List[ray.ObjectRef])
verl/protocol.py:613
Functionconvert_config
(hf_config: PretrainedConfig, megatron_config)
verl/utils/megatron_utils.py:140
Methodconvert_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
Methodconvert_tokens_to_string
(self, tokens)
tests/e2e/envs/digit_completion/tokenizer.py:101
Methodconvert_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
Functioncreate_huggingface_critic
Args: model_name: override_config_kwargs: Returns:
verl/utils/model.py:81
Functiondecorator
(func)
verl/single_controller/base/decorator.py:398
Functiondispatch_all_to_all
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:66
Functiondispatch_dp_compute
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:255
Functiondispatch_dp_compute_data_proto
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:272
Functiondispatch_dp_compute_data_proto_with_func
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:279
Functiondispatch_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
Functiondispatch_megatron_pp_as_dp_data_proto
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:237
Functiondispatch_one_to_all
(worker_group, *args, **kwargs)
verl/single_controller/base/decorator.py:60
Methoddp_size
(self)
verl/single_controller/base/megatron/worker_group.py:41
Functionentropy_from_logits
Calculate entropy from logits.
verl/utils/torch_functional.py:95
Methodeos_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
Methodexecute_all
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:329
Methodexecute_rank_zero
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:326
Methodexecute_rank_zero_sync
(self, method_name: str, *args, **kwargs)
verl/single_controller/ray/base.py:319
Functionexists
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
Functionextract_pg_from_exist
(resource_pools: Dict[str, RayResourcePool], src_role_names: List[str], resource_poo
verl/single_controller/ray/base.py:91
Functionextract_solution
(solution_str, *args)
examples/data_preprocess/multiply.py:62
Functionextract_step
(path)
verl/trainer/fsdp_sft_trainer.py:51
Functionfit
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
Methodflush
(self)
verl/utils/logger/aggregate_logger.py:37
Methodfoo
(self, y)
tests/ray/test_worker_group_basics.py:48
Methodforward
( ctx: Any, group: dist.ProcessGroup, local_input: Tensor, scatter_dim: int,
verl/utils/ulysses.py:167
Methodforward
(ctx: Any, group: dist.ProcessGroup, local_tensor: Tensor, gat
verl/utils/ulysses.py:200
Methodforward
(self, *args, **kwargs)
verl/utils/model.py:34
Methodforward
(ctx, vocab_parallel_logits: torch.Tensor)
verl/utils/megatron/tensor_parallel.py:103
Methodforward
r""" Args: labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing
verl/models/llama/megatron/modeling_llama_megatron.py:174
Methodforward
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
Methodforward
r""" Args: labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing
verl/models/llama/megatron/modeling_llama_megatron.py:308
Methodforward
( self, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.Tensor] = N
verl/models/llama/megatron/modeling_llama_megatron.py:384
Methodforward
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
Methodforward
r""" Args: labels (`torch.LongTensor` of shape `(batch_size, sequence_length)`, *optional*): Labels for computing
verl/models/llama/megatron/modeling_llama_megatron.py:562
Methodforward
( self, *, input_ids: torch.LongTensor = None, attention_mask: Optional[torch.
verl/models/llama/megatron/modeling_llama_megatron.py:644
Methodforward
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
Methodforward
( self, hidden_states: torch.Tensor, position_ids: Optional[torch.LongTensor] = None,
verl/models/llama/megatron/layers/parallel_decoder.py:112
Methodforward
(self, x)
verl/models/llama/megatron/layers/parallel_mlp.py:71
Methodforward
(self, x, seq_len=None)
verl/models/llama/megatron/layers/parallel_attention.py:61
Methodforward
( self, hidden_states: torch.Tensor, attention_mask: Optional[torch.Tensor] = None,
verl/models/llama/megatron/layers/parallel_attention.py:234
Methodforward
(self, hidden_states: torch.Tensor, position_ids: Optional[torch.LongTensor] =
verl/models/llama/megatron/layers/parallel_attention.py:340
Methodforward
(self, hidden_states)
verl/models/llama/megatron/layers/parallel_rmsnorm.py:41
Methodforward_step
(batch_iter, model)
verl/workers/critic/megatron_critic.py:165
Methodforward_step
(batch_iter, model)
verl/workers/actor/megatron_actor.py:286
Methodforward_step
(batch_iter, model)
verl/workers/reward_model/megatron/reward_model.py:222
Functiongen_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
Functiongen_from_jsonl
(path)
examples/data_preprocess/kk.py:34
Methodgen_test_prompt
(self, ntrain, test_records, idx, model_name=None)
eval_kk/kk_processor.py:172
Methodgenerate_sequences
(self, prompts: DataProto)
verl/workers/megatron_workers.py:345
Methodgenerate_sequences
(self, prompts: DataProto)
verl/workers/fsdp_workers.py:401
Methodgenerate_sequences
(self, prompts: DataProto)
verl/workers/rollout/hf_rollout.py:42
Methodgenerate_sequences
Generate sequences
verl/workers/rollout/naive/naive_rollout.py:52
Methodgenerate_sequences
(self, prompts: DataProto, **kwargs)
verl/workers/rollout/vllm_rollout/vllm_rollout.py:142
Methodget_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
Methodget_cuda_visible_devices
(self)
verl/single_controller/base/worker.py:165
Methodget_data
()
verl/protocol.py:474
Functionget_default_kwargs_for_column_parallel_linear
()
verl/utils/megatron/tensor_parallel.py:58
Functionget_default_kwargs_for_parallel_embedding
()
verl/utils/megatron/tensor_parallel.py:77
Functionget_default_kwargs_for_row_parallel_linear
()
verl/utils/megatron/tensor_parallel.py:72
Functionget_kl_controller
(config)
verl/trainer/ppo/core_algos.py:56
Methodget_master_addr_port
(self)
verl/single_controller/base/worker.py:162
Methodget_megatron_global_info
(self)
verl/single_controller/base/megatron/worker_group.py:50
Methodget_megatron_rank_info
(self, rank: int)
verl/single_controller/base/megatron/worker_group.py:31
Methodget_memory_buffers
(self)
verl/utils/memory_buffer.py:153
Methodget_node_id
(self)
tests/ray/test_high_level_scheduling_api.py:29
Methodget_node_ip_by_sdk
()
verl/single_controller/base/worker.py:41
Methodget_rank_zero_info
(self)
verl/single_controller/base/register_center/ray.py:24
Methodget_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
Methodget_state
(self)
tests/e2e/envs/digit_completion/task.py:61
Functionget_tensor_parallel_partition_dim
(param)
verl/utils/megatron/tensor_parallel.py:90
Functionget_tensor_parallel_partition_stride
(param)
verl/utils/megatron/tensor_parallel.py:95
Functionget_unpad_data
(attention_mask)
verl/utils/torch_functional.py:483
← previousnext →601–700 of 858, ranked by callers