🚀 Alpha-Instruct:强大的双语语言模型
Alpha-Instruct是我们最新推出的语言模型,在韩语和英语方面均展现出卓越的能力。它采用“进化模型融合”技术开发,能出色完成复杂的语言任务和逻辑推理。我们基于社区驱动的理念进行开发,从不同社区汲取灵感和创意,同时也致力于与社区分享我们的见解,提供Alpha-Instruct创建过程中所使用的数据、方法和模型的详细信息。

🚀 快速开始
Alpha-Instruct是我们运用“进化模型融合”技术开发的最新语言模型。该方法按1:1的比例使用来自KoBEST和Haerae的特定任务数据集,最终得到名为“Alpha-Ko-8B-Evo”的模型。以下是用于融合的模型:
为了优化和提升Alpha-Instruct,我们使用了精心策划的高质量数据集来“修复”模型的输出,显著提高了其在人类偏好方面的得分。我们特别使用 ORPO 进行这个“修复”(基于人类反馈的强化学习)阶段。所使用的数据集包括:
部分数据集在训练时进行了部分使用和翻译,并且我们确保在评估过程中没有数据污染。这种方法有效地平衡了人类偏好和模型能力,使Alpha-Instruct非常适合对用户满意度和性能都有较高要求的实际场景。
✨ 主要特性
- 双语能力:在韩语和英语方面均表现出色,能处理多种语言任务。
- 先进技术:采用“进化模型融合”技术,结合社区驱动的开发方法,使模型在复杂语言任务和逻辑推理中表现卓越。
- 高性能表现:在LogicKor测试中取得了6.62的优异成绩,可与70B模型相媲美,展示了8B模型的高效和强大。
📊 基准测试结果
LogicKor测试结果
模型 |
单轮对话 |
多轮对话 |
总体得分 |
MLP-KTLim/llama-3-Korean-Bllossom-8B |
4.238 |
3.404 |
3.821 |
Alpha-Ko-Evo |
5.143 |
5.238 |
5.190 |
Alpha-Ko-Instruct (alt) |
7.095 |
6.571 |
6.833 |
Alpha-Ko-Instruct |
7.143 |
6.065 |
6.620 |
Alpha-Ko-Instruct-marlin (4bit) |
6.857 |
5.738 |
6.298 |
注:自报告(使用“alpha”模板的默认设置,三次测试的平均值)。
KoBEST测试结果
任务 |
beomi/Llama-3-Open-Ko-8B-Instruct |
maywell/Llama-3-Ko-8B-Instruct |
Alpha-Ko-Evo |
Alpha-Ko-Instruct |
kobest总体 |
0.6220 |
0.6852 |
0.7229 |
0.7055 |
kobest_boolq |
0.6254 |
0.7208 |
0.8547 |
0.8369 |
kobest_copa |
0.7110 |
0.7650 |
0.7420 |
0.7420 |
kobest_hellaswag |
0.3840 |
0.4440 |
0.4220 |
0.4240 |
kobest_sentineg |
0.8388 |
0.9194 |
0.9471 |
0.9244 |
kobest_wic |
0.5738 |
0.6040 |
0.6095 |
0.5730 |
注:参考选择“融合”模型。
💻 使用示例
基础用法
from transformers import AutoTokenizer, AutoModelForCausalLM
import torch
model_id = "allganize/Llama-3-Alpha-Ko-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(
model_id,
torch_dtype="auto",
device_map="auto",
)
messages = [
{"role": "system", "content": "당신은 인공지능 어시스턴트입니다. 묻는 말에 친절하고 정확하게 답변하세요."},
{"role": "user", "content": "피보나치 수열이 뭐야? 그리고 피보나치 수열에 대해 파이썬 코드를 짜줘볼래?"},
]
input_ids = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
return_tensors="pt"
).to(model.device)
terminators = [
tokenizer.eos_token_id,
tokenizer.convert_tokens_to_ids("<|eot_id|>")
]
outputs = model.generate(
input_ids,
max_new_tokens=512,
eos_token_id=terminators,
do_sample=False,
repetition_penalty=1.05,
)
response = outputs[0][input_ids.shape[-1]:]
print(tokenizer.decode(response, skip_special_tokens=True))
📞 联系方式
- 联系人:Ji soo Kim (jisoo.kim@allganize.ai)
- 贡献者:
- Sangmin Jeon (sangmin.jeon@allganize.ai)
- Seungwoo Ryu (seungwoo.ryu@allganize.ai)
🙏 特别感谢
感谢 @beomi 提供的优秀模型!
📄 许可证
本模型的使用受 META LLAMA 3 COMMUNITY LICENSE AGREEMENT 约束。
📚 引用信息
如果您在研究中使用了本模型,请按以下方式引用:
@misc{alpha-instruct,
author = {Ji soo Kim},
title = {Alpha-Instruct: Allganize Bilingual Model},
year = {2024},
publisher = {Hugging Face},
journal = {Hugging Face repository},
url = {https://huggingface.co/allganize/Llama-3-Alpha-Ko-8B-Instruct},
}
如需了解更多关于Alpha-Instruct的信息和技术细节,请关注我们的更新并访问我们的网站(即将上线)。