Instructions to use onnx-community/OneJev-0.8B-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use onnx-community/OneJev-0.8B-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-text-to-text', 'onnx-community/OneJev-0.8B-ONNX');
OneJev-0.8B (ONNX)
ONNX conversion of OmniJev/OneJev-0.8B, a multimodal System One decision model: give it a state (text, a screenshot, a photo) and typed questions (choice, score, noul), and it returns a probability for every option. For the model, its training data and its limits, see the original card and the OneJev repository.
How it was made
OneJev-0.8B is a full fine-tune of Qwen3.5-0.8B with the vision tower frozen: the same architecture and shapes, and vision weights identical to the base. So this repo reuses the graphs of onnx-community/Qwen3.5-0.8B-ONNX-OPT (fused LinearAttention / CausalConvWithState, num_logits_to_keep) with OneJev's weights put in:
- Every weight in the base graphs was matched by value to the Hugging Face parameter it came from (transpose, reshape,
1 + weightfor the zero-centred RMSNorm, the patch embedding flattened); all 420 match. OneJev's parameters go through the same transforms. - q4f16: 4-bit, block size 32, asymmetric, with ONNX Runtime's own kernel, in the base graph's
MatMulNBits/GatherBlockQuantizedlayout. Its error on the weights (about 8.8% relative) is the same as the base repo's. - The vision encoder is copied unchanged.
Scripts and the reference cases are in conversion/.
Checks
Against a Hugging Face forward pass of OneJev-0.8B (fp32), on 9 questions over text, an app-review screenshot and a payment screen:
| Runtime | Max difference in any option's probability | Top answer changed |
|---|---|---|
| fp32, ONNX Runtime (Node, Transformers.js) | 0.0011 | 0 of 9 |
| fp16, WebGPU (Chrome, M3 Pro) | 0.030 | 0 of 9 |
| q4f16, WebGPU | 0.025 on 8 questions, 0.19 on a near-tie | 1 of 9 |
On WebGPU a question takes about 150 ms with text only and about 500 ms with a 720ร400 image, one forward pass each.
Note: OneJev's own engine (qev) reuses a cached image prefix across questions; on image prompts its probabilities differ from a full forward pass by up to about 0.07. This conversion matches the full forward pass, which qev calls the training evaluation path.
Use
The answer is the softmax over the option letters at the last position of a chat turn built as in qev/prompt.py: a system prompt, the state in <state>โฆ</state> (images inline where <image:N> stands), the question with lettered options, and "Answer with one letter". See the browser demo and its code for a complete Transformers.js implementation.
| Files | Size |
|---|---|
q4f16: decoder_model_merged_q4f16, embed_tokens_q4f16, vision_encoder_fp16 |
about 0.8 GB |
fp16: decoder_model_merged_fp16, embed_tokens_fp16, vision_encoder_fp16 |
about 2.2 GB |
| fp32 | about 4.4 GB |
Two settings the browser needs: preprocessor_config.json here sets do_normalize: true (and the rest of the Qwen2-VL image processor settings) explicitly, and tokenizer_config.json carries the chat template.
License
Apache-2.0, as the original. Converted by @shreyask; all credit for the model to the OneJev authors.
- Downloads last month
- 214