🚀 Labess-7b-chat模型
Labess-7b-chat是一个针对突尼斯方言进行指令调优的开源模型。它基于jais-adapted-7b-chat
模型,使用突尼斯方言数据集进行持续预训练,为处理突尼斯方言相关的文本任务提供了强大的支持。
🚀 快速开始
安装依赖
首先,你需要安装transformers
库,可使用以下命令进行安装:
pip install transformers
运行模型
以下是一个快速运行模型的代码示例:
import torch
from transformers import pipeline
pipe = pipeline(
"text-generation",
model="linagora/Labess-7b-chat-16bit",
model_kwargs={"torch_dtype": torch.bfloat16},
device="cuda"
)
messages = [
{"role": "user", "content": 'وين تجي تونس؟'},
]
outputs = pipe(messages, max_new_tokens=64, do_sample=True, temperature=0.2)
assistant_response = outputs[0]["generated_text"][-1]["content"].strip()
print(assistant_response)
运行上述代码后,模型的回复如下:
- Response:تونس هي بلاد في شمال إفريقيا هي بلاد جميلة برشة ومعروفة في العالم الكل هي بلاد فيها مناظر طبيعية
✨ 主要特性
- 针对性调优:专门针对突尼斯方言进行指令调优,能更好地处理该方言相关的文本任务。
- 持续预训练:基于
jais-adapted-7b-chat
模型进行持续预训练,融合了突尼斯方言数据集的知识。
📦 安装指南
安装transformers
库是运行该模型的必要步骤,可使用以下命令完成安装:
pip install transformers
💻 使用示例
基础用法
import torch
from transformers import pipeline
pipe = pipeline(
"text-generation",
model="linagora/Labess-7b-chat-16bit",
model_kwargs={"torch_dtype": torch.bfloat16},
device="cuda"
)
messages = [
{"role": "user", "content": 'وين تجي تونس؟'},
]
outputs = pipe(messages, max_new_tokens=64, do_sample=True, temperature=0.2)
assistant_response = outputs[0]["generated_text"][-1]["content"].strip()
print(assistant_response)
📚 详细文档
模型信息
属性 |
详情 |
基础模型 |
inceptionai/jais-adapted-7b-chat |
支持语言 |
阿拉伯语(突尼斯方言) |
许可证 |
apache-2.0 |
标签 |
text-generation-inference、transformers、unsloth、llama、trl |
数据集 |
linagora/Tunisian_Derja_Dataset |
库名称 |
transformers |
模型开发信息
- 开发者:Linagora
- 许可证:apache-2.0
- 微调基础模型:inceptionai/jais-adapted-7b-chat
📄 许可证
本模型使用apache-2.0
许可证。
📚 引用说明
当使用此模型 Labess-7b-chat 时,请按以下格式进行引用:
@model{linagora2025LLM-tn,
author = {Wajdi Ghezaiel and Jean-Pierre Lorré},
title = {Labess-7b-chat:Tunisian Derja LLM},
year = {2025},
month = {January},
url = {https://huggingface.co/datasets/Wajdi1976/Labess-7b-chat}
}
