Library / SDK
TheoLeeCJ/openjev avatar
TheoLeeCJ/openjev

SemIf, formerly OpenJEv: typed option logits instead of a generated answer

Can we run something like Jev on a 3090 at home?

4,971 stars355 forksPythonMIT

At a glance

What is it?
TheoLeeCJ/openjev reproduces Jev's runtime-defined decision interface with open models, scoring declared option logits in one forward pass on a single consumer GPU. The speed claim is a systems result, not a claim of matching the closed service.
Who is it for?
Adopt SemIf if your criteria are decided at runtime and you want one forward pass over a 4B model on hardware you already own. Do not adopt it if you need the quality level Jev publishes, or if bit-identical reproducibility across runs matters more than the 8x throughput on repeated state.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 60 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • TheoLeeCJ/openjev4,971 ★ · +3,460
Star history
Repository2026-09-182026-11-22
TheoLeeCJ/openjev1.5k5k

3,460 Stars in the last 65 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

Most agent decisions are if statements that a chat model answers in prose

Route this, retry that, does the evidence support X. Each of these arrives as a decision at runtime, with criteria the software did not see at training time, and each resolves to one of a declared set of options. A chat model will produce a sentence, and the caller will parse it back into a boolean. SemIf skips both ends of that round trip.

Jev is TypeSafe's closed hosted service for runtime-defined semantic decisions. The repository states plainly that it is an independent research project, not affiliated with or endorsed by TypeSafe, and that it reproduces the interface pattern rather than any undisclosed model or training. The homepage, openjev.com, still carries the old name while the package name `semif-phase1` follows the new one, so anyone arriving on the repository today should read SemIf, not OpenJEv, as the current project name.

The audience is engineers with a GPU they already own and a workload that is mostly small decisions over the same long state. The committed fixture is 37 states by 21 criteria, which is not a benchmark suite for general reasoning. It is a shape.

One forward pass reads declared option logits, with no answer token sampled

The data flow is four steps: unstructured state in, runtime criteria in, typed options in, native option logits out. The model never generates. `semif-score` reads the probability of each declared option directly from the forward pass, so there is no answer sentence to repair, no JSON to coerce, and no decoding loop that retries.

That is the whole architectural bet. Everything the README measures follows from it. On an owned workload with one RTX 3090 and 21 binary criteria, direct typed logits took 1.023 s at the median of three runs and emitted 0 output tokens. An autoregressive compact array over the same frozen model and the same state took 5.332 s and emitted 111 tokens.

Auditability is a design property rather than a promise. Each result row carries typed option scores, timing, the exact model revision, and a prompt hash. `--revision` pins the checkpoint, so a row can be traced to a specific set of weights rather than to whatever the hub served that morning. The runner, the fixture, row-level outputs and known failures are committed under results/ and benchmarks/.

Installing from source: pinned torch, a 4B BF16 slot, and one owned example

The install path is an editable install of the project itself, with `HF_HOME` pointed at a large drive first, because the weights, not the code, dominate disk use. Python 3.10 or newer, CUDA, and a GPU that can hold a 4B BF16 model are the stated requirements.

bash
python -m venv .venv
. .venv/bin/activate
export HF_HOME=/path/to/large-drive/huggingface
pip install -e '.[test]'

That extra resolves to `pytest==8.4.2` in pyproject.toml, and the main dependency list is fully pinned: `torch==2.10.0`, `transformers==5.17.0`, `accelerate==1.12.0`, `safetensors==0.8.0`, `tokenizers==0.23.2`, `numpy==2.2.6`. The install registers one console script, `semif-score`.

The first real run uses a committed example file and pins the model revision by hash:

bash
CUDA_VISIBLE_DEVICES=0 semif-score \
  --mode direct \
  --model Qwen/Qwen3.5-4B \
  --revision 851bf6e806efd8d0a36b00ddf55e13ccb7b8cd0a \
  --input examples/decisions.jsonl \
  --output results.jsonl

Read `results.jsonl` and you should see one record per input row with the option probabilities, the timing, the revision and the prompt hash. If every row in your own file carries the same state, switch to `--mode shared` so that state is prefilled once and the criteria are evaluated in parallel.

Parallel suffixes cut 777 decisions from 333.1 s to 38.8 s, and moved 6 argmaxes

The headline is the shape777 run on an owned 37-state by 21-criterion fixture. Fresh direct scoring managed 2.33 decisions per second, so 777 decisions took 333.1 s. Serial prefix reuse reached 10.75 per second and 72.3 s. Parallel suffixes reached 20.03 per second and 38.8 s. A native reranker on the same 4B model was slower than the baseline, at 1.86 per second and 417.3 s.

The number to notice is not 38.8 s. The README states that the fast reuse paths are experimental, because BF16 execution changed 5 to 6 of 777 argmaxes relative to fresh scoring. Prefix reuse is not a pure speedup; it is a speedup with a small distribution shift baked in, and the project is honest about it rather than rounding it away.

A second close read matters as much. The 5.21x comparison against a compact generative array came with a median first-token time of 0.489 s, so most of the generative cost sat in producing the remaining tokens rather than in the model's first response. And the two readouts agreed on only 18 of 21 criteria. The README calls this a systems comparison rather than a claim of semantic equivalence, which is the correct reading: this project is about how long a decision takes, not about whether it matches what Jev would have said.

