# Nx vs. Python performance for sentence-transformer encoding

**URL:** <https://forum.elixirforum.com/t/nx-vs-python-performance-for-sentence-transformer-encoding/56502>\
**Category:** Questions\
**Tags:** benchmark, nx\
**Created:** [June 14, 2023, 3:53pm UTC](https://forum.elixirforum.com/t/nx-vs-python-performance-for-sentence-transformer-encoding/56502 "2023-06-14T15:53:14Z")\
**Posts on this page:** 1\
**Showing post:** 26

<div class="post-metadata">

**Author:** ![josevalim](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/josevalim/32/1787_2.png) [@josevalim](https://forum.elixirforum.com/u/josevalim)\
**Post date:** [June 30, 2023, 7:02am UTC](https://forum.elixirforum.com/t/nx-vs-python-performance-for-sentence-transformer-encoding/56502/26 "2023-06-30T07:02:48Z")

</div>

It is hard to say without more information on how you are running the model. Per above, the results will vary depending if you are batching or not and if you are padding or not. Can you provide a snippet with more information on how you are starting the serving and calling it?

---

_[View the full topic](https://forum.elixirforum.com/t/nx-vs-python-performance-for-sentence-transformer-encoding/56502)._
