Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AMAP-ML/EMF
/ types & classes
Types & classes
184 in github.com/AMAP-ML/EMF
⨍
Functions
947
◇
Types & classes
184
↳
Endpoints
9
↓ 17 callers
Class
TrlParser
A subclass of [`transformers.HfArgumentParser`] designed for parsing command-line arguments with dataclass-backed configurations, while also
trl/trl/scripts/utils.py:114
↓ 8 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/trl/trainer/sft_trainer.py:265
↓ 7 callers
Class
ARModel
tok/ar_dtok/ar_model.py:292
↓ 7 callers
Class
ModelArgs
tok/ar_dtok/ar_model.py:44
↓ 7 callers
Class
RMSNorm
tok/ar_dtok/ar_model.py:79
↓ 7 callers
Class
_LazyModule
Module class that surfaces all objects but only performs associated imports when the objects are requested.
trl/trl/import_utils.py:95
↓ 6 callers
Class
OptionalDependencyNotAvailable
Internally used error class for signalling an optional dependency was not found.
trl/trl/import_utils.py:155
↓ 6 callers
Class
ResnetBlock
tok/ar_dtok/vqvae.py:315
↓ 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/trl/trainer/utils.py:312
↓ 4 callers
Class
AttnBlock
tok/ar_dtok/vqvae.py:353
↓ 4 callers
Class
DPOTrainer
Trainer for Direct Preference Optimization (DPO) method. This class is a wrapper around the [`transformers.Trainer`] class and inherits all
trl/trl/trainer/dpo_trainer.py:183
↓ 4 callers
Class
LengthGroupedSampler
r""" Sampler that samples indices in a way that groups together features of the dataset of roughly the same length while keeping a bit of rand
blip3o/train/blip3o_trainer.py:197
↓ 4 callers
Class
LogCompletionsCallback
r""" A [`~transformers.TrainerCallback`] that logs completions to Weights & Biases and/or Comet. Usage: ```python trainer = DPOTraine
trl/trl/trainer/callbacks.py:420
↓ 4 callers
Class
PPOTrainer
trl/trl/trainer/ppo_trainer.py:99
↓ 4 callers
Class
SFTConfig
r""" Configuration class for the [`SFTTrainer`]. This class includes only the parameters that are specific to SFT training. For a full list o
trl/trl/trainer/sft_config.py:22
↓ 3 callers
Class
Attention
tok/ar_dtok/ar_model.py:190
↓ 3 callers
Class
Conversation
A class that keeps all conversation history.
blip3o/conversation.py:22
↓ 3 callers
Class
GRPOTrainer
Trainer for the Group Relative Policy Optimization (GRPO) method. This algorithm was initially proposed in the paper [DeepSeekMath: Pushing t
trl/trl/trainer/grpo_trainer.py:445
↓ 3 callers
Class
LengthSampler
Samples a length
trl/trl/core.py:79
↓ 3 callers
Class
SanaCombinedTimestepGuidanceEmbeddings
sana_transformer.py:99
↓ 3 callers
Class
ScalingLayer
tok/utils.py:5
↓ 2 callers
Class
DDPOPipelineOutput
Output class for the diffusers pipeline to be finetuned with the DDPO trainer Args: images (`torch.Tensor`): The generat
trl/trl/models/modeling_sd_base.py:39
↓ 2 callers
Class
DPOConfig
r""" Configuration class for the [`DPOTrainer`]. This class includes only the parameters that are specific to DPO training. For a full list o
trl/trl/trainer/dpo_config.py:34
↓ 2 callers
Class
DataCollatorForLanguageModeling
Data collator used for language modeling data. Inputs are dynamically padded to the maximum length of a batch. This collator expects each ex
trl/trl/trainer/sft_trainer.py:103
↓ 2 callers
Class
DefaultDDPOStableDiffusionPipeline
trl/trl/models/modeling_sd_base.py:798
↓ 2 callers
Class
GRPOConfig
r""" Configuration class for the [`GRPOTrainer`]. This class includes only the parameters that are specific to GRPO training. For a full list
trl/trl/trainer/grpo_config.py:24
↓ 2 callers
Class
IterativeSFTConfig
r""" Configuration class for the [`IterativeSFTTrainer`]. This class includes only the parameters that are specific to Iterative SFT training
trl/trl/trainer/iterative_sft_config.py:22
↓ 2 callers
Class
KTOTrainer
r""" Initialize KTOTrainer. Args: model (`transformers.PreTrainedModel`): The model to train, preferably an `AutoModelFor
trl/trl/trainer/kto_trainer.py:276
↓ 2 callers
Class
LabelEmbedder
Embeds class labels into vector representations. Also handles label dropout for classifier-free guidance.
tok/ar_dtok/ar_model.py:259
↓ 2 callers
Class
ModelArgs
tok/ar_dtok/vqvae.py:54
↓ 2 callers
Class
OnlineTrainerState
trl/trl/trainer/utils.py:688
↓ 2 callers
Class
PPOConfig
r""" Configuration class for the [`PPOTrainer`]. This class includes only the parameters that are specific to PPO training. For a full list o
trl/trl/trainer/ppo_config.py:23
↓ 2 callers
Class
RLOOTrainer
trl/trl/trainer/rloo_trainer.py:73
↓ 2 callers
Class
RepeatSampler
Sampler that repeats the indices of a dataset in a structured manner. Args: data_source (`Sized`): Dataset to sample fro
trl/trl/trainer/grpo_trainer.py:118
↓ 2 callers
Class
RewardTrainer
trl/examples/research_projects/stack_llama/scripts/reward_modeling.py:289
↓ 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/trl/trainer/utils.py:396
↓ 2 callers
Class
SyncRefModelCallback
Callback to synchronize the model with a reference model.
trl/trl/trainer/callbacks.py:93
↓ 2 callers
Class
TrainingArguments
blip3o/train/train.py:59
↓ 2 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/trl/extras/vllm_client.py:46
↓ 2 callers
Class
VQModel
tok/ar_dtok/vqvae.py:68
↓ 2 callers
Class
ValueHead
r""" The ValueHead class implements a head for GPT2 that returns a scalar for each output token.
trl/trl/models/modeling_value_head.py:22
↓ 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/examples/scripts/ddpo.py:105
↓ 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/trl/models/auxiliary_modules.py:43
↓ 1 callers
Class
AlignPropTrainer
The AlignPropTrainer uses Deep Diffusion Policy Optimization to optimise diffusion models. Note, this trainer is heavily inspired by the work
trl/trl/trainer/alignprop_trainer.py:40
↓ 1 callers
Class
BCOTrainer
r""" Initialize BCOTrainer from [BCO](https://huggingface.co/papers/2404.04656) paper. Args: model (`transformers.PreTrainedModel`):
trl/trl/trainer/bco_trainer.py:284
↓ 1 callers
Class
CPOTrainer
r""" Initialize CPOTrainer. Args: model (`transformers.PreTrainedModel`): The model to train, preferably an `AutoModelFor
trl/trl/trainer/cpo_trainer.py:74
↓ 1 callers
Class
DDPOSchedulerOutput
Output class for the diffusers scheduler to be finetuned with the DDPO trainer Args: latents (`torch.Tensor`): Predicted
trl/trl/models/modeling_sd_base.py:59
↓ 1 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/trl/trainer/ddpo_trainer.py:42
↓ 1 callers
Class
DataCollatorForChatML
Data collator for ChatML format datasets.
trl/trl/trainer/utils.py:69
↓ 1 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/trl/trainer/dpo_trainer.py:106
↓ 1 callers
Class
DataCollatorForSupervisedDataset
Collate examples for supervised fine-tuning.
blip3o/data/dataset.py:355
↓ 1 callers
Class
Decoder
tok/ar_dtok/vqvae.py:165
↓ 1 callers
Class
Downsample
tok/ar_dtok/vqvae.py:414
↓ 1 callers
Class
DropPath
Drop paths (Stochastic Depth) per sample (when applied in main path of residual blocks).
tok/ar_dtok/ar_model.py:134
↓ 1 callers
Class
Encoder
tok/ar_dtok/vqvae.py:103
↓ 1 callers
Class
EvaluateFirstStepCallback
trl/examples/research_projects/stack_llama/scripts/reward_modeling.py:313
↓ 1 callers
Class
FeedForward
tok/ar_dtok/ar_model.py:153
↓ 1 callers
Class
GKDTrainer
trl/trl/trainer/gkd_trainer.py:59
↓ 1 callers
Class
GLUMBConv
sana_transformer.py:38
↓ 1 callers
Class
GeometricMixtureWrapper
r""" Geometric Mixture generation wrapper that samples from the logits of two model's geometric mixture. Args: model (`PreTrainedMode
trl/trl/models/modeling_base.py:667
↓ 1 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/trl/trainer/judges.py:289
↓ 1 callers
Class
KVCache
tok/ar_dtok/ar_model.py:172
↓ 1 callers
Class
LayerSkipSFTTrainer
trl/examples/research_projects/layer_skip/scripts/custom_trainer.py:18
↓ 1 callers
Class
MLP
trl/examples/scripts/ddpo.py:86
↓ 1 callers
Class
MLP
trl/trl/models/auxiliary_modules.py:25
↓ 1 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/trl/mergekit_utils.py:39
↓ 1 callers
Class
NashMDTrainer
r""" Initialize NashMDTrainer as a subclass of [`OnlineDPOConfig`]. Args: model (`transformers.PreTrainedModel`): The mod
trl/trl/trainer/nash_md_trainer.py:66
↓ 1 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/trl/models/activation_offloading.py:329
↓ 1 callers
Class
ORPOTrainer
r""" Initialize ORPOTrainer. Args: model (`transformers.PreTrainedModel`): The model to train, preferably an `AutoModelFo
trl/trl/trainer/orpo_trainer.py:78
↓ 1 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/trl/models/activation_offloading.py:29
↓ 1 callers
Class
OnlineDPOTrainer
r""" Initialize OnlineDPOTrainer. Args: model (`Union[str, nn.Module, PreTrainedModel]`): Model to be trained. Can be eit
trl/trl/trainer/online_dpo_trainer.py:93
↓ 1 callers
Class
OpenAIPairwiseJudge
Judge based on the OpenAI API. This judge is relevant for assessing the quality chat models, where the completion is a response to a given p
trl/trl/trainer/judges.py:345
↓ 1 callers
Class
PRMTrainer
Initialize PRMTrainer. Args: model (`transformers.PreTrainedModel`): The model to train, preferably an `AutoModelForToke
trl/trl/trainer/prm_trainer.py:53
↓ 1 callers
Class
PerPromptStatTracker
r""" Class for tracking statistics per prompt. Mainly used to calculate advantage for the DPPO algorithm Args: buffer_size (`int`):
trl/trl/trainer/utils.py:541
↓ 1 callers
Class
PolicyAndValueWrapper
trl/trl/trainer/ppo_trainer.py:86
↓ 1 callers
Class
RewardDataCollatorWithPadding
trl/examples/research_projects/stack_llama/scripts/reward_modeling.py:232
↓ 1 callers
Class
RewardDataCollatorWithPadding
r""" Reward DataCollator class that pads the inputs to the maximum length of the batch. Args: tokenizer (`PreTrainedTokenizerBase`):
trl/trl/trainer/utils.py:168
↓ 1 callers
Class
SILoss_adaptive
blip3o/model/language_model/loss_adaptive.py:4
↓ 1 callers
Class
SanaAttnProcessor2_0
r""" Processor for implementing scaled dot-product attention (enabled by default if you're using PyTorch 2.0).
sana_transformer.py:127
↓ 1 callers
Class
SanaModulatedNorm
sana_transformer.py:85
↓ 1 callers
Class
SanaTransformerBlock
r""" Transformer block introduced in [Sana](https://huggingface.co/papers/2410.10629).
sana_transformer.py:193
↓ 1 callers
Class
StepInjectorCallback
blip3o/train/blip3o_trainer.py:256
↓ 1 callers
Class
StringStoppingCriteria
Custom `StoppingCriteria` which checks if all generations in the batch are completed.
trl/trl/environment/base_environment.py:30
↓ 1 callers
Class
T2IConfig
inference.py:24
↓ 1 callers
Class
T2IConfig
trl/inference.py:10
↓ 1 callers
Class
TATokVisionTower
blip3o/model/multimodal_encoder/ta_tok_encoder.py:11
↓ 1 callers
Class
TextHistory
The TextHistory class keeps track of the history of an interaction between the language model and the environment.
trl/trl/environment/base_environment.py:59
↓ 1 callers
Class
TextToImageInference
inference.py:34
↓ 1 callers
Class
TextToImageInference
trl/inference.py:20
↓ 1 callers
Class
TransformerBlock
tok/ar_dtok/ar_model.py:243
↓ 1 callers
Class
Upsample
tok/ar_dtok/vqvae.py:400
↓ 1 callers
Class
VectorQuantizer
tok/ar_dtok/vqvae.py:234
↓ 1 callers
Class
XPOTrainer
r""" Initialize XPOTrainer as a subclass of [`OnlineDPOConfig`]. Args: model (`transformers.PreTrainedModel`): The model
trl/trl/trainer/xpo_trainer.py:66
↓ 1 callers
Class
_ForwardRedirection
Implements the `forward-redirection`. Taken from Pytorch-lightning: https://github.com/Lightning-AI/pytorch-lightning/blob/02311d03fb98256024
trl/trl/models/utils.py:401
↓ 1 callers
Class
_SegmentTree
A segment tree data structure that, when initialized as `_SegmentTree(maxval)`, efficiently finds the next larger value for a given input wit
trl/trl/data_utils.py:443
↓ 1 callers
Class
blip3oQwenModel
blip3o/model/language_model/blip3o_qwen_inference.py:40
↓ 1 callers
Class
blip3oQwenModel
blip3o/model/language_model/blip3o_qwen.py:23
↓ 1 callers
Class
blip3oQwenModel
blip3o/model/language_model/blip3o_qwen_grpo.py:43
↓ 1 callers
Class
blip3oTrainer
blip3o/train/blip3o_trainer.py:266
Class
AlignPropConfig
r""" Configuration class for the [`AlignPropTrainer`]. Using [`~transformers.HfArgumentParser`] we can turn this class into [argparse](ht
trl/trl/trainer/alignprop_config.py:26
next →
1–100 of 184, ranked by callers