Skip to content

Commit

Permalink
update max_legn initialization in model
Browse files Browse the repository at this point in the history
  • Loading branch information
jshuadvd committed Jun 14, 2024
1 parent aa5b4b7 commit def4bf1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ def __init__(self, d_model, n_heads, num_layers, vocab_size, max_len):
self.n_heads = n_heads
self.num_layers = num_layers
self.vocab_size = vocab_size
self.max_len = max_len
self.embedding = nn.Embedding(vocab_size, d_model)
self.rope = RoPEPositionalEncoding(d_model, max_len)
self.transformers = nn.ModuleList(
Expand Down
1 change: 1 addition & 0 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from torch.nn.utils.rnn import pad_sequence
import gzip
from transformers import GPT2Tokenizer
from datasets import load_dataset
from importlib import reload
import src.main
from accelerate import Accelerator
Expand Down

0 comments on commit def4bf1

Please sign in to comment.