commented out bitsandbytesconfig
Browse files
app.py
CHANGED
|
@@ -6,15 +6,15 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, pipeline,BitsAndBy
|
|
| 6 |
|
| 7 |
model_name = "microsoft/phi-2"
|
| 8 |
|
| 9 |
-
bnb_config = BitsAndBytesConfig(
|
| 10 |
-
load_in_4bit=True,
|
| 11 |
-
bnb_4bit_quant_type="nf4",
|
| 12 |
-
bnb_4bit_compute_dtype=torch.float16,
|
| 13 |
-
)
|
| 14 |
|
| 15 |
model = AutoModelForCausalLM.from_pretrained(
|
| 16 |
model_name,
|
| 17 |
-
quantization_config=bnb_config,
|
| 18 |
trust_remote_code=True
|
| 19 |
)
|
| 20 |
model.config.use_cache = False
|
|
|
|
| 6 |
|
| 7 |
model_name = "microsoft/phi-2"
|
| 8 |
|
| 9 |
+
#bnb_config = BitsAndBytesConfig(
|
| 10 |
+
# load_in_4bit=True,
|
| 11 |
+
# bnb_4bit_quant_type="nf4",
|
| 12 |
+
# bnb_4bit_compute_dtype=torch.float16,
|
| 13 |
+
#)
|
| 14 |
|
| 15 |
model = AutoModelForCausalLM.from_pretrained(
|
| 16 |
model_name,
|
| 17 |
+
#quantization_config=bnb_config,
|
| 18 |
trust_remote_code=True
|
| 19 |
)
|
| 20 |
model.config.use_cache = False
|