Instructions to use RessAI/Onner-O1-Qwen35-4B-Reasoning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use RessAI/Onner-O1-Qwen35-4B-Reasoning with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="RessAI/Onner-O1-Qwen35-4B-Reasoning") 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)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("RessAI/Onner-O1-Qwen35-4B-Reasoning") model = AutoModelForMultimodalLM.from_pretrained("RessAI/Onner-O1-Qwen35-4B-Reasoning") 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use RessAI/Onner-O1-Qwen35-4B-Reasoning with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "RessAI/Onner-O1-Qwen35-4B-Reasoning" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RessAI/Onner-O1-Qwen35-4B-Reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/RessAI/Onner-O1-Qwen35-4B-Reasoning
- SGLang
How to use RessAI/Onner-O1-Qwen35-4B-Reasoning with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "RessAI/Onner-O1-Qwen35-4B-Reasoning" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RessAI/Onner-O1-Qwen35-4B-Reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "RessAI/Onner-O1-Qwen35-4B-Reasoning" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "RessAI/Onner-O1-Qwen35-4B-Reasoning", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use RessAI/Onner-O1-Qwen35-4B-Reasoning with Docker Model Runner:
docker model run hf.co/RessAI/Onner-O1-Qwen35-4B-Reasoning
Onner-O1 Qwen3.5 4B Reasoning
RessAI/Onner-O1-Qwen35-4B-Reasoning is a merged Transformers checkpoint derived from Qwen/Qwen3.5-4B.
This model was post-trained for reasoning-style interaction, Indonesian/English instruction following, tool-call formatting, and long-context experimentation. The uploaded Transformers weights are merged; no external LoRA adapter is required.
Model Details
- Base model:
Qwen/Qwen3.5-4B - Released model id:
RessAI/Onner-O1-Qwen35-4B-Reasoning - Format: merged Hugging Face Transformers checkpoint
- Training type: BF16 LoRA supervised fine-tuning + supervised repair
- Not trained with: DPO or GRPO
- Primary languages: Indonesian and English
- Intended use: research, local inference, API serving experiments, reasoning/tool-use prototyping
Important Limitations
This is an experimental post-trained model. It may still:
- repeat words or phrases under poor decoding settings;
- enter self-doubt or thought loops on hard reasoning prompts;
- answer in the wrong language if the system prompt is written only in English;
- hallucinate unsupported facts;
- fail exact-answer benchmark formatting;
- degrade on very long contexts without careful runtime configuration.
Use conservative decoding and validate outputs for important tasks.
Recommended Decoding
For reasoning/math:
temperature = 0.2
top_p = 0.8
top_k = 20
repetition_penalty = 1.08
max_new_tokens = 2048
For direct/no-thinking answers:
temperature = 0.0
top_p = 1.0
repetition_penalty = 1.05
max_new_tokens = 512
Recommended system instruction:
Ikuti bahasa pengguna.
Jika pengguna bertanya dalam bahasa Indonesia, jawab dalam bahasa Indonesia.
Jika pengguna bertanya dalam bahasa Inggris, jawab dalam bahasa Inggris.
Bernalar secara ringkas.
Jangan ragu-ragu berulang.
Jika menemukan kesalahan, koreksi sekali lalu lanjut.
Jangan mengulang frasa seperti "wait", "maybe", atau "let me reconsider".
Akhiri dengan satu jawaban final yang jelas.
Transformers Usage
import torch
from transformers import AutoProcessor, AutoModelForImageTextToText
model_id = "RessAI/Onner-O1-Qwen35-4B-Reasoning"
processor = AutoProcessor.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForImageTextToText.from_pretrained(
model_id,
torch_dtype=torch.bfloat16,
device_map="auto",
trust_remote_code=True,
)
messages = [
{
"role": "system",
"content": (
"Ikuti bahasa pengguna. Bernalar secara ringkas. "
"Jangan mengulang frasa atau ragu-ragu berulang."
),
},
{"role": "user", "content": "Jawab hanya dengan angka: 17 dikali 23 berapa?"},
]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
add_generation_prompt=True,
return_tensors="pt",
enable_thinking=False,
).to(model.device)
outputs = model.generate(
inputs,
max_new_tokens=128,
do_sample=False,
repetition_penalty=1.05,
)
print(processor.decode(outputs[0][inputs.shape[-1]:], skip_special_tokens=True))
Expected answer:
391
Thinking Mode
The chat template supports enable_thinking=True or enable_thinking=False.
Use enable_thinking=True for math, science, and multi-step reasoning. Use enable_thinking=False for short factual answers, extraction, and low-latency responses.
GGUF
A Q4_K_M GGUF build is included under the gguf/ folder when available:
gguf/qwen35-4b-reasoning-1m-Q4_K_M.gguf
Recommended local settings:
- context: 2K, 4K, or 8K for normal consumer devices;
- avoid 262K/1M context on laptops/phones;
- use a repetition penalty around
1.05to1.10.
Evaluation Notes
Raw local evaluation artifacts were generated for:
- AIME 2026
- HMMT Nov 2025 / Feb 2026
- SuperGPQA
- SciBench
- MBPP
- LongBench v2
- IMOAnswerBench
- CritPt
However, these raw numbers should not be treated as leaderboard-comparable scores without rerunning a corrected evaluation harness. Known issues in the previous evaluation include:
- HMMT outputs were often truncated by low
max_new_tokens; - SciBench numeric grading was too strict;
- MBPP prompts did not always preserve required function names;
- some exact-answer tasks failed due to final-answer formatting rather than model capability alone.
Training Summary
The local training ledger recorded:
- Phase 1 SFT/LoRA runtime: about 1284 seconds
- Phase 1 train loss: about
0.7563 - Phase 2 SFT/LoRA runtime: about 282 seconds
- Phase 2 train loss: about
1.7346 - Repair SFT steps:
30 - Repair train loss: about
0.3085
Safety and Use
This model is provided for experimentation. Do not rely on it for legal, medical, financial, safety-critical, or high-stakes decisions without independent verification.
License
This repository follows the license terms of the base model where applicable. See the base model Qwen/Qwen3.5-4B for upstream license and usage requirements.
- Downloads last month
- 59