AceGPT 是基于 LlaMA2 构建的全量微调生成式文本模型系列,尤其专注于阿拉伯语领域。本仓库为 7B-chat 预训练模型的存放地。
我们发布了 AceGPT 大语言模型系列,该系列是基于 LlaMA2 构建的全量微调生成式文本模型集合,参数规模涵盖 70 亿至 130 亿。我们的模型包含两大主要类别:AceGPT 和 AceGPT-chat。其中,AceGPT-chat 是专门针对对话应用优化的版本。值得一提的是,在多项基准测试中,我们的模型表现优于目前所有已公开的阿拉伯语对话模型。此外,在人类评估中,我们的模型在阿拉伯语方面的满意度已达到部分闭源模型(如 ChatGPT)的水平。
我们来自香港中文大学(深圳)数据科学学院、深圳大数据研究院以及阿卜杜拉国王科技大学(KAUST)。
AceGPT 系列提供多种参数规模——70 亿和 130 亿,每种规模的模型均包含基础版和 -chat 对话版两个类别。
模型仅输入文本。
模型仅输出文本。
在 Arabic Vicuna-80 和 Arabic AlpacaEval 上进行了实验。数值为三次运行中相对于 ChatGPT 的平均性能比率。由于原始 Llama-2 模型无法正常生成阿拉伯语文本,因此未报告其结果。
| Arabic Vicuna-80 | Arabic AlpacaEval | |
|---|---|---|
| Phoenix Chen et al. (2023a) | 71.92% ± 0.2% | 65.62% ± 0.3% |
| Phoenix–multiple-langs Chen et al. (2023b) | 71.67% ± 0.7% | 65.36% ± 0.1% |
| Jais-13B-chat Sengupta et al. (2023) | 75.40% ± 1.6% | 74.95% ± 0.2% |
| AceGPT-7B-chat | 94.82% ± 0.2% | 93.81% ± 0.1% |
| AceGPT-13B-chat | 100.88% ± 0.4% | 97.95% ± 0.1% |
有哪些著名演员是从百老汇开启他们的职业生涯的?
我如何提高我的时间管理技能?
@article{huang2023acegpt,
title={AceGPT, Localizing Large Language Models in Arabic},
author={Huang, Huang and Yu, Fei and Zhu, Jianqing and Sun, Xuening and Cheng, Hao and Song, Dingjie and Chen, Zhihong and Alharthi, Abdulmohsen and An, Bang and Liu, Ziche and others},
journal={arXiv preprint arXiv:2309.12053},
year={2023}
}推理:
from openmind import AutoTokenizer, AutoModelForCausalLM import openmind import torch import torch_npu import argparse
def parse_args(): parser = argparse.ArgumentParser() parser.add_argument( "--model_name_or_path", type=str, help="模型路径", default="LF_AICC/AceGPT-7B-chat", ) args = parser.parse_args() return args
args = parse_args() model = args.model_name_or_path
tokenizer = AutoTokenizer.from_pretrained(model) pipeline = openmind.pipeline( "text-generation", model=model, tokenizer=tokenizer, torch_dtype=torch.bfloat16, device_map="auto", ) sequences = pipeline( "<|im_start|>user\nP是否等于NP?<|im_end|>\n<|im_start|>assistant\n", max_length=256, do_sample=True, top_k=10, num_return_sequences=1, eos_token_id=tokenizer.eos_token_id, ) for seq in sequences: print(f"结果:{seq['generated_text']}")