From 875d18d80fc74c7d1b424f1963e80c5d34f96fc5 Mon Sep 17 00:00:00 2001 From: Ethan Heavey <65369063+VeiledTee@users.noreply.github.com> Date: Sat, 15 Feb 2025 12:51:24 -0400 Subject: [PATCH] Update HuggingFace example in README.md Replaced "hf_embedding" with "hf_embed" in HuggingFace example to match implementation --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 62f21a65..ad9ad819 100644 --- a/README.md +++ b/README.md @@ -237,7 +237,7 @@ rag = LightRAG( * If you want to use Hugging Face models, you only need to set LightRAG as follows: ```python -from lightrag.llm import hf_model_complete, hf_embedding +from lightrag.llm import hf_model_complete, hf_embed from transformers import AutoModel, AutoTokenizer from lightrag.utils import EmbeddingFunc @@ -250,7 +250,7 @@ rag = LightRAG( embedding_func=EmbeddingFunc( embedding_dim=384, max_token_size=5000, - func=lambda texts: hf_embedding( + func=lambda texts: hf_embed( texts, tokenizer=AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2"), embed_model=AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")