Instructions to use malvavisc0/OxCoder-9B-gptq-int4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use malvavisc0/OxCoder-9B-gptq-int4 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="malvavisc0/OxCoder-9B-gptq-int4") 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("malvavisc0/OxCoder-9B-gptq-int4") model = AutoModelForMultimodalLM.from_pretrained("malvavisc0/OxCoder-9B-gptq-int4", 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use malvavisc0/OxCoder-9B-gptq-int4 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "malvavisc0/OxCoder-9B-gptq-int4" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "malvavisc0/OxCoder-9B-gptq-int4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/malvavisc0/OxCoder-9B-gptq-int4
- SGLang
How to use malvavisc0/OxCoder-9B-gptq-int4 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 "malvavisc0/OxCoder-9B-gptq-int4" \ --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": "malvavisc0/OxCoder-9B-gptq-int4", "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 "malvavisc0/OxCoder-9B-gptq-int4" \ --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": "malvavisc0/OxCoder-9B-gptq-int4", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use malvavisc0/OxCoder-9B-gptq-int4 with Docker Model Runner:
docker model run hf.co/malvavisc0/OxCoder-9B-gptq-int4
OxCoder-9B — GPTQ Int4
Agentic coding, distilled to 9B, compressed to 8.5 GB.
OrionLLM/OxCoder-9B is a
lightweight coding model for long-horizon agentic tasks — distilled from
Fable-5.1 and GLM-5.3 trajectories across Claude Code, OpenCode and
Codex — with 262K native context, SWE-bench Verified 73.5, Terminal-Bench
2.1 (Claude Code) 50.8. This artifact is a faithful GPTQ Int4
quantization: the full text stack at group size 128, desc_act ordering,
calibrated on real code-reasoning and agentic tool-use traces — not
generic web text.
Why this artifact
- Runs where the BF16 original can't. 17.6 GB BF16 → 8.5 GB Int4 fits a 12 GB GPU with room for KV cache. Same weights, same behavior, a third of the memory.
- Proven recipe, third shipped artifact on this hybrid
qwen3_5architecture (GatedDeltaNet + attention): 200/200 text modules quantized, mean per-layer quant error 2.3e-5 (worst 1.1e-4) — better than the 4.2e-5 baseline of the first artifact in the series. Vision tower skipped by design (text-only calibration). - Calibrated on serving traffic. 256 rows: 128 OpenCodeReasoning CoT traces + 128 Nemotron-Agentic interactive tool-use episodes. The model sees, during calibration, the same kind of prompts it sees in production — code reasoning with think blocks, multi-step tool calls.
- Ships with the froggeric v22.5 chat template (froggeric/Qwen-Fixed-Chat-Templates): XML tool calls, preserved think blocks, KV-cache-safe history, no empty-think poisoning. Calibrated and served through the same template, so serving matches calibration exactly.
Serving (vLLM)
vllm serve malvavisc0/OxCoder-9B-gptq-int4 \
--quantization gptq_marlin \
--max-num-seqs 10 \
--chat-template chat_template.jinja \
--enable-auto-tool-choice \
--tool-call-parser qwen3_xml
Notes:
--max-num-seqs 10— the hybrid GDN/Mamba cache corrupts state at high concurrency; 10 is the proven setting on this architecture.- Pass
--chat-template chat_template.jinjaexplicitly — vLLM does not auto-load the sibling file from the model dir in current releases. - Sampling:
temperature=0.6, top_p=0.95, top_k=20(thinking mode). Greedy decoding causes repetition loops on this model class.
Hardware guidance
| Min GPU memory | 12 GB (Int4 weights + KV headroom) |
| Verified | RTX A5000 16 GB — 5/5 behavioral probes; 45 tok/s decode (short coding), 40 tok/s at 31k context |
| Kernels | gptq_marlin — any Marlin-capable CUDA GPU (sm_80+) |
| Context | 262K native; clamp --max-model-len on <16 GB cards |
Quantization details
| Format | GPTQ Int4, group size 128, desc_act |
| Calibration | 256 rows (128 OpenCodeReasoning + 128 Nemotron-Agentic), seq len 4096 |
| Chat template | froggeric v22.5 (calibration + shipped) |
| Coverage | 200/200 text modules; vision tower skipped (--allow-partial-coverage) |
| Provenance | aft_provenance.json (pinned source revision, seeds, config) |
| Per-layer log | quant_log.csv |
Toolchain: quantized with aft (the Aria Finetuner pipeline) driving gptqmodel 7.3.4 / torch 2.13.0+cu130 / transformers 5.15.0 on an NVIDIA GB10 (DGX Spark, aarch64, 128 GB unified). Quant error: mean 2.3e-5, worst 1.1e-4 (200 text modules).
Verified on consumer hardware: RTX A5000 16 GB (sm_86, plain CUDA — no GB10 dependency) with vLLM 0.28.0: 5/5 behavioral probes (math with closed think blocks, exec-verified Kadane's incl. the all-negative case, parsed XML tool call), 45 tok/s decode on a short coding probe, 40 tok/s at 31k context, 0.06 s TTFT.
- Downloads last month
- 52