Spaces:
Runtime error
Runtime error
Anthony G
commited on
Commit
•
76c8687
1
Parent(s):
41637d6
removed quantization because no GPU :/
Browse files
app.py
CHANGED
@@ -17,19 +17,19 @@ SYSTEM_PROMPT = """Answer the following question truthfully.
|
|
17 |
USER_PROMPT = lambda x: f"""<HUMAN>: {x}\n<ASSISTANT>: """
|
18 |
ADD_RESPONSE = lambda x, y: f"""<HUMAN>: {x}\n<ASSISTANT>: {y}"""
|
19 |
|
20 |
-
bnb_config = BitsAndBytesConfig(
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
)
|
26 |
|
27 |
config = PeftConfig.from_pretrained(PEFT_MODEL)
|
28 |
|
29 |
peft_base_model = AutoModelForCausalLM.from_pretrained(
|
30 |
config.base_model_name_or_path,
|
31 |
return_dict=True,
|
32 |
-
quantization_config=bnb_config,
|
33 |
device_map="auto",
|
34 |
trust_remote_code=True,
|
35 |
)
|
|
|
17 |
USER_PROMPT = lambda x: f"""<HUMAN>: {x}\n<ASSISTANT>: """
|
18 |
ADD_RESPONSE = lambda x, y: f"""<HUMAN>: {x}\n<ASSISTANT>: {y}"""
|
19 |
|
20 |
+
# bnb_config = BitsAndBytesConfig(
|
21 |
+
# load_in_4bit=True,
|
22 |
+
# bnb_4bit_quant_type="nf4",
|
23 |
+
# bnb_4bit_use_double_quant=True,
|
24 |
+
# bnb_4bit_compute_dtype=torch.float16,
|
25 |
+
# )
|
26 |
|
27 |
config = PeftConfig.from_pretrained(PEFT_MODEL)
|
28 |
|
29 |
peft_base_model = AutoModelForCausalLM.from_pretrained(
|
30 |
config.base_model_name_or_path,
|
31 |
return_dict=True,
|
32 |
+
# quantization_config=bnb_config,
|
33 |
device_map="auto",
|
34 |
trust_remote_code=True,
|
35 |
)
|