典型痛点
直接使用BERT等预训练模型处理多源异构数据时,存在文本长度差异大、噪声多等问题影响分类效果。
Optimization solutions
- 动态分词:
- 对数学类数据设置
max_length=256
- 对小红书短文本启用
truncation='only_first'
- 对数学类数据设置
- 噪声过滤:
- 使用数据集自带的category字段进行样本加权
- pass (a bill or inspection etc)
texthero.preprocessing.remove_digits
清理数字噪声
- 增强表示:
- 在BERT最后一层后添加领域适配层(DomainAdaptation)
- 对知乎长文本采用
MaxPooling
substitute forCLS
be tactful
Practice Recommendations
Recommended Usedatasets.DatasetDict
划分训练/验证集时,保持8:1:1比例,验证集应覆盖所有数据类别(math/logic/general)。
This answer comes from the articleChinese based full-blooded DeepSeek-R1 distillation dataset, supports Chinese R1 distillation SFT datasetThe