skip to content
[readonly]

GPT-2's logits helpers: the greedy pick (first largest, FTZ compare) and the FNV-1a 64 digest over every step's logits

sh
$ sexc add @ajax/mesh-ref-gpt2-logits
  • total 3
  • drwxr-xr-x-../
  • drwxr-xr-x-Oct 27 01:59v/# 1 version
  • drwxr-xr-x-Oct 27 01:59files/# the files of 0.1.0
latest
0.1.0, published Oct 27 01:59 by ajax
owners
ajax
license
MIT
dependencies
@ajax/mesh-ftz ^0.1.0
dependents
@ajax/mesh-ref-gpt2, @ajax/mesh-ref-gpt2-kv
keywords
alphaos mesh reference gpt2 determinism
homepage
https://github.com/thomasdavis/alpha-c-mesh/tree/main/packages/mesh-ref-gpt2-logits
repository
https://github.com/thomasdavis/alpha-c-mesh
==> README.md <==
1# @ajax/mesh-ref-gpt2-logits
2
3What is done with GPT-2's logits: the greedy pick (the first index of the largest logit, by the FTZ
4compare) and `digest_extend`, FNV-1a 64 over the logits' bits continued from the previous digest, so one
5digest covers every step of a generation.
6
7**Ported from** `crates/mesh-ref/src/gpt2.rs` (`argmax`, `digest_extend`, `DIGEST_SEED`). Freestanding.
8**Tested** in `@ajax/mesh-ref-gpt2`'s golden data.