Ornstein-27B

A reasoning-focused fine-tune of Qwen 3.5 27B, trained on a small, high-quality dataset curated through a custom Drift Diffusion Modeling (DDM) pipeline. 1,229 carefully selected reasoning traces is all you need when the data quality is high enough.

GGUF quantizations available at DJLougen/Ornstein-27B-GGUF

Support This Work

I'm a PhD student in visual neuroscience at the University of Toronto who also happens to spend way too much time fine-tuning, merging, and quantizing open-weight models on rented H100s and a local DGX Spark. All training compute is self-funded — balancing GPU costs against a student budget. If my uploads have been useful to you, consider buying a PhD student a coffee. It goes a long way toward keeping these experiments running.

Support on Ko-fi


What Makes Ornstein Different

Most reasoning fine-tunes throw large volumes of synthetic data at a base model and hope for the best. Ornstein takes the opposite approach: every single training example passed through a multi-stage quality pipeline that measures whether a reasoning trace is actually reasoning or just generating tokens that look like reasoning.

The core insight is that language models frequently produce degenerate reasoning - long chains of text that superficially resemble deep thought (hedging, restating the problem, circling without progress) but carry little actual signal. The DDM pipeline detects and separates these from genuine premium reasoning traces, producing a training mix that teaches the model what good thinking actually looks like.

Training Data at a Glance

Training Data Profile

  • Top left - Drift Score Distribution: The DDM pipeline assigns each reasoning trace a drift score. Premium traces (blue) cluster low, degenerate traces (red) cluster high, with the fitted threshold at 1.463 cleanly separating the two pools.
  • Top right - Category Mix: The dataset is math-heavy (1,016 examples), with code (124), science (45), and logic (44) rounding it out.
  • Bottom left - Reasoning Depth: Premium traces average 1,263 words of thinking - substantially deeper than the degenerate traces (281 words), which tend to be shallow repetition that inflates token count without substance.
  • Bottom right - Difficulty x Pool: Breakdown across difficulty tiers. The degenerate pool skews toward hard problems where models are most likely to loop or stall.

DDM Curation Pipeline

Drift Diffusion Modeling works by decomposing each reasoning trace into uniform segments and tracking how "reasoning quality" evolves across the trace. Each segment is scored on multiple dimensions that capture whether the model is mimicking cognitive progress - things like introducing new ideas, self-correcting, verifying intermediate results, and exploring alternative approaches.

These per-segment scores are accumulated into a drift trajectory. Premium traces maintain healthy trajectories throughout. Degenerate traces accumulate deficit as the model loops, repeats itself, or pads without substance - and the drift score crosses a threshold fitted via ROC analysis.

Pipeline performance on the validation set:

  • AUC: 0.9705 - near-perfect separation between premium and degenerate traces
  • 99.49% sensitivity - catches virtually all degenerate reasoning
  • ~5% false positive rate - rarely misclassifies genuine reasoning
  • Only 11 hard negatives in the entire evaluation set

The final training mix is ratio-clamped to prevent degenerate patterns from destabilizing convergence, yielding 799 premium traces + 430 selected degenerate traces = 1,229 total examples.

Training Details

Parameter Value
Base model unsloth/Qwen3.5-27B
Method LoRA (rank 32, alpha 32)
Dropout 0.05
Epochs 1
Learning rate 1e-4 (cosine schedule, 10% warmup)
Max sequence length 8192
Micro batch size 1
Gradient accumulation 4 steps
Weight decay 0.01
LoRA targets q_proj, k_proj, v_proj, o_proj, gate_proj, up_proj, down_proj
Packing Off
Training framework Unsloth

Data Quality Metrics

The curated training set has the following characteristics:

Metric Value
Total examples 1,229
Mean thinking depth ~1,667 words
Self-correction present 100% of traces
Verification present 100% of traces
Exploration present 100% of traces
Quality gate pass rate 100%

Usage

With Transformers

from transformers import AutoModelForCausalLM, AutoTokenizer

model_id = "DJLougen/Ornstein-27B"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")

messages = [{"role": "user", "content": "Your question here"}]
inputs = tokenizer.apply_chat_template(messages, return_tensors="pt").to(model.device)
outputs = model.generate(inputs, max_new_tokens=8192)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

With Unsloth (Recommended for Inference)

from unsloth import FastLanguageModel

model, tokenizer = FastLanguageModel.from_pretrained(
    model_name="DJLougen/Ornstein-27B",
    max_seq_length=8192,
    load_in_4bit=True,
)
FastLanguageModel.for_inference(model)

Reasoning Format

Ornstein uses <think>...</think> blocks for extended reasoning:

<think>
Let me work through this step by step...
[multi-phase reasoning with self-correction and verification]
</think>

[Final answer]

Intended Use

Ornstein-27B is designed for tasks that benefit from structured, multi-step reasoning - math, logic, code analysis, scientific problems, and complex question answering. The DDM curation specifically optimizes for traces that mimic cognitive progress rather than verbose restating.

Limitations

  • Single epoch on 1,229 examples means the model retains most of the base Qwen 3.5 27B behavior; the fine-tune primarily shapes reasoning style rather than injecting new knowledge
  • The DDM pipeline optimizes for English reasoning traces; performance on other languages reflects the base model
  • Extended thinking can still occasionally loop on adversarial or highly ambiguous prompts

License

Apache 2.0

Citation

If you use Ornstein-27B or the DDM curation methodology in your work:

@misc{ornstein27b,
  author = {DJLougen},
  title = {Ornstein-27B: DDM-Curated Reasoning Fine-Tune of Qwen 3.5 27B},
  year = {2026},
  publisher = {Hugging Face},
  url = {https://huggingface.co/DJLougen/Ornstein-27B}
}
Downloads last month
266
Safetensors
Model size
27B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for DJLougen/Ornstein-27B

Base model

Qwen/Qwen3.5-27B
Adapter
(16)
this model
Quantizations
1 model