Instructions to use prithivMLmods/OxCoder-9B-fp8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use prithivMLmods/OxCoder-9B-fp8 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="prithivMLmods/OxCoder-9B-fp8") 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("prithivMLmods/OxCoder-9B-fp8") model = AutoModelForMultimodalLM.from_pretrained("prithivMLmods/OxCoder-9B-fp8", 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 prithivMLmods/OxCoder-9B-fp8 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "prithivMLmods/OxCoder-9B-fp8" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "prithivMLmods/OxCoder-9B-fp8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/prithivMLmods/OxCoder-9B-fp8
- SGLang
How to use prithivMLmods/OxCoder-9B-fp8 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 "prithivMLmods/OxCoder-9B-fp8" \ --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": "prithivMLmods/OxCoder-9B-fp8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "prithivMLmods/OxCoder-9B-fp8" \ --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": "prithivMLmods/OxCoder-9B-fp8", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use prithivMLmods/OxCoder-9B-fp8 with Docker Model Runner:
docker model run hf.co/prithivMLmods/OxCoder-9B-fp8
OxCoder-9B-FP8
This repository contains an FP8 dynamic quantized version of OrionLLM/OxCoder-9B (built on
Qwen/Qwen3.5-9B), optimized for high-throughput inference and reduced VRAM footprint usingllm-compressorand thecompressed-tensorsformat. OxCoder-9B is a compact, frontier-class coding and reasoning model tailored for long-horizon agentic workflows, complex terminal operations, multi-file codebases, and interactive software development.
Model Summary
| Attribute | Details |
|---|---|
| Base Model | OrionLLM/OxCoder-9B (Foundation: Qwen/Qwen3.5-9B) |
| Quantized Model | prithivMLmods/OxCoder-9B-fp8 |
| Quantization Method | LLM Compressor |
| Quantization Scheme | FP8_DYNAMIC |
| Output Format | compressed-tensors |
| Native Context Length | 262,144 tokens (262K) |
| License | Apache-2.0 |
Quantization Details
The model was quantized to FP8 using llm-compressor with dynamic per-tensor activation scaling. Sensitive architecture components—including the language model head, input embeddings, vision modules, and linear attention layers—were excluded to preserve fidelity, reasoning stability, and code generation precision.
Quantization Recipe
default_stage:
default_modifiers:
QuantizationModifier:
targets: [Linear]
ignore:
- 're:.*lm_head'
- 're:.*embed_tokens$'
- 're:.*visual.*'
- 're:.*model.visual.*'
- 're:.*linear_attn.*'
scheme: FP8_DYNAMIC
bypass_divisibility_checks: false
requires_calibration_data: false
- Targeted Layers: All standard
Linearprojections (MLP and attention projections). - Excluded Layers:
lm_head,embed_tokens,visual,model.visual, andlinear_attn. - Calibration Required: No (utilizes runtime dynamic activation scaling).
Deployment & Inference
1. vLLM (Recommended)
compressed-tensors FP8 checkpoints run natively in vLLM:
pip install vllm
Launch an OpenAI-compatible API server:
vllm serve prithivMLmods/OxCoder-9B-fp8 \
--max-model-len 65536 \
--trust-remote-code
Or execute via Python:
from vllm import LLM, SamplingParams
sampling_params = SamplingParams(
temperature=0.6,
top_p=0.95,
max_tokens=4096
)
llm = LLM(
model="prithivMLmods/OxCoder-9B-fp8",
trust_remote_code=True,
max_model_len=65536
)
prompts = [
"Write a Python script using asyncio to run a rate-limited web scraper with exponential backoff."
]
outputs = llm.generate(prompts, sampling_params)
for output in outputs:
print(output.outputs[0].text)
2. Transformers & Compressed Tensors
pip install transformers compressed-tensors accelerate
import torch
from transformers import AutoModelForCausalLM, AutoTokenizer
model_id = "prithivMLmods/OxCoder-9B-fp8"
tokenizer = AutoTokenizer.from_pretrained(model_id, trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained(
model_id,
device_map="auto",
torch_dtype="auto",
trust_remote_code=True
)
prompt = "Implement a LRU cache with O(1) runtime for get and put operations in Python."
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
with torch.no_grad():
output_tokens = model.generate(
**inputs,
max_new_tokens=1024,
temperature=0.6,
top_p=0.95,
do_sample=True
)
print(tokenizer.decode(output_tokens[0][inputs.input_ids.shape[1]:], skip_special_tokens=True))
Attribution & License
- Base Architecture & Weights: Developed by OrionLLM based on
Qwen/Qwen3.5-9B. - Quantization: Prepared and hosted by
prithivMLmods. - License: Released under the Apache 2.0 License.
- Downloads last month
- -