Spaces:
Sleeping
Sleeping
Stéphanie Kamgnia Wonkap
commited on
Commit
•
df89c31
1
Parent(s):
71da9d1
requirement
Browse files- app.py +5 -4
- requirements.txt +6 -4
app.py
CHANGED
@@ -78,10 +78,11 @@ def main():
|
|
78 |
if st.button("Get Answer"):
|
79 |
# Get the answer and relevant documents
|
80 |
bnb_config = BitsAndBytesConfig(
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
|
|
85 |
)
|
86 |
model = AutoModelForCausalLM.from_pretrained(READER_MODEL_NAME, quantization_config=bnb_config,
|
87 |
device_map = 'auto')
|
|
|
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')
|
requirements.txt
CHANGED
@@ -13,7 +13,9 @@ sentence_transformers==2.7.0
|
|
13 |
torch
|
14 |
#==2.5.0+cu121
|
15 |
tqdm==4.66.6
|
16 |
-
|
17 |
-
transformers==4.30
|
18 |
-
bitsandbytes
|
19 |
-
accelerate
|
|
|
|
|
|
13 |
torch
|
14 |
#==2.5.0+cu121
|
15 |
tqdm==4.66.6
|
16 |
+
transformers==4.44.2
|
17 |
+
#transformers==4.30
|
18 |
+
bitsandbytes>=0.39.0
|
19 |
+
accelerate
|
20 |
+
faiss-cpu==1.9.0
|
21 |
+
faiss-gpu==1.7.2
|