MCPcopy Create free account

hub / github.com/ContextualAI/HALOs / types & classes

Types & classes29 in github.com/ContextualAI/HALOs

↓ 15 callersClassDataset
A collection of Example instances, indexed by prompt.
train/data.py:108
↓ 2 callersClassStreamingJSONWriter
Writes JSON arrays to a file in a streaming fashion.
train/utils.py:48
↓ 1 callersClassExample
Class for an example in a preference or SFT dataset. If you want each prompt to be uniquely associated with an Example instance, save it in a dic
train/data.py:38
↓ 1 callersClassReferenceModelWrapper
A wrapper around the reference model that precomputes the logprobs and saves them in a local dict, after which the reference model and accele
train/models.py:425
↓ 1 callersClassSFTDataLoader
Dataloader for supervised fine-tuning.
train/dataloader.py:276
↓ 1 callersClassValueHead
r""" The ValueHead class implements a head for autoregressive that returns a scalar for each output token. The weights of the value head need
train/models.py:201
ClassAutoModelForBradleyTerry
A wrapper around AutoModelForSequenceClassification that ensures binary classification.
train/models.py:553
ClassAutoModelForCausalLMWithValueHead
r""" An autoregressive model with a value head in addition to the language model head. Class attributes: - **transformers_parent_clas
train/models.py:239
ClassBasicTrainer
train/trainers.py:59
ClassBradleyTerryTrainer
train/trainers.py:1541
ClassCDPOTrainer
train/trainers.py:767
ClassConditionalSFTDataLoader
Dataloader for token-conditioned SFT, in the style of Korbak et al.'s (2023) "Pretraining Models with Human Feedback." For training, eac
train/dataloader.py:345
ClassDPOTrainer
train/trainers.py:746
ClassDataLoader
The base data loader class, similar to the one from the DPO repo. Subclass this and overwrite the __iter__ method as needed, since the batch
train/dataloader.py:31
ClassGRPOTrainer
train/trainers.py:1009
ClassGroupUnpairedPreferenceDataLoader
A variant of UnpairedPreferenceDataLoader that groups examples with the same prompt in the same batch (but distributed across different proce
train/dataloader.py:590
ClassHalfPrefDataLoader
Dataloader for training on only one output per input. This throws out at least half the data (more than half if there are multiple pairs per
train/dataloader.py:659
ClassIPOTrainer
train/trainers.py:790
ClassKTOTrainer
train/trainers.py:851
ClassPPOTrainer
train/trainers.py:1106
ClassPairedPreferenceDataLoader
Dataloader for losses that do require pairwise preferences (e.g., DPO).
train/dataloader.py:691
ClassPairedPreferenceTrainer
train/trainers.py:654
ClassPreTrainedModelWrapper
r""" A wrapper class around a (`transformers.PreTrainedModel`) to be compatible with the (`~transformers.PreTrained`) class in order to keep s
train/models.py:25
ClassSFTTrainer
train/trainers.py:552
ClassSLiCTrainer
train/trainers.py:824
ClassScoreDataLoader
train/dataloader.py:633
ClassSimPOTrainer
train/trainers.py:808
ClassUnpairedPreferenceDataLoader
Dataloader for losses that do not require pairwise preferences (e.g., KTO). This assumes that if an example has no pairs, then it is natural
train/dataloader.py:451
ClassUnpairedPreferenceTrainer
train/trainers.py:584