Skip to content

Commit

Permalink
fix v6
Browse files Browse the repository at this point in the history
  • Loading branch information
JL-er committed Mar 14, 2024
1 parent 6d42247 commit c03cdbb
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__pycache__/
Binary file modified src/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file modified src/__pycache__/binidx.cpython-310.pyc
Binary file not shown.
Binary file modified src/__pycache__/dataset.cpython-310.pyc
Binary file not shown.
Binary file modified src/__pycache__/model.cpython-310.pyc
Binary file not shown.
Binary file modified src/__pycache__/trainer.cpython-310.pyc
Binary file not shown.
Binary file modified src/__pycache__/utils.cpython-310.pyc
Binary file not shown.
5 changes: 3 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,6 @@
args.vocab_size = train_data.vocab_size

from src.model import RWKV, LORA_CONFIG, LoraLinear
model = RWKV(args)

if args.lora:
assert args.lora_r > 0, "LoRA should have its `r` > 0"
LORA_CONFIG["r"] = args.lora_r
Expand All @@ -267,6 +265,9 @@
LORA_CONFIG["parts"] = set(str(args.lora_parts).split(','))
enable_time_finetune = 'time' in LORA_CONFIG["parts"]
enable_ln_finetune = 'ln' in LORA_CONFIG["parts"]
model = RWKV(args)

if args.lora:
model.requires_grad_(False)
for name, module in model.named_modules():

Expand Down

0 comments on commit c03cdbb

Please sign in to comment.