One loaded backend owns one stateful scoring context, and CPU numbers drift

The llama.cpp backend removes the CUDA requirement entirely. Installing `pip install -e '.[test,llamacpp]'` adds `llama-cpp-python==0.3.35`, and scoring runs against a local GGUF such as `Qwen_Qwen3.5-4B-Q4_K_M.gguf` with `--backend llamacpp --gguf /path/to/model.gguf`. `--llama-threads` caps CPU threads.

Two constraints come with it. One loaded backend owns one stateful scoring context, so parallel callers against a single process are not the design point. And scores are conditional on the quantized weights, since each result carries the GGUF checksum. Direct and prefix-cached execution can differ numerically from the Torch path because llama.cpp evaluates differently, so the documented comparison method is decisions or probabilities with a tolerance, never raw logits bit for bit.

The repository is MIT licensed, with a separate THIRD_PARTY.md. Pin your own dependencies rather than tracking a moving upstream, since the pinned versions live in pyproject.toml (distribution name `semif-phase1`) and requirements.txt.

Where an open 4B model stops short of the closed service

The quality tables are where this project gives up ground to what it imitates. On the 102-row TypeSafe selected subset, the browser Qwen3.5-4B build reaches 0.845 agreement while published Jev sits at 0.883. Authored balanced accuracy for that model is 0.813, and perturbation balanced accuracy is lower still at 0.766, which means the decision degrades when the input is pushed off-distribution.

The EXL3 bridge changes the picture rather than confirming it. A Qwen3.8-27B EXL3 build at 5 bits per weight scores 0.958 authored balanced accuracy against 0.813 for direct 4B logits, and the native reranker scores 0.625. In other words the 4B baseline is not the ceiling of the approach, it is the cheap floor of it, and the project's own numbers say a much larger model on the same interface does considerably better on the authored set.

The alternative to name here is Jev itself, and the difference in approach is the whole point of the repository. Jev is a closed hosted service with undisclosed models and training. SemIf runs open weights on a GPU you control, exposes option logits instead of generated text, and accepts a lower agreement rate as the price. If the hosted service is available to you, the comparison is 0.883 against 0.845 on the same subset, and no amount of throughput closes that gap. The browser demo under webgpu-demo/ is the cheapest way to see the ladder: 639 MB for Qwen3-0.6B, 1.56 GB for MiniCPM5-2B, 3.01 GB for Qwen3.5-4B.

Apple Silicon is a second-class path added in September 2026

The quick start opens with CUDA, but the native path on macOS arm64 is MLX: install `pip install -e '.[test,mlx]'` and pass `--backend mlx` to the scorer command. PyTorch/MPS with `--device mps` covers direct, serial and shared modes as well.

PyTorch/MPS scoring arrived on 2026-09-22, alongside per-workload temperature calibration and a Qwen3.8-27B EXL3 bridge. The last push to the repository was on 2026-09-23. On 2026-09-18, MiniCPM5 2B and Qwen3.5 4B were added to the browser demo, and an Unsloppify site appeared as a switch to a conventional interface.

The MLX extra is environment-gated in pyproject.toml with `sys_platform == 'darwin' and platform_machine == 'arm64'`, and it installs `mlx==0.32.2` plus `mlx-lm` from a pinned git commit. On an Intel Mac both extras resolve to nothing. Direct scoring, serial prefix reuse and parallel shared-state decisions are the modes documented there, so the semantics carry over, but the acceleration path and the pinned revision are not the ones the 3090 numbers were produced on.

Editorial conclusion

Adopt SemIf if your criteria are decided at runtime and you want one forward pass over a 4B model on hardware you already own. Do not adopt it if you need the quality level Jev publishes, or if bit-identical reproducibility across runs matters more than the 8x throughput on repeated state. Before anything else, replay your own workload through --mode direct and compare argmaxes against --mode shared, because the README reports that BF16 prefix reuse moved 5 to 6 of 777 decisions relative to fresh scoring.

Frequently asked questions

What is OpenJEv?

It is an independent research project, formerly called OpenJEv and now named SemIf, that reproduces the runtime-defined semantic decision interface of TypeSafe's closed Jev service using open models. It reads typed option probabilities from a forward pass instead of generating an answer sentence, and it is not affiliated with or endorsed by TypeSafe.

How does OpenJEv differ from Jev?

Jev is a closed hosted service whose model and training are undisclosed, while OpenJEv runs open weights on hardware you control. On the same 102-row TypeSafe selected subset the project's browser Qwen3.5-4B build reports 0.845 agreement against 0.883 for published Jev.

What does SemIf require to run?

The stated baseline is Python 3.10 or newer, CUDA, and a GPU that can hold a 4B BF16 model, installed with `pip install -e '.[test]'`. A CPU-only path runs through the llama.cpp backend by selecting the `llamacpp` optional dependency and pointing at a local GGUF checkpoint, while Apple Silicon installs the mlx extra and adds `--backend mlx`, or uses PyTorch/MPS with `--device mps`.

Official sources

  1. Issues
  2. License: MIT
  3. README
  4. TheoLeeCJ/openjev on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/theoleecj-openjev.svg)](https://hysenlabs.com/projects/theoleecj-openjev)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/theoleecj-openjev.svg)](https://hysenlabs.com/projects/theoleecj-openjev)

Was this useful?