Downloads · 30 days
4
7% of all-time downloads
snowfly/Mistral-7B-orca_dpo_pairs
Mistral-7B-orca_dpo_pairs is a text generation model from snowfly. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
- 目标:模型上的DPO训练 - 使用模型:Mistral-7B - 使用数据:Intel/orcadpopairs(使用全部数据跑了一个epoch) - 显卡:一张4090,24G
Downloads · 30 days
4
7% of all-time downloads
All-time downloads
57
Public
Parameters
7.2B
14.5 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors14.5 GB · 100%
From the Hugging Face model README
from transformers import AutoTokenizer
import transformers
model = "snowfly/Mistral-7B-orca_dpo_pairs"
# Format prompt
message = [
{"role": "system", "content": "You are a helpful assistant chatbot."},
{"role": "user", "content": "What is a Large Language Model?"}
]
tokenizer = AutoTokenizer.from_pretrained(model)
prompt = tokenizer.apply_chat_template(message, add_generation_prompt=True, tokenize=False)
# Create pipeline
pipeline = transformers.pipeline(
"text-generation",
model=model,
tokenizer=tokenizer
)
# Generate text
sequences = pipeline(
prompt,
do_sample=True,
temperature=0.7,
top_p=0.9,
num_return_sequences=1,
max_length=200,
)
print(sequences[0]['generated_text'])
实验设置如下:
由于每次更新梯度的数据量较小,导致训练前期loss急剧震荡,170step后趋于平稳,直至一个epoch训练结束loss下降不明显,趋于稳定