Skip to content

Commit

Permalink
add peft
Browse files Browse the repository at this point in the history
  • Loading branch information
zhansu committed Aug 16, 2023
1 parent 2362156 commit d0474f8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ click
rich
ray
shortuuid
peft
9 changes: 8 additions & 1 deletion tests/test_poly.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
import torch
from pytorch_lightning import seed_everything
from transformers import AutoTokenizer
import sys

# add parent directory to path
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

from mttl.models.encoder_decoder import EncoderDecoder
from mttl.config import Config

Expand All @@ -19,7 +24,9 @@ def test_poly(tmp_path):
_args.learning_rate = 1e-3

seed_everything(0)
model = EncoderDecoder(**vars(_args), tokenizer=AutoTokenizer.from_pretrained(_args.model))
model = EncoderDecoder(
**vars(_args), tokenizer=AutoTokenizer.from_pretrained(_args.model)
)

seed_everything(0)
batch = {
Expand Down

0 comments on commit d0474f8

Please sign in to comment.