/Ali_Ecom_Search_Contest_2021

阿里问天搜索比赛

Primary LanguageJupyter Notebook

“阿里灵杰”问天引擎电商搜索算法赛 SimCSE版本BaseLine

使用SimCSE有监督版本的问天搜索算法赛BaseLine,无困难负样本。

SimCSE版本BaseLine Python 3.8.12

初始提交 0.244

比赛地址:https://tianchi.aliyun.com/competition/entrance/531946/introduction

文件构成

1.data_process.py --- 数据预处理(因为给出的数据列数发生过改变,这里可能要注意一下编号问题 需要对应数据修改一下)

2.train.py --- 训练主程序

3.get_embedding.py --- 生成对应的embedding文件

4.tar.sh 压缩脚本

run_sup_example.sh 训练脚本

./models.py 模型文件

./trainers.py 训练主程序

./data/* 训练数据(训练数据放置在这个文件夹下)

执行顺序

1.data_precess.py ---> run_sup_example.sh ---> 3.get_embedding.py ---> 4.tar.sh

提交记录

需要把max_seq_length改小一点 bs=32爆内存 bs=16跑通,0.232分数,排名120

0403提交:1.改用RobertaForCL 2.存储best Checkpoint 3.打开了pooler开关 4.写死128到mlp部分

References

[1] SimCSE: Simple Contrastive Learning of Sentence Embeddings Tianyu Gao*, Xingcheng Yao*, Danqi Chen. In EMNLP 2021

[2] https://github.com/princeton-nlp/SimCSE