Update app.py
Browse files
app.py
CHANGED
@@ -29,18 +29,18 @@ index = VectorStoreIndex.from_vector_store(vector_store, embed_model=embed_model
|
|
29 |
# Load the correct tokenizer and LLM
|
30 |
from transformers import AutoTokenizer
|
31 |
|
32 |
-
quantization_config = BitsAndBytesConfig(
|
33 |
-
|
34 |
-
|
35 |
-
)
|
36 |
|
37 |
llm = HuggingFaceLLM(
|
38 |
model_name="microsoft/phi-1_5", # Mały model 1.3B
|
39 |
tokenizer=AutoTokenizer.from_pretrained("microsoft/phi-1_5"),
|
40 |
-
device_map="auto"
|
41 |
-
model_kwargs={
|
42 |
-
|
43 |
-
}
|
44 |
)
|
45 |
|
46 |
#Query Engine
|
|
|
29 |
# Load the correct tokenizer and LLM
|
30 |
from transformers import AutoTokenizer
|
31 |
|
32 |
+
# quantization_config = BitsAndBytesConfig(
|
33 |
+
# load_in_4bit=True,
|
34 |
+
# bnb_4bit_compute_dtype="float16"
|
35 |
+
# )
|
36 |
|
37 |
llm = HuggingFaceLLM(
|
38 |
model_name="microsoft/phi-1_5", # Mały model 1.3B
|
39 |
tokenizer=AutoTokenizer.from_pretrained("microsoft/phi-1_5"),
|
40 |
+
device_map="auto"
|
41 |
+
# model_kwargs={
|
42 |
+
# "quantization_config": quantization_config,
|
43 |
+
# }
|
44 |
)
|
45 |
|
46 |
#Query Engine
|