Skip to content

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

Apple Machine Learning Research 1 min read Research hardMaster

Weighted State Souping for Efficient Long-Context Retrieval

Weighted state souping learns query-dependent weights for combining independently encoded, cached SSM states for chunks like documents, tool definitions or memory records, fixing the degradation that plain state souping and vanilla SSMs show on long, crowded contexts. It substantially improves single- and multi-hop document QA, needle-in-a-haystack retrieval, variable tracking and tool use. A sparse variant keeps encoding cost near-constant in context length while preserving or sometimes improving accuracy, and simple theoretical arguments explain when souping works and when it fails.

Assumes: state space modelslong-context language modelingretrieval-augmented generation

Related posts

  • On the Importance of Gating: Memorization vs. In-Context Learning in State Space Models

    Apple Machine Learning Research hardMaster

    The gating mechanism in State Space Models makes them first learn an in-weights "memorization" solution, which delays or even prevents convergence to a correct in-context learning solution. This happens even when the architecture and its memory capacity impose no fundamental limit, and it helps explain why SSMs lag Transformers on in-context learning and precise retrieval. Gating also often improves generalization to longer sequence lengths. The results, supported by theory and experiments, point to gating as the key factor shaping SSM training dynamics and generalization, and offer a basis for improving linear-time models.

  • 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.

  • Falcon-H1: A Family of Hybrid-Head Language Models Redefining Efficiency and Performance

    Hugging Face hardMaster

    Falcon-H1 is a family of six open-weight language models (0.5B to 34B, base and instruct, Apache 2.0-based license) built on a parallel hybrid mixer that runs attention and Mamba-2 SSM heads side by side, with a tunable attention/SSM ratio. Design experiments found that a small fraction of attention suffices, larger SSM memory size and very large RoPE base values help, and depth matters most but costs efficiency. Training departed from convention: hard data shown from the start rather than via a curriculum, high-quality samples reused more often, 35 tuned μP multipliers, and dampening multipliers to remove SSM loss spikes. The models support 256K context and 18 languages, and reach up to 4× prefill and 8× generation throughput over Qwen2.5-32B at long sequence lengths, though they are slightly slower at short contexts.

  • Building Deep Research: How we Achieved State of the Art

    Hugging Face mediumAdept

    Tavily's deep research agent reached state of the art on DeepResearch Bench while using 66% fewer tokens than LangChain's Open Deep Research, mainly through context engineering. Each tool output is distilled into a short reflection, and only past reflections are passed to the tool-calling model. Raw sources come back only for the final write-up. This turns token growth from quadratic (n·m(m+1)/2) into linear (n·m) across m iterations. Other lessons: keep orchestration simple so future model gains carry through, deduplicate sources through global state, expose a small toolset, design for failure modes, and treat LLM-as-judge evals as directional feedback rather than the optimization target.

  • GLM-5.2: Built for Long-Horizon Tasks

    Hugging Face hardMaster

    GLM-5.2 is Z.ai's MIT-licensed flagship model for long-horizon coding-agent work, with a 1M-token context and selectable thinking effort levels. It scores 81.0 on Terminal-Bench 2.1 and lands near Claude Opus 4.8 on FrontierSWE. Architecturally, IndexShare reuses one sparse-attention indexer across every four DSA layers, cutting per-token FLOPs 2.9× at 1M context. An improved MTP draft layer, using shared indices and KV, rejection sampling and an end-to-end TV loss, raises speculative-decoding acceptance length by 20%. Post-training switches from group-wise optimization to critic-based PPO, which handles compacted sub-traces, and uses slime for agentic RL plus a two-stage rule-and-LLM-judge guard that blocks reward-hacking tool calls online without aborting rollouts.

The quest for software engineering knowledge.

Look:
Layout: