# Trying to use Transformers.js

**URL:** <https://discuss.huggingface.co/t/trying-to-use-transformers-js/75417>\
**Category:** 🤗Optimum\
**Created:** [March 1, 2024, 2:07am UTC](https://discuss.huggingface.co/t/trying-to-use-transformers-js/75417 "2024-03-01T02:07:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wdavies](https://avatars.discourse-cdn.com/v4/letter/w/df788c/32.png) [@wdavies](https://discuss.huggingface.co/u/wdavies)\
**Post date:** [March 1, 2024, 2:07am UTC](https://discuss.huggingface.co/t/trying-to-use-transformers-js/75417/1 "2024-03-01T02:07:42Z")

</div>

I’ve been bashing my head against a wall for 4 hours. I finally got node.js working and started the transformers.js next-server example, only to encounter this error: Could not locate file: “[https://huggingface.co/wdavies/public-onnx-test/resolve/main/onnx/model\_quantized.onnx](https://huggingface.co/wdavies/public-onnx-test/resolve/main/onnx/model_quantized.onnx)”.

I’d converted my original DistilBERT model into ONNX, using this  
model = ORTModelForSequenceClassification.from\_pretrained(“wdavies/public-question-in-text”,from\_transformers=True)  
model.save\_pretrained(“local\_onnx”)  
model.push\_to\_hub(“local\_onnx”, “wdavies/public-onnx-test”)

Only to find out that it needs a quantized version - but the quantized version needs to know what architecture its going to run on???

Ok, so according to this blog section, [Accelerated Inference with Optimum and Transformers Pipelines](https://huggingface.co/blog/optimum-inference#34-use-the-ortquantizer-to-apply-dynamic-quantization) , you have to “predecide” what CPU architecture you’re going to run on??? Am I missing something?

Also, this very relevant, and only link in your documentation is dead: [Transformers.js](https://huggingface.co/docs/transformers.js/en/index#convert-your-models-to-onnx)
