Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Layers that are never used in ByteLatentTransformer class #28

Open
isayoften opened this issue Jan 19, 2025 · 2 comments
Open

Layers that are never used in ByteLatentTransformer class #28

isayoften opened this issue Jan 19, 2025 · 2 comments

Comments

@isayoften
Copy link

Hello! Please check this line :

self.layers = nn.ModuleList(

Image

It seems that these layers are here by mistake. All transformerblocks are defined inside the local and global parts. There is no self.layers in the forward at all also

@isayoften
Copy link
Author

The same question about:

self.tok_embeddings = torch.nn.Embedding(args.vocab_size, args.dim)

and:
self.output = nn.Linear(args.dim, args.vocab_size, bias=False)

because we already have tok_embeds and unembeds in encoder and decoder:

self.tok_embeddings = nn.Embedding(self.vocab_size, args.dim)

self.output = nn.Linear(

@isayoften
Copy link
Author

Also, we initialise tok_embeds twice because of super() call in the decoder:

super().__init__(args)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant