Qwen3-8B JEE SDPO — MLX 4-bit

A 4-bit quantized MLX version of vipsehgal/qwen3-8b-jee-sdpo, optimized for fast inference on Apple Silicon Macs.

This model solves IIT JEE Advanced problems in Physics, Chemistry, and Mathematics with step-by-step chain-of-thought reasoning.

Model Details

Property Value
Base Model Qwen3-8B
Training SFT (QLoRA on Mac) → SDPO/DPO (A100 on cloud)
Quantization 4-bit (group size 64), 4.5 bits/weight avg
Size ~4.3 GB
Peak Memory ~4.8 GB
Speed ~30 tokens/sec on M3 Pro

Training Pipeline

  1. SFT (Phase 2): QLoRA fine-tuning on 3,515 JEE + competition math examples using MLX on Apple M3 Pro
  2. SDPO (Phase 3): DPO preference optimization on A100 GPU using rollout-based preference pairs with LLM-as-judge feedback
  3. Quantization (Phase 4): Converted to MLX 4-bit for efficient local inference

Usage

Quick Start

pip install "mlx-lm[generate]"

mlx_lm.generate \
    --model vipsehgal/qwen3-8b-jee-sdpo-mlx-4bit \
    --prompt "Solve: A particle of mass m is projected with velocity v at 45 degrees. Find the angular momentum about the point of projection at maximum height."

Chat Format

mlx_lm.generate \
    --model vipsehgal/qwen3-8b-jee-sdpo-mlx-4bit \
    --prompt '<|im_start|>system
You are an expert IIT JEE tutor. Solve problems step-by-step using LaTeX notation. Show all work clearly and arrive at the final answer.<|im_end|>
<|im_start|>user
Find the number of real solutions of x^3 - 3x + 1 = 0<|im_end|>
<|im_start|>assistant
'

Local API Server

mlx_lm.server --model vipsehgal/qwen3-8b-jee-sdpo-mlx-4bit --port 8080

# Then query with any OpenAI-compatible client:
curl http://localhost:8080/v1/chat/completions \
    -H "Content-Type: application/json" \
    -d '{"messages": [{"role": "user", "content": "Solve: ..."}]}'

Python

from mlx_lm import load, generate

model, tokenizer = load("vipsehgal/qwen3-8b-jee-sdpo-mlx-4bit")
response = generate(
    model, tokenizer,
    prompt="Solve: The number of sp2 hybridised carbon atoms in benzaldehyde is:",
    max_tokens=512,
)
print(response)

System Prompt

You are an expert IIT JEE tutor. Solve problems step-by-step using LaTeX notation. Show all work clearly and arrive at the final answer.

Requirements

  • Apple Silicon Mac (M1/M2/M3/M4)
  • ~5 GB free RAM
  • Python 3.10+
  • pip install mlx-lm

License

Apache 2.0 (following Qwen3-8B license)

Downloads last month
8
Safetensors
Model size
1B params
Tensor type
BF16
·
U32
·
MLX
Hardware compatibility
Log In to add your hardware

4-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for vipsehgal/qwen3-8b-jee-sdpo-mlx-4bit

Quantized
(1)
this model

Datasets used to train vipsehgal/qwen3-8b-jee-sdpo-mlx-4bit