Alibaba's latest AI model ran autonomously for 35 hours to optimize code for its own custom chip

Alibaba’s AI Just Spent 35 Hours Rewriting Code for Its Own Processor. Without Human Help.

Alibaba’s latest AI model, an agentic version of the Qwen series, autonomously ran for 35 hours to optimize code designed for the company’s own custom chips. The model worked without human intervention, rewriting software libraries to improve performance on Alibaba’s proprietary Hanguang 800 AI accelerator.

This marks a major leap in AI-driven hardware optimization. Until now, tuning code for specific chips has been a labor-intensive, manual process. Alibaba’s agent took over the entire workflow: analyzing the existing code, generating improvements, compiling the result, testing it, and iterating.

What the AI Actually Did

The AI focused on operator libraries—the low-level software that tells a chip how to perform mathematical calculations for AI workloads. By rewriting these libraries, the model aimed to squeeze more speed out of the hardware.

The AI agent ran continuously for nearly a day and a half, performing what would normally be a weeks-long engineering task.

Results were measured in execution speed. The optimized code allowed the Hanguang 800 to run specific operations faster than the previous hand-tuned versions. Alibaba did not specify exact performance gains for every test, but confirmed the AI outmatched human-written code in multiple scenarios.

How It Worked: A Self-Directed Workflow

Alibaba’s model did not simply generate code and stop. It executed a full development cycle:

  • Analysis Phase: The agent first examined the existing operator code and its dependencies, understanding what the chip needed to do.
  • Code Generation: It then produced new, optimized versions of the library functions.
  • Build and Compile: The agent invoked the chip’s toolchain to compile the new code into a usable binary.
  • Testing: It ran the compiled code against standard benchmarks to measure real-world performance.
  • Iteration: If results were suboptimal, the agent revised its own output and repeated the cycle.

The entire 35-hour run was self-managed. No engineer touched the system once the initial instruction was given.

Why This Matters for Chip Design

Custom AI chips are proliferating—from Google’s TPUs to Amazon’s Trainium to Alibaba’s Hanguang 800. Each requires bespoke software to perform well.

The bottleneck has shifted from hardware design to software optimization. Hardware teams can build a chip in months, but tuning the software stack often takes longer. An AI that can autonomously optimize its own target hardware collapses that timeline.

Alibaba’s approach suggests a future where AI models design and refine their own runtime environment. The agent did not need to understand the chip’s architecture the way a human engineer does. It simply ran experiments, measured outcomes, and kept what worked.

Limits of the Approach

The agent ran for 35 hours, which is far longer than a human would spend on a single optimization pass. This is acceptable for a one-time library improvement, but may not scale to real-time or dynamic workloads.

The model also required a predefined scope. It did not redesign the chip’s architecture or invent new algorithms. It optimized known operations within existing constraints.

Alibaba’s AI is a powerful tool for targeted, repetitive optimization—not a replacement for chip architects or systems engineers.

The Bigger Picture: AI Writing Its Own Software Stack

This development fits a broader industry trend. Companies like Google and NVIDIA are also experimenting with AI that generates and tunes its own acceleration code.

The end goal is a self-optimizing loop: AI models that can modify the software they run on, improving their own speed and efficiency without human intervention. Alibaba’s 35-hour test is a proof of concept that this loop is already working.

Key Takeaways

  • Autonomy: The AI ran unassisted for 35 hours, completing a full develop-test-iterate cycle.
  • Domain Specific: It optimized code only for Alibaba’s own Hanguang 800 chip, not for general hardware.
  • Performance Gains: The agent outperformed human-written code in multiple benchmarks.
  • Time Savings: What takes a team weeks was done in under two days by an AI agent.

What’s Next

Alibaba has not announced whether this agent will be integrated into its production cloud services. The company is likely exploring whether the approach can generalize to other chips and other software stacks.

If successful, this could reduce the cost and time of deploying new hardware—and give cloud providers a powerful tool for keeping their infrastructure ahead of competitors.

Gnoppix is the leading open-source AI Linux distribution and service provider. Since implementing AI in 2022, it has offered a fast, powerful, secure, and privacy-respecting open-source OS with both local and remote AI capabilities. The local AI operates offline, ensuring no data ever leaves your computer. Based on Debian Linux, Gnoppix is available with numerous privacy- and anonymity-enabled services free of charge.

What are your thoughts on this? I’d love to hear about your own experiences in the comments below.