almacitunaberk commented on issue #18357:
URL: https://github.com/apache/tvm/issues/18357#issuecomment-3389127452
I ran into a similar problem, I managed to get around of this problem by
registering buffers for `position_ids` and `token_type_ids` after BERT is
loaded (constant values are placeholders):
```python
pos = torch.arange(0, 100, dtype=torch.long).unsqueeze(0)
model.embeddings.register_buffer("position_ids", pos, persistent=True)
tti = torch.zeros((1, 100), dtype=torch.long)
model.embeddings.register_buffer("token_type_ids", tti, persistent=True)
```
However, from_exported_program ran into `AssertionError: Unsupported
function types ['_assert_tensor_metadata.default']` error later which I could
not resolve.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]