CoolFace
Modelpublic

GoshKolotyan/llama-3.2-3b-sft-human-feedback

sourceHugging Faceupdated 11mo agoView on Hugging Face
0likes3downloads
Model Card

Model Card for sft_model

This model is a fine-tuned version of meta-llama/Llama-3.2-3B. It has been trained using TRL.

Quick start

python
from transformers import pipeline

question = "If you had a time machine, but could only go to the past or the future once and never return, which would you choose and why?"
generator = pipeline("text-generation", model="None", device="cuda")
output = generator([{"role": "user", "content": question}], max_new_tokens=128, return_full_text=False)[0]
print(output["generated_text"])

Training Results

Final Training Metrics (Epoch 2.0)

  • Train Loss: 2.005
  • Train Runtime: 56,228.83 seconds (~15.6 hours)
  • Samples/Second: 2.712
  • Steps/Second: 0.17
  • Mean Token Accuracy: 0.5171
  • Entropy: 2.098
  • Total Tokens: 32,755,538

Evaluation Metrics (Epoch 1.99)

  • Eval Loss: 2.057
  • Eval Runtime: 526.36 seconds
  • Eval Samples/Second: 9.695
  • Eval Steps/Second: 9.695
  • Mean Token Accuracy: 0.5160
  • Entropy: 2.080
  • Total Tokens: 32,644,899

Sample Loss Progression (Final Steps)

StepLossGrad NormLearning RateToken AccuracyEntropy
Final-31.9560.4003.20e-090.5222.051
Final-21.8940.5161.09e-090.5342.024
Final-11.8970.4318.88e-110.5322.021

Model Configuration

  • Base Model: Llama-3.2-3B (Meta)
  • Fine-tuning Method: LoRA (Low-Rank Adaptation)
  • LoRA Rank (r): 8
  • LoRA Alpha: 16
  • LoRA Dropout: 0.05
  • Target Modules: qproj, vproj
  • Training Method: Supervised Fine-Tuning (SFT)
  • Total Training Steps: 9,532
  • Training Epochs: 2.0

Trainable Parameters

Only ~7% of parameters were trained using LoRA, making this an efficient fine-tuning approach.

Training procedure

This model was trained with SFT.

Framework versions

  • PEFT 0.17.1
  • TRL: 0.24.0
  • Transformers: 4.57.1
  • Pytorch: 2.9.0
  • Datasets: 4.3.0
  • Tokenizers: 0.22.1

Citations

Cite TRL as:

bibtex
@misc{vonwerra2022trl,
	title        = {{TRL: Transformer Reinforcement Learning}},
	author       = {Leandro von Werra and Younes Belkada and Lewis Tunstall and Edward Beeching and Tristan Thrush and Nathan Lambert and Shengyi Huang and Kashif Rasul and Quentin Gallou{\'e}dec},
	year         = 2020,
	journal      = {GitHub repository},
	publisher    = {GitHub},
	howpublished = {\url{https://github.com/huggingface/trl}}
}