Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -28,9 +28,9 @@ CSS = """
|
|
28 |
model = AutoModelForCausalLM.from_pretrained(
|
29 |
"THUDM/LongWriter-glm4-9b",
|
30 |
torch_dtype=torch.bfloat16,
|
31 |
-
|
32 |
trust_remote_code=True,
|
33 |
-
).
|
34 |
|
35 |
tokenizer = AutoTokenizer.from_pretrained("THUDM/LongWriter-glm4-9b",trust_remote_code=True)
|
36 |
|
|
|
28 |
model = AutoModelForCausalLM.from_pretrained(
|
29 |
"THUDM/LongWriter-glm4-9b",
|
30 |
torch_dtype=torch.bfloat16,
|
31 |
+
device_map="auto",
|
32 |
trust_remote_code=True,
|
33 |
+
).eval()
|
34 |
|
35 |
tokenizer = AutoTokenizer.from_pretrained("THUDM/LongWriter-glm4-9b",trust_remote_code=True)
|
36 |
|