🚀 Open-Assistant CodeLlama 13B SFT v10
本模型是Open-Assistant对Meta的CodeLlama 13B大语言模型进行微调后的产物。它能够为用户提供更符合特定需求的语言交互服务,在代码处理等相关场景中具有一定优势。
⚠️ 重要提示
由于新的RoPE Theta值(从1e4变为1e6),若要获得正确结果,你必须使用trust_remote_code=True
加载此模型,或者使用Huggingface transformers的最新主分支(直到4.33版本发布)。
📚 详细文档
模型详情
提示/提示模板
由于公众需求(参见调查),我们将此模型的提示模板从自定义的提示器/助手标记改为OpenAI的chatml标准提示格式。我们希望这能提高与聊天推理/前端应用程序的兼容性。
提示对话模板
"""
<|im_start|>system
{system_message}<|im_end|>
<|im_start|>user
{prompt}<|im_end|>
<|im_start|>assistant
"""
模型输入可以包含用户和助手之间的多轮对话,例如:
<|im_start|>user
{prompt 1}<|im_end|>
<|im_start|>assistant
{reply 1}<|im_end|>
<|im_start|>user
{prompt 2}<|im_end|>
<|im_start|>assistant
(...)
该模型部分使用orca系统消息进行训练。推理时,我们建议使用官方的Llama2系统消息:
<|im_start|>system
You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
<|im_end|>
致谢与特别感谢
伦理考量与局限性
截至目前,测试仅使用英语进行,且无法涵盖所有场景。因此,与所有大语言模型一样,无法提前预测codellama-13b-oasst-sft-v10的潜在输出,该模型在某些情况下可能会对用户提示产生不准确、有偏见或其他令人反感的回复。所以,在部署codellama-13b-oasst-sft-v10的任何应用之前,开发者应针对模型的特定应用进行安全测试和调整。
请参阅Meta的负责任使用指南。
配置详情
用于对数据混合进行分词的“预分词器”工具是Open-Assistant GitHub仓库的一部分,可在此处找到:model/pretokenizer。
预分词器配置
orca_megacode_oasst_best:
datasets:
- orca-chat:
val_split: 0.01
max_val_set: 1000
- bestofmegacode:
val_split: 0.01
max_val_set: 1000
- oasst_export:
lang: "bg,ca,cs,da,de,en,es,fr,hr,hu,it,nl,pl,pt,ro,ru,sl,sr,sv,uk"
#hf_dataset_name: OpenAssistant/oasst1
input_file_path: 2023-08-25_oasst_ready.jsonl.gz
top_k: 1
val_split: 0.025
output_dir: "output/orca_megacode_oasst_best"
filename_prefix: "orca_megacode_oasst_best"
min_assistant_tokens: 1