Skip to content

Commit

Permalink
misc
Browse files Browse the repository at this point in the history
  • Loading branch information
www committed Mar 19, 2023
1 parent 6d4dec7 commit 107f167
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 2 additions & 0 deletions RWKV-v4neo/src/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ def worker_seed():
magic_prime = 162165671
elif args.ctx_len == 4096:
magic_prime = 81082817
elif args.ctx_len == 8192:
magic_prime = 40541399
data = self.data_pile
else:
ii = ii // 2
Expand Down
10 changes: 4 additions & 6 deletions RWKV-v4neo/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,13 +166,11 @@
elif args.ctx_len == 4096:
args.magic_prime = 81082817
args.epoch_count = 2010
elif args.ctx_len == 8192:
args.magic_prime = 40541399
args.epoch_count = 1005
if args.my_pile_shift < 0:
if args.ctx_len == 1024:
args.my_pile_shift = 0
elif args.ctx_len == 2048:
args.my_pile_shift = 512
elif args.ctx_len == 4096:
args.my_pile_shift = 768
args.my_pile_shift = 0

if magic_prime_bak > 0:
args.magic_prime = magic_prime_bak
Expand Down

0 comments on commit 107f167

Please sign in to comment.