From 96439b392a9df2e61305c7c6e8ba92a8ce796e2b Mon Sep 17 00:00:00 2001 From: Daulet Zhanguzin Date: Mon, 4 Nov 2024 17:28:46 -0800 Subject: [PATCH] fix: cache path has to be model specific --- tokenizer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tokenizer.go b/tokenizer.go index 17d2277..4c33576 100644 --- a/tokenizer.go +++ b/tokenizer.go @@ -128,7 +128,7 @@ func FromPretrained(modelID string, opts ...TokenizerConfigOption) (*Tokenizer, // Determine the download directory var downloadDir string if cfg.cacheDir != nil { - downloadDir = *cfg.cacheDir + downloadDir = fmt.Sprintf("%s/%s", *cfg.cacheDir, modelID) // Create the destination directory if it doesn't exist err := os.MkdirAll(downloadDir, os.ModePerm) if err != nil {