RUCAIBox / TextBox

TextBox 2.0 is a text generation library with pre-trained language models
https://github.com/RUCAIBox/TextBox
MIT License
1.08k stars 117 forks source link

[🐛BUG] The bug of T5 using prefix-tuning #331

Closed luoyetingqiu closed 1 year ago

luoyetingqiu commented 1 year ago

Describe the bug AttributeError: 'GPT2LMHeadModel' object has no attribute 'set_efficient_tuning'

When I use efficient_methods:

python run_textbox.py \ --model=T5 \ --model_path=t5-large \ --dataset=webnlg \ --gpu_id=4 \ --efficient_methods=[\'prefix-tuning\'] \ --efficient_kwargs={\'prefix_length\':\ 100,\ \'prefix_dropout\':\ 0.1,\ \'prefix_mid_dim\':\ 512} \ --filename CP/T5_large_prefix_tuning

StevenTang1998 commented 1 year ago

You need to install our Transformers following the instruction. Or using pip install git+https://github.com/RUCAIBox/transformers.git