compile a model using scripting #819
Replies: 3 comments
-
Haven't tried it João, but could this have something to do with it:
From the Known Issues section of |
Beta Was this translation helpful? Give feedback.
-
@joaomsimoes were you able to figure this out? |
Beta Was this translation helpful? Give feedback.
-
@joaomsimoes
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
Has anyone tried to compile the model using TorchScript?
If I try:
model = whisper.load_model("small.en")
scripted_model = torch.jit.script(model)
Gives me:
RuntimeError: 'Tensor' object has no attribute or method '_conv_forward'.: File "E:\hodl-out\nlp_venv\lib\site-packages\whisper\model.py", line 43 def _conv_forward(self, x: Tensor, weight: Tensor, bias: Optional[Tensor]) -> Tensor: return super()._conv_forward( ~~~~~~~~~~~~~~~~~~~ <--- HERE x, weight.to(x.dtype), None if bias is None else bias.to(x.dtype) ) 'Conv1d._conv_forward' is being compiled since it was called from 'Conv1d.forward' File "E:\hodl-out\nlp_venv\lib\site-packages\torch\nn\modules\conv.py", line 313 def forward(self, input: Tensor) -> Tensor: return self._conv_forward(input, self.weight, self.bias) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions