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.
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
| Dimensions | Change | What it means to us | Recommended actions |
|---|---|---|---|
| Cost | LLM Agent inference cost reduced by 10-100x (DeepSeek / Gemini, etc.) | Karpathy's Loop can also be run on ordinary development machines | Try out the demo of autoresearch or Auto-Architecture |
| Scope | From LLM training to CPU architecture optimization | This "AI automatic research" paradigm can be transferred to any field with performance indicators | Think about which repetitive optimizations in your own work can be handed over to Agent |
| Threshold | Show HN proves that a single developer can achieve it | Google-level resources are no longer needed to do AI-driven optimization | The Fork project ran through the baseline experiment in 5 minutes |
| Reliability | Community 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 available | Compare 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:
- LLM Agent (such as Claude, Codex) reads the CPU architecture description and performance targets
- Agent proposes an architecture modification plan (such as adjusting cache size, branch prediction strategy, instruction pipeline depth)
- Use the simulator to evaluate the modified performance
- If performance improves, keep the modification and add it to the architecture pool; otherwise discard it
- 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
- 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)
- 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.
- 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.pyverification 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
# 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!
- GitHub: karpathy/autoresearch — 77.8k Stars
- GitHub: algorithmicsuperintelligence/openevolve — AlphaEvolve
- HN: Show HN: Auto-Architecture: Karpathy's Loop, pointed at a CPU — 185 points, 48 comments
Claude Code、DeepSeek、Hermes Agent、OpenAI、Gemini
Internal link guidance
- Want to get started? See: Claude Code automated writing practice: build an AI content production pipeline in 30 minutes
- Where is the boundary of AI Agent’s actual combat capabilities? Watch: AI Agent Tools 2026 Complete Tutorial: 5 Tools to Build an Automated Pipeline in 30 Minutes
- Real case: Independent developer uses AI Agent to earn monthly income $5,000 — 18-Year-Old Built a $5,000/mo SaaS With AI Agents — Zero Hand-Written Code
Topic hub
AI Agent Tutorials & Workflow Guides
Evergreen how-tos for coding agents, content pipelines, and n8n automation—linked to news context and real earn cases.
Explore AI Agent Tutorials & Workflow Guides →Monetization angle
How can you make money from this trend?
WayToClawEarn focuses on verified earn playbooks—not just news. Start from these cases.
DeepSeek + Claude Code Micro SaaS
Run multiple small products on cheap inference
Claude Code bug bounty
Productize agent skills into security services