diff options
| author | Jonas Knobloch <jonas.knobloch@t-online.de> | 2026-04-24 11:49:26 +0200 |
|---|---|---|
| committer | Jonas Knobloch <jonas.knobloch@t-online.de> | 2026-04-24 11:50:02 +0200 |
| commit | 12f15fdd8c048e5958e294f12a9f163f6f950b3e (patch) | |
| tree | 16bb23c134f1fe476d977dd846e6dda6c7667c48 /llmc/cmd/debug/debug.go | |
| parent | 408536516bdfedc93d93226dc08280ed224361fc (diff) | |
Recover tokenization based on config
Diffstat (limited to 'llmc/cmd/debug/debug.go')
| -rw-r--r-- | llmc/cmd/debug/debug.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llmc/cmd/debug/debug.go b/llmc/cmd/debug/debug.go index d1a621a..f076949 100644 --- a/llmc/cmd/debug/debug.go +++ b/llmc/cmd/debug/debug.go @@ -16,7 +16,10 @@ func main() { _ = must(llmc.Deserialize(shelf.Abs("llmc/tinyshakespeare/tiny_shakespeare_train.bin"), &data)) _ = must(llmc.Deserialize(shelf.Abs("test/llmc/tinyshakespeare/tiny_shakespeare_train.bin"), &gold)) - t := must(bpe.NewTokenizerFromFiles(shelf.Abs("models/gpt2/vocab.json"), shelf.Abs("models/gpt2/merges.txt"))) + v := shelf.Abs("models/gpt2/vocab.json") + m := shelf.Abs("models/gpt2/merges.txt") + + t := must(bpe.NewTokenizerFromFiles(v, m, bpe.DefaultConfig())) itoa := bpe.Itoa(t) |
