Skip to content

Qwen3.5 may need specific handling, also we are on an older stale transformers.js #58

Description

@devlux76

Please review the docs for https://huggingface.co/onnx-community/Qwen3.5-0.8B-ONNX
I think we might need to be on transformers@next and we might need to using a qwen3.5 specific function. We should probably check all models for this sort of shenanigans.
Here is the section from the page in case it's inaccessible.

const model_id = "onnx-community/Qwen3.5-0.8B-ONNX";
const processor = await AutoProcessor.from_pretrained(model_id);
const model = await Qwen3_5ForConditionalGeneration.from_pretrained(model_id, {
  dtype: {
    embed_tokens: "q4",
    vision_encoder: "fp16",
    decoder_model_merged: "q4",
  },
  device: "webgpu",
});

Here is the error you need to fix now

worker.ts:264 Unknown tokenizer class "TokenizersBackend", attempting to construct from base class.
from_pretrained @ transformers.web.js:30347
await in from_pretrained
loadItems @ transformers.web.js:25826
pipeline @ transformers.web.js:25764
loadModel @ worker.ts:264
await in loadModel
(anonymous) @ worker.ts:452Understand this warning
worker.ts:156 [q2 worker] 2026-03-20T08:29:40.924Z [warn] Backend failed {device: 'wasm', error: Error: Unsupported model type: qwen3_5
    at AutoModelForCausalLM.from_pretrained (https://devlux7…}
workerLog @ worker.ts:156
loadModel @ worker.ts:316
await in loadModel
(anonymous) @ worker.ts:452Understand this warning
worker.ts:158 [q2 worker] 2026-03-20T08:29:40.924Z [error] All backends failed, sending error message to main thread {lastErr: Error: Unsupported model type: qwen3_5
    at AutoModelForCausalLM.from_pretrained (https://devlux7…}

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions