Find your next open-source project

Search by name, purpose, or keyword, or paste a GitHub URL. Start with / to search agent skills (e.g. /pdf)

NandhaKishorM/sthiti

Machine Learning

A research method and reproducible code for teaching a frozen language model through checked lessons instead of weight updates.

100
11
Python
Apache-2.0
new today
+100 stars in 22h

What this is

Sthiti is a research training method for language models that adds learned behavior without changing any weights. It targets multiple-choice questions: on each forward pass the model's answer probabilities are the signal, and the method fits three closed-form linear probes on hidden states at layer 46, at the last token of each answer option. The probes estimate whether an option is correct, whether the model would pick it, and whether it belongs to the subject being studied. A lesson then nudges those states along the model's own answer direction, gated by subject. Lessons are stored separately, so each can be listed, tested, or removed. The scope is stated clearly: the model moves knowledge it already half-encodes into its answers; it cannot add new knowledge, and only multiple-choice output is supported for now. See how the method works.

Quick start

Requirements are Python with numpy, torch, transformers and datasets, pulled in by the package install. The unit tests need no GPU:

pip install -e .
python -m pytest -q tests

The full reproduction behind the reported table is a different matter; the README says it ran on one B200 GPU in about 45 minutes:

python -m sthiti.run
python -m sthiti.lever_test

Code is grouped by role: sthiti/probe.py for the closed-form probe, sthiti/judge.py for answer judging and the sign test, sthiti/lessons.py for the forward-pass lessons, sthiti/model.py for the frozen model wrapper, sthiti/worlds.py for generated questions, and sthiti/run.py for the round loop. Saved lessons and logs live under results/. The documented steps leave the model checkpoint source and GPU setup to the reproduction guide; check those before running the full experiment.

Results as reported

On generated physics and biology questions, the README reports that a frozen 27B Qwen3.8-27B model went from 74.2% to 85.0% on the final round of 12,288 unseen questions after five accepted lessons, with GPQA Diamond, MMLU-Pro and HLE staying within run-to-run noise. Each round's new questions were scored before learning, and a candidate lesson was kept only when it fixed clearly more answers than it broke on 2,400 held-out questions, following the stated sign-test rule. The sixth round found no candidate that passed, so no lesson was added. The record also keeps failed attempts, such as closed-form key-value weight edits that memorized answers and steering along a right-versus-wrong direction that broke more than it fixed results.

Constraints

  • Multiple-choice only: the lesson acts at the answer-option position, not at every token.
  • No new facts: lessons can only move knowledge already present in the frozen model, and the model cannot exceed its learner's score.
  • One model, two generated subjects, one run: the author states this is not evidence of superintelligence and calls the learning steady rather than accelerating, with each lesson adding less than the previous one.
  • The full loop needs a large GPU; only the tests are described as GPU-free.
  • The repository is Apache-2.0; citation details are in the README.

HotRepo's take

HotRepo recorded this repository on the new Python list on 2026-12-03 with 100 stars and 11 forks, all reported as gains in the first observed window of roughly 22 hours. There is no GitHub daily-rank record or Hacker News discussion to compare against, so the signal here is only the initial star and fork jump. The more decision-relevant facts are in the repo itself: a concrete, testable loop with a stated acceptance rule and a deliberately preserved failure log, but a single-model, single-run result that still requires a large GPU and a checkpoint not described in the README to reproduce.

Written by AI from the project's public information and HotRepo's records, updated . The project's own docs are the source of truth.

You might also like

  1. snap-stanford/memorillaTrains a memory module that compresses large document collections into a few memory tokens for a frozen LLM.Python767
  2. lyramakesmusic/neuron-explorerPushes every MLP neuron in Qwen3.5-4B up and down and browses the rollouts in a 3D explorer.Python673
  3. pytorch/torchtitanA PyTorch-native training stack for pretraining, fine-tuning, and RL of large generative models across multi-GPU clusters.Python5,926