Explore the research collection
2 entries · Follow this search
- Paper
HyperThink: Text-to-Parameter Hypernetworks for Efficient Reasoning
HyperThink amortizes long-form reasoning traces into a single query-conditioned parameter update. A lightweight hypernetwork reads the question with a frozen pretrained text encoder; a bias encoder combines the query representation with learnable parameter tokens assigned to selected layers; and a vector-quantized (VQ) decoder maps them through learned discrete codebook prototypes to bias shifts applied to a small selected subset of the base LLM's biases, leaving the rest of the model frozen. This is not per-query gradient optimization: the trained hypernetwork predicts the update in one forward pass. Training uses correctness-filtered thinking-mode responses generated by the base model itself; only the hypernetwork and codebook are trained, teaching the adapted model to reproduce the response tokens without the trace. On Qwen3-0.6B trained on GSM8K with MATH-500 as the out-of-domain test, HyperThink reaches 73.40% Pass@5 versus 61.48% for budget-controlled thinking at similar compute (1150.83G vs 1198.27G FLOPs), with end-to-end latency comparable to native non-thinking on a single H200. A VQ ablation (43.32% Acc / 66.90% Pass@5 without VQ vs 48.76% / 73.40% with VQ on MATH-500, near-tied on GSM8K-train) supports the authors' reading that the discrete bottleneck regularizes the query-to-update mapping and aids transfer. Boundaries: on harder AIME problems high-budget thinking remains substantially stronger, and on executable code native non-thinking can be competitive or stronger; the established contribution is an improved low-latency accuracy trade-off, strongest in the near-non-thinking regime.
- Other
Shard: getting to 10x KV cache compression
Engineering writeup of Shard, a drop-in HuggingFace Cache. Reimplementing TurboQuant stalled around 4-6x; authors split K and V: undo RoPE then PCA+int4 on K (rank 192/1024, DP bit allocation with a 4x drop penalty) and Hadamard + 4-d vector quantization on V. Attention scores run on int4 PCA coeffs via a relative-Delta RoPE identity; V Hadamard is applied after the weighted sum. 4 FP16 sink tokens + 64-token recency window. Decode stream uses data-oblivious Hadamard+Lloyd-Max (8-bit path 750/750 FP16 match at 150 tokens). Llama-3.1-8B: 10x at 8K / 11.2x at 32K, NIAH recall 1.000 across 4K-32K, LongBench-E avg 16.19 vs FP16 16.24, WikiText-2 PPL +0.26%. Decode throughput 0.39-0.49x FP16, so a memory win not a latency win. Code krish1905/shard.