So erstellen Sie eine Einbettung für ein 4-Bit-quantisiertes Lama3-Modell mithilfe von Huggingface und LangchainPython

Python-Programme
Anonymous
 So erstellen Sie eine Einbettung für ein 4-Bit-quantisiertes Lama3-Modell mithilfe von Huggingface und Langchain

Post by Anonymous »

Ich versuche, einen Rag mit Longchain und Huggingface zu machen,

Code: Select all

from langchain_huggingface import HuggingFaceEmbeddings

model_name = "unsloth/llama-3-8b-Instruct-bnb-4bit"
model_kwargs = {'device': device}
encode_kwargs = {'normalize_embeddings': False}
hf = HuggingFaceEmbeddings(
model_name=model_name,
model_kwargs=model_kwargs,
encode_kwargs=encode_kwargs
)
...
vectorstore = Chroma.from_documents(documents=splits, embedding=hf)
Allerdings erhalte ich beim Erstellen der HF die Fehlermeldung „ValueError: Supplied state dict for Layers.0.mlp.down_proj.weight does not contains bitsandbytes__* and möglicherweise other quantized_stats Components“.
Wie soll ich das korrigieren? Vielen Dank

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post