# ⚡️Qwenputer: A Computer Inside an LLM — Yohei Nakajima, Untapped Capital

## Executive summary

This discussion details Qwenputer, a project that compiles a RISC-V CPU into the extra layers of a general LLM (Qwen). This allows the LLM to function as a computational tool. The concept was extended with qwenFS, a filesystem built into the weights, enabling state management. The BabyAGI Inside demo showed a controller loop executing tasks (like arithmetic) one step at a time, demonstrating a proof-of-concept for running a bounded agent loop entirely within the model's weights, though the 2B model proved insufficient for complex agent tasks.

## Key takeaways

- In-Model Computation and State Management: Qwenputer embeds a RISC-V CPU into the LLM's weights, allowing the model to act as a tool. qwenFS further extends this by storing data in the attention mechanism (using 'gated delta net'), effectively making the model a database.
- The Agent Loop Architecture: The BabyAGI Inside cycle is a bounded process: the controller reads the task ledger, sends tasks to Qwen, forces a 'close thinking' tag, executes a 'write file' command, and loops until the 'HALT' token is emitted.
- Limitations of Current Models: The 2B model successfully completed a short arithmetic task (2+3)×4 by splitting it into sequential tasks, but the speaker noted that the model was not robust enough to run a full agent, requiring scaling to stronger models.
- Beyond the Model: Event Sourcing: The concept of state and execution graphs is applied to organizational systems, where a company's 'playbook' is derived from historical meeting notes (events) using an event-sourced log, making the firm 'agent agnostic'.

## Technical details

- Qwenputer Implementation: Qwenputer is a CPU compiled into extra layers of Qwen, allowing the LLM to execute deterministic functions. This is distinct from previous research using languages like Rasp or DeepMind's Tracer.
- Agent Loop Mechanism: The agent loop is bounded (fixed number of loops) and relies on a circuit that manages the task ledger. The process is: read task list -> execute task X (via Qwen) -> force 'close thinking' -> start 'write file' command -> loop until 'HALT' token.
- Future Research Directions: Potential research includes 'training across the boundary' (freezing the compiled loop) and developing self-modifying agents where the agent can adjust or write new code/weights into the compiled structure.

## Practical implications

- The integration of computational logic (CPU) and state storage (FS) directly into the LLM weights offers a new paradigm for building self-contained, deterministic AI agents.
- The use of event sourcing to manage organizational knowledge (playbooks) suggests a robust method for building 'agent agnostic' systems that can be driven by various LLMs (Claude, Gemini, etc.).
- The focus on 'weak to strong generalization' highlights the need for research into training models to effectively utilize complex, compiled internal structures.

## Topics

LLM Architecture, RISC-V, Agentic Systems, Inference, State Management, Event Sourcing, Qwenputer, qwenFS, BabyAGI Inside, ActiveGraph

Source: https://www.youtube.com/watch?v=FE8To1gW1Jw
