Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NVlabs/GDPO
/ types & classes
Types & classes
346 in github.com/NVlabs/GDPO
⨍
Functions
2,091
◇
Types & classes
346
↳
Endpoints
46
↓ 58 callers
Class
SFTTrainer
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 callers
Class
SFTConfig
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 callers
Class
DPOTrainer
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 callers
Class
DPOConfig
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 callers
Class
TrlParser
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 callers
Class
GRPOTrainer
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 callers
Class
GRPOConfig
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 callers
Class
DataProto
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 callers
Class
DataCollatorForCompletionOnlyLM
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 callers
Class
BCOTrainer
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 callers
Class
BCOConfig
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 callers
Class
KTOTrainer
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 callers
Class
TextHistory
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 callers
Class
ConstantLengthDataset
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 callers
Class
KTOConfig
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 callers
Class
OnlineDPOTrainer
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 callers
Class
RepeatSampler
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 callers
Class
DatasetConfig
Configuration for a dataset in a mixture.
trl-GDPO/open-r1/src/open_r1/configs.py:23
↓ 9 callers
Class
OnlineDPOConfig
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 callers
Class
RewardConfig
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 callers
Class
RewardTrainer
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/reward_trainer.py:83
↓ 8 callers
Class
NashMDTrainer
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 callers
Class
XPOTrainer
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 callers
Class
LengthSampler
Samples a length
trl-GDPO/trl-0.18.0-gdpo/trl/core.py:79
↓ 7 callers
Class
NashMDConfig
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 callers
Class
ParallelLlamaRMSNorm
verl-GDPO/verl/models/llama/megatron/layers/parallel_rmsnorm.py:25
↓ 7 callers
Class
PistonError
trl-GDPO/open-r1/src/open_r1/utils/competitive_programming/piston_client.py:12
↓ 7 callers
Class
ScriptArguments
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 callers
Class
TextEnvironment
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 callers
Class
XPOConfig
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 callers
Class
_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 callers
Class
DatasetMixtureConfig
Configuration for a mixture of datasets.
trl-GDPO/open-r1/src/open_r1/configs.py:34
↓ 6 callers
Class
DefaultDDPOStableDiffusionPipeline
trl-GDPO/trl-0.18.0-gdpo/trl/models/modeling_sd_base.py:791
↓ 6 callers
Class
DummyTool
trl-GDPO/trl-0.18.0-gdpo/tests/test_environments.py:24
↓ 6 callers
Class
LogCompletionsCallback
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 callers
Class
OptionalDependencyNotAvailable
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 callers
Class
PPOTrainer
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/ppo_trainer.py:98
↓ 6 callers
Class
RayClassWithInitArgs
verl-GDPO/verl/single_controller/ray/base.py:128
↓ 6 callers
Class
VLLMClient
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 callers
Class
CPOTrainer
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 callers
Class
DPODataCollatorWithPadding
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 callers
Class
ORPOTrainer
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 callers
Class
OffloadActivations
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 callers
Class
PRMTrainer
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 callers
Class
RLOOTrainer
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/rloo_trainer.py:72
↓ 4 callers
Class
CPOConfig
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 callers
Class
DataCollatorForLanguageModeling
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 callers
Class
ORPOConfig
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 callers
Class
PPOConfig
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 callers
Class
PRMConfig
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 callers
Class
RoutedSandbox
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 callers
Class
ScriptResult
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 callers
Class
WinRateCallback
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 callers
Class
AlignPropTrainer
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 callers
Class
DDPOTrainer
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 callers
Class
FSDPUlyssesShardingManager
Sharding manager to support data resharding when using FSDP + Ulysses
verl-GDPO/verl/workers/sharding_manager/fsdp_ulysses.py:33
↓ 3 callers
Class
GKDTrainer
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/gkd_trainer.py:59
↓ 3 callers
Class
MergeConfig
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 callers
Class
ModelConfig
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 callers
Class
RLOOConfig
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 callers
Class
RandomPairwiseJudge
Random pairwise judge, for testing purposes.
trl-GDPO/trl-0.18.0-gdpo/tests/testing_utils.py:117
↓ 3 callers
Class
RayResourcePool
verl-GDPO/verl/single_controller/ray/base.py:49
↓ 3 callers
Class
RoutedMorphSandbox
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 callers
Class
BestOfNSampler
trl-GDPO/trl-0.18.0-gdpo/trl/extras/best_of_n_sampler.py:23
↓ 2 callers
Class
DDPOConfig
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 callers
Class
DDPOPipelineOutput
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 callers
Class
DataCollatorForChatML
Data collator for ChatML format datasets.
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:248
↓ 2 callers
Class
DataCollatorForPreference
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 callers
Class
DataParallelPPOActor
verl-GDPO/verl/workers/actor/dp_actor.py:39
↓ 2 callers
Class
DataProtoFuture
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 callers
Class
FlopsCounter
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 callers
Class
GKDConfig
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 callers
Class
GeometricMixtureWrapper
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 callers
Class
HfPairwiseJudge
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 callers
Class
IterativeSFTConfig
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 callers
Class
MegatronPPOActor
verl-GDPO/verl/workers/actor/megatron_actor.py:48
↓ 2 callers
Class
MergeModelCallback
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 callers
Class
NoOpManager
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 callers
Class
OnlineTrainerState
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/utils.py:1002
↓ 2 callers
Class
ParallelLlamaDecoderLayerRmPad
verl-GDPO/verl/models/llama/megatron/layers/parallel_decoder.py:99
↓ 2 callers
Class
ParallelLlamaMLP
verl-GDPO/verl/models/llama/megatron/layers/parallel_mlp.py:31
↓ 2 callers
Class
RLHFDataset
We assume the dataset contains a column that contains prompts and other information
verl-GDPO/verl/utils/dataset/rl_dataset.py:58
↓ 2 callers
Class
RandomBinaryJudge
Random binary judge, for testing purposes.
trl-GDPO/trl-0.18.0-gdpo/tests/testing_utils.py:108
↓ 2 callers
Class
RewardManager
The reward manager.
verl-GDPO/verl/trainer/main_ppo.py:39
↓ 2 callers
Class
RewardTrainer
trl-GDPO/trl-0.18.0-gdpo/examples/research_projects/stack_llama/scripts/reward_modeling.py:290
↓ 2 callers
Class
RunningMoments
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 callers
Class
SFTDataset
This is an in-memory SFTDataset
verl-GDPO/verl/utils/dataset/sft_dataset.py:34
↓ 2 callers
Class
ScriptResult
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 callers
Class
State
verl-GDPO/verl/utils/seqlen_balancing.py:49
↓ 2 callers
Class
SubtaskResult
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 callers
Class
SyncRefModelCallback
Callback to synchronize the model with a reference model.
trl-GDPO/trl-0.18.0-gdpo/trl/trainer/callbacks.py:93
↓ 2 callers
Class
TestResult
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 callers
Class
Tracking
verl-GDPO/verl/utils/tracking.py:24
↓ 2 callers
Class
TrainerWithRefModel
trl-GDPO/trl-0.18.0-gdpo/tests/test_callbacks.py:46
↓ 2 callers
Class
ValueHead
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 callers
Class
vLLMRollout
verl-GDPO/verl/workers/rollout/vllm_rollout/vllm_rollout.py:57
↓ 1 callers
Class
AdaptiveKLController
Adaptive KL controller described in the paper: https://arxiv.org/pdf/1909.08593.pdf
verl-GDPO/verl/trainer/ppo/core_algos.py:28
↓ 1 callers
Class
AestheticScorer
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 callers
Class
AestheticScorer
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 callers
Class
AlignPropConfig
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