CoolFace
Modelpublic

chaoweihuang/FactAlign-Phi-3-Mini

sourceHugging Facemitupdated 2y agoView on Hugging Face
0likes10downloads
Model Card

<!-- This model card has been generated automatically according to the information the Trainer had access to. You should probably proofread and complete it, then remove this comment. -->

FactAlign-Phi-3-Mini

This model is aligned with our FactAlign framework for improved long-form factuality, from microsoft/Phi-3-mini-4k-instruct.

For more information, please refer to our paper: FactAlign: Long-form Factuality Alignment of Large Language Models.

Model description

More information needed

Intended uses & limitations

More information needed

Training and evaluation data

This model is a fine-tuned version of microsoft/Phi-3-mini-4k-instruct on the trl-lib/kto-mix-14k and the chaoweihuang/lf-response-phi3-f11000.7-fg0.5 datasets. It achieves the following results on the evaluation set:

  • —Loss: 0.4815
  • —Rewards/chosen: -0.6601
  • —Logps/chosen: -299.7121
  • —Rewards/rejected: -2.6435
  • —Logps/rejected: -364.3744
  • —Rewards/margins: 1.9834
  • —Kl: 0.0081
  • —Fg Kl: nan
  • —Fg Rewards/chosen Sum: 0.0694
  • —Fg Logps/policy Chosen: -15.2781
  • —Fg Logps/reference Chosen: -14.9295
  • —Count/fg Chosen: 16.0137
  • —Fg Rewards/rejected Sum: -0.3623
  • —Fg Logps/policy Rejected: -19.6552
  • —Fg Logps/reference Rejected: -18.7868
  • —Count/fg Rejected: 4.0824
  • —Fg Logps/policy Kl: -21.1260
  • —Fg Logps/reference Kl: -20.2070
  • —Fg Loss: 0.7365

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • —learning_rate: 5e-07
  • —trainbatchsize: 1
  • —evalbatchsize: 1
  • —seed: 42
  • —distributed_type: multi-GPU
  • —num_devices: 2
  • —gradientaccumulationsteps: 8
  • —totaltrainbatch_size: 16
  • —totalevalbatch_size: 2
  • —optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • —lrschedulertype: linear
  • —lrschedulerwarmup_ratio: 0.1
  • —num_epochs: 1.0
  • —mixedprecisiontraining: Native AMP

Training results

Training LossEpochStepValidation LossRewards/chosenLogps/chosenRewards/rejectedLogps/rejectedRewards/marginsKlFg KlFg Rewards/chosen SumFg Logps/policy ChosenFg Logps/reference ChosenCount/fg ChosenFg Rewards/rejected SumFg Logps/policy RejectedFg Logps/reference RejectedCount/fg RejectedFg Logps/policy KlFg Logps/reference KlFg Loss
0.44950.41034000.4978-1.0397-303.5076-2.7182-365.12121.67850.0054nan-1.3184-16.1070-14.929516.0137-0.5732-20.2671-18.78684.0824-21.1826-20.20700.7449
0.51890.82068000.4815-0.6601-299.7121-2.6435-364.37441.98340.0081nan0.0694-15.2781-14.929516.0137-0.3623-19.6552-18.78684.0824-21.1260-20.20700.7365

Framework versions

  • —Transformers 4.41.1
  • —Pytorch 2.3.0+cu121
  • —Datasets 2.19.1
  • —Tokenizers 0.19.1