Mayank A.
Writes most about learning paths for ai engineers, test oracles for agent-written code and ai code review.
Field guides
Entries by Mayank A. are sources in these guides:
Entries
- 2026-11-20R205sharedTrain LLM From Scratch: every post-training objective on one hand-written TransformerA plain-PyTorch Transformer (no trl, peft or transformers) carried through pretraining, SFT with assistant-only loss masks, a Bradley-Terry reward model, DPO/ORPO/KTO/IPO/SimPO, PPO with a value head and GAE, and GRPO with Dr. GRPO, DAPO and GSPO flags, all on one backbone via a single forward_hidden method. A --arch modern flag swaps in RoPE, RMSNorm, SwiGLU, GQA/MLA, MoE and a KV cache; Muon, LoRA, speculative decoding and int8 are hand-written too. A 369K-param TinyStories model trains on a laptop CPU in about 5 minutes. Strongest evidence: its base eval matches lm-evaluation-harness on GPT-2 to 0.0006 per log-likelihood. Weakest: reward model and DPO both at 0.574 accuracy and no published GSM8K numbers for post-training stages, so the RL stages teach mechanics, not gains. Widest objective coverage of the three from-scratch repos (R097, R120).
- 2026-11-19R151sharedPonytail: a minimal-code skill for coding agents, with its own benchmarkOne MIT prompt for ~20 agent hosts: read the touched code and list every place the change must reach, then take the first rung that works (does it need to exist, already in repo, stdlib/platform, installed dep, one line, minimum code plus a small test for logic); never cut validation, security, accessibility; end every reply with what was skipped. Maintainer's Claude Code/Opus 5.5 benchmark (39 tasks x5): -53% code, -41% time, -26% cost, risky logic with a test 98% vs 68%; security tasks level at 30/30, reply quality no better than no skill. Self-benchmark: reproduce on your repo; watch over-reuse and silent scope cuts.
- 2026-11-17R134CodeGraph: a local code graph agents query over MCP, and what its benchmark does and doesn't showRust and tree-sitter code graph in local SQLite (symbols, calls, imports, routes for 20+ frameworks, cross-language mobile bridging), queried over MCP by ~25 agents; watcher re-sync, per-file staleness banner and connect-time reconciliation keep it fresh. Maintainer benchmark (7 repos, Opus 4.8, median of 4): 88% fewer tool calls, 53% faster, 62% fewer tokens, 44% cheaper on architecture questions, but savings near zero on Gin and 13% on Django, and ~80% more retrieval context left resident in long sessions. The control arm reached the CLI through bash in 26 of 28 runs until blocked; earlier figures lacked that block. Anonymous telemetry.
- 2026-11-17R120nanochat: the whole LLM pipeline in one hackable repoMinimal single-node harness: BPE tokenizer (32,768 vocab), pretraining (Muon + AdamW, FP8), SFT on SmolTalk + MMLU aux x3 + GSM8K x4 with a Python tool, RL, CORE and bits-per-byte evals, KV-cache inference, chat CLI. Reference speedrun beats GPT-2 CORE (0.2565) in 1.65 h on 8xH100 (~$48), down from 3.04 h in Jan 2026; ClimbMix data and two autoresearch rounds drove the biggest gains. Distinctive ideas the post skips: one `--depth` dial sets every hyperparameter compute-optimally and changes must help at all depths; a public time-to-GPT-2 leaderboard with commits; explicit precision instead of autocast; no config framework; PRs disclose LLM-written code. Post overstates "understand RoPE, GQA" (code implements, Discussions guides teach) and omits the 8xH100 cost. Data mix: one pretraining dataset; SFT mix via epoch flags or editing chat_sft.py. Caveats: speedrun data ratio 8 is tuned to the leaderboard, SFT on MMLU/GSM8K train flatters those evals, from-scratch only.
- 2026-11-16R098Stanford CS329A: Self-Improving AI Agents, a free lecture mapAutumn 2025 graduate seminar by Aakanksha Chowdhery and Azalia Mirhoseini, about 10.5 hours recorded: test-time compute scaling, robust verification (ORM vs PRM, weak-verifier ensembles), feedback from tools and code (ReAct, RLEF, Constitutional AI), planning and tree search, train-time RL (STaR, GRPO, DAPO), open-ended self-improvement (AlphaEvolve, AI Scientist), agentic evals and task horizon. Through-line: generation is cheap, verification is the product. Research-first; guest lectures not recorded; readings are late-2025.
- 2026-11-15R082Craft Anything: rebuild software, graded against the originalA desktop app, CLI and MCP server around a pure-Rust reverse-engineering engine (320 tools: decoders, disassembler, decompiler, optional Ghidra) driving a coding agent (Claude Code first; others via ACP, mostly unverified). Loop: Study the target (website, app, game, file), Build a new project in the requested stack, Check against the original (websites at three widths, games by their own self-test, apps by running them) and refine until Ready. The original is the oracle; findings are evidence records with confidence, coverage, limitations and an unknowns list; open questions live in an `inbox/` folder. Clean room (default) refuses tools that read code or files, explicitly a tool policy and not an OS sandbox; Deep unlocks everything. Caveats: similarity is UI fidelity, not correctness (auth, races, business rules); clean-room leakage via the agent's own shell; IP risk is the user's; installs run code; alpha, two weeks old, 33K stars.
- 2026-11-12R052Open Code Review: Alibaba's hybrid AI code reviewerPlain code does file selection, bundling of related files into isolated-context sub-agents, template-matched review rules, and separate comment positioning and reflection; the agent only reads code, searches for context and reasons about defects, with a toolset distilled from production tool-call traces. Delegation mode hands the model half to the host agent (Claude Code, Codex, Cursor and others). On Alibaba's AACR-Bench (200 PRs, 1,505 labelled issues), OCR + Opus 4.6 scores F1 25.1% and precision 33.9% vs Claude Code + Opus 4.6 at 11.6% and 7.2%, at about 1/15 of the tokens; recall is lower (20.0% vs 28.9%), and with Opus 4.8 OCR recall falls to 11.7%. Caveats: vendor-built benchmark, untuned baselines, old OCR versions in the table, low absolute scores, rule and bundle boundaries narrow what gets seen.
Credits come from each entry's byline. How reputation is scored.