jianzhnie / LLamaTuner

Easy and Efficient Finetuning LLMs. (Supported LLama, LLama2, LLama3, Qwen, Baichuan, GLM , Falcon) 大模型高效量化训练+部署.
https://jianzhnie.github.io/llmtech/
Apache License 2.0
547 stars 60 forks source link

不同样式的样本对应什么样的情形,如何根据自己的需求选择样本的样式 #101

Open lixiaoxiangzhi opened 7 months ago

lixiaoxiangzhi commented 7 months ago

选择哪一种方法进行数据预处理,处理得到的结果不同。

# 格式1
# return {
#     'input_ids': input_ids,
#     'attention_mask': attention_mask,
#     'labels': labels,
#     'target_mask': target_mask
# }
# 格式2
# return {'input_ids': input_ids, 'labels': labels}