Model Details

Model Description

We fine-tuned google/gemma-2-9b-it on princeton-nlp/gemma2-ultrafeedback-armorm with the gamma-SimPO objective.

  • Developed by: Jie Sun, Junkang Wu, Jiancan Wu, Zhibo Zhu, Xingyu Lu, Jun Zhou, Lintao Ma, Xiang Wang

  • Model type: Causal Language Model

  • License: gemma

  • Finetuned from model: google/gemma-2-9b-it

Model Sources

How to Get Started with the Model

import torch
from transformers import pipeline

model_id = "Sunshine279/gammaPO-gemma-2-9b-it"

generator = pipeline(
    "text-generation",
    model=model_id,
    model_kwargs={"torch_dtype": torch.bfloat16},
    device="cuda",
)
outputs = generator([{"role": "user", "content": "What's the difference between llamas and alpacas?"}],
                      do_sample=False,
                      eos_token_id=[generator.tokenizer.convert_tokens_to_ids("<end_of_turn>"), generator.tokenizer.eos_token_id],
                      max_new_tokens=200)
print(outputs[0]['generated_text'])

Training details

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 8e-07
  • train_batch_size: 1
  • eval_batch_size: 2
  • seed: 42
  • distributed_type: multi-GPU
  • num_devices: 8
  • gradient_accumulation_steps: 16
  • total_train_batch_size: 128
  • total_eval_batch_size: 16
  • optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
  • lr_scheduler_type: cosine
  • lr_scheduler_warmup_ratio: 0.1
  • num_epochs: 1

Training results

Training Loss Epoch Step Validation Loss Rewards/chosen Rewards/rejected Rewards/accuracies Rewards/margins Logps/rejected Logps/chosen Logits/rejected Logits/chosen
2.5863 0.8594 400 2.5622 -18.1350 -23.0307 0.7828 4.8958 -2.3031 -1.8135 -15.8316 -15.8114

Framework versions

  • Transformers 4.42.4
  • Pytorch 2.3.0+cu121
  • Datasets 2.20.0
  • Tokenizers 0.19.1
Downloads last month
29
Safetensors
Model size
9.24B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for Sunshine279/gammaPO-gemma-2-9b-it

Base model

google/gemma-2-9b
Finetuned
(288)
this model
Quantizations
1 model

Dataset used to train Sunshine279/gammaPO-gemma-2-9b-it