Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -33,21 +33,21 @@ books_db = Chroma(persist_directory="./pdf_db", embedding_function=embeddings)
|
|
33 |
books_db_client = books_db.as_retriever()
|
34 |
|
35 |
# Initialize the model and tokenizer
|
36 |
-
model_name = "
|
37 |
|
38 |
-
bnb_config = transformers.BitsAndBytesConfig(
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
)
|
44 |
|
45 |
model_config = transformers.AutoConfig.from_pretrained(model_name, max_new_tokens=1024)
|
46 |
model = transformers.AutoModelForCausalLM.from_pretrained(
|
47 |
model_name,
|
48 |
trust_remote_code=True,
|
49 |
config=model_config,
|
50 |
-
quantization_config=bnb_config,
|
51 |
device_map=device,
|
52 |
)
|
53 |
|
|
|
33 |
books_db_client = books_db.as_retriever()
|
34 |
|
35 |
# Initialize the model and tokenizer
|
36 |
+
model_name = "nltpt/Llama-3.2-3B-Instruct"
|
37 |
|
38 |
+
# bnb_config = transformers.BitsAndBytesConfig(
|
39 |
+
# load_in_4bit=True,
|
40 |
+
# bnb_4bit_quant_type='nf4',
|
41 |
+
# bnb_4bit_use_double_quant=True,
|
42 |
+
# bnb_4bit_compute_dtype=torch.bfloat16
|
43 |
+
# )
|
44 |
|
45 |
model_config = transformers.AutoConfig.from_pretrained(model_name, max_new_tokens=1024)
|
46 |
model = transformers.AutoModelForCausalLM.from_pretrained(
|
47 |
model_name,
|
48 |
trust_remote_code=True,
|
49 |
config=model_config,
|
50 |
+
# quantization_config=bnb_config,
|
51 |
device_map=device,
|
52 |
)
|
53 |
|