I’m using the Hugging Face Sentence Transformer embeddings model in my RAG-based chatbot, but when trying to deploy it on Vercel/Render, I get an error stating that the data is too large and out of memory on Render. What causes the data to be large? Is it the model? How can I resolve this issue?
Error in Render:
embeddings = HuggingFaceEmbeddings(model_name=”all-MiniLM-L6-v2″)
==> Out of memory (used over 512Mi)
==> Common ways to troubleshoot your deploy: https://render.com/docs/troubleshooting-deploys
==> Running ‘python app.py’
/opt/render/project/src/chatbot.py:2: LangChainDeprecationWarning: Importing FAISS from langchain.vectorstores is deprecated. Please replace deprecated imports:
from langchain.vectorstores import FAISS
with new imports of:
from langchain_community.vectorstores import FAISS
You can use the langchain cli to automatically upgrade many imports. Please see documentation here https://python.langchain.com/docs/versions/v0_2/
from langchain.vectorstores import FAISS
/opt/render/project/src/document_handler.py:3: LangChainDeprecationWarning: Importing FAISS from langchain.vectorstores is deprecated. Please replace deprecated imports:
from langchain.vectorstores import FAISS
with new imports of:
from langchain_community.vectorstores import FAISS
You can use the langchain cli to automatically upgrade many imports. Please see documentation here https://python.langchain.com/docs/versions/v0_2/
from langchain.vectorstores import FAISS
/opt/render/project/src/document_handler.py:18: LangChainDeprecationWarning: The classHuggingFaceEmbeddings
was deprecated in LangChain 0.2.2 and will be removed in 1.0. An updated version of the class exists in the :class:~langchain-huggingface package and should be used instead. To use it run
pip install -U :class:~langchain-huggingface
and import asfrom :class:
~langchain_huggingface import HuggingFaceEmbeddings“.
embeddings = HuggingFaceEmbeddings(model_name=”all-MiniLM-L6-v2″)
==> Deploying…
Error in Vercel:
Running “vercel build”
Vercel CLI 39.1.3
WARN! Due to builds
existing in your configuration file, the Build and Development Settings defined in your Project Settings will not apply. Learn More: https://vercel.link/unused-build-settings
Installing required dependencies…
Build Completed in /vercel/output [3m]
Deploying outputs…
Failed to process build result for “app.py”. Data: {“type”:”Lambda”}.
Error: data is too long
Kiran Bhairava is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.