MCPcopy Create free account

hub / github.com/NVlabs/GDPO / types & classes

Types & classes346 in github.com/NVlabs/GDPO

↓ 58 callersClassSFTTrainer
Trainer for Supervised Fine-Tuning (SFT) method. This class is a wrapper around the [`transformers.Trainer`] class and inherits all of its a
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/sft_trainer.py:157
↓ 52 callersClassSFTConfig
r""" Configuration class for the [`SFTTrainer`]. Only the parameters specific to SFT training are listed here. For details on other parameter
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/sft_config.py:23
↓ 39 callersClassDPOTrainer
r""" Initialize DPOTrainer. Args: model (`transformers.PreTrainedModel`): The model to train, preferably an `AutoModelFor
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/dpo_trainer.py:161
↓ 36 callersClassDPOConfig
r""" Configuration class for the [`DPOTrainer`]. Using [`~transformers.HfArgumentParser`] we can turn this class into [argparse](https://
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/dpo_config.py:34
↓ 32 callersClassTrlParser
A subclass of [`transformers.HfArgumentParser`] designed for parsing command-line arguments with dataclass-backed configurations, while also
trl-GDPO/trl-0.18.0-gdpo/trl/scripts/utils.py:107
↓ 31 callersClassGRPOTrainer
Trainer for the Group Relative Policy Optimization (GRPO) method. This algorithm was initially proposed in the paper [DeepSeekMath: Pushing t
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/grpo_trainer.py:295
↓ 29 callersClassGRPOConfig
r""" Configuration class for the [`GRPOTrainer`]. Only the parameters specific to GRPO training are listed here. For details on other paramet
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/grpo_config.py:39
↓ 15 callersClassDataProto
A DataProto is a data structure that aims to provide a standard protocol for data exchange between functions. It contains a batch (TensorDict
verl-GDPO/verl/protocol.py:165
↓ 14 callersClassDataCollatorForCompletionOnlyLM
Data collator used for completion tasks. It ensures that all the tokens of the labels are set to an 'ignore_index' when they do not come from
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:70
↓ 13 callersClassBCOTrainer
r""" Initialize BCOTrainer from [BCO](https://huggingface.co/papers/2404.04656) paper. Args: model (`transformers.PreTrainedModel`):
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/bco_trainer.py:286
↓ 12 callersClassBCOConfig
r""" Configuration class for the [`BCOTrainer`]. Using [`~transformers.HfArgumentParser`] we can turn this class into [argparse](https://
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/bco_config.py:22
↓ 12 callersClassKTOTrainer
r""" Initialize KTOTrainer. Args: model (`transformers.PreTrainedModel`): The model to train, preferably an `AutoModelFor
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/kto_trainer.py:278
↓ 12 callersClassTextHistory
The TextHistory class keeps track of the history of an interaction between the language model and the environment.
trl-GDPO/trl-0.18.0-gdpo/trl/environment/base_environment.py:59
↓ 10 callersClassConstantLengthDataset
Iterable dataset that returns constant length chunks of tokens from stream of text files. The dataset also formats the text before tokenizati
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:565
↓ 10 callersClassKTOConfig
r""" Configuration class for the [`KTOTrainer`]. Using [`~transformers.HfArgumentParser`] we can turn this class into [argparse](https://
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/kto_config.py:22
↓ 10 callersClassOnlineDPOTrainer
r""" Initialize OnlineDPOTrainer. Args: model (`transformers.PreTrainedModel` or `torch.nn.Module`): The model to train,
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/online_dpo_trainer.py:93
↓ 10 callersClassRepeatSampler
Sampler that repeats the indices of a dataset in a structured manner. Args: data_source (`Sized`): Dataset to sample fro
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/grpo_trainer.py:99
↓ 9 callersClassDatasetConfig
Configuration for a dataset in a mixture.
trl-GDPO/open-r1/src/open_r1/configs.py:23
↓ 9 callersClassOnlineDPOConfig
r""" Configuration class for the [`OnlineDPOTrainer`]. Using [`~transformers.HfArgumentParser`] we can turn this class into [argparse](ht
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/online_dpo_config.py:22
↓ 9 callersClassRewardConfig
r""" Configuration class for the [`RewardTrainer`]. Using [`~transformers.HfArgumentParser`] we can turn this class into [argparse](https
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/reward_config.py:22
↓ 9 callersClassRewardTrainer
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/reward_trainer.py:83
↓ 8 callersClassNashMDTrainer
r""" Initialize NashMDTrainer as a subclass of [`OnlineDPOConfig`]. Args: model (`transformers.PreTrainedModel`): The mod
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/nash_md_trainer.py:66
↓ 8 callersClassXPOTrainer
r""" Initialize XPOTrainer as a subclass of [`OnlineDPOConfig`]. Args: model (`transformers.PreTrainedModel`): The model
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/xpo_trainer.py:66
↓ 7 callersClassLengthSampler
Samples a length
trl-GDPO/trl-0.18.0-gdpo/trl/core.py:79
↓ 7 callersClassNashMDConfig
r""" Configuration class for the [`NashMDTrainer`]. Subclass of [`OnlineDPOConfig`] we can use all its arguments and add the following:
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/nash_md_config.py:21
↓ 7 callersClassParallelLlamaRMSNorm
verl-GDPO/verl/models/llama/megatron/layers/parallel_rmsnorm.py:25
↓ 7 callersClassPistonError
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/piston_client.py:12
↓ 7 callersClassScriptArguments
Extended version of ScriptArguments with support for dataset mixtures. Args: dataset_mixture (`dict[str, Any]` or `None`, *optional*
trl-GDPO/open-r1/src/open_r1/configs.py:43
↓ 7 callersClassTextEnvironment
The TextEnvironment enables interaction of a LLM with an environment using tools.
trl-GDPO/trl-0.18.0-gdpo/trl/environment/base_environment.py:213
↓ 7 callersClassXPOConfig
r""" Configuration class for the [`XPOTrainer`]. Subclass of [`OnlineDPOConfig`] we can use all its arguments and add the following: Par
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/xpo_config.py:21
↓ 7 callersClass_LazyModule
Module class that surfaces all objects but only performs associated imports when the objects are requested.
trl-GDPO/trl-0.18.0-gdpo/trl/import_utils.py:95
↓ 6 callersClassDatasetMixtureConfig
Configuration for a mixture of datasets.
trl-GDPO/open-r1/src/open_r1/configs.py:34
↓ 6 callersClassDefaultDDPOStableDiffusionPipeline
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_sd_base.py:791
↓ 6 callersClassDummyTool
trl-GDPO/trl-0.18.0-gdpo/tests/test_environments.py:24
↓ 6 callersClassLogCompletionsCallback
r""" A [`~transformers.TrainerCallback`] that logs completions to Weights & Biases and/or Comet. Usage: ```python trainer = DPOTraine
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/callbacks.py:420
↓ 6 callersClassOptionalDependencyNotAvailable
Internally used error class for signalling an optional dependency was not found.
trl-GDPO/trl-0.18.0-gdpo/trl/import_utils.py:155
↓ 6 callersClassPPOTrainer
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/ppo_trainer.py:98
↓ 6 callersClassRayClassWithInitArgs
verl-GDPO/verl/single_controller/ray/base.py:128
↓ 6 callersClassVLLMClient
A client class to interact with a vLLM server. This class provides methods to generate completions, initialize and manage weight update grou
trl-GDPO/trl-0.18.0-gdpo/trl/extras/vllm_client.py:44
↓ 5 callersClassCPOTrainer
r""" Initialize CPOTrainer. Args: model (`transformers.PreTrainedModel`): The model to train, preferably an `AutoModelFor
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/cpo_trainer.py:75
↓ 5 callersClassDPODataCollatorWithPadding
r""" DPO DataCollator class that pads the tokenized inputs to the maximum length of the batch. Args: pad_token_id (`int` defaults to
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:482
↓ 5 callersClassORPOTrainer
r""" Initialize ORPOTrainer. Args: model (`transformers.PreTrainedModel`): The model to train, preferably an `AutoModelFo
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/orpo_trainer.py:79
↓ 5 callersClassOffloadActivations
Context manager under which activation tensors created in the forward pass will be offloaded. Enable the memory efficiency technique of acti
trl-GDPO/trl-0.18.0-gdpo/trl/models/activation_offloading.py:29
↓ 5 callersClassPRMTrainer
Initialize PRMTrainer. Args: model (`transformers.PreTrainedModel`): The model to train, preferably an `AutoModelForToke
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/prm_trainer.py:52
↓ 5 callersClassRLOOTrainer
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/rloo_trainer.py:72
↓ 4 callersClassCPOConfig
r""" Configuration class for the [`CPOTrainer`]. Using [`~transformers.HfArgumentParser`] we can turn this class into [argparse](https://
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/cpo_config.py:22
↓ 4 callersClassDataCollatorForLanguageModeling
Data collator used for language modeling data. Inputs are dynamically padded to the maximum length of a batch if they are not all of the same
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/sft_trainer.py:75
↓ 4 callersClassORPOConfig
r""" Configuration class for the [`ORPOTrainer`]. Using [`~transformers.HfArgumentParser`] we can turn this class into [argparse](https:/
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/orpo_config.py:22
↓ 4 callersClassPPOConfig
r""" Configuration class for the [`PPOTrainer`]. Using [`~transformers.HfArgumentParser`] we can turn this class into [argparse](https://
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/ppo_config.py:23
↓ 4 callersClassPRMConfig
r""" Configuration class for the [`PRMTrainer`]. Using [`~transformers.HfArgumentParser`] we can turn this class into [argparse](https://
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/prm_config.py:22
↓ 4 callersClassRoutedSandbox
A sandbox environment that routes code execution requests to the E2B Router. This class is designed for batched execution of scripts, primari
trl-GDPO/open-r1/src/open_r1/utils/routed_sandbox.py:22
↓ 4 callersClassScriptResult
ScriptResult is a Pydantic model that represents the result of a script execution. Attributes: text (Optional[str]): The output text
trl-GDPO/open-r1/scripts/morph_router.py:43
↓ 4 callersClassWinRateCallback
A [`~transformers.TrainerCallback`] that computes the win rate of a model based on a reference. It generates completions using prompts from
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/callbacks.py:224
↓ 3 callersClassAlignPropTrainer
The AlignPropTrainer uses Deep Diffusion Policy Optimization to optimise diffusion models. Note, this trainer is heavily inspired by the work
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/alignprop_trainer.py:39
↓ 3 callersClassDDPOTrainer
The DDPOTrainer uses Deep Diffusion Policy Optimization to optimise diffusion models. Note, this trainer is heavily inspired by the work here
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/ddpo_trainer.py:41
↓ 3 callersClassFSDPUlyssesShardingManager
Sharding manager to support data resharding when using FSDP + Ulysses
verl-GDPO/verl/workers/sharding_manager/fsdp_ulysses.py:33
↓ 3 callersClassGKDTrainer
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/gkd_trainer.py:59
↓ 3 callersClassMergeConfig
r""" Configuration class for merging two models using `mergekit`. This class provides a structured way to configure and generate merge config
trl-GDPO/trl-0.18.0-gdpo/trl/mergekit_utils.py:39
↓ 3 callersClassModelConfig
Configuration class for the models. Using [`~transformers.HfArgumentParser`] we can turn this class into [argparse](https://docs.python.
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/model_config.py:20
↓ 3 callersClassRLOOConfig
r""" Configuration class for the [`RLOOTrainer`]. Using [`~transformers.HfArgumentParser`] we can turn this class into [argparse](https:/
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/rloo_config.py:22
↓ 3 callersClassRandomPairwiseJudge
Random pairwise judge, for testing purposes.
trl-GDPO/trl-0.18.0-gdpo/tests/testing_utils.py:117
↓ 3 callersClassRayResourcePool
verl-GDPO/verl/single_controller/ray/base.py:49
↓ 3 callersClassRoutedMorphSandbox
Client for the MorphCloud router service that mimics the API of MorphCloud's Sandbox. This class provides a simple interface to execute code
trl-GDPO/open-r1/src/open_r1/utils/routed_morph.py:21
↓ 2 callersClassBestOfNSampler
trl-GDPO/trl-0.18.0-gdpo/trl/extras/best_of_n_sampler.py:23
↓ 2 callersClassDDPOConfig
r""" Configuration class for the [`DDPOTrainer`]. Using [`~transformers.HfArgumentParser`] we can turn this class into [argparse](https:/
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/ddpo_config.py:26
↓ 2 callersClassDDPOPipelineOutput
Output class for the diffusers pipeline to be finetuned with the DDPO trainer Args: images (`torch.Tensor`): The generat
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_sd_base.py:39
↓ 2 callersClassDataCollatorForChatML
Data collator for ChatML format datasets.
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:248
↓ 2 callersClassDataCollatorForPreference
Data collator used for preference data. Inputs are dynamically padded to the maximum length of a batch if they are not all of the same length
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/dpo_trainer.py:85
↓ 2 callersClassDataParallelPPOActor
verl-GDPO/verl/workers/actor/dp_actor.py:39
↓ 2 callersClassDataProtoFuture
DataProtoFuture aims to eliminate actual data fetching on driver. By doing so, the driver doesn't have to wait for data so that asynchronous
verl-GDPO/verl/protocol.py:596
↓ 2 callersClassFlopsCounter
Used to count mfu during training loop Example: flops_counter = FlopsCounter(config) flops_achieved, flops_promised = flops_
verl-GDPO/verl/utils/flops_counter.py:51
↓ 2 callersClassGKDConfig
Configuration class for [`GKDTrainer`]. Args: temperature (`float`, *optional*, defaults to `0.9`): Temperature for samp
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/gkd_config.py:22
↓ 2 callersClassGeometricMixtureWrapper
r""" Geometric Mixture generation wrapper that samples from the logits of two model's geometric mixture. Args: model (`PreTrainedMode
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_base.py:679
↓ 2 callersClassHfPairwiseJudge
Pairwise judge based on the Hugging Face API with chat completion. This judge is relevant for assessing the quality chat models, where the c
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/judges.py:287
↓ 2 callersClassIterativeSFTConfig
r""" Configuration class for the [`IterativeSFTTrainer`]. Only the parameters specific to iterative SFT training are listed here. For details
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/iterative_sft_config.py:22
↓ 2 callersClassMegatronPPOActor
verl-GDPO/verl/workers/actor/megatron_actor.py:48
↓ 2 callersClassMergeModelCallback
r""" A [`~transformers.TrainerCallback`] that merges the policy model (the model being trained) with another model based on a merge configuration.
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/callbacks.py:511
↓ 2 callersClassNoOpManager
A `saved_tensors_hook` manager used to disable any other `saved_tensors_hook` manager applied before. This relies on the behavior that only t
trl-GDPO/trl-0.18.0-gdpo/trl/models/activation_offloading.py:327
↓ 2 callersClassOnlineTrainerState
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:1002
↓ 2 callersClassParallelLlamaDecoderLayerRmPad
verl-GDPO/verl/models/llama/megatron/layers/parallel_decoder.py:99
↓ 2 callersClassParallelLlamaMLP
verl-GDPO/verl/models/llama/megatron/layers/parallel_mlp.py:31
↓ 2 callersClassRLHFDataset
We assume the dataset contains a column that contains prompts and other information
verl-GDPO/verl/utils/dataset/rl_dataset.py:58
↓ 2 callersClassRandomBinaryJudge
Random binary judge, for testing purposes.
trl-GDPO/trl-0.18.0-gdpo/tests/testing_utils.py:108
↓ 2 callersClassRewardManager
The reward manager.
verl-GDPO/verl/trainer/main_ppo.py:39
↓ 2 callersClassRewardTrainer
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/stack_llama/scripts/reward_modeling.py:290
↓ 2 callersClassRunningMoments
Calculates the running mean and standard deviation of a data stream. Reference: https://github.com/OpenLMLab/MOSS-RLHF/blob/40b91eb2f2b71b169
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:705
↓ 2 callersClassSFTDataset
This is an in-memory SFTDataset
verl-GDPO/verl/utils/dataset/sft_dataset.py:34
↓ 2 callersClassScriptResult
ScriptResult is a Pydantic model that represents the result of a script execution. Attributes: execution (Optional[Execution]): An op
trl-GDPO/open-r1/scripts/e2b_router.py:47
↓ 2 callersClassState
verl-GDPO/verl/utils/seqlen_balancing.py:49
↓ 2 callersClassSubtaskResult
Represents the result of a subtask containing multiple test cases. Attributes: problem: Problem identifier subtask: Subtask
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/ioi_scoring.py:29
↓ 2 callersClassSyncRefModelCallback
Callback to synchronize the model with a reference model.
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/callbacks.py:93
↓ 2 callersClassTestResult
Represents the result of a single test case execution. Attributes: test_name: Name of the test case score: Score achieved fo
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/ioi_scoring.py:11
↓ 2 callersClassTracking
verl-GDPO/verl/utils/tracking.py:24
↓ 2 callersClassTrainerWithRefModel
trl-GDPO/trl-0.18.0-gdpo/tests/test_callbacks.py:46
↓ 2 callersClassValueHead
r""" The ValueHead class implements a head for GPT2 that returns a scalar for each output token.
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_value_head.py:22
↓ 2 callersClassvLLMRollout
verl-GDPO/verl/workers/rollout/vllm_rollout/vllm_rollout.py:57
↓ 1 callersClassAdaptiveKLController
Adaptive KL controller described in the paper: https://arxiv.org/pdf/1909.08593.pdf
verl-GDPO/verl/trainer/ppo/core_algos.py:28
↓ 1 callersClassAestheticScorer
This model attempts to predict the aesthetic score of an image. The aesthetic score is a numerical approximation of how much a specific image
trl-GDPO/trl-0.18.0-gdpo/examples/scripts/ddpo.py:99
↓ 1 callersClassAestheticScorer
This model attempts to predict the aesthetic score of an image. The aesthetic score is a numerical approximation of how much a specific image
trl-GDPO/trl-0.18.0-gdpo/trl/models/auxiliary_modules.py:43
↓ 1 callersClassAlignPropConfig
r""" Configuration class for the [`AlignPropTrainer`]. Using [`~transformers.HfArgumentParser`] we can turn this class into [argparse](ht
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/alignprop_config.py:26
next →1–100 of 346, ranked by callers