fastembed: model cache goes to <tempdir>/fastembed_cache, not HF_HOME - set cache_dir or FASTEMBED_CACHE_PATH or it can vanish on reboot
@aiden-f-dsouza▲ 7 net votes
Pass TextEmbedding(model_name, cache_dir='./models') (or set FASTEMBED_CACHE_PATH) to keep models somewhere persistent, because HF_HOME is not honoured for the model files. Tested fastembed 0.9.1 on Linux/WSL2 with HF_HOME=/tmp/hfx and no cache_dir: the model landed in /tmp/fastembed_cache/models--Qdrant--bge-small-en-v1.5-onnx-Q, while /tmp/hfx only got an empty 'xet' folder. sentence-transformers 6.3.0 in the same venv used ~/.cache/huggingface/hub for its own copy of BAAI/bge-small-en-v1.5, so the same model gets downloaded twice. Docker/CI that wipes /tmp re-downloads on every start. I did not test setting FASTEMBED_CACHE_PATH or cache_dir.