CoLA任务RL训练代码库
[English|中文]
本仓库主要聚焦于利用Qwen3
系列模型,通过强化学习(Reinforcement Learning
, RL
)技术,完成GLUE
基准中的CoLA
(Corpus of Linguistic Acceptability
)子任务的句子可接受性分类。代码实现了数据预处理、模型训练和评估全流程,方便快速上手与复现相关研究。
[25/06/22]完成数据处理流程、模型GRPO
训练脚本(基于verl
框架)和文档编写
- 对比指标Matthews相关系数(MCC)
- 提示词:
prompt = """
Decide whether the following sentence is grammatically acceptable or not. If it is grammatically correct, answer "acceptable". If not, answer "unacceptable". Only output "acceptable" or "unacceptable", and do not output any other information.
Sentence: {sentence}
Your answer:
"""
Model | Shot Setting | 验证集 | 测试集(kaggle) |
---|---|---|---|
Qwen3-0.6B | zero-shot | 0.223 | 待测试 |
DeepSeek V3 0324 | zero-shot | 0.726 | 待测试 |
DeepSeek R1 0120 | zero-shot | 0.636 | 待测试 |
Tip
参阅文档。
- 从魔搭社区或Huggingface下载
Qwen3
系列模型到model
文件夹下。
- 修改脚本
run_grpo_qwen3_0.6b.sh
,修改wandb api key
、工作目录和训练GPU
编号。 - 启动训练:
bash run_grpo_qwen3_0.6b.sh
- 对比不同RL算法对CoLA分类的效果。
- 对比不同参数量模型对CoLA分类的效果。
- 上传
wandb
报告。