Stéphanie Kamgnia Wonkap commited on
Commit
4a793d8
·
1 Parent(s): 0a78a57

fixing main

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -67,7 +67,7 @@ def main():
67
  embedding_model=init_embedding_model(EMBEDDING_MODEL_NAME)
68
 
69
  if os.path.exists(VECTORDB_PATH):
70
- new_vector_store = FAISS.load_local(
71
  VECTORDB_PATH, embedding_model,
72
  allow_dangerous_deserialization=True)
73
  else:
@@ -78,11 +78,11 @@ def main():
78
  if st.button("Get Answer"):
79
  # Get the answer and relevant documents
80
  bnb_config = BitsAndBytesConfig(
81
- load_in_8bit=True
82
- #load_in_4bit=True,
83
- #bnb_4bit_use_double_quant=True,
84
- #bnb_4bit_quant_type="nf4",
85
- #bnb_4bit_compute_dtype=torch.bfloat16,
86
  )
87
  model = AutoModelForCausalLM.from_pretrained(READER_MODEL_NAME, quantization_config=bnb_config,
88
  device_map = 'auto')
 
67
  embedding_model=init_embedding_model(EMBEDDING_MODEL_NAME)
68
 
69
  if os.path.exists(VECTORDB_PATH):
70
+ KNOWLEDGE_VECTOR_DATABASE = FAISS.load_local(
71
  VECTORDB_PATH, embedding_model,
72
  allow_dangerous_deserialization=True)
73
  else:
 
78
  if st.button("Get Answer"):
79
  # Get the answer and relevant documents
80
  bnb_config = BitsAndBytesConfig(
81
+ #load_in_8bit=True
82
+ load_in_4bit=True,
83
+ bnb_4bit_use_double_quant=True,
84
+ bnb_4bit_quant_type="nf4",
85
+ bnb_4bit_compute_dtype=torch.bfloat16,
86
  )
87
  model = AutoModelForCausalLM.from_pretrained(READER_MODEL_NAME, quantization_config=bnb_config,
88
  device_map = 'auto')