AdvancedWeekly lectures

Week 7 — mHC, Engram and DSpark

Conditional Memory · Speculative Decoding

Advanced

II — Memory-efficient inference

Overview

Three separate directions. Single-Pass mHC reorganizes residual-stream mixing to hit the ideal activation-traffic bound. Engram is conditional memory: 196B parameters of sparsely accessed hashed N-gram embeddings, decoupled from computation. DSpark is speculative decoding with a Markov head and confidence-scheduled verification.

What You Will Learn

Core Concepts

Conditional memory

Engram replaces some computation with addressable memory: hash N-grams → sparse embedding lookup → gate.

Speculative throughput

\mathbb E[\text{tokens/round}]=f(\text{acceptance},\ \text{draft length})

DSpark

Semi-autoregressive drafting + a Markov head + confidence-scheduled verification; trained after backbone pretraining and kept aligned during post-training.

Prerequisites

Work these pages on this site before the lecture.

Lecture notes

Three mechanisms, three jobs:

Required readings

Lab / Implementation

Model speculative throughput vs acceptance × draft length and validate it; build a tiny Engram layer and compare against an equal-parameter dense FFN.

Not on this site (paper reading required)

Mastery Check


Part of CS/AI 684 — Efficient Long-Context Agent Systems.