🚀 UCCIX-Llama2-13B-Instruct模型卡片
UCCIX-Llama2-13B-Instruct大语言模型(LLM)是一个爱尔兰语 - 英语双语模型,能够理解这两种语言,并且在爱尔兰语任务上的表现优于许多更大的模型。
该模型基于Llama 2 - 13B构建,通过扩展词汇表以包含爱尔兰语原生标记,并在我们收集的约5.2亿个爱尔兰语标记(可在https://huggingface.co/datasets/ReliableAI/Irish - Text - Collection获取)上进行了额外的持续预训练。
随后,我们进行了有监督的指令微调,以增强模型有效遵循人类指令的能力。
UCCIX是开发首个基于爱尔兰语的开源大语言模型的开创性尝试。你可以在https://arxiv.org/abs/2405.13010找到更多详细信息。
立即与模型进行实时交互: https://aine.chat
🚀 快速开始
运行模型
指令格式
必须严格遵守此格式,否则模型将生成不理想的输出。
用于为该指令模型构建提示的模板定义如下:
### Instruction:
{system_prompt}
### Input:
{instruction1}
### Response:
{respone1}
### Input:
{instruction2}
### Response:
{respone2}
使用transformers库运行模型:
from transformers import AutoModelForCausalLM, AutoTokenizer
import torch
model_id = "ReliableAI/UCCIX-Llama2-13B-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id,
device_map="auto",
dtype=torch.float16
)
model.eval()
def make_prompt(system_prompt, instruction):
return f"""### Instruction:
{system_prompt}
### Input:
{instruction}
### Response:
"""
user_input = "Do you know about CloudCIX?"
SYSTEM_PROMPT = "You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe."
input_prompt = make_prompt(SYSTEM_PROMPT, user_input)
input_ids = tokenizer(input_prompt, return_tensors="pt")["input_ids"]
generated_token_ids = model.generate(
inputs=input_ids,
max_new_tokens=100,
do_sample=True,
temperature=0.6,
top_p=1,
)[0]
generated_text = tokenizer.decode(generated_token_ids)
✨ 主要特性
- 双语能力:支持爱尔兰语和英语,能理解并处理这两种语言的任务。
- 性能优越:在爱尔兰语任务上表现出色,超越许多更大的模型。
- 创新尝试:是首个基于爱尔兰语的开源大语言模型的开创性成果。
📦 模型信息
属性 |
详情 |
基础模型 |
ReliableAI/UCCIX-Llama2-13B |
训练数据集 |
ReliableAI/Irish-Text-Collection |
支持语言 |
英语、爱尔兰语 |
许可证 |
apache-2.0 |
任务类型 |
文本生成 |
⚠️ 注意事项
作为一项开创性的尝试,UCCIX模型目前没有任何审核机制。我们期待与社区合作,完善模型对限制条件的遵循,以便在需要审核输出的场景中使用。
📄 引用信息
@misc{tran2024uccix,
title={UCCIX: Irish-eXcellence Large Language Model},
author={Khanh-Tung Tran and Barry O'Sullivan and Hoang D. Nguyen},
year={2024},
eprint={2405.13010},
archivePrefix={arXiv},
primaryClass={cs.CL}
}