Expand description
ESM3 VQ-VAE structure token encoder and decoder (vqvae.py port).
StructureTokenEncoder maps backbone coordinates to discrete structure
tokens. It is a local encoder: for every residue it runs a 2-layer
geometric transformer over that residue’s 16 nearest neighbours in space,
then quantizes the query node’s output against a 4096-entry VQ codebook
(ferritin-100.22).
StructureTokenDecoder is stubbed (not needed for ESM3 inference).
Structs§
- Structure
Token Decoder - Stub for the structure token decoder. Not needed for ESM3 inference.
- Structure
Token Encoder - Encodes backbone coordinates into discrete structure tokens via a 2-layer geometric mini-transformer followed by nearest-neighbour VQ codebook lookup.
- VqVae
Config
Constants§
- KNN
- Neighbours per residue in the structure encoder’s local graph.