J-lens Qwen3.6 is a visual debugger that uses a Jacobian lens to display latent token predictions across layers and positions for a local Qwen3.6-27B model on Apple Silicon via MLX.

Stars

350

7-day growth

No data

Forks

23

Open issues

0

License

Apache-2.0

Last updated

2026-07-21

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It provides a practical, interactive tool for mechanistic interpretability of large language models, featuring a custom Metal backward kernel that makes full-depth Jacobian lens fitting feasible in under 3 hours on an M4 Pro, and includes manual and backward-search intervention capabilities.

Who it is for

  • Mechanistic interpretability researchers
  • AI safety researchers
  • Developers running local LLMs on Apple Silicon
  • Machine learning engineers interested in model debugging

Use cases

  • Inspecting latent concepts that influence model outputs but are suppressed in the final response
  • Debugging model behavior by editing latent representations and observing changes in output
  • Testing safety alignment by searching for edits that produce a desired safe or unsafe reply
  • Exploring how individual tokens and concepts are represented across different layers

Strengths

  • Custom Metal backward kernel for GDN linear-attention layers enables full-depth lens fitting in ~2.75 hours on an M4 Pro
  • Live streaming chat mode with interactive grid visualization (position × layer) and clickable cells for detailed readouts
  • Supports both manual edits and automated backward search (including premise-level swaps) for causal interventions
  • Bundled lens immediately usable and compatible with external lenses from Neuronpedia or user-fitted lenses

Considerations

  • Only runs on Apple Silicon with macOS and MLX; no cross-platform support
  • Limited to Qwen3.5-architecture models (e.g., Qwen3.6-27B) due to arch-specific custom kernels
  • Lens quality scales with prompt count; the bundled 20-prompt lens is demo-grade, requiring 100+ prompts for research-grade results

README quick start

Quick start

Description

J-space / Jacobian-lens visualizer for Qwen3.6-27B (4-bit) on Apple Silicon, ported to Apple MLX

Related repositories

Similar projects matched by category, topics, and programming language.

lopopolo
Featured
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI & Machine LearningAI Agents
2,390
slvDev
Featured
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI & Machine LearningLarge Language Models
1,960
littledivy
Featured
littledivy GitHub avatar

mimic

mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

AI & Machine Learning
1,482