Spaces:
Runtime error
Runtime error
Update inference.py
Browse files- inference.py +6 -6
inference.py
CHANGED
@@ -3,15 +3,15 @@ from transformers import AutoModelForCausalLM, AutoTokenizer, BitsAndBytesConfig
|
|
3 |
|
4 |
model_name = "model/"
|
5 |
|
6 |
-
bnb_config = BitsAndBytesConfig(
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
)
|
11 |
|
12 |
model = AutoModelForCausalLM.from_pretrained(
|
13 |
model_name,
|
14 |
-
quantization_config=bnb_config,
|
15 |
trust_remote_code=True
|
16 |
)
|
17 |
model.config.use_cache = False
|
|
|
3 |
|
4 |
model_name = "model/"
|
5 |
|
6 |
+
# bnb_config = BitsAndBytesConfig(
|
7 |
+
# load_in_4bit=True,
|
8 |
+
# bnb_4bit_quant_type="nf4",
|
9 |
+
# bnb_4bit_compute_dtype=torch.float16,
|
10 |
+
# )
|
11 |
|
12 |
model = AutoModelForCausalLM.from_pretrained(
|
13 |
model_name,
|
14 |
+
# quantization_config=bnb_config,
|
15 |
trust_remote_code=True
|
16 |
)
|
17 |
model.config.use_cache = False
|