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

More consistent variable naming #103

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

vwxyzjn
Copy link

@vwxyzjn vwxyzjn commented Jan 10, 2023

Hi @karpathy this is such an awesome repo. I was implementing it from scratch using JAX and learned quite a bit :)

This PR proposes a more consistent naming convention.

  • n_embd -> embd_dim, since we are really splitting the embd_dim into separate heads, which have their own head_dim
  • C // self.n_head -> head_dim to give a better name
  • hs -> hd, to unify naming from "head size" to "head dim", which connects nicely with embd_dm
  • att -> attn for consistency
  • tok_emb -> tok_embd for consistency with using embd as an abbreviation for embedding
  • pos_emb -> pos_embd for consistency with using embd as an abbreviation for embedding

@vwxyzjn vwxyzjn changed the title Var name More consistent variable naming Jan 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.

1 participant