How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("image-text-to-text", model="occ-ai/OCC-4B")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
pipe(text=messages)
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoProcessor, AutoModelForMultimodalLM

processor = AutoProcessor.from_pretrained("occ-ai/OCC-4B")
model = AutoModelForMultimodalLM.from_pretrained("occ-ai/OCC-4B", device_map="auto")
messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"},
            {"type": "text", "text": "What animal is on the candy?"}
        ]
    },
]
inputs = processor.apply_chat_template(
	messages,
	add_generation_prompt=True,
	tokenize=True,
	return_dict=True,
	return_tensors="pt",
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=256)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:]))
Quick Links

OCC

Technical Report  |  GitHub  |  GGUF  |  ONNX

OCC-4B

OCC-4B is our first general-purpose agentic model, built for long-running assistant tasks that combine user interaction and tool use, with a focus on multi-turn workflows and iterative search.

Highlights

  • Agentic training. Fine-tuned for agentic tasks and supports both instruct and thinking modes.
  • Function calling. Natively supports function calling, taking actions across multiple tools as the conversation unfolds.
  • Search. Answers questions through iterative search across diverse sources, using each finding to guide the next query and connect evidence along the way.

Instruct mode (default)
OCC-4B benchmark results in instruct mode

Thinking mode
OCC-4B benchmark results in thinking mode

Performance

Instruct

Benchmark OCC
4B
Qwen3.5
4B
NeoHorse1
4B
Qwen3.5
9B
Gemma 4
26B A4B
Qwen3.6
35B-A3B
Gemma 4
31B
Qwen3.8
27B
General Agent
Workplace Assistant 75.30 60.11 56.33 69.10 80.84 70.97 86.46 86.31
GAIA-2 35.63 25.00 27.42 35.00 14.08 45.42 23.46 35.71
ToolSandbox 55.01 47.35 49.71 56.46 52.97 55.13 57.60 64.99
BFCL V4 Multi-Turn 50.53 42.63 37.15 39.20 47.98 51.00 61.78 59.15
BFCL V4 Memory 51.78 33.89 38.88 47.44 38.88 35.31 41.59 55.14
τ²-bench 73.34 69.37 67.33 69.25 49.59 66.03 61.70 65.16**
Long-Horizon Search
BrowseComp-Plus 45.13 11.30 32.50 16.80 13.70 34.40 18.50 40.00
BFCL V4 Web Search 43.80 24.00 37.80 31.40 16.40 45.80 32.40 48.00
TRuST 32.10 5.60 16.00 8.50 2.80 26.70 19.10 34.90
Instruction Following
IFBench 33.27 33.53 33.40 38.53 46.73 38.73 54.20 42.00
* Each score is the average of five runs (seeds 0–4) per model.
* For Instruct mode, we use each model card’s recommended sampling parameters, except for τ²-bench, ToolSandbox, and BFCL V4 Multi-Turn, where we use the benchmark-recommended settings.
* Long-Horizon Search: each model is given three browser tools similar to those in OpenResearcher: search to retrieve result snippets, open to read pages, and find to locate text within a page.
* τ²-bench: average of airline, retail, and telecom.
* GAIA-2: average of Search, Execution, and Ambiguity (3 of the 7 capability splits).
** Qwen3.8-27B on τ²-bench: the default scorer accepts a transfer to a human agent only if the required uppercase phrase matches exactly. Qwen3.8-27B often writes it in lowercase, which no other model in the table does, so otherwise-correct trajectories fail. So for this model specifically, we count lowercase transfers as valid (64.11 with the default scorer).

Thinking

Benchmark OCC
4B
Qwen3.5
4B
NeoHorse1
4B
Qwen3.5
9B
Gemma 4
26B A4B
Qwen3.6
35B-A3B
Gemma 4
31B
Qwen3.8
27B
General Agent
Workplace Assistant 79.45 76.55 76.84 80.84 85.98 82.57 87.60 89.14
GAIA-2 31.08 27.38 31.21 29.75 38.96 47.75 43.17 65.17
ToolSandbox 68.92 66.84 67.47 71.08 60.75 72.69 64.01 66.64
BFCL V4 Multi-Turn 53.33 50.75 50.40 53.08 61.20 57.58 65.70 57.25
BFCL V4 Memory 58.80 40.22 55.53 56.13 50.97 53.42 55.40 73.63
τ²-bench 80.94 77.35 76.94 76.40 69.55 81.36 73.22 75.91**
Long-Horizon Search
BrowseComp-Plus 47.35 39.50 36.90 46.60 17.25 35.20 29.80 52.27
BFCL V4 Web Search 48.60 36.40 39.80 41.00 38.40 46.20 46.60 52.40
TRuST 37.47 26.00 26.20 32.30 12.22 22.50 28.30 53.95
Instruction Following
IFBench 63.40 35.33 61.13 49.53 80.67 65.93 80.20 69.00
* Each score is the average of five runs (seeds 0–4) per model.
* For Thinking mode, we use each model card’s recommended sampling parameters.
* For Qwen3.8-27B, we set reasoning_effort=medium.
* Long-Horizon Search: each model is given three browser tools similar to those in OpenResearcher: search to retrieve result snippets, open to read pages, and find to locate text within a page.
* τ²-bench: average of airline, retail, and telecom.
* GAIA-2: average of Search, Execution, and Ambiguity (3 of the 7 capability splits).
** Qwen3.8-27B on τ²-bench: the default scorer accepts a transfer to a human agent only if the required uppercase phrase matches exactly. Qwen3.8-27B often writes it in lowercase, which no other model in the table does, so otherwise-correct trajectories fail. So for this model specifically, we count lowercase transfers as valid (68.27 with the default scorer).

