Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -88,8 +88,9 @@ def load_model_and_tokenizer(doc_text_count):
|
|
88 |
# Load the pre-trained model with quantization
|
89 |
model = AutoModelForCausalLM.from_pretrained(
|
90 |
model_name,
|
91 |
-
|
92 |
-
|
|
|
93 |
,token=HF_TOKEN
|
94 |
)
|
95 |
|
|
|
88 |
# Load the pre-trained model with quantization
|
89 |
model = AutoModelForCausalLM.from_pretrained(
|
90 |
model_name,
|
91 |
+
torch_dtype=torch.float16 if torch.cuda.is_available() else torch.float32,
|
92 |
+
device_map="auto",
|
93 |
+
trust_remote_code=True
|
94 |
,token=HF_TOKEN
|
95 |
)
|
96 |
|