Spaces:
Sleeping
Sleeping
Stéphanie Kamgnia Wonkap
commited on
Commit
•
368eef9
1
Parent(s):
139ea2c
fixing import and devive map
Browse files
app.py
CHANGED
@@ -83,7 +83,8 @@ def main():
|
|
83 |
bnb_4bit_quant_type="nf4",
|
84 |
bnb_4bit_compute_dtype=torch.bfloat16,
|
85 |
)
|
86 |
-
model = AutoModelForCausalLM.from_pretrained(READER_MODEL_NAME, quantization_config=bnb_config
|
|
|
87 |
tokenizer = AutoTokenizer.from_pretrained(READER_MODEL_NAME)
|
88 |
|
89 |
READER_LLM = pipeline(
|
|
|
83 |
bnb_4bit_quant_type="nf4",
|
84 |
bnb_4bit_compute_dtype=torch.bfloat16,
|
85 |
)
|
86 |
+
model = AutoModelForCausalLM.from_pretrained(READER_MODEL_NAME, quantization_config=bnb_config,
|
87 |
+
device_map = 'auto')
|
88 |
tokenizer = AutoTokenizer.from_pretrained(READER_MODEL_NAME)
|
89 |
|
90 |
READER_LLM = pipeline(
|