Skip to main content

LLMPU

Large Language Model Processing Unit

Imagine a processing unit powered by LLM and infinite registers. Each register can store a string for prompts or codes. There is no fixed prompt. Instead, the contents of the first several registers are presented to the LLM. By generating code, the processing unit will be able to read and write any register, and directly execute the content of any register as Python code. Then the processing unit can be used as a general intelligent computing engine that potentially can improve itself by rewriting some of its own prompts or codes in registers.

The following instruction set is provided to the processing unit as Python functions:

  • read(r) returns content in register number r
  • write(r, content) store string content in register number r
  • run(r) execute the content in register number r as Python code

And their description is not hard coded, but stored in register 0, for example, as a "firmware".

Get Started

pip install llmpu
import llmpu

llmpu.init({
  "api_key": "",
  "model": "gemini-flash-latest"
})

# full config with default values:
llmpu.init({
    "api_key": "", # llm api key
    "V": 16, # visible register number
    "L": 16000, # hard character number limit for register
    "model": "gemini-flash-latest", # llm model
    "llm_config": {}, # llm config
    "EXEC": { # provided to execution environment, can be used by llm
        "read": llmpu.read, "write": llmpu.write, "run": llmpu._run
    }
})

Instruction set functions:

# use register 100 as an example
llmpu.write(100, "print('hello')") # truncate if exceed config["L"]
llmpu.read(100) # "print('hello')"
llmpu.run(100) # execute code in register 100
# llmpu.run also supports code string

Note: llmpu._run shares the caller's locals and insert new variables to caller's globals, while llmpu.run is isolated.

Control functions:

# main cycle: generate instructions
code = llmpu.cycle()
llmpu.run(code) # run the code

# core dump
llmpu.dump("dump.json") # dump state to a json file
llmpu.load("dump.json") # load state from a json file

Server and UI:

Network server uses srpc protocol. It only allows localhost traffic for security reason. Exposing the interface allows arbitrary code execution!

llmpu.serve(port=22222, browser=True)

Metadata

Release files for llmpu 0.3.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llmpu 0.3.2
File Size Uploaded
llmpu-0.3.2.tar.gz 7.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for llmpu 0.3.2
File Interpreter ABI Platform
llmpu-0.3.2-py3-none-any.whl Python 3 none any Details

Total release size: 16.0 kB

Release files / llmpu-0.3.2.tar.gz

Download URL llmpu-0.3.2.tar.gz
Size 7.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fcfe4bf12b609bf4a4f9a9a8f1f7b03dfd29a202dbfec9469d47198666908c45
BLAKE2b-256 checksum
How to use checksums
e4c189f8d3075e039b2e542f79dd8f38fe4f6e3a962e7502e792944e93c64955
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release files / llmpu-0.3.2-py3-none-any.whl

Download URL llmpu-0.3.2-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
02f271e75afe2ea9ea43bd863011f69664b02003ebc544b7ab38be5031f9f5e4
BLAKE2b-256 checksum
How to use checksums
801241c266690037928b3004fe493cbb83456b7d530a7676eecb86486f46068d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.2

2 release files

0.4.0

2 release files

0.3.5

2 release files

0.3.3

2 release files

This release

0.3.2 This release

2 release files

0.3.1

2 release files

0.2.6

2 release files

0.2.5

2 release files

0.2.4

2 release files

0.2.2

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page