Skip to content

Openjev Experiments

A single self-contained Python script around AlexWortega/openjev, a Qwen3.5-4B cross-encoder that answers contradiction, entailment or neutral, exposing pair classification, multiple-choice rerank, a library API and a CLI.

Stars
1
Language
Python
License
MIT
Published by
Community
Author
zefir1990
Last verified
Oct 2026

About this project

Natural language inference with AlexWortega/openjev, a Qwen3.5-4B cross-encoder that reads a premise and a hypothesis and answers with contradiction, entailment, or neutral. classify.py is a single self-contained script exposing pair classification, multiple-choice rerank, a library API, and a CLI. Python 3.10 or newer (3.13 tested) — transformers 5.x and torch 2.14 both require it. About 9.1 GB of disk for the checkpoint, plus roughly 2 GB resident while running.

Quoted from the project's README. Read the full README.

Highlights

  • One script covers pair classification, multiple-choice rerank, a library API and a CLI, and the checkpoint is pulled into HF_HOME on first run.
  • The checkpoint dictates its own preprocessing: fixed label order, right padding and last-non-pad-token pooling, and deviating from them degrades accuracy.
  • max_length defaults to 256 from the checkpoint's own training config; the upstream snippet's 4096 is both far more expensive and a train/inference mismatch.
  • Thread count is chosen from whether the weights exceed physical RAM: two threads when paging from disk, half the cores when the work is compute-bound.

Watch out

The checkpoint is 9.1 GB, which is most of what this costs you, and the measured latency is dominated by re-reading those weights rather than by compute. The README is explicit that its timings are order-of-magnitude: the same single-pair command has been observed at both 130 s and 192 s, and only comparisons made back to back inside one process are meaningful. sdpa is set explicitly because Transformers otherwise downgrades to eager on CPU, and the qwen3_5 linear-attention layers fall back to pure-PyTorch reference implementations with a warning on load that is expected and harmless. Copy reviewed against the repository README on 2026-10-04, not from running it.

Questions about this entry

Short answers drawn from the linked project or page.

More Jev resources like this

24GitHub stars
Unofficial laptop study of parallel constrained decoding: prefill once, share the KV cache across fields, and decide all schema fields in one batched forward pass without writing JSON.
Jev Practices & Patterns#community#jevbest#catalog-import
22GitHub stars
Offline evaluator that checks whether classifier confidences match reality and converts mistake costs into a deployable threshold, emitting an HTML report plus machine-readable threshold files.
Jev Practices & Patterns#community#jevbest#catalog-import
16GitHub stars
Vendor-neutral harness that tests whether Jev reranking improves a small RAG stack, using frozen hybrid BM25 plus BGE-M3 candidates and isolating retrieval, rerank, and generation stages.
Jev Practices & Patterns#community#jevbest#catalog-import
37GitHub stars
Minimal Python recipe that turns any causal LLM into a Jev-style classifier by prefilling choice_index and constraining sampling to legal indexes in one forward pass.
Jev Practices & Patterns#community#jevbest#catalog-import
39GitHub stars
Open replica of the typed decision API on openly available base models, answering choice, score, and true-probability questions in one forward pass with no decoding.
Jev Practices & Patterns#community#jevbest#catalog-import
34GitHub stars
Curated catalog of community Jev applications grouped by use, where each case explains the mechanism and states what the public evidence does and does not prove.
Jev Practices & Patterns#community#jevbest#catalog-import

From the Jev guides

Original write-ups on what this entry is for.

Most Jev accuracy problems are state problems. What belongs in a state, what is a pre-made judgment to leave out, and why naming the slice you ask about matters more than the wording.
Jev Practices & Patterns#state#design#primitives
Read article
A Noul returns one number and no separate confidence. How to read the value, pin its boundary with criteria, split compound questions, and set a per-action threshold that matches the cost of being wrong.
Jev Practices & Patterns#noul#primitives#confidence
Read article
A Score is a weighted position, not a ruler. Why the number can land between levels, why levels are judged separately, and how to combine several atomic scores in code instead of one crowded rubric.
Jev Practices & Patterns#score#primitives#scoring
Read article
Back to all resources

From the Jev community

Posts from builders shipping with Jev right now.

Follow @typesafeai