Spaces:
Running
on
Zero
Running
on
Zero
Daemontatox
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ from transformers import (
|
|
20 |
)
|
21 |
|
22 |
# Configuration Constants
|
23 |
-
MODEL_ID = "Daemontatox/
|
24 |
|
25 |
|
26 |
# Understand]: Analyze the question to identify key details and clarify the goal.
|
@@ -139,9 +139,9 @@ h3 {
|
|
139 |
def initialize_model():
|
140 |
"""Initialize the model with appropriate configurations"""
|
141 |
quantization_config = BitsAndBytesConfig(
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
)
|
146 |
|
147 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
|
@@ -153,7 +153,7 @@ def initialize_model():
|
|
153 |
torch_dtype=torch.float16,
|
154 |
device_map="cuda",
|
155 |
attn_implementation="flash_attention_2",
|
156 |
-
|
157 |
|
158 |
)
|
159 |
|
|
|
20 |
)
|
21 |
|
22 |
# Configuration Constants
|
23 |
+
MODEL_ID = "Daemontatox/PathFinderAi3.0"
|
24 |
|
25 |
|
26 |
# Understand]: Analyze the question to identify key details and clarify the goal.
|
|
|
139 |
def initialize_model():
|
140 |
"""Initialize the model with appropriate configurations"""
|
141 |
quantization_config = BitsAndBytesConfig(
|
142 |
+
load_in_4bit=True,
|
143 |
+
bnb_4bit_compute_dtype=torch.bfloat16,
|
144 |
+
bnb_4bit_use_double_quant=True
|
145 |
)
|
146 |
|
147 |
tokenizer = AutoTokenizer.from_pretrained(MODEL_ID)
|
|
|
153 |
torch_dtype=torch.float16,
|
154 |
device_map="cuda",
|
155 |
attn_implementation="flash_attention_2",
|
156 |
+
quantization_config=quantization_config
|
157 |
|
158 |
)
|
159 |
|