yoyo-yun / PLoRA

[AAAI‘24] The official PyTorch implimentation of our AAAI 2024 paper: Personalized LoRA for Human-Centered Text Understanding

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Personalized LoRA for Human-Centered Text Understanding

images

Installation

  1. download datasets from here:

    dataset IMDB YELP GDRD PPR
    original link Link Link Link Link

    and organize data as follows:

    |--$corpus
    |  |-- imdb2
    |  |  | a
    |  |  | b
    |  |-- yelp2
    |  |  | a
    |  |  | b
    |  |-- gdrd
    |  |  | a
    |  |  | b
    |  |-- ppr
    |  |  | a
    |  |  | b
    
  2. install required packages:

    pip install -r requirement.txt

Training and Evaluating

  1. config with configuration files:

    |--$cfgs
    |  |-- {Model}_model.yml # configurations for each base model
    |  |-- config.py # configurations for running settings
    |  |-- constants # constant configurations
    
  2. training and evaluating on full-shot scenario (e.g., IMDB datasets)

    python run.py --run train --version test_fullshot --gpu 0 --dataset imdb2a --model bert
  3. training and evaluating on few-shot scenario (e.g., IMDB datasets)

    python run.py --run fewshot --version test_fewshot --gpu 0 --dataset imdb2b --model bert
  4. evaluating on zero-shot scenario (e.g., IMDB datasets)

    python run.py --run zeroshot --version test_zeroshot --gpu 0 --dataset imdb2b --model bert

Citation

awaiting update.

About

[AAAI‘24] The official PyTorch implimentation of our AAAI 2024 paper: Personalized LoRA for Human-Centered Text Understanding


Languages

Language:Python 100.0%