-
- Downloads
Hugging Face Inference API (#8098)
* Added first pass of Hugging Face Inference API wrapper
* Added first pass of testing for HuggingFaceInferenceAPI
* Added support for message history in chat
* Added test_chat and fixed conversational_output_to_chat_response
* Added validate_supported function to check if a model is loaded
* Populated completion function using text_generation, with test
* Added CHANGELOG entry
* Added links to task pages on Hugging Face
* Added embedding capability to Hugging Face Inference API
* Added LLM and embedding to __init__/__all__, alphabetizing __all__
* Split up Hugging Face Inference API's embeddings to a subclass
* Moved Pooling to embeddings/utils.py
* Added sentence on TGI backend to class docstring
* Implemented LLMMetadata using pass-through Fields
* Added helper function to get ModelInfo
* Moved embed_documents to use 1+ single-text queries instead of 1 multiple-text query
* Fixed pydantic ForwardRef error in embeddings __init__.py
* Moved embeddings to use asyncio, and updated tests to match
* Added max new tokens to completion
* Comment tweaks when looking over the PR
* Removed conversational_output_to_chat_response helper since it's just indirection
* Moved pooling from embeddings/utils.py to embeddings/pooling.py
* Using langchain.bridge for Embeddings import
* Moved default pooling to CLS pooling
* Revert embeddings/utils.py
* Cleaned up conditionals within huggingface_utils
* Moved from LangChain Embeddings to LlamaIndex BaseEmbedding
* Expanded huggingface_utils formatting to allow None model_name
* Added test of embeddings serialization, to confirm mixin of BaseEmbeddings plays nice with pydantic
* clean doc
* minor update
---------
Co-authored-by:
Simon Suo <simonsdsuo@gmail.com>
Showing
- CHANGELOG.md 5 additions, 0 deletionsCHANGELOG.md
- llama_index/embeddings/__init__.py 17 additions, 11 deletionsllama_index/embeddings/__init__.py
- llama_index/embeddings/huggingface.py 117 additions, 2 deletionsllama_index/embeddings/huggingface.py
- llama_index/embeddings/huggingface_utils.py 11 additions, 9 deletionsllama_index/embeddings/huggingface_utils.py
- llama_index/embeddings/pooling.py 31 additions, 0 deletionsllama_index/embeddings/pooling.py
- llama_index/llms/__init__.py 2 additions, 1 deletionllama_index/llms/__init__.py
- llama_index/llms/huggingface.py 246 additions, 2 deletionsllama_index/llms/huggingface.py
- tests/embeddings/test_huggingface.py 73 additions, 0 deletionstests/embeddings/test_huggingface.py
- tests/llms/test_huggingface.py 83 additions, 0 deletionstests/llms/test_huggingface.py
Loading
Please register or sign in to comment