Giter Club home page Giter Club logo

gid_benchmark's Introduction

GID_benchmark

Official implementation of "Generalized Intent Discovery: Learning from Open World Dialogue System", COLING2022 main conference

Usage

Pretraining

You can use the ./run_pretrain.sh script for IND pretraining. For different settings, you need to slightly modify the parameters of the script.

Running pretraining on GID-SD (take GID-SD-60% as an example):

python main_pretrain.py \
    --dataset GID-SD \
    --data_dir dataset/GID_benchmark/ \
    --OOD_ratio 60 \
    --batch_size 256 \
    --gpus 1 \
    --precision 16 \
    --max_epochs 200 \
    --num_labeled_classes 31 \
    --num_unlabeled_classes 46 \
    --comment 31_46 \
    --offline \

Running pretraining on GID-MD (take GID-MD-60% as an example):

python main_pretrain.py \
    --dataset GID-MD \
    --data_dir dataset/GID_benchmark/ \
    --OOD_ratio 60 \
    --batch_size 256 \
    --gpus 1 \
    --precision 16 \
    --max_epochs 200 \
    --num_labeled_classes 60 \
    --num_unlabeled_classes 90 \
    --comment 60_90 \
    --offline \

Running pretraining on GID-CD (take GID-CD-60% as an example):

python main_pretrain.py \
   --dataset GID-CD \
   --data_dir dataset/GID_benchmark/ \
   --OOD_ratio 60 \
   --batch_size 256 \
   --gpus 1 \
   --precision 16 \
   --max_epochs 200 \
   --num_labeled_classes 60 \
   --num_unlabeled_classes 90 \
   --comment 60_90 \
   --offline \

Generalized Intent Discovery

You can use the ./run_discovery.sh script for end-to-end generalized intent discovery. For different settings, you need to slightly modify the parameters of the script.

Running generalized intent discovery on GID-SD (take GID-SD-20% as an example):

for s in 0
do
    python main_discover.py \
      --dataset GID-SD \
      --data_dir dataset/GID_benchmark/ \
      --OOD_ratio 20 \
      --batch_size 512 \
      --gpus 1 \
      --seed $s \
      --max_epochs 200 \
      --num_labeled_classes 62 \
      --num_unlabeled_classes 15 \
      --pretrained pretrain_checkpoints/pretrain-bert-base-uncased-GID-SD-62_15.cp \
      --num_heads 4 \
      --comment 62_15 \
      --precision 16 \
      --offline \

done

Running generalized intent discovery on GID-MD (take GID-MD-20% as an example):

for s in 0
do
    python main_discover.py \
      --dataset GID-MD \
      --data_dir dataset/GID_benchmark/ \
      --OOD_ratio 20 \
      --batch_size 512 \
      --gpus 1 \
      --seed $s \
      --max_epochs 200 \
      --num_labeled_classes 120 \
      --num_unlabeled_classes 30 \
      --pretrained pretrain_checkpoints/pretrain-bert-base-uncased-GID-MD-120_30.cp \
      --num_heads 4 \
      --comment 120_30 \
      --precision 16 \
      --offline \

done

Running generalized intent discovery on GID-CD (take GID-CD-20% as an example):

for s in 0
do
    python main_discover.py \
      --dataset GID-CD \
      --data_dir dataset/GID_benchmark/ \
      --OOD_ratio 20 \
      --batch_size 512 \
      --gpus 1 \
      --seed $s \
      --max_epochs 200 \
      --num_labeled_classes 120 \
      --num_unlabeled_classes 30 \
      --pretrained pretrain_checkpoints/pretrain-bert-base-uncased-GID-CD-120_30.cp \
      --num_heads 4 \
      --comment 120_30 \
      --precision 16 \
      --offline \

done

gid_benchmark's People

Contributors

myt517 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.