WayToClawEarn
Medium impactHacker News / GitHub

Auto-Architecture: When Karpathy's Loop meets CPU optimization - LLM Agent evolutionary algorithm is automatically improving chip architecture

The AI ​​autonomous research framework autoresearch proposed by Karpathy gave birth to the Auto-Architecture project - automatically optimizing the CPU architecture using an LLM Agent-driven evolutionary algorithm. The project received 185 points and 48 comments on Hacker News. The community believes that as the capabilities of the new generation of models improve, the idea of ​​​​this AI automatic optimization system is moving from theory to practicality.

WayToClawEarn EditorialPublished Apr 29, 2026Updated Aug 8, 2026

Editorial review of public sources · AI-assisted drafting. How we work · Original source

Core conclusion

In April 2026, developer fesens released the Auto-Architecture project on Hacker News, applying Karpathy's Loop (the AI autonomous research framework proposed by Karpathy) to CPU architecture optimization. Behind the project is a general paradigm: let the LLM Agent act as a "research scientist" to automatically optimize complex computing systems through evolutionary algorithm cycles - randomly perturb the system → measure performance → retain improvements → repeat iteration.

This idea triggered extensive discussion in the community (185 points / 48 comments). The core dispute is not "can it be used", but "when to use it". Comments pointed out that Google DeepMind solutions like AlphaEvolve have already verified the feasibility of the LLM+ evolutionary algorithm. The real new change is that the new generation model makes this cycle cheap and fast enough that it can also be run in the hands of ordinary developers.

Key Points

  • Published: 2026-04-28 (No. 12 on Hacker News home page)
  • Core concept: Karpathy's Loop — LLM Agent serves as the "mutation operator" of the genetic algorithm and automatically discovers system optimization solutions.
  • Affected objects: AI automation engineers, LLM Agent developers, system optimization teams
  • Core changes: AI Agent no longer just "writes code", but starts to automatically "do research"

Background: From Karpathy's Loop to Auto-Architecture

In March 2026, Andrej Karpathy released the autoresearch project (GitHub 77.8k stars), proposing a disruptive concept: allowing AI Agents to conduct experiments independently on a small but realistic LLM training setup. Agent modifies the code → trains for 5 minutes → checks whether the indicators are improved → retains or discards the changes → repeats the cycle. When you wake up, the Agent has run about 100 experiments and optimized the model to the optimal configuration on your platform.

This pattern is called Karpathy's Loop by the community. Its essence is a Genetic Algorithm, but the "mutation" is not a random bit flip, but a "smart but random" idea generated by the LLM Agent.

SEO Keywords: Karpathy's Loop, LLM Agent evolutionary algorithm, AI autonomous optimization, Auto-Architecture

Key Impact

DimensionsChangeWhat it means to usRecommended actions
CostLLM Agent inference cost reduced by 10-100x (DeepSeek / Gemini, etc.)Karpathy's Loop can also be run on ordinary development machinesTry out the demo of autoresearch or Auto-Architecture
ScopeFrom LLM training to CPU architecture optimizationThis "AI automatic research" paradigm can be transferred to any field with performance indicatorsThink about which repetitive optimizations in your own work can be handed over to Agent
ThresholdShow HN proves that a single developer can achieve itGoogle-level resources are no longer needed to do AI-driven optimizationThe Fork project ran through the baseline experiment in 5 minutes
ReliabilityCommunity comments pointed out that "it is not novel, but it has become practical"Solutions such as AlphaEvolve previously required a lot of engineering resources, but now open source is availableCompare the implementation differences between AlphaEvolve and Auto-Architecture

Auto-Architecture: Karpathy's Loop in practice on CPU

The Auto-Architecture project shifts the core loop of autoresearch from "optimizing LLM training" to "optimizing CPU microarchitecture". The basic process is:

  1. LLM Agent (such as Claude, Codex) reads the CPU architecture description and performance targets
  2. Agent proposes an architecture modification plan (such as adjusting cache size, branch prediction strategy, instruction pipeline depth)
  3. Use the simulator to evaluate the modified performance
  4. If performance improves, keep the modification and add it to the architecture pool; otherwise discard it
  5. Repeat the cycle to automatically explore the architectural design space

The core discussions in the HN community focus on the following points:

  • The door to practicality is open: User zby commented: "This is not novel - but with the new models it is just becoming practical." - The core contradiction has changed from "can it" to "can it run now?"
  • There are pioneers: User thald pointed out that Google DeepMind's AlphaEvolve project (based on Gemini's evolutionary algorithm) and the open source implementation OpenEvolve are already taking the same path
  • Single player operable: The HN score of 185 points proves that independent developers can already produce demonstrable results.

Adaptation suggestions

If you are an AI automation practitioner

  1. Try Karpathy's Loop now: Fork karpathy/autoresearch (77.8k stars), run through the baseline experiment on a single GPU (or even a MacBook fork). The entire process only requires one model file (train.py) and one agent instructions file (program.md)
  2. Apply the loop to your scenario: Any process with "change parameters → evaluate → judge whether it is good or bad" can be automated using this model. It is applicable to A/B testing, SEO strategy optimization, and advertising delivery parameter adjustment in content production.
  3. Focus on OpenEvolve: If Karpathy's Loop is an entry-level implementation, Google's AlphaEvolve/OpenEvolve provides a more mature evolutionary algorithm framework

Task List

  • Fork karpathy/autoresearch, run uv run prepare.py + uv run train.py verification environment
  • Load program.md in Claude Code or Hermes Agent to start the first round of independent optimization experiments
  • Compare the implementation differences between autoresearch and Auto-Architecture, and think about how to apply them to your own optimization process
  • Set up a scheduled task and let the Agent automatically run a round of experiments every night

Example: Launching Karpathy's Loop with Claude Code

terminal

# 1.
git clone https://github.com/karpathy/autoresearch.git
cd autoresearch

# 2. ( uv)
uv sync

# 3. (, 2 )
uv run prepare.py

# 4. ( 5 )
uv run train.py

# 5. Agent

# Claude Code / Codex / Hermes Agent,

# Have a look at program.md and let's kick off a new experiment!

Related

Claude CodeDeepSeekHermes AgentOpenAIGemini

Internal link guidance

View source →

Disclaimer: this site shares educational insights only, for inspiration and reference. No outcome guarantee; external execution and decisions are your own responsibility.