Skip to content

ke-01/Trigger3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Implementation of Trigger3

This is the implementation of the paper "Trigger3: Refining Query Correction via Adaptive Model Selector" based on PyTorch.

Dataset

Check folder dataset for details.

Satisfy the requirements

Because the base model environment conflicts, you need to check it according to the requirements in the corresponding folder.

# e.g. GECToR
conda create -n GECToR python=3.8
conda activate GECToR
pip install -r requirements_gector.txt

Train and evaluate our framework:

Traditional correction models

# GECToR
sh model/GECToR/train_gector.sh

# BART
sh model/BART/train_bart.sh

# mT5
sh model/mT5/train_mt5.sh

Check folder model/GECToR, model/BART, model/mT5 for details.

LLMs

The fine-tuing process of LLMs is based on the open-sourced LLaMA-Factory.

The Qwen1.5-7b-chat and Baichuan2-7b-chat can be downloaded from huggingface.

# Qwen
sh model/LLaMA-Factory/sft_qwen.sh

# Baichuan
sh model/LLaMA-Factory/sft_baichuan.sh

Check folder model/LLaMA-Factory for details.

Trigger

# train dataset construct
sh ChERRANT/qq_train_trigger_char.sh
sh ChERRANT/qq_train_trigger_data_construct.sh

# train
sh model/Trigger/train_trigger.sh

Check folder model/Trigger for details.

Inference

sh model/Trigger/Trigger3.sh

Check folder model/Trigger for details.

Test

sh ChERRANT/qq_test.sh

Reference Repositories

MuCGEC

LLaMA-Factory

Environments

We conducted the experiments based on the following environments:

  • CUDA Version: 11.8
  • OS: Ubuntu 18.04.4 LTS
  • GPU: The NVIDIA Tesla V100 GPUs
  • CPU: Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors