-
Notifications
You must be signed in to change notification settings - Fork 15.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HuggingFaceBgeEmbeddings Error, Please help! #10263
Comments
🤖 I'm sorry to hear about the issues you're experiencing after the recent update. Based on a similar issue I found in the LangChain repository, it seems like the Here's how you can refactor your code: from langchain.embeddings import SelfHostedHuggingFaceEmbeddings
import runhouse as rh
model_name = "BAAI/bge-large-en"
gpu = rh.cluster(name="rh-a10x", instance_type="A100:1")
embeddings = SelfHostedHuggingFaceEmbeddings(model_name=model_name, hardware=gpu)
news_instance = FAISS.load_local("federal_legislativeinstruments_inforce_index", embeddings)
data_state_nsw_legisation_index_instance = FAISS.load_local("data_indexes/federal/federal_legislativeinstruments_inforce_index", embeddings)
data_state_nsw_legisation_runner = RetrievalQA.from_chain_type(llm=ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0,
openai_api_key=openai_api_key_value),
chain_type="stuff",
retriever=data_state_nsw_legisation_index_instance.as_retriever()) Please ensure that you have the pip install runhouse I hope this helps! If you're still experiencing issues, could you please provide the specific error message you're getting? This will help me provide more targeted assistance. SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Thank you so much for helping us!!! We have refactored and getting this exception. Please help, and thank you so much 🙏
|
we had to install version langchain==0.0.279 to get it working. is it still supported? |
🤖 Hello, Thank you for reaching out and providing detailed information about the issue you're facing. From the traceback you provided, it seems like the In the latest version of LangChain, the Here is the relevant code: class SelfHostedHuggingFaceEmbeddings(SelfHostedEmbeddings):
model_id: str = DEFAULT_MODEL_NAME
"""Model name to use.""" And in the def __init__(self, **kwargs: Any):
"""Initialize the remote inference function."""
load_fn_kwargs = kwargs.pop("load_fn_kwargs", {})
load_fn_kwargs["model_id"] = load_fn_kwargs.get("model_id", DEFAULT_MODEL_NAME)
...
super().__init__(load_fn_kwargs=load_fn_kwargs, **kwargs) So, the 'model_name' parameter should be a string that represents the name of a valid model that can be loaded by the As for your question about the support for version langchain==0.0.279, while it might still work for your current needs, it's generally recommended to use the latest version of the library to benefit from the latest features and bug fixes. If you're still encountering issues after checking the Best regards. SourcesThis response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Working in 0.0.285! |
Hi, @bathroomhu, I'm helping the LangChain team manage their backlog and am marking this issue as stale. From what I understand, the issue was raised by you regarding a platform that went down after a language model update. The team attempted to load embeddings and use them for retrieval, encountering exceptions. After some troubleshooting and guidance from me, it was discovered that installing version langchain==0.0.279 resolved the issue, and confirmed that the issue was resolved in version 0.0.285. Could you please confirm if this issue is still relevant to the latest version of the LangChain repository? If it is, please let the LangChain team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you! |
System Info
Yesterday is works, someone accidentally update langchain now the whole platform is down.
We built the whole platform using his code all over the place. Now nothing works.
We have around 50 models. All our models are build like this and we just went live as a startup.
We are scrabbling here guys. Please help us.
`
from langchain.embeddings import HuggingFaceBgeEmbeddings
embeddings = HuggingFaceBgeEmbeddings(model_name="BAAI/bge-large-en")
news_instance = FAISS.load_local("federal_legislativeinstruments_inforce_index", embeddings)
data_state_nsw_legisation_index_instance = FAISS.load_local("data_indexes/federal/federal_legislativeinstruments_inforce_index", embeddings)
data_state_nsw_legisation_runner = RetrievalQA.from_chain_type(llm=ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0,
openai_api_key=openai_api_key_value),
chain_type="stuff",
retriever=data_state_nsw_legisation_index_instance.as_retriever())
`
Please, please help. How to we refactor so it works. How team is going crazy to get it live again, Our very first customers are ringing us complaining. Please help.
Who can help?
No response
Information
Related Components
Reproduction
from langchain.embeddings import HuggingFaceBgeEmbeddings
embeddings = HuggingFaceBgeEmbeddings(model_name="BAAI/bge-large-en")
news_instance = FAISS.load_local("federal_legislativeinstruments_inforce_index", embeddings)
data_state_nsw_legisation_index_instance = FAISS.load_local("data_indexes/federal/federal_legislativeinstruments_inforce_index", embeddings)
data_state_nsw_legisation_runner = RetrievalQA.from_chain_type(llm=ChatOpenAI(model_name="gpt-3.5-turbo", temperature=0,
openai_api_key=openai_api_key_value),
chain_type="stuff",
retriever=data_state_nsw_legisation_index_instance.as_retriever())
Expected behavior
How load the embedding like yesterday and all the time before.
The text was updated successfully, but these errors were encountered: