jspace lenses: fitted Jacobian lenses for 5 open models
Code (this card's
jlenssnippets, the sidecar, all analysis) is Apache 2.0. The Gemma lens files are derived from Gemma model weights and are provided subject to the Gemma Terms of Use; the Qwen lens is derived from an Apache 2.0 model. Using a Gemma lens requires the Gemma model itself, which you accept the license for on its own HF page.
Fitted Jacobian lenses ("J-lens", from Anthropic's July 2026 global-workspace paper and the anthropics/jacobian-lens reference implementation, Apache 2.0) for five open-weight models, plus the raw evaluation traces behind the findings at github.com/solarkyle/jspace.
| Path | Model | Fit prompts | HF revision at fit time |
|---|---|---|---|
| gemma-4-e4b-it/lens.pt | google/gemma-4-E4B-it | 100 | fee6332c1aba |
| gemma-4-12b-it/lens.pt | google/gemma-4-12B-it | 75 | 5926caa4ec0c |
| huihui-gemma-4-12b-it-abliterated/lens.pt | huihui-ai/Huihui-gemma-4-12B-it-abliterated | 75 | 060ea173c4d1 |
| gemma-4-26b-a4b-it/lens.pt | google/gemma-4-26B-A4B-it (MoE) | 100 | 20da991ab4af |
| qwen3.6-27b/lens.pt | Qwen/Qwen3.6-27B | 100 | 6a9e13bd6fc8 |
All fits: WikiText-103 prompts, bf16, dim-sharded and merged with
JacobianLens.merge (details and the consumer-GPU recipe in the repo).
Load one
import jlens, transformers, torch
from huggingface_hub import hf_hub_download
path = hf_hub_download("solarkyle/jspace-lenses", "gemma-4-e4b-it/lens.pt")
lens = jlens.JacobianLens.load(path)
tok = transformers.AutoTokenizer.from_pretrained("google/gemma-4-E4B-it")
hf = transformers.AutoModelForImageTextToText.from_pretrained(
"google/gemma-4-E4B-it", dtype=torch.bfloat16, device_map="cuda")
model = jlens.from_hf(hf, tok)
logits, _, _ = lens.apply(model, "Fact: the currency of the country shaped like a boot is", positions=[-1])
Eval traces (traces/)
uncertainty_trivia_<model>.jsonl- 500 TriviaQA questions per model: answer, correctness, output-confidence baselines, workspace features, per-layer entropy trajectory. Basis of the hallucination-prediction results.uncertainty_fake_<model>.jsonl- 100 matched real/fabricated-entity questions per model.uncertainty_shape_<model>.jsonl- the noise-decomposition traces (rival mass vs tail smear) behind the "entropy = tail smear" result;uncertainty_shapeq4_*are the same protocol at NF4 4-bit (the lens-survives-quantization check).emotion_matrix_5models.json- covert-emotion delta matrices + evidence.workspace_dump.json- top workspace tokens per layer under 6 covert emotional states, all 5 models.
Findings, caveats, and every analysis script: github.com/solarkyle/jspace
Router weights (router/)
workspace_router_e4b.json - the trained hallucination-risk classifier
(logistic regression, 10 workspace features / 14 combined) from the repo's
analyze_router.py. Trained on E4B, transfers zero-shot to the other Gemmas
when features are z-scored per model (AUC 0.74-0.78). Predicts P(wrong);
escalate when risk exceeds your budget threshold. Feature definitions in
analyze_router.py.