Downloads · 30 days
0
kaushikreddyxyz/oracle-encoders
oracle-encoders is a machine learning model from kaushikreddyxyz. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for pytorch.
Three independent per-layer oracle encoders (Stage 7, corrected one-layer-per-model design). Each maps raw text - the 54 concept-probe detection scores of EXACTLY ONE gemma-2-2b layer, per token. Full fine-tune of Qwe…
Downloads · 30 days
0
Access
Public
Updated Jul 13, 2026
Repo size
36.7 GB
Likes
0
Public
Click a slice to open those files.
.pt11.4 GB · 100%
From the Hugging Face model README
Three independent per-layer oracle encoders (Stage 7, corrected one-layer-per-model design). Each maps raw text -> the 54 concept-probe detection scores of EXACTLY ONE gemma-2-2b layer, per token. Full fine-tune of Qwen/Qwen3-0.6B-Base + MLP head (1024 -> 4096 -> GELU -> 54). Original runs trained 2026-07-10 overnight; L6/L8 continuation (cont1) checkpoints trained 2026-07-10 afternoon.
Two generations per layer (L6/L8). layerXX/ = the ORIGINAL overnight run
(stopped by an 11h wall clock, still improving). layerXX/cont1/ = the
CONTINUATION: warm-started from the original best, trained on the remaining
unseen corpus-scores(+overflow) shards until the eval plateau rule fired
(Δ median R² < 0.005 over trailing 150M tokens). Same val shards {353,354}
throughout, so all R² values below are directly comparable. For deployment,
prefer cont1 for L6/L8 (strictly better on the identical heldout set);
L14 was deliberately not continued.
| Checkpoint | Layer | Best heldout median R² | Spearman ρ | Total train tokens | Stop reason | wandb |
|---|---|---|---|---|---|---|
layer06/best_stripped.pt | 6 | 0.8331 | 0.898 | 690M | 11h wall clock | bga5ozov |
layer06/cont1/best_stripped.pt | 6 | 0.8368 | 0.900 | 854M | plateau (Δ0.0027<0.005/150M) | 5voreqcz |
layer08/best_stripped.pt | 8 | 0.7965 | 0.874 | 701M | 11h wall clock | jouy3hop |
layer08/cont1/best_stripped.pt | 8 | 0.8002 | 0.877 | 865M | plateau (Δ0.0033<0.005/150M) | mf6v2nyo |
layer14/best_stripped.pt | 14 | 0.7217 | 0.829 | 614M | 11h wall clock (not continued) | 44zfc7qf |
Baseline: the deprecated 162-joint oracle reached 0.6371 — all beat it.
Each metrics.jsonl holds the full eval history (per-probe / per-family R²,
Spearman, loss vs tokens); cont1 metrics cover the continuation segment only.
layerXX/best_stripped.pt (no optimizer state existed):
150-step LR re-warmup to the original cosine's value at the resume step,
then cosine toward a 0.1 floor at the projected full-epoch step.cont1/best_full.pt includes full Muon+AdamW optimizer state (unlike
the originals) — exact resume is possible if training is ever pushed
further. cont1/DONE.json records stop reason/step/tokens; cont1/logs/
has the training + prefetch logs.import torch
from transformers import AutoModel
from train_oracle_perlayer import OracleMLPHead # concept_probes/stage7_oracle/code/
ck = torch.load("layer08/cont1/best_stripped.pt", map_location="cpu", weights_only=False)
enc = AutoModel.from_pretrained("Qwen/Qwen3-0.6B-Base", dtype=torch.bfloat16)
enc.load_state_dict(ck["encoder_state"])
head = OracleMLPHead(ck["hidden_size"], ck["head_up"], ck["K"]).to(torch.bfloat16)
head.load_state_dict(ck["head_state"])
# per-token: pred = head(enc(input_ids).last_hidden_state) -> [.., 54] standardized scores
Outputs are in corpus-standardized units (dequantized int8 scores standardized by
per-probe ClimbMix mean/std). Output dim c = concept ck["concepts"][c].
Checkpoint dict keys: encoder_state (Qwen3-0.6B, bf16), head_state (MLP),
step, train_tokens, layer, layer_idx, K=54, concepts (store order),
families, head_up=4096, args (+ muon_state/adamw_state in best_full.pt).
[n,3,54] store before training.gold_probes/layer06|08|14. DoM steering scores (separate):
concept-probes-corpus-scores-dom-layer8.concept_probes/stage7_oracle/code/train_oracle_perlayer.py (cont1 flags:
--resume --hf-subdir layerXX/cont1 --cont-anchor-mult --cont-end-step).Checkpoint of the Stage-7 eval results and probe weight arrays (moved out of git;
source dir concept_probes/5_oracle/out/, formerly stage7_oracle/out/). Relative
structure is preserved under stage7_eval/.
gold_probes_per_layer/ — the 54-probe gold banks actually used for scoring:
detection (mixed-method) and steering (difference-of-means) .npz, layers 6/8/14probe_set.json, probe_set_arrays.npz, probe_set_dom_steering_l6_l8_l14.npz —
packed probe-set definition + arrays + DoM steering vectorsretro_metrics/ — retroactive expA/expB metric extracts (.jsonl) + wandb watch scriptfigures/ — oracle-vs-probe association figure and its underlying matricesg1_corpus_stats.json, g1_natural_ref.json, g1_residual_checks.json,
g2_retention.json, verify_report.json, expA_frozen_metrics.jsonl,
expB_final_analysis.json, coord_fidelity.json, quant.json, scoring_config.json,
bench/ (throughput/parity benchmarks)