Update app.py
Browse files
app.py
CHANGED
@@ -39,9 +39,9 @@ def create_llm():
|
|
39 |
"""Initialize the language model with optimized parameters"""
|
40 |
|
41 |
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
|
46 |
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME,
|
47 |
# quantization_config=bnb_config
|
|
|
39 |
"""Initialize the language model with optimized parameters"""
|
40 |
|
41 |
|
42 |
+
bnb_config = BitsAndBytesConfig(
|
43 |
+
load_in_4bit=True, bnb_4bit_use_double_quant=True, bnb_4bit_quant_type="nf4", bnb_4bit_compute_dtype=torch.bfloat16
|
44 |
+
)
|
45 |
|
46 |
model = AutoModelForCausalLM.from_pretrained(MODEL_NAME,
|
47 |
# quantization_config=bnb_config
|