Spaces:
Sleeping
Sleeping
torch.compile()
Browse files
app.py
CHANGED
@@ -17,6 +17,7 @@ model_name = "google/madlad400-3b-mt"
|
|
17 |
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)
|
18 |
model = AutoModelForSeq2SeqLM.from_pretrained(
|
19 |
model_name, device_map="auto", torch_dtype=torch.float16)
|
|
|
20 |
|
21 |
#
|
22 |
# Translate given input text in given target language
|
|
|
17 |
tokenizer = AutoTokenizer.from_pretrained(model_name, use_fast=True)
|
18 |
model = AutoModelForSeq2SeqLM.from_pretrained(
|
19 |
model_name, device_map="auto", torch_dtype=torch.float16)
|
20 |
+
model = torch.compile(model)
|
21 |
|
22 |
#
|
23 |
# Translate given input text in given target language
|