🚀 MaziyarPanahi/calme-2.3-llama3-70b
这是一个基于meta-llama/Meta-Llama-3-70B-Instruct
模型微调(DPO)的模型,可用于文本生成任务,在多个数据集上有不错的表现。

🚀 快速开始
你可以在Hugging Face的transformers库中使用MaziyarPanahi/calme-2.3-llama3-70b
作为模型名称来使用此模型。
from transformers import AutoModelForCausalLM, AutoTokenizer, TextStreamer
from transformers import pipeline
import torch
model_id = "MaziyarPanahi/calme-2.3-llama3-70b"
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
tokenizer = AutoTokenizer.from_pretrained(
model_id,
trust_remote_code=True
)
streamer = TextStreamer(tokenizer)
pipeline = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer,
model_kwargs={"torch_dtype": torch.bfloat16},
streamer=streamer
)
messages = [
{"role": "system", "content": "You are a pirate chatbot who always responds in pirate speak!"},
{"role": "user", "content": "Who are you?"},
]
prompt = tokenizer.apply_chat_template(
messages,
tokenize=False,
add_generation_prompt=True
)
terminators = [
tokenizer.eos_token_id,
tokenizer.convert_tokens_to_ids("<|im_end|>"),
tokenizer.convert_tokens_to_ids("<|eot_id|>")
]
outputs = pipeline(
prompt,
max_new_tokens=2048,
eos_token_id=terminators,
do_sample=True,
temperature=0.6,
top_p=0.95,
)
print(outputs[0]["generated_text"][len(prompt):])
✨ 主要特性
- 基于
meta-llama/Meta-Llama-3-70B-Instruct
模型进行微调(DPO)。
- 支持
ChatML
提示模板。
- 提供量化的GGUF模型。
- 在多个数据集上有良好的评估结果。
📦 量化的GGUF模型
所有GGUF模型可在此处获取:MaziyarPanahi/calme-2.3-llama3-70b-GGUF
详细结果可查看此处
指标 |
值 |
平均值 |
78.74 |
AI2推理挑战(25次少样本) |
72.35 |
HellaSwag(10次少样本) |
86.00 |
MMLU(5次少样本) |
80.47 |
TruthfulQA(0次少样本) |
63.45 |
Winogrande(5次少样本) |
82.95 |
GSM8k(5次少样本) |
87.19 |
排行榜前10的模型

📚 详细文档
提示模板
此模型使用ChatML
提示模板:
<|im_start|>system
{系统提示}
<|im_end|>
<|im_start|>user
{用户输入}
<|im_end|>
<|im_start|>assistant
{模型输出}
📄 许可证
此模型的许可证为llama3,具体许可证信息可查看LICENSE。
模型信息表格
属性 |
详情 |
模型类型 |
基于meta-llama/Meta-Llama-3-70B-Instruct 的微调(DPO)模型 |
训练数据 |
MaziyarPanahi/truthy-dpo-v0.1-axolotl |
模型创建者 |
MaziyarPanahi |
量化者 |
MaziyarPanahi |
任务类型 |
文本生成 |
评估数据集 |
AI2 Reasoning Challenge、HellaSwag、MMLU、TruthfulQA、Winogrande、GSM8k 等 |