d1-3B Code Review Decisions for Ollama: d1-3B Code Review Decisions packaged for Ollama, with a script that reads the log-probabilities of answer tokens.

d1-3B Code Review Decisions for Ollama

d1-3B Code Review Decisions packaged for Ollama. Give it a JavaScript or TypeScript snippet and the task the snippet implements, and it answers 13 typed questions with probabilities: which of 10 code review flaws the code has, whether it has any flaw, which flaw matters most, and how mergeable it is.

These are the same weights as the d1-3B files in yannelli/code-review-decisions-GGUF, with the lfm2.decision.type key removed. Ollama (tested with v0.40.3) refuses completion for a GGUF that carries that key, and its /v1/systemone endpoint does not support d1. ollama_d1.py sends d1's prompt for each question and reads the log-probabilities of the answer tokens. For llama.cpp, use the GGUF repo instead, because its files work with the native /v1/systemone endpoint of llama-server, which is about 6 times faster.

Quick start

ollama pull hf.co/yannelli/d1-3b-code-review-decisions-ollama:Q4_K_M    # or :Q8_0
curl -fsSLO https://huggingface.co/yannelli/d1-3b-code-review-decisions-ollama/resolve/main/code_review_tui.sh
sh code_review_tui.sh

code_review_tui.sh is a terminal UI. You pick the model and the language, enter the task and the code, and it shows each flaw's probability, the primary flaw and the quality level. It needs python3, curl and gum (brew install gum). On first run it downloads ollama_d1.py and the 13 questions, and it pulls the model if none is installed.

Python

ollama_d1.py uses only the Python standard library.

import json
import urllib.request

from ollama_d1 import system_one  # curl -fsSLO https://huggingface.co/yannelli/d1-3b-code-review-decisions-ollama/resolve/main/ollama_d1.py

manifest = "https://huggingface.co/datasets/yannelli/js-ts-code-review-decisions/resolve/main/manifest.json"
questions = json.load(urllib.request.urlopen(manifest))["questions"]
state = {"task": "Parse a CSV upload into rows.", "language": "TypeScript", "code": "..."}

answers = system_one(state, questions, model="hf.co/yannelli/d1-3b-code-review-decisions-ollama:Q4_K_M")["answers"]
print(answers["primary_flaw"]["choice"], answers["unsafe_input"]["noul"])

A noul answer is P(yes). A choice answer has the top choice and probabilities over all options. A score answer has score (the expected level) and probabilities over levels 0 ("Should not merge.") to 4 ("Exemplary. Merge as is."). From the command line, python ollama_d1.py --model MODEL request.json answers a JSON file that holds state and questions.

Files

File Size Use
d1-3b-code-review-decisions-Q4_K_M.gguf 1.7 GB ollama pull hf.co/yannelli/d1-3b-code-review-decisions-ollama:Q4_K_M
d1-3b-code-review-decisions-Q8_0.gguf 2.9 GB ollama pull hf.co/yannelli/d1-3b-code-review-decisions-ollama:Q8_0
ollama_d1.py System One answers from the model through Ollama's /api/generate
code_review_tui.sh Terminal UI on top of ollama_d1.py

Results

Test split of JS/TS Code Review Decisions, scored with its score_decisions.py. Ollama ran on one NVIDIA L40S with every layer on the GPU, on 300 test snippets (3,900 decisions).

Build Macro F1 @ 0.5 Accuracy Top answers matching PyTorch p50 per snippet p95 per snippet
Q8_0 0.930 0.944 99.9% 1.30 s 1.60 s
Q4_K_M 0.921 0.941 99.3% 1.40 s 1.60 s

On the same 300 snippets the PyTorch model scores 0.930 macro F1 and 0.944 accuracy. On all 1,200 test snippets it scores 0.917 and 0.940, and the source model card has the full results and limitations. Ollama sends one request per question, so a snippet takes 13 requests, and on 16 Neoverse V3 CPU cores Q8_0 took 67 s per snippet.

License

These files are derivatives of LiquidAI/d1-3B and are released under the base model's LFM Open License v1.0, included as LICENSE. The license allows commercial use only for entities with less than $10M in annual revenue, and LICENSE has the full terms.

The training data, JS/TS Code Review Decisions, is CC BY 4.0.

Citation

@misc{yannelli2026d13bcodereview,
  title        = {d1-3B Code Review Decisions},
  author       = {Ryan Yannelli},
  year         = {2026},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/yannelli/d1-3b-code-review-decisions}}
}

Maintainer

Ryan Yannelli | 10/12/2026 | GitHub: @yannelli | Hugging Face: yannelli

Downloads last month
561
GGUF
Model size
3B params
Architecture
lfm2
Hardware compatibility
Log In to add your hardware

4-bit

8-bit

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

Model tree for yannelli/d1-3b-code-review-decisions-ollama

Finetuned
LiquidAI/d1-3B
Quantized
(2)
this model

Dataset used to train yannelli/d1-3b-code-review-decisions-ollama

Collection including yannelli/d1-3b-code-review-decisions-ollama