Upload app1.py
Browse files
app1.py
CHANGED
|
@@ -10,7 +10,7 @@ import re
|
|
| 10 |
# Load model and tokenizer
|
| 11 |
tokenizer = AutoTokenizer.from_pretrained('GSAI-ML/LLaDA-8B-Instruct', trust_remote_code=True)
|
| 12 |
model = LLaDAModelLM.from_pretrained('GSAI-ML/LLaDA-8B-Instruct', trust_remote_code=True,
|
| 13 |
-
torch_dtype=torch.
|
| 14 |
|
| 15 |
device = next(iter(model.parameters())).device.type
|
| 16 |
print(f"Using device: {device}")
|
|
|
|
| 10 |
# Load model and tokenizer
|
| 11 |
tokenizer = AutoTokenizer.from_pretrained('GSAI-ML/LLaDA-8B-Instruct', trust_remote_code=True)
|
| 12 |
model = LLaDAModelLM.from_pretrained('GSAI-ML/LLaDA-8B-Instruct', trust_remote_code=True,
|
| 13 |
+
torch_dtype=torch.float16, device_map = 'auto')
|
| 14 |
|
| 15 |
device = next(iter(model.parameters())).device.type
|
| 16 |
print(f"Using device: {device}")
|