Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Jane Street Tech Blog 6 min read Research hardMaster

Mitigating memorization in LLMs

LLMs evaluated on historical prediction benchmarks can score well by recalling memorized outcomes from pretraining rather than reasoning, so an intern project measured and tried to mitigate this using a cricket match-preview dataset, comparing accuracy before and after the model's knowledge cutoff. Divergence decoding, which steers a large model's logits using two small auxiliary models trained on different date cutoffs, reduced pre-cutoff performance without hurting post-cutoff accuracy, while distilling that behavior back into weights failed, likely due to a poor data mix. Rewriting previews as podcast transcripts improved post-cutoff results more than pre-cutoff, and Natural Language Autoencoders revealed structure such as task vectors from fine-tuning and decisions forming in middle layers, though they gave no usable memorization signal.

Assumes: LLM pretraining and knowledge cutoffslogit-level decodingmodel distillationautoencoders and activations

Related posts

  • Accelerate RL rollouts by up to 50% with distribution-aware speculative decoding

    Together AI hardMaster

    Distribution-aware speculative decoding (DAS) speeds up the rollout phase of LLM RL post-training, which can consume ~70% of training time due to long-tail straggler generations, while keeping outputs identical to standard decoding. It combines a training-free suffix tree drafter built from a sliding window of recent rollouts with length-aware scheduling. The drafter adapts to the evolving policy by inserting newly verified tokens back into the tree. The scheduler interleaves long requests across GPUs and gives long requests aggressive speculation budgets from the start, medium requests moderate budgets, and short ones none. Reported results are over 50% rollout time reduction on math RL with DeepSeek-R1-Distill-Qwen-7B and ~25% on code RL with Qwen3-8B, with matching reward curves across 8k–16k sequence lengths and batch sizes of 16–32.

  • Faster Text Generation with Self-Speculative Decoding

    Hugging Face hardMaster

    Self-speculative decoding from the LayerSkip paper drafts tokens by exiting early from a model's own intermediate layers and verifies them with the remaining layers. Because no separate draft model is needed, weights, KV cache and compute for the first layers can be shared. It only speeds things up on checkpoints trained with the LayerSkip recipe (layer dropout plus early-exit loss), and Hugging Face transformers exposes it through the `assistant_early_exit` argument to `generate()`. On A100 benchmarks it reaches up to about 1.8x over autoregressive decoding and beats two-model speculative decoding for most Llama sizes except Llama2 70B. The best exit layer is a per-model tradeoff between draft accuracy and drafting cost.

  • Aligning LLM-as-a-Judge with Human Preferences

    LangChain easyNovice

    LangSmith evaluators now store human corrections to LLM-as-a-Judge scores as few-shot examples, optionally with explanations, and inject them into the judge prompt on later runs so the evaluator aligns with team preferences without manual prompt engineering. LLM judges work because they can see information the generator lacked, such as reference answers, and because judging is easier than generating. Common uses are detecting RAG hallucinations, RAG correctness and toxic outputs, in both online and offline evaluation. The design draws on few-shot learning and Shreya Shankar's Berkeley paper "Who Validates the Validators?".

  • The sleep framework: A new way for LLMs to retain knowledge in continual learning

    Google Research hardMaster

    A sleep phase for continual learning alternates LLM operation between an active (wake) phase that stores information in fast short-term memory and an offline sleep phase that consolidates it into long-term parameters. Consolidation unlocks low-rank Mixture-of-Experts memory blocks, distills in-context memory into them via on-policy Generalized Knowledge Distillation plus RL-based imitation learning rewarded by semantic and Levenshtein similarity, then resets the short-term parameters. A 'dreaming' stage generates synthetic samples with randomly routed experts, filters them by gradient-based selection, and refines the model with SFT and RL. Reported results include near-zero forgetting on continual translation for unseen languages like Manchu and Kalamang, near-perfect BABILong scaling to 10M tokens, better factual incorporation than SFT and SEAL on SQuAD, and 79.2%/69.0%/46.1% on AIME 24/25 and HMMT 25.

  • A failed experiment: Infini-Attention, and why we should keep trying?

    Hugging Face hardMaster

    A Hugging Face reproduction of Google's Infini-attention found that retrieval quality degrades as memory is compressed more times. Ring attention, YaRN and RoPE scaling remain the better ways to extend a pretrained model's context length. Infini-attention splits the sequence into segments, runs local causal attention within each segment, and folds earlier segments into a fixed-size linear-attention memory, mixing the two outputs through a learned sigmoid gate. Small 200M-parameter models trained with Nanotron on FineWeb showed some use of the memory, but continual pretraining of Llama 3 8B failed passkey retrieval when the needle sat in an earlier segment. Most of the effort went into debugging a convergence issue, and the post lays out reproduction principles: start small, train a solid baseline, and run controlled ablations.

The quest for software engineering knowledge.

Look:
Layout: