allegro mod

This commit is contained in:
l.gabrysiak 2025-02-28 21:34:32 +01:00
parent b895fda3b0
commit 03faf77ee4
2 changed files with 4 additions and 4 deletions

View File

@ -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 = {

View File

@ -10,4 +10,5 @@ huggingface-hub>=0.16.4
numpy
peft
weaviate-client
sentence_transformers
sentence_transformers
faiss-gpu