Merge pull request #793 from VeiledTee/patch-1
Browse files
README.md
CHANGED
@@ -237,7 +237,7 @@ rag = LightRAG(
|
|
237 |
|
238 |
* If you want to use Hugging Face models, you only need to set LightRAG as follows:
|
239 |
```python
|
240 |
-
from lightrag.llm import hf_model_complete,
|
241 |
from transformers import AutoModel, AutoTokenizer
|
242 |
from lightrag.utils import EmbeddingFunc
|
243 |
|
@@ -250,7 +250,7 @@ rag = LightRAG(
|
|
250 |
embedding_func=EmbeddingFunc(
|
251 |
embedding_dim=384,
|
252 |
max_token_size=5000,
|
253 |
-
func=lambda texts:
|
254 |
texts,
|
255 |
tokenizer=AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2"),
|
256 |
embed_model=AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
|
|
|
237 |
|
238 |
* If you want to use Hugging Face models, you only need to set LightRAG as follows:
|
239 |
```python
|
240 |
+
from lightrag.llm import hf_model_complete, hf_embed
|
241 |
from transformers import AutoModel, AutoTokenizer
|
242 |
from lightrag.utils import EmbeddingFunc
|
243 |
|
|
|
250 |
embedding_func=EmbeddingFunc(
|
251 |
embedding_dim=384,
|
252 |
max_token_size=5000,
|
253 |
+
func=lambda texts: hf_embed(
|
254 |
texts,
|
255 |
tokenizer=AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2"),
|
256 |
embed_model=AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
|