djl

Resource Caches

DJL uses cache directories to store downloaded models and Engine specific native files. By default, cache directories are located at current user’s home directory:

In the current version, DJL will not clean obsolete cache automatically in the current version. User can clean up unused model or native engine manually.

Users may need change cache directory location in some cases. For example, sometimes users may have limited access to this directory (Read Only) or user’s home directory doesn’t have enough disk space. To avoid downloading failures in these situations, users can specify a custom location to use instead:

Other cache folders

ONNXRuntime

ONNXRuntime will extract native libraries into system default temporary-file directory.

Huggingface tokenizer

If the HF_HOME or HF_HUB_CACHE environment variable is set, Huggingface tokenizer will store cache files in it. It is the responsibility of the user to make sure this path is correct. Otherwise, we try to use the default cache directory as defined for each OS: