# Export a BetterTransformer to ONNX

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fexport-a-bettertransformer-to-onnx%2F38578%3E%5C
**Category:** 🤗Optimum\
**Created:** [May 3, 2023, 5:51pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fexport-a-bettertransformer-to-onnx%2F38578 "2023-05-03T17:51:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![regisss](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/regisss/32/22467_2.png) [@regisss](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fregisss)%5C
**Post date:** [May 15, 2023, 12:13pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fexport-a-bettertransformer-to-onnx%2F38578%2F2 "2023-05-15T12:13:13Z")

</div>

Hi @dfangish, here is the list of ONNX-supported ATen operators: [ONNX supported TorchScript operators — PyTorch 2.0 documentation](https://pytorch.org/docs/stable/onnx_supported_aten_ops.html)

Searching this page for `_nested_tensor_from_mask` shows that it is not supported yet (same for `_transformer_encoder_layer_fwd` which would also be needed).

They provide a small guide if you would like to add support for these operators: [torch.onnx — PyTorch 2.0 documentation](https://pytorch.org/docs/stable/onnx.html#adding-support-for-an-aten-or-quantized-operator)

---

_[View the full topic](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fexport-a-bettertransformer-to-onnx%2F38578)._
