In case you need something a bit more lightweight, or want privacy. You can get amazing (better in a lot of cases) accuracy and performance from local models that run and train on CPU: https://jeffyclassify.com/blog/when-llms-fail-at-classificat...
It's also open source, https://github.com/nicobrenner/jeffy it's in the roadmap to build something for the browser. Do you want to take a stab at it and submit a PR?