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

add support for nn.Linear layers in StandardParametrizator #277

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sapiosaturn
Copy link
Contributor

Hi,

I was training a small model using nn.Linear layers, since I had no immediate need for tensor parallel. This resulted in the following error (truncated):

[rank0]:   File "/root/nanotron/src/nanotron/scaling/parametrization.py", line 28, in parametrize
[rank0]:     raise Exception(f"Parameter {param_name} was not initialized")
[rank0]: Exception: Parameter weight was not initialized

I looked at the file and realized that the parameter initialization logic didn't have support for nn.Linear layers, so I added it myself. I thought I'd make a small PR in case anyone else runs into the same issue when just using nn.Linear layers at small/medium scale.

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

Successfully merging this pull request may close these issues.

1 participant