Didier commited on
Commit
e5f3f0b
·
verified ·
1 Parent(s): 8089a80

torch.compile()

Browse files
Files changed (1) hide show
  1. app.py +1 -0
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