Skip to content

Commit

Permalink
fix: cache path has to be model specific
Browse files Browse the repository at this point in the history
  • Loading branch information
daulet committed Nov 5, 2024
1 parent 53ff61b commit 96439b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tokenizer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 96439b3

Please sign in to comment.