You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling the T5-Base Model model via the FX path, the following error is encountered. Note the model can be pre-traced using the HuggingFace symbolic tracer (Pre-Traced / NOT Pre-Traced below).
NOT Pre-Traced torch_tensorrt.fx.compile(model, is_aten=True,...)
Initialize three input tensors, for example: torch.randint(0, 1, (1, 14), dtype=torch.int32).to("cuda") ("input_ids", "attention_mask", "decoder_input_ids")
(Optional) Use the transformers tools to trace the model via: transformers.utils.fx.symbolic_trace(model, input_names=["input_ids", "attention_mask", "decoder_input_ids"])
Bug Description
When compiling the T5-Base Model model via the FX path, the following error is encountered. Note the model can be pre-traced using the HuggingFace symbolic tracer (Pre-Traced / NOT Pre-Traced below).
NOT Pre-Traced torch_tensorrt.fx.compile(model, is_aten=True,...)
Pre-Traced torch_tensorrt.fx.compile(model, is_aten=True,...)
Pre-Traced torch_tensorrt.fx.compile(model, is_aten=True,...) + PR #1708
To Reproduce
Steps to reproduce the behavior:
T5Model.from_pretrained("t5-base").eval().cuda()
torch.randint(0, 1, (1, 14), dtype=torch.int32).to("cuda")
("input_ids", "attention_mask", "decoder_input_ids")transformers
tools to trace the model via:transformers.utils.fx.symbolic_trace(model, input_names=["input_ids", "attention_mask", "decoder_input_ids"])
Expected behavior
Model should compile via the FX path
Environment
python setup.py develop
The text was updated successfully, but these errors were encountered: