chaoweihuang's picture
Update README.md
3179552 verified
metadata
license: mit
base_model: microsoft/Phi-3-mini-4k-instruct
tags:
  - alignment-handbook
  - generated_from_trainer
datasets:
  - trl-lib/kto-mix-14k
  - chaoweihuang/lf-response-phi3-f1_100_0.7-fg0.5
model-index:
  - name: kto-mix-14k-lf-response-phi3-f1_100_0.7-fg0.5-kto-fg-fgudw4.0
    results: []

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-f1_100_0.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
  • train_batch_size: 1
  • eval_batch_size: 1
  • seed: 42
  • distributed_type: multi-GPU
  • num_devices: 2
  • gradient_accumulation_steps: 8
  • total_train_batch_size: 16
  • total_eval_batch_size: 2
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: linear
  • lr_scheduler_warmup_ratio: 0.1
  • num_epochs: 1.0
  • mixed_precision_training: Native AMP

Training results

Training Loss Epoch Step Validation Loss Rewards/chosen Logps/chosen Rewards/rejected Logps/rejected Rewards/margins Kl Fg Kl Fg Rewards/chosen Sum Fg Logps/policy Chosen Fg Logps/reference Chosen Count/fg Chosen Fg Rewards/rejected Sum Fg Logps/policy Rejected Fg Logps/reference Rejected Count/fg Rejected Fg Logps/policy Kl Fg Logps/reference Kl Fg Loss
0.4495 0.4103 400 0.4978 -1.0397 -303.5076 -2.7182 -365.1212 1.6785 0.0054 nan -1.3184 -16.1070 -14.9295 16.0137 -0.5732 -20.2671 -18.7868 4.0824 -21.1826 -20.2070 0.7449
0.5189 0.8206 800 0.4815 -0.6601 -299.7121 -2.6435 -364.3744 1.9834 0.0081 nan 0.0694 -15.2781 -14.9295 16.0137 -0.3623 -19.6552 -18.7868 4.0824 -21.1260 -20.2070 0.7365

Framework versions

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