MCPcopy Create free account

hub / github.com/NVlabs/GDPO / functions

Functions2,091 in github.com/NVlabs/GDPO

Functioncompute_grpo_bn_outcome_advantage
Compute advantage for GRPO, operating only on Outcome reward (with only one scalar reward for each response). Args: token_level_
verl-GDPO/verl/trainer/ppo/core_algos.py:205
Functioncompute_grpo_no_std_bn_outcome_advantage
Compute advantage for GRPO, operating only on Outcome reward (with only one scalar reward for each response). Args: token_level_
verl-GDPO/verl/trainer/ppo/core_algos.py:253
Functioncompute_grpo_no_std_outcome_advantage
Compute advantage for GRPO, operating only on Outcome reward (with only one scalar reward for each response). Args: token_level_
verl-GDPO/verl/trainer/ppo/core_algos.py:158
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-GDPO/verl/trainer/ppo/core_algos.py:111
Methodcompute_liger_loss
(self, unwrapped_model, inputs)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/grpo_trainer.py:1339
Methodcompute_log_prob
Compute the log probability of the responses given input_ids, attention_mask and position_ids Args: data (DataProto): a DataProto
verl-GDPO/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-GDPO/verl/workers/actor/dp_actor.py:153
Methodcompute_logprobs_fn
(output, data)
verl-GDPO/verl/workers/actor/megatron_actor.py:149
Methodcompute_logprobs_for_data
(m, data)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/xpo_trainer.py:290
Methodcompute_logprobs_for_data
(m, data)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/nash_md_trainer.py:304
Methodcompute_loss
(self, model, inputs, return_outputs=False)
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/stack_llama/scripts/reward_modeling.py:292
Methodcompute_loss
(self, model, inputs, return_outputs=False, num_items_in_batch=None)
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/layer_skip/scripts/custom_trainer.py:25
Methodcompute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/orpo_trainer.py:828
Methodcompute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/bco_trainer.py:1252
Methodcompute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/dpo_trainer.py:1351
Methodcompute_loss
(self, model, inputs, return_outputs=False, num_items_in_batch=None)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/gkd_trainer.py:220
Methodcompute_loss
( self, model: Union[PreTrainedModel, nn.Module], inputs: dict[str, Union[torch.Tensor
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/cpo_trainer.py:856
Methodcompute_loss
Compute training loss and additionally compute token accuracies
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/sft_trainer.py:682
Functioncompute_metrics
(eval_pred)
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/stack_llama/scripts/reward_modeling.py:281
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-GDPO/verl/trainer/ppo/core_algos.py:306
Methodcompute_ref_log_prob
(self, data: DataProto)
verl-GDPO/verl/workers/megatron_workers.py:376
Methodcompute_reward
(self, data: DataProto)
verl-GDPO/verl/workers/reward_model/megatron/reward_model.py:123
Methodcompute_reward_score
r""" Computes the reward score for a given input. The method has first to enable the adapter and then compute the reward score. After
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_base.py:574
Functioncompute_rewards
(token_level_scores, old_log_prob, ref_log_prob, kl_ratio)
verl-GDPO/verl/trainer/ppo/core_algos.py:301
Methodcompute_rm_score
(self, data: DataProto)
verl-GDPO/verl/workers/megatron_workers.py:723
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-GDPO/verl/utils/reward_score/rlla.py:257
Functioncompute_score
The scoring function for countdown task. Args: solution_str: the solution text ground_truth: dictionary containing target num
verl-GDPO/verl/utils/reward_score/countdown.py:59
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-GDPO/verl/utils/reward_score/gsm8k.py:44
Functioncompute_score
(solution_str, ground_truth)
verl-GDPO/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-GDPO/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-GDPO/verl/trainer/ppo/core_algos.py:359
Methodcompute_values
(self, data: DataProto)
verl-GDPO/verl/workers/megatron_workers.py:551
Methodcompute_values
Compute values
verl-GDPO/verl/workers/critic/base.py:33
Methodcompute_values
(self, data: DataProto)
verl-GDPO/verl/workers/critic/megatron_critic.py:77
Methodcompute_values
(self, data: DataProto)
verl-GDPO/verl/workers/critic/dp_critic.py:113
Methodconcat
(data: List[ray.ObjectRef])
verl-GDPO/verl/protocol.py:613
Functionconvert_config
(hf_config: PretrainedConfig, megatron_config)
verl-GDPO/verl/utils/megatron_utils.py:140
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-GDPO/verl/workers/rollout/tokenizer.py:147
Functioncorrectness_reward_func
(prompts, completions, answer, **kwargs)
trl-GDPO/open-r1/src/open_r1/gsm8k.py:100
Functioncosine_scaled_reward
Reward function that scales based on completion length using a cosine schedule. Shorter correct solutions are rewarded more than longer ones.
trl-GDPO/open-r1/src/open_r1/rewards.py:212
Functioncreate_huggingface_critic
Args: model_name: override_config_kwargs: Returns:
verl-GDPO/verl/utils/model.py:81
Methodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/online_dpo_trainer.py:787
Methodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/iterative_sft_trainer.py:455
Methodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/rloo_trainer.py:643
Methodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/prm_trainer.py:296
Methodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/kto_trainer.py:1650
Methodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/orpo_trainer.py:1010
Methodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/xpo_trainer.py:533
Methodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/bco_trainer.py:1462
Methodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/dpo_trainer.py:1537
Methodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/gkd_trainer.py:308
Methodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/ppo_trainer.py:750
Methodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/nash_md_trainer.py:487
Methodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/cpo_trainer.py:1030
Methodcreate_model_card
Creates a draft of a model card using the information available to the `Trainer`. Args: model_name (`str` or `None`, *op
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/reward_trainer.py:367
Functioncreate_nccl_communicator_in_ray
(rank: int, world_size: int, group_nam
verl-GDPO/verl/utils/rendezvous/ray_backend.py:47
Functioncreate_random_mask
Create a random mask given input_ids. Support left padding and right padding. Process: - Sample valid token length - Sample left_padding l
verl-GDPO/verl/utils/model.py:136
Methodcross_entropy_loss
(logits, labels)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/orpo_trainer.py:727
Methodcross_entropy_loss
(logits, labels)
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/cpo_trainer.py:762
Functiondecorator
(func)
verl-GDPO/verl/single_controller/base/decorator.py:398
Functiondispatch_all_to_all
(worker_group, *args, **kwargs)
verl-GDPO/verl/single_controller/base/decorator.py:66
Functiondispatch_dp_compute
(worker_group, *args, **kwargs)
verl-GDPO/verl/single_controller/base/decorator.py:255
Functiondispatch_dp_compute_data_proto
(worker_group, *args, **kwargs)
verl-GDPO/verl/single_controller/base/decorator.py:272
Functiondispatch_dp_compute_data_proto_with_func
(worker_group, *args, **kwargs)
verl-GDPO/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-GDPO/verl/single_controller/base/decorator.py:118
Functiondispatch_megatron_pp_as_dp_data_proto
(worker_group, *args, **kwargs)
verl-GDPO/verl/single_controller/base/decorator.py:237
Functiondispatch_one_to_all
(worker_group, *args, **kwargs)
verl-GDPO/verl/single_controller/base/decorator.py:60
Methoddp_size
(self)
verl-GDPO/verl/single_controller/base/megatron/worker_group.py:41
Functiondrop_long_prompt
(example)
trl-GDPO/trl-0.18.0-gdpo/examples/datasets/ultrafeedback-prompt.py:56
Methoddummy_compute_metrics
(*args, **kwargs)
trl-GDPO/trl-0.18.0-gdpo/tests/test_orpo_trainer.py:157
Methoddummy_compute_metrics
(*args, **kwargs)
trl-GDPO/trl-0.18.0-gdpo/tests/test_cpo_trainer.py:163
Methoddummy_compute_metrics
(*args, **kwargs)
trl-GDPO/trl-0.18.0-gdpo/tests/test_kto_trainer.py:422
Methoddummy_compute_metrics
(*args, **kwargs)
trl-GDPO/trl-0.18.0-gdpo/tests/test_dpo_trainer.py:1233
Methoddummy_compute_metrics
(*args, **kwargs)
trl-GDPO/trl-0.18.0-gdpo/tests/test_bco_trainer.py:427
Functiondummy_generate
(histories)
trl-GDPO/trl-0.18.0-gdpo/tests/test_environments.py:29
Functionembed_prompt
Borrowed from https://huggingface.co/nomic-ai/nomic-embed-text-v1.5#transformers
trl-GDPO/trl-0.18.0-gdpo/examples/scripts/bco.py:82
Methodembed_prompt
(input_ids, attention_mask, model)
trl-GDPO/trl-0.18.0-gdpo/tests/test_bco_trainer.py:274
Methodempty_device_cache
(cls)
trl-GDPO/trl-0.18.0-gdpo/trl/core.py:96
Functionentropy_from_logits
Calculate entropy from logits.
verl-GDPO/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-GDPO/verl/workers/rollout/tokenizer.py:44
Methodevaluation_loop
Overriding built-in evaluation loop to store metrics for each batch. Prediction/evaluation loop, shared by `Trainer.evaluate()` and `
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/kto_trainer.py:1554
Methodevaluation_loop
Overriding built-in evaluation loop to store metrics for each batch. Prediction/evaluation loop, shared by `Trainer.evaluate()` and `
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/orpo_trainer.py:915
Methodevaluation_loop
Overriding built-in evaluation loop to store metrics for each batch. Prediction/evaluation loop, shared by `Trainer.evaluate()` and `
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/bco_trainer.py:1366
Methodevaluation_loop
Overriding built-in evaluation loop to store metrics for each batch. Prediction/evaluation loop, shared by `Trainer.evaluate()` and `
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/dpo_trainer.py:1462
Methodevaluation_loop
Overriding built-in evaluation loop to store metrics for each batch. Prediction/evaluation loop, shared by `Trainer.evaluate()` and `
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/cpo_trainer.py:935
Methodexecute
Execute code on MorphCloud based on the provided data with enhanced debugging and recovery. Orchestrates the following steps with pr
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/morph_client.py:282
Methodexecute_all
(self, method_name: str, *args, **kwargs)
verl-GDPO/verl/single_controller/ray/base.py:329
Functionexecute_batch
(batch: BatchRequest, request: Request)
trl-GDPO/open-r1/scripts/e2b_router.py:103
Functionexecute_batch
(batch: BatchRequest, request: Request)
trl-GDPO/open-r1/scripts/morph_router.py:86
Methodexecute_func_rank_zero
(self, func, *args, **kwargs)
verl-GDPO/verl/single_controller/base/worker.py:184
Methodexecute_rank_zero
(self, method_name: str, *args, **kwargs)
verl-GDPO/verl/single_controller/ray/base.py:326
Methodexecute_rank_zero_sync
(self, method_name: str, *args, **kwargs)
verl-GDPO/verl/single_controller/ray/base.py:319
Methodexecute_scripts
Execute multiple scripts and return their reward values. Args: scripts: List of code scripts to execute language: The
trl-GDPO/open-r1/src/open_r1/utils/code_providers.py:50
Methodexecute_scripts
Execute scripts using MorphCloud Sandbox API. Args: scripts: List of Python scripts to execute language: Programming
trl-GDPO/open-r1/src/open_r1/utils/code_providers.py:211
Methodexecute_with_func_generator
(self, func, *args, **kwargs)
verl-GDPO/verl/single_controller/base/worker.py:179
Functionexists
r"""Works like os.path.exists() but supports hdfs. Test whether a path exists. Returns False for broken symbolic links. Args: path (
verl-GDPO/verl/utils/hdfs_io.py:27
Functionextract_dialogue
(example: str)
trl-GDPO/trl-0.18.0-gdpo/examples/datasets/hh-rlhf-helpful-base.py:62
Functionextract_pg_from_exist
(resource_pools: Dict[str, RayResourcePool], src_role_names: List[str], resource_poo
verl-GDPO/verl/single_controller/ray/base.py:91
Functionextract_step
(path)
verl-GDPO/verl/trainer/fsdp_sft_trainer.py:51
Methodfake_generate
(prompt_ids, **kwargs)
trl-GDPO/trl-0.18.0-gdpo/tests/test_grpo_trainer.py:1037
← previousnext →1,101–1,200 of 2,091, ranked by callers