Class TrainSmallGPTWithBPE

java.lang.Object
io.github.kirstenali.deepj.examples.TrainSmallGPTWithBPE

public final class TrainSmallGPTWithBPE extends Object
Example: tiny GPT training on a small text file using a BPE tokenizer.

Differences from the byte-level example:

  • A BPE model is trained from the corpus before GPT training begins.
  • The tokenizer is saved to disk so it can be reloaded alongside the model weights.
  • GPT vocab size is set from the BPE vocab rather than the fixed 256-byte vocab.
  • Constructor Details

    • TrainSmallGPTWithBPE

      public TrainSmallGPTWithBPE()
  • Method Details