From d89387bec0c037724b3f4185946fe576d732d05a Mon Sep 17 00:00:00 2001 From: Trenton Holmes <797416+stumpylog@users.noreply.github.com> Date: Sat, 9 May 2026 14:38:33 -0700 Subject: [PATCH] Direct hugging face to cache into a persistent, writeable location --- src/paperless_ai/embedding.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/paperless_ai/embedding.py b/src/paperless_ai/embedding.py index 7fb594a97..e03ddae72 100644 --- a/src/paperless_ai/embedding.py +++ b/src/paperless_ai/embedding.py @@ -39,6 +39,7 @@ def get_embedding_model() -> "BaseEmbedding": return HuggingFaceEmbedding( model_name=config.llm_embedding_model or "sentence-transformers/all-MiniLM-L6-v2", + cache_folder=str(settings.DATA_DIR / "hf_cache"), ) case LLMEmbeddingBackend.OLLAMA: from llama_index.embeddings.ollama import OllamaEmbedding