Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ MAX_INPUT_TOKEN_LENGTH = int(os.getenv("MAX_INPUT_TOKEN_LENGTH", "8192"))
|
|
| 15 |
|
| 16 |
if torch.cuda.is_available():
|
| 17 |
model_id = "google/gemma-2-27b-it"
|
| 18 |
-
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.
|
| 19 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 20 |
|
| 21 |
|
|
|
|
| 15 |
|
| 16 |
if torch.cuda.is_available():
|
| 17 |
model_id = "google/gemma-2-27b-it"
|
| 18 |
+
model = AutoModelForCausalLM.from_pretrained(model_id, torch_dtype=torch.bfloat16, device_map="cuda")
|
| 19 |
tokenizer = AutoTokenizer.from_pretrained(model_id)
|
| 20 |
|
| 21 |
|