13Methods

How every number on these pages was produced

Model and software

ModelQwen/Qwen3-8B-Base
Revision49e3418fbbbca6ecbdf9608b4d22e5a407081db4
Tokenizersame repository and revision
transformers / torch5.18.0 / 2.14.1+cu126
HardwareNVIDIA GeForce RTX 3050 Ti Laptop GPU (layer streaming; one decoder layer on the GPU at a time)
Exported2026-10-15T22:45:38+00:00
Git commit at exportcc886f7b88092f5940b11bfb8a063226f42288a2-dirty

Measurement design

  • Architecture: model instantiated on the meta device (exact shapes, no weights), compared with the stored safetensors headers and the model card; operation order checked in the installed source.
  • Hidden states: forward hooks at module boundaries (layer input, RMSNorm outputs, attention output, MLP output, layer output), not output_hidden_states, whose last entry is post-norm in this transformers version.
  • Layer streaming: the library's own Qwen3DecoderLayer, loaded one at a time. Tested equal to the full model (1e-4, float32, Qwen3-0.6B-Base).
  • Real 8B cross-check in bfloat16 against an offloaded transformers model: top-1 agreement 6/6 and 12/14 positions on two sentences, log-probability differences up to 0.46 nats. This is agreement within bfloat16 noise on a small check, not complete numerical equivalence; the runner is still being validated.
  • Documents and passages start with <|endoftext|>, which Qwen's tokenizer does not add by itself.
Methods

How every visual is labelled

  • Toy calculation Small, hand-made or seeded numbers that teach an operation exactly. Not Qwen values. Controls may change them freely.
  • Recorded Qwen measurement Saved from the real checkpoint or from a recorded forward pass. Controls only select among what was recorded; new text is never simulated.
  • Live model computation Would mean the model runs in your browser or on a server now. Nothing on these pages does, so this label is not used.
  • Experiment pending The experiment has not been run. No values or charts are shown; the commands that produce them are listed.
Methods

Limitations

  1. 1One model so far. Every internal measurement is Qwen/Qwen3-8B-Base at revision 49e3418f; nothing here generalizes to other models without running them.
  2. 2The one-sentence trace and the two recall passages are illustrations measured on real data, not samples large enough for general statements about Qwen.
  3. 3Learn Mode labs marked Toy use hand-picked numbers to teach an operation. They are not Qwen values.
  4. 4Diagnostic projections (logit lens) read intermediate residuals through a head trained on the last residual only. They show linear readability, not the model's intermediate decisions.
  5. 5Measurements on the laptop use layer streaming in bfloat16. Two bfloat16 code paths can differ by a few tenths of a nat on individual log-probabilities; near-tie top-1 decisions can flip.
  6. 6Human-vs-AI results do not exist yet. The EditLens dataset is gated and access has not been granted. The pipeline is tested only structurally, on a small model and a synthetic fixture.
  7. 7When they exist, probe results will describe linear accessibility of label-correlated information in one dataset. They will not show causal mechanisms, will not transfer automatically to other generators or domains, and cannot establish authorship of any text.
  8. 8Black-box API models are never internally probed here; their text can only be data.
Methods

Claims this project does not make

  • "Layer k detects AI text."
  • "RMSNorm causes (or removes) the AI signal."
  • "Qwen knows this text is AI-generated."
  • "These PCA clusters prove the classes separate."
  • "The logit lens shows what Qwen predicts at layer k."
  • "A detector score proves who wrote a text."
  • "We probed GPT, Claude or Gemini internals."
  • "Qwen's recall plateau is explained." (Not measured: only one model has been run.)
Methods

Reproduce and download

Commands

python scripts/latentlens/inspect_qwen_architecture.py --model Qwen/Qwen3-8B-Base
python scripts/latentlens/build_tokenizer_examples.py
python scripts/latentlens/trace_one_token.py --loader stream
python scripts/latentlens/run_recall_analysis.py --loader stream \
  --input scripts/latentlens/passages/gettysburg_address.txt --name "Gettysburg Address (public domain)" \
  --input scripts/latentlens/passages/control_original.txt --name "Original control paragraph (unpublished)"
python scripts/latentlens/verify_streaming.py
python scripts/latentlens/export_web_artifacts.py

Full GPU workflow for the university machines: docs/LATENTLENS_CSE_RUNBOOK.md.

Artifacts (JSON)