Update app.py
Browse files
app.py
CHANGED
@@ -86,7 +86,12 @@ class BasicModel:
|
|
86 |
# )
|
87 |
|
88 |
# Download the model weights to the local machine and build the pipeline
|
89 |
-
quantization_config = BitsAndBytesConfig(
|
|
|
|
|
|
|
|
|
|
|
90 |
tok = AutoTokenizer.from_pretrained(model_id, token=hf_token)
|
91 |
mod = AutoModelForCausalLM.from_pretrained(
|
92 |
model_id,
|
|
|
86 |
# )
|
87 |
|
88 |
# Download the model weights to the local machine and build the pipeline
|
89 |
+
quantization_config = BitsAndBytesConfig(
|
90 |
+
load_in_4bit=True,
|
91 |
+
bnb_4bit_quant_type="nf4",
|
92 |
+
bnb_4bit_compute_dtype=torch.float16,
|
93 |
+
bnb_4bit_use_double_quant=True,
|
94 |
+
)
|
95 |
tok = AutoTokenizer.from_pretrained(model_id, token=hf_token)
|
96 |
mod = AutoModelForCausalLM.from_pretrained(
|
97 |
model_id,
|