Skip to content

Instantly share code, notes, and snippets.

@Green-Sky
Created June 30, 2023 18:36
Show Gist options
  • Save Green-Sky/59b5918800de6b6e8c3ea8984817bac6 to your computer and use it in GitHub Desktop.
Save Green-Sky/59b5918800de6b6e8c3ea8984817bac6 to your computer and use it in GitHub Desktop.
struct Header {
u32 magic;
u32 version;
u32 n_vocab;
u32 n_embd;
u32 n_mult;
u32 n_head;
u32 n_layer;
u32 n_rot;
u32 ftype;
};
Header header @0x00;
struct Token {
u32 tok_size;
char string[tok_size];
float score;
};
Token tokens[header.n_vocab] @ 0x00 + sizeof(header);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment