update README.md

This commit is contained in:
LarFii
2024-10-15 21:23:03 +08:00
parent 756133512e
commit 7409668f9f

View File

@@ -86,9 +86,16 @@ rag = LightRAG(
working_dir=WORKING_DIR, working_dir=WORKING_DIR,
llm_model_func=hf_model_complete, # Use Hugging Face complete model for text generation llm_model_func=hf_model_complete, # Use Hugging Face complete model for text generation
llm_model_name='meta-llama/Llama-3.1-8B-Instruct', # Model name from Hugging Face llm_model_name='meta-llama/Llama-3.1-8B-Instruct', # Model name from Hugging Face
embedding_func=hf_embedding, # Use Hugging Face embedding function # Use Hugging Face embedding function
tokenizer=AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2"), embedding_func=EmbeddingFunc(
embed_model=AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2") embedding_dim=384,
max_token_size=5000,
func=lambda texts: hf_embedding(
texts,
tokenizer=AutoTokenizer.from_pretrained("sentence-transformers/all-MiniLM-L6-v2"),
embed_model=AutoModel.from_pretrained("sentence-transformers/all-MiniLM-L6-v2")
)
),
) )
``` ```
### Batch Insert ### Batch Insert