Skip to content

More consistent variable naming - #103

Open
vwxyzjn wants to merge 2 commits into
karpathy:masterfrom
vwxyzjn:var-name
Open

More consistent variable naming#103
vwxyzjn wants to merge 2 commits into
karpathy:masterfrom
vwxyzjn:var-name

Conversation

@vwxyzjn

@vwxyzjn vwxyzjn commented Jan 10, 2023

Copy link
Copy Markdown

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