Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

namyoungkim
Copy link
Contributor

[Title] HuggingFace Embeddings
[Version] initial
[Language] ENG
[Package] langchain_huggingface, langsmith, torch, numpy, scikit-learn

This tutorial demonstrates building a simple text embedding-based search system using LangChain HuggingFace.

Text Embedding Models Used:

  • multilingual-e5-large-instruct: A multilingual instruction-based embedding model.
  • multilingual-e5-large: A powerful multilingual embedding model.
  • bge-m3: Optimized for large-scale text processing.

[Title] HuggingFace Embeddings
[Version] initial
[Language] ENG
[Package] langchain_huggingface, langsmith, torch, numpy, scikit-learn

This tutorial demonstrates building a simple text embedding-based search system using LangChain HuggingFace.

Text Embedding Models Used:
- multilingual-e5-large-instruct: A multilingual instruction-based embedding model.
- multilingual-e5-large: A powerful multilingual embedding model.
- bge-m3: Optimized for large-scale text processing.
@namyoungkim namyoungkim changed the title [Team] New content development teams 3 [N-2] 08-EMBEDDING / 03-HuggingFaceEmbeddings Jan 1, 2025
@LEE1026icarus
Copy link
Contributor

%%time

Embed the query and documents using the embedding model

embedded_query = hf_endpoint_embeddings.embed_query(q)
embedded_documents = hf_endpoint_embeddings.embed_documents(docs)

HfHubHTTPError: 429 Client Error: Too Many Requests for url: https://api-inference.huggingface.co/pipeline/feature-extraction/intfloat/multilingual-e5-large-instruct (Request ID: Q9VFE7-wlqppQoJN6_o7y)

Please log in or use a HF access token

윗 코드를 실행시키면
아래 오류가 계속 발생하는데 원인이 무엇인지 아시나요..?

@namyoungkim
Copy link
Contributor Author

@LEE1026icarus
안녕하세요, api key를 제대로 읽어오지 못한 에러네요
아래와 같이 override=True를 추가하면 잘 됩니다!

from dotenv import load_dotenv

load_dotenv(override=True)

코드에 반영하겠습니다!

acho98
acho98 previously approved these changes Jan 3, 2025
Copy link
Contributor

@acho98 acho98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Review OS(Windows/Mac/Linux): Mac
  2. Template Rule 가이드를 준수 하였는가(YES/NO): YES
  3. Table of Contents 의 링크가 원활하게 동작하는지 확인하였는가?(YES/NO): YES
  4. 이미지가 포함되어 있다면, 이미지의 파일명이 가이드를 준수하였는가?(YES/NO):YES
  5. import 구문이 예전 legacy 방식이 아닌 최신 버전을 따르는가?(YES/NO):YES
  6. 모든 코드가 동작에 오류 없이 동작하는가? (만약, warning 발생시 코멘트에 적어주세요):YES
  7. 기타 의견: 고생하셨습니다.

LEE1026icarus
LEE1026icarus previously approved these changes Jan 3, 2025
Copy link
Contributor

@LEE1026icarus LEE1026icarus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Review OS(Windows/Mac/Linux): Window
  2. Template Rule 가이드를 준수 하였는가(YES/NO): YES
  3. Table of Contents 의 링크가 원활하게 동작하는지 확인하였는가?(YES/NO): YES
  4. 이미지가 포함되어 있다면, 이미지의 파일명이 가이드를 준수하였는가?(YES/NO):YES
  5. import 구문이 예전 legacy 방식이 아닌 최신 버전을 따르는가?(YES/NO):YES
  6. 모든 코드가 동작에 오류 없이 동작하는가? (만약, warning 발생시 코멘트에 적어주세요):YES
  7. 기타 의견: 고생하셨습니다.

@namyoungkim namyoungkim dismissed stale reviews from LEE1026icarus and acho98 via 8289229 January 3, 2025 10:44
@namyoungkim
Copy link
Contributor Author

@acho98 @LEE1026icarus
병길님, 순형님 안녕하세요
poetry.lock 파일의 주석이 일치하지 않아서 main 브랜치와 충돌을 일으켜서 해당 부분 수정을 했더니 리뷰 완료 버튼을 한번 더 눌러야 하네요 ㅜㅜ

번거로우시겠지만 리뷰 완료 버튼 한번 더 클릭 부탁드리겠습니다.🙇‍♂️
( 주석만 수정하였고, 다른 부분은 수정하지 않았습니다)

@teddylee777
Copy link
Contributor

@namyoungkim 님 고생하셨습니다.

현재 file changed 에 .gitignore 파일과 poetry.lock 파일이 포함되어 있습니다.
이 파일은 인프라에서만 관리하고 있으며, 다음 PR 때는 반영되지 않도록 해주시면 감사드리겠습니다!

@teddylee777 teddylee777 merged commit 7f201b4 into LangChain-OpenTutorial:main Jan 3, 2025
1 check failed
Copy link
Contributor

@acho98 acho98 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants