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

enable flexible emb init #220

Merged
merged 6 commits into from
Mar 10, 2023
Merged

enable flexible emb init #220

merged 6 commits into from
Mar 10, 2023

Conversation

vchiley
Copy link
Contributor

@vchiley vchiley commented Mar 9, 2023

allows user to init embed layer more flexibly.

eg: setting emb_init_std: 1 will override init_fn_ to init embed layer using normal distribution with mean=0 and std=1
(this is what the PaLM paper does; Sec 5 Weight initialization)

@vchiley vchiley self-assigned this Mar 9, 2023
@vchiley vchiley requested a review from dakinggg March 9, 2023 20:34
Copy link
Collaborator

@dakinggg dakinggg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, would be good to add a basic test, like if you set the things to 0, you get the expected warning and the embedding layers is 0s. to at least exercise the new code paths

@vchiley vchiley enabled auto-merge (squash) March 10, 2023 17:41
@vchiley vchiley disabled auto-merge March 10, 2023 17:41
@vchiley vchiley merged commit 65656dd into mosaicml:main Mar 10, 2023
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.

2 participants