Model Details
Model Description
We fine-tuned mistralai/Mistral-7B-Instruct-v0.2 on princeton-nlp/mistral-instruct-ultrafeedback 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: mistralai/Mistral-7B-Instruct-v0.2
Model Sources
Repository: https://github.com/sunjie279/gammaPO
How to Get Started with the Model
import torch
from transformers import pipeline
model_id = "Sunshine279/gammaPO-mistral-7b-instruct-v0.2"
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: 6e-07
- train_batch_size: 2
- eval_batch_size: 4
- seed: 42
- distributed_type: multi-GPU
- num_devices: 4
- 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 |
---|---|---|---|---|---|---|---|---|---|---|---|
0.7922 | 0.8573 | 400 | 0.8477 | -2.2162 | -2.4466 | 0.6197 | 0.2304 | -0.9786 | -0.8865 | -2.7504 | -2.7538 |
Framework versions
- Transformers 4.42.4
- Pytorch 2.3.0+cu121
- Datasets 2.20.0
- Tokenizers 0.19.1
- Downloads last month
- 21
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support
Model tree for Sunshine279/gammaPO-mistral-7b-instruct-v0.2
Base model
mistralai/Mistral-7B-Instruct-v0.2