Explore the research collection
10 entries · Follow this search
- Code
Muon formula grid (vukrosic)
Standard Muon orthogonalizes every gradient with a fixed 5 rounds of a degree-5 Newton-Schulz/Polar Express polynomial. This repo asks: for a given target, what is the cheapest formula? A grid over three settings — how weak the weakest singular direction is (0.0001–0.01 of the longest), closeness-to-equal tolerance (±0.02 to ±0.4), and matrix shape (square or wide 1:4 like most LLM layers) — searches 1,104 mixes of degree-3/5/9/13/17 rounds per cell (Polar Express fitting) and keeps the cheapest hitting the target. Examples: 9+9+9 matches-or-beats standard Muon at 33% fewer wide-matrix FLOPs; 13+13+13 matches Polar Express at 27% fewer; 13+13 on short-band-only settings at 51% fewer. Since Muon's orthogonalization is ~0.5–2% of training compute (4096-wide, 1–4M-token batches), a 25–50% cut on the step saves ~0.1–0.5% of a training run. Usage: pick settings in picker.html, copy coefficients from grid.json, or use formulas.py's `orthogonalize(G, coefs)` as a drop-in for the Newton-Schulz call. Caveats (author-stated): degree-9+ rounds need the small (rows×rows) part in float32 (all-bf16 overflows); cost is matmul work, not wall-clock — the float32 part shrinks the real saving; not timed on a GPU; whether directions outside the target band hurt training is untested.
- Code
Watching: Can Language Models Detect Read-Only Probes? (SauersML)
Fine-tuning only the last two layers of Qwen3-8B teaches the model to detect when a read-only probe is capturing its activations — but only under torch.compile. The probe forces the compiler to split layer 14's kernel into two with BF16 rounding in between (~2.5% change in the user token's hidden state), and the model learns to recognize this: 128/128 correct on new prompts, separation ~27 nats. The key control shows it reads the compiler's change, not the observer — a two-kernel layer with no probe also gets "Yes", while a no-kernel-split copying probe is never learned. One attention head (layer 35 head 6) carries ~99% of the effect via a cancellation trick that subtracts away the normal component of the user-token key. The same recipe extends: detection of HF output_hidden_states reads (80% held-out), distinguishing HF Trainer training steps from vLLM/SGLang serving (66/68 prompts), and a logit-lens message ("I can see you watching me") that appears only when hidden states are read from the compiled model. Detection is GPU-specific: perfect on the training L40S, 52–77% on four other NVIDIA GPUs, backwards on H100/A100. Untrained models cannot detect the probe. Caveats: GPU-bound exactness; thread/README are AI-documented ("written by Opus 5.5 and GPT-6 Astra"); repo code license unstated.
- Code
OpenAI math: open-sourced math results + FineEnvs/openai-math Harbor RL environments
OpenAI's Oct 6, 2026 release of model-produced mathematics (github.com/openai/math, Apache-2.0, ~12.9K stars), announced via OpenAI's X post (~22M views): 719 manuscripts organized into 372 result families — proofs of or progress on long-standing open problems (number theory, algebraic geometry, combinatorics, mathematical physics, TCS), produced by an unreleased internal frontier model. Each result used ~3 hours of ChatGPT Pro-equivalent thinking compute on average; ~4,000 problems were posed in the evaluation. Results sit at different verification stages: ~42% of top-line results ship with Lean 4 formalizations (lean/ library + formalization catalogue), and abridged reasoning summaries are released for 10 headline results (e.g., Mahler conjectures, Kaplansky direct-finiteness, Mézard–Parisi formula). The Lean formalizations are what make this RL-usable: Adithya S K (Scaling RL Envs @huggingface; founded cognitivelab_ai; previously enriched catalog ID 1619) converted the release into Harbor RL environments on Hugging Face — FineEnvs/openai-math, 369 tasks, each instructing an agent to prove a theorem in Lean 4 with Mathlib and graded by the repo's Comparator in a separate sandbox (Dockerfile + task.toml + tests/Challenge.lean pinned to the upstream commit, Apache-2.0). IAS Advisory Group on Mathematics and Artificial Intelligence (Institute for Advanced Study) published Sept 29, 2026 recommendations (stop testing advanced math on proprietary models; name the model; publish prompts, reasoning summaries, compute costs; don't treat results as model marketing) — OpenAI consulted the group; a spokesperson said the company takes the guidelines seriously but isn't bound by them.
- Code
slime v0.4.0: A First Step Toward Greater Scale
slime (THUDM) is an LLM post-training framework for RL scaling that connects Megatron training with SGLang rollout through a shared training/rollout/Data Buffer path; it is the RL framework behind the GLM-4.5 through GLM-5.3 model releases and supports Qwen, DeepSeek, and Llama 3 models (repo ~8.6K stars, Apache-2.0). Release v0.4.0, 'A First Step Toward Greater Scale', was motivated by OpenAI's Navier-Stokes research effort (~10,000 concurrent agents, ~130B output tokens), which prompted a rethink of RL infrastructure scale. Four architectural changes: (1) Focus — two training modes share one train.py lifecycle: synchronous training for algorithmic exploration and correctness, fully async training for throughput at scale (legacy train_async.py removed; PR #2391). (2) Distributed rollout — with the new straw backend, fully async rollout runs one rollout worker per Ray node on CPU resources, each with its own generation pool and asyncio event loop, so orchestration spreads across cluster CPUs instead of a single process bottleneck; training batches collect completed groups without waiting for every worker (PR #2410). (3) Persistent storage — straw (github.com/zhuzilin/straw) provides durable queues and shared tensor storage on a filesystem (JuiceFS currently supported): rollout workers publish payloads to shared storage and training ranks read by reference, moving bulk data off Ray's object-store transport; prompt tasks, partial rollouts, completed samples, and converted training batches persist as large append-only files to reduce small-file/filesystem metadata overhead, with checkpoint rollback support (PRs #2410, #2427). Select via --rollout-data-transport straw. (4) Independent recovery — Megatron training lifetime separated from the SGLang serving cluster: healthy engines/routers keep running after a training failure, and resubmitted training restores the last committed checkpoint and replays retained batches, reusing accepted samples and conversion results (PR #2444). Other improvements: score centering (REINFORCE objective with top-p replay and importance-sampling corrections, --use-score-centering, for training-inference mismatch); PipelineRL --flush-cache-interval letting unfinished requests and KV caches survive selected weight updates; streaming and agent rollouts (cumulative/incremental generation streams, partial-prefix retention, per-request cancellation); Biren SUPA and Ascend NPU accelerator backends; correctness fixes (linear-attention gradients under context parallelism, full-vocabulary reference logprobs in actor top-p replay, checkpoint shard selection in disk-delta sync); stack updated to Megatron Core 0.19.2, Transformer Engine 2.18.0, Flash Linear Attention 0.5.2, NCCL 2.30.7.
- Code
sfFFT: fused tensor-core FFT convolution for NVIDIA GB10 (DGX Spark)
sfFFT is an MIT-licensed fused tensor-core FFT convolution kernel for NVIDIA GB10 (DGX Spark), from the solidSF lab. It computes batched causal long convolutions (the operation at the heart of Hyena, H3, S4/SSM-style layers in convolution mode, and long audio/signal filters) in one kernel launch per batch: the forward FFT, pointwise filter-spectrum multiply, and inverse FFT all run in shared memory, with FFT stages executed as small dense DFT matrix multiplies on fp16 tensor cores with fp32 accumulation (a complex product takes four real MMAs). It uses the four-step/Bailey FFT factorization (N = R0 x R1 (x R2), radices 16/32/64) — the same structure as Monarch matrices and FlashFFTConv — with twiddles computed in registers via __sincosf, real-input/real-output stage pruning, and a filter spectrum precomputed once per channel and fused into the last forward stage. On one GB10 (sm_121, CUDA 13.0), batch 8x768 channels, it records 3.8x to 6.1x end-to-end speedup over the cuFFT pipeline (pad, R2C, pointwise multiply, C2R, slice) for lengths 128 to 8192, using the best measured plan per length and I/O type. ACCURACY CAVEAT (disclosed by the authors): sfFFT trades accuracy for speed — relative L2 error is ~3.3e-4 to 4.7e-4 with fp32 I/O and ~2.4e-3 with bf16 I/O (dominated by bf16 I/O rounding), versus ~3e-7 for the cuFFT fp32 pipeline against an fp64 reference — i.e. roughly 1,000x worse than cuFFT in fp32 and ~8,000x worse in bf16. This is a speed-vs-accuracy tradeoff, not a free speedup; the README states it is not a drop-in replacement for fp32 or fp64 scientific FFT work, and suitability for ML training/inference depends on the application's error tolerance. The repo ships an error-budget selector (--max-error) that benchmarks plans and picks the fastest candidate meeting a target, plus an experimental fp16-accumulation mode (1.11x-1.32x faster, ~0.24% error) and multiple allocator modes (device/managed/mapped/hybrid) for GB10's unified memory. Benchmark scope is GB10 only, lengths 128-8192 (memory max); repo created 2026-10-08, 11 commits. Code: github.com/solidsf-inc/sfFFT (MIT).
- Code
RSIGym: A Flexible Environment for Recursive Self-Improvement
RSIGym is an agent-native recursive self-improvement environment built on Everything as a Service: training (Tinker-backed LoRA), inference (OpenAI-compatible, Tinker), rollout (frontier-model gateway), evaluation (Harbor + E2B), sandbox (E2B SDK), and authorization (run keys, budget accounting) are reusable platform services, while the research agent works in a lightweight CPU-only container and spends its budget on improving the target system. Three improvement tracks are supported: Data (change training data), Harness (change execution harness, weights fixed), and Joint (data + training settings + harness together). RSI-Index measures how well frontier agents jointly improve a target model's weights and harness, defined as the mean fraction of the remaining performance gap closed across five benchmarks: RSI-Index = mean((final - initial) / (1 - initial)) over SWE-bench Verified (100 tasks), Terminal-Bench 2.0 (89), AIME 2024/2025 (60), GPQA Diamond (100), and SkillsBench (37, science/office/finance). In the main Joint-track study (six research agents improving Qwen3.5-35B-A3B-Base with a minimal harness, $500 platform-service budget per benchmark run), Opus 5 leads at RSI-Index 0.4809, followed by Opus 5.5 (0.4528), DeepSeek V4.1 Flash (0.4343), Astra (0.4093), Sol 6.1 (0.3321), and Sol 6 (0.2079). Opus 5's selected systems improve all five benchmarks: SWE-bench Verified 17.67% to 50.33% and AIME 31.67% to 97.78% (Terminal-Bench 10.49% to 26.97%, GPQA 51.33% to 83.33%, SkillsBench 1.65% to 21.21%). 29 of 30 Joint runs improve; four different researchers lead at least one benchmark. Two additional experiments: Opus 5 iterating the DSH harness with Qwen3.6-35B-A3B-Instruct weights fixed raises Terminal-Bench from 30.34% to 40.82% (tasks solved on all three attempts increase 15 to 26); and Qwen3.8-27B acting as its own researcher completes training, candidate comparison, and submission but scores 56.26% vs 56.66% initially on SkillsBench - its six-task development gain does not translate into an overall improvement.
- Code
AgentEnv (Scale AI) — open framework for building RL agent environments
AgentEnv Framework is a Python SDK and CLI for building, deploying, and running agentic environments and the tasks that grade agents inside them. Environments are containerized servers speaking the open agentenv-framework-protocol; the framework builds them into versioned images, deploys them behind a gateway, points an agent at them, and scores what the agent did. Scale AI says every RL environment it builds runs on AgentEnv, so the release is effectively Scale's internal RL environment stack opened to the community ('so more people can build the worlds agents learn in'). It covers environments, artifacts, agents, tasks, and a registry, with an entry-point-based plugin system (envs, task steps, artifacts, sandbox/state/environment providers, CLI plugins, explorer routes) and a built-in explorer UI plus a 'hello' bundle for zero-config trials. Distributed as agentenv-framework on PyPI (import package agent_env, command agent-env), full docs at agentenvframework.com/docs, Apache 2.0 licensed. Caveat: the repo is young (created 24 Sep 2026) and the public announcement is hours old, so real-world adoption and maturity are unproven.
- Code
Agent Memory Repo (Cognition) — open spec for persistent agent memory
Cognition open-sources its agent memory format as an open standard, usable with any agent (announced alongside Devin's 'Dreaming' feature, where Devin builds a persistent memory graph of how a user likes to work across sessions). The format is a git repo of Markdown: every session clones the latest memory, searches or follows links, updates entries as the agent learns (no human in the loop), and pushes after every edit. MEMORY.md is the entry point loaded at the start of every session; entries are one-line bullets with open [key: value] metadata (recommended: source link to the session where it was learned, added date); [[path]] cross-links connect files; history and versioning come from git. 'Dreaming' is a dedicated periodic agent with two jobs: add new memory (spot patterns across sessions) and clean up (merge duplicates, drop outdated entries, resolve contradictions). Composability: memories are folders — a session can clone several repos at once (personal + team + swarm folders), each keeping its own ownership/permissions/history, and the agent tracks who said what. Agent swarms coordinate via message-board folders (findings.md, questions.md) with git rejecting conflicting pushes, forcing the agent to reconcile both versions. Worked examples: four parallel agents diagnosing a 1-in-100 slow request by sharing measurements through the repo, and a saved SQL query reused across sessions. Open to contributions: https://github.com/AgentMemoryRepo/agentmemoryrepo. Notably complementary/contrastable with the pending proactivity items on agent memory: the two-tier Memorystore/AlloyDB blueprint (SQL-native vector + BM25 hybrid retrieval, compaction) and the 'docs, not memory' RAG-skeptic argument. Directly relevant to the user's unnamed AI agent app.
- Code
Homebrew: an open agent that brews AI models with you
Guided console agent ('brewmaster') that turns model fine-tuning into a beginner-friendly conversation: the user describes the goal and the agent handles base-model selection, data preparation, safe hyperparameters, and training. The guiding AI can be Claude, any OpenAI-compatible model, or a local model. Supports text models (Qwen3, Qwen3.5, Llama 3.x, Gemma 3/4) with LoRA/QLoRA/full fine-tuning via chainable CPT -> SFT -> DPO regimes, plus image LoRAs for Qwen-Image 2.1 with live previews. Trains on a local GPU or an automatically provisioned rented GPU (Runpod/Vast.ai), with publishing to Hugging Face. Demo proof: 'Grandma's Kitchen' (Qwen3.5 2B writing recipes in a warm grandma voice) and a Y2K digicam LoRA for Qwen-Image 2.1, each brewed in a single guided session on one rented GPU.
- Code
Combinatorial BPE Tokenizer (factored variation/prefix/core/suffix embeddings)
Combinatorial BPE (SwayStar123, MIT repo; intro X 2026-09-23, scaled update 2026-09-25) factors each token into (variation, prefix, core, suffix) and embeds as the sum of four tables so capitalization, leading whitespace/punctuation, and trailing punctuation (plus Simplified/Traditional Chinese) share one core. On a single 32k-budget tokenizer and 8-layer GPT (42–45M, RoPE/SwiGLU/QK-norm/Muon) trained 22.5k steps×16k tokens on 6 Wikipedia langs + 5 code langs, README reports ~32% fewer tokens overall (22–25% NL, 42–50% code) and ~3.7% lower bits-per-byte vs GPT-2-style BPE (tweet chart: 4.1%), better on every source; gains strongest on code. Author notes flop-match vs data-match caveats; small-scale / one-seed / preliminary.