Giter Site home page Giter Site logo

gaic_track3_pair_sim's Introduction

gaic_track3_pair_sim

全球人工智能技术创新大赛-赛道三-冠军方案

比赛主页

https://tianchi.aliyun.com/competition/entrance/531851/introduction

数据

本项目没有提供数据,如果需要数据,请到天池比赛主页下载

预训练模型准备

  • 下载预训练模型
  • 预训练模型开源仓库
  • 下载并解压, 解压到文件夹 data, 文件夹结构如下:
    data/
    └── official_model
        └── download
            ├── chinese-bert-wwm-ext
            │   ├── added_tokens.json
            │   ├── config.json
            │   ├── pytorch_model.bin
            │   ├── special_tokens_map.json
            │   ├── tokenizer_config.json
            │   └── vocab.txt
            ├── chinese-roberta-wwm-ext-large
            │   ├── config.json
            │   ├── pytorch_model.bin
            │   ├── special_tokens_map.json
            │   ├── tokenizer.json
            │   ├── tokenizer_config.json
            │   └── vocab.txt
            ├── macbert-base
            │   ├── added_tokens.json
            │   ├── config.json
            │   ├── pytorch_model.bin
            │   ├── special_tokens_map.json
            │   ├── tokenizer.json
            │   ├── tokenizer_config.json
            │   └── vocab.txt
            ├── macbert-large
            │   ├── added_tokens.json
            │   ├── config.json
            │   ├── pytorch_model.bin
            │   ├── special_tokens_map.json
            │   ├── tokenizer.json
            │   ├── tokenizer_config.json
            │   └── vocab.txt
            ├── mixed_corpus_bert_base_model.bin
            ├── mixed_corpus_bert_large_model.bin
            └── nezha-cn-base
                ├── bert_config.json
                ├── pytorch_model.bin
                └── vocab.txt
    
  • 预训练模型md5

环境准备

  • torch==1.7.0
  • transformers=4.3.0.rc1
  • simpletransformers==0.51.15
  • TensorRT-7.2.1.6

端到端训练脚本

cd code
bash ./run.sh

不同版本方案

  • 方案一: 预训练(多个模型) + finetune-分类(多个模型) + 生成软标签 + 训练regression模型(软标签,单模型)

    cd code
    bash ./train.sh
    

    初赛使用的该方案,初赛成绩为0.9220;

  • 方案二: 预训练(多个模型) + 加载预训练参数,初始化一个大模型 + 训练分类模型(单模型)

    pipeline/pipeline_b.py
    

    训练一个144层模型(6 * 12 + 24 * 3);

    该模型单模型在复赛A榜成绩0.9561;推理平均时间15ms;

  • 方案三: 预训练(多个模型) + finetune-分类(多个模型) + 平均融合

    pipeline/pipeline_d.py
    

    融合6个bert-base + 3个bert-large模型;

    该模型在复赛A榜没测试,B榜成绩0.9593;推理平均时间15ms;

gaic_track3_pair_sim's People

Contributors

nilboy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.