summaryrefslogtreecommitdiff
path: root/llmc/cmd/debug
diff options
context:
space:
mode:
authorJonas Knobloch <jonas.knobloch@t-online.de>2026-04-24 11:49:26 +0200
committerJonas Knobloch <jonas.knobloch@t-online.de>2026-04-24 11:50:02 +0200
commit12f15fdd8c048e5958e294f12a9f163f6f950b3e (patch)
tree16bb23c134f1fe476d977dd846e6dda6c7667c48 /llmc/cmd/debug
parent408536516bdfedc93d93226dc08280ed224361fc (diff)
Recover tokenization based on config
Diffstat (limited to 'llmc/cmd/debug')
-rw-r--r--llmc/cmd/debug/debug.go5
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)