Phoenix is a model trained using Direct Preference Optimization (DPO) for the german language. Its training procedure follows the process of the alignment-handbook from Huggingface.
In contrast to zephyr and notus this model has been trained using german instruction and dpo data. In detail, a german translation of HuggingFaceH4/ultrachat_200k
and HuggingFaceH4/ultrafeedback_binarized were created in addition to a series of allready available instruction datasets. The LLM haoranxu/ALMA-13B was used for this.
While the mistral model performs really well, it is not really suitable for the german language. Therefore we have used the fantastic LeoLM/leo-mistral-hessianai-7b.
Thanks to the new type of training, Phoenix is not only able to compete with the Mistral model from LeoLM but also beats the Llama-70b-chat model in 2 mt-bench categories.
This model wouldn't have been possible without the amazing work of Huggingface, LeoLM, openbnb, argilla, the Alma-Team and many others of the AI community.
i would like to personally thank all AI researchers who make the training of such models possible
MT-Bench-DE Scores
Phoenix beats the LeoLM-Mistral model in all categories except for coding and humanities.
Additionally it also Beats LeoLM/Llama-2-70b-chat in roleplay and reasoning which shows the power of DPO.
You will first need to install transformers and accelerate (just to ease the device placement), then you can run any of the following:
Via generate
python
1import torch
2from transformers import AutoModelForCausalLM, AutoTokenizer
3model = AutoModelForCausalLM.from_pretrained("DRXD1000/Phoenix-GPTQ", torch_dtype=torch.bfloat16, device_map="auto")4tokenizer = AutoTokenizer.from_pretrained("DRXD1000/Phoenix-GPTQ")5prompt =[6{7"role":"system",8"content":"",#Not recommended. Phoenix does not react well on system prompts9},10{"role":"user","content":"Erkläre mir was KI ist"},11]12inputs = tokenizer.apply_chat_template(prompt, return_tensors="pt").to("cuda")13outputs = model.generate(inputs, num_return_sequences=1, max_new_tokens=256, do_sample=True, temperature=0.7, top_k=50, top_p=0.95)14response = tokenizer.decode(outputs[0], skip_special_tokens=True)
Ethical Considerations and Limitations
As with all LLMs, the potential outputs of DRXD1000/Phoenix cannot be predicted
in advance, and the model may in some instances produce inaccurate, biased or other objectionable responses
to user prompts. Therefore, before deploying any applications of DRXD1000/Phoenix, developers should
perform safety testing and tuning tailored to their specific applications of the model.
Please see Meta's Responsible Use Guide.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
SFT Training
learning_rate: 2e-05
train_batch_size: 32
eval_batch_size: 16
seed: 42
distributed_type: multi-GPU
num_devices: 8
gradient_accumulation_steps: 2
total_train_batch_size: 512
total_eval_batch_size: 128
optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
lr_scheduler_type: cosine
num_epochs: 1
DPO Training
learning_rate: 5e-07
train_batch_size: 8
eval_batch_size: 4
seed: 42
distributed_type: multi-GPU
num_devices: 8
total_train_batch_size: 64
total_eval_batch_size: 32
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
Citation
@misc{uhlig2024phoenix,
title={PHOENIX: Open-Source Language Adaption for Direct Preference Optimization},
author={Matthias Uhlig and Sigurd Schacht and Sudarshan Kamath Barkur},
year={2024},
eprint={2401.10580},
archivePrefix={arXiv},
primaryClass={cs.CL}
}