Subagent Orchestration (Preview)

OCC-4B can also direct subagents: it runs several copies of itself in parallel and combines their answers into the final response, improving on a single agent.

Benchmark OCC-4B
single agent
Qwen3.5-4B manager
+ OCC-4B subagents
OCC-4B manager
+ OCC-4B subagents
Long-Horizon Search
BrowseComp-Plus 45.13 50.17 62.41
BFCL V4 Web Search 43.80 44.00 47.80
TRuST 32.10 30.19 41.91
* Mode: the manager and the subagents all run in Instruct mode. Each score is the average of five runs. The single-agent scores are the ones in the Instruct table above.
* Orchestration: the manager has only three tools: new to start a subagent session, send to send it a prompt, and wait to receive the next reply. Each subagent is OCC-4B with the same search, open and find tools as the single agent. The two manager columns differ only in the manager model.

Quickstart

OCC-4B keeps the architecture and chat template of Qwen3.5-4B, so it runs anywhere Qwen3.5-4B runs. It supports both instruct and thinking modes. Instruct is the default and recommended mode. To enable thinking, pass enable_thinking: true in the chat template arguments.

vLLM

vllm serve occ-ai/OCC-4B \
  --port 8000 \
  --max-model-len 262144 \
  --reasoning-parser qwen3 \
  --enable-auto-tool-choice \
  --tool-call-parser qwen3_coder

Add --language-model-only to skip the vision encoder and free memory for the KV cache.

SGLang

python -m sglang.launch_server \
  --model-path occ-ai/OCC-4B \
  --port 8000 \
  --context-length 262144 \
  --reasoning-parser qwen3 \
  --tool-call-parser qwen3_coder

Both commands start an OpenAI-compatible server at http://localhost:8000/v1.

Function calling

from openai import OpenAI

client = OpenAI(base_url="http://localhost:8000/v1", api_key="EMPTY")

tools = [{
    "type": "function",
    "function": {
        "name": "get_weather",
        "description": "Get the current weather for a city.",
        "parameters": {
            "type": "object",
            "properties": {"city": {"type": "string"}},
            "required": ["city"],
        },
    },
}]

response = client.chat.completions.create(
    model="occ-ai/OCC-4B",
    messages=[{"role": "user", "content": "What's the weather in Moscow?"}],
    tools=tools,
    temperature=0.7,
    top_p=0.8,
    extra_body={"top_k": 20},
)
print(response.choices[0].message.tool_calls)

Transformers

import torch
from transformers import AutoModelForImageTextToText, AutoProcessor

model_id = "occ-ai/OCC-4B"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForImageTextToText.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto")

messages = [{"role": "user", "content": [{"type": "text", "text": "Plan a three-day trip to Kazan."}]}]
inputs = processor.apply_chat_template(
    messages,
    add_generation_prompt=True,
    tokenize=True,
    return_dict=True,
    return_tensors="pt",
    enable_thinking=False,  # set to True for thinking mode
).to(model.device)

outputs = model.generate(**inputs, max_new_tokens=32768, do_sample=True, temperature=0.7, top_p=0.8, top_k=20)
print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:], skip_special_tokens=True))

Recommended sampling parameters

We recommend using the following sampling parameters for generation:

  • Instruct mode: temperature=0.7, top_p=0.8, top_k=20, min_p=0.0, presence_penalty=0.0, repetition_penalty=1.0
  • Thinking mode: temperature=0.6, top_p=0.95, top_k=20, min_p=0.0, presence_penalty=0.0, repetition_penalty=1.0

Please note that the support for sampling parameters varies according to inference frameworks.

License

OCC-4B is released under the Apache 2.0 License. It is fine-tuned from Qwen3.5-4B, which is also licensed under Apache 2.0. Only the language model is fine-tuned; the vision components are inherited from Qwen3.5-4B unchanged.

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
2
Safetensors
Model size
5B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for occ-ai/OCC-4B

Finetuned
Qwen/Qwen3.5-4B
Finetuned
(1,700)
this model
Quantizations
2 models

Collection including occ-ai/OCC-4B