transformers.js support

#1
by NERDDISCO - opened

what is needed to make sure this model is working with transformers.js? i'm happy to help out if this is needed, but i guess @Xenova already got it covered? :D

ONNX Community org

Hi there! We'll be releasing a new version soon that has support for it! I'll update the model's library tag when ready.

ONNX Community org

PR: https://github.com/huggingface/transformers.js/pull/1229

Stay tuned for a full release (after that PR has been merged)

@Xenova thank you so much!

Any update on this?

@pythiccoder support was added with https://github.com/huggingface/transformers.js/releases/tag/3.4.1, but "only" for Node.js for now

ONNX Community org

I've uploaded an optimized version of the model which should work in-browser on WebGPU now: https://huggingface.co/onnx-community/gemma-3-1b-it-ONNX-GQA

If anyone is able to test, I'd greatly appreciate it! (webgpu & dtype=q4f16 especially)

@Xenova
I'm trying to convert my finetuned version of gemma-3 model to ONNX but currently getting this error:
ValueError: Trying to export a gemma3-text model, that is a custom or unsupported architecture, but no custom onnx configuration was passed as custom_onnx_configs. Please refer to https://huggingface.co/docs/optimum/main/en/exporters/onnx/usage_guides/export_a_model#custom-export-of-transformers-models for an example on how to export custom models. Please open an issue at https://github.com/huggingface/optimum/issues if you would like the model type gemma3-text to be supported natively in the ONNX export.

Do you have any suggestions on how I can resolve this? I'd appreciate your guidance, especially if there's an example or a workaround I can follow to create the necessary custom_onnx_configs.

@Xenova only Q8 WASM works for mine. I can't convert gemma3 4b to ONNX. any suggestion?

I've uploaded an optimized version of the model which should work in-browser on WebGPU now: https://huggingface.co/onnx-community/gemma-3-1b-it-ONNX-GQA

If anyone is able to test, I'd greatly appreciate it! (webgpu & dtype=q4f16 especially)

q4f16 is not working

Your need to confirm your account before you can post a new comment.

Sign up or log in to comment