Instructions to use occ-ai/OCC-4B-ONNX with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers.js
How to use occ-ai/OCC-4B-ONNX with Transformers.js:
// npm i @huggingface/transformers import { pipeline } from '@huggingface/transformers'; // Allocate pipeline const pipe = await pipeline('image-text-to-text', 'occ-ai/OCC-4B-ONNX');
Model | Technical Report | GitHub
OCC-4B-ONNX
The ONNX release of OCC-4B accepts text and images and generates text. OCC-4B is a Qwen3.5-4B fine-tune for multi-turn assistant tasks and tool use. Base model
ONNX variants
| Release variant | Decoder dtype key | Embedding dtype key | Vision dtype key |
|---|---|---|---|
| FP16 | fp16 |
fp16 |
fp16 |
| Q8 | q8 |
q8 |
fp16 |
| Q4 | q4 |
q4 |
fp16 |
| Q4F16 | q4f16 |
q4f16 |
fp16 |
| Q4F32 | fp32 |
fp16 |
fp16 |
For Q8 the loader resolves the _quantized.onnx suffix. For Q4F32 it resolves the unsuffixed decoder graph. The Q4F32 decoder stores 4-bit linear weights and retains the output projection in FP32. The dtype key controls file selection.
Files
The onnx/ directory contains a decoder (decoder_model_merged*), token embeddings (embed_tokens*) and a shared image encoder (vision_encoder_fp16). Keep each selected graph alongside all of its matching .onnx_data* files. The repository root contains the tokenizer, chat template, image processor and generation settings.
Usage
To download the Q4F16 variant with its tokenizer and image encoder, run:
hf download occ-ai/OCC-4B-ONNX --local-dir OCC-4B-ONNX \
--include '*.json' '*.jinja' '*.txt' 'onnx/decoder_model_merged_q4f16.onnx*' \
'onnx/embed_tokens_q4f16.onnx*' 'onnx/vision_encoder_fp16.onnx*'
Load the directory with Transformers.js 4.3.2 using AutoProcessor and Qwen3_5ForConditionalGeneration. For WebGPU, use an adapter with shader-f16 and set the three component dtype keys from the table above. The chat template defaults to instruct mode. Pass enable_thinking: true to the template to enable thinking.
License
This model is licensed under the Apache License 2.0.
Citation
If you find our work helpful, feel free to give us a cite.
@misc{occ4b,
title = {{OCC-4B} Technical Report},
author = {{OCC AI}},
month = {November},
year = {2026},
url = {https://github.com/optimal-cognitive-core/OCC/blob/main/OCC_Technical_Report.pdf}
}
- Downloads last month
- -