allegro mod
This commit is contained in:
parent
b895fda3b0
commit
03faf77ee4
|
|
@ -5,7 +5,6 @@ from weaviate.connect import ConnectionParams
|
|||
import weaviate
|
||||
|
||||
import torch
|
||||
import faiss
|
||||
import numpy as np
|
||||
from sentence_transformers import SentenceTransformer
|
||||
from datasets import Dataset
|
||||
|
|
@ -47,8 +46,8 @@ documents = fetch_documents()
|
|||
embeddings = embed_model.encode(documents)
|
||||
|
||||
dim = embeddings.shape[1]
|
||||
index = faiss.IndexFlatL2(dim)
|
||||
index.add(np.array(embeddings, dtype=np.float32))
|
||||
#index = faiss.IndexFlatL2(dim)
|
||||
#index.add(np.array(embeddings, dtype=np.float32))
|
||||
|
||||
def create_training_data():
|
||||
data = {
|
||||
|
|
|
|||
|
|
@ -10,4 +10,5 @@ huggingface-hub>=0.16.4
|
|||
numpy
|
||||
peft
|
||||
weaviate-client
|
||||
sentence_transformers
|
||||
sentence_transformers
|
||||
faiss-gpu
|
||||
Loading…
Reference in New Issue