Large Language Model Process Unit
Project description
LLMPU
Large Language Model Process Unit
Get Started
pip install llmpu
import llmpu
llmpu.init({
# "VR": 16, # visibile register number
# "L": 10000, # hard character number limit for register
# "model": "gemini-3.5-flash", # llm model
"api_key": "your llm api key", # llm api key
# "llm_config": {}, # llm config
})
Helper functions:
llmpu.write(100, "print('hello')") # truncate if exceed config["L"]
llmpu.read(100) # "print('hello')"
llmpu.call(100) # execute code in register 100
Main cycle:
llmpu.cycle()
# this will provide all visible registers to llm, and execute the code generated by llm
Minimum Example
# using default config
firmware = """
You are a process unit with many registers (this is register 0, or r0) with string values. Each register can store up to 5000 characters. Registers 0-15 (r0 to r15) are visible to you, and other registers are available but not presented to you. You can operate on registers using the following functions:
- `READ(r)` returns content in register number `r`
- `WRITE(r, content)` store string `content` in register number `r`. The content will be truncated to 5000 characters maximum.
- `CALL(r)` execute the content in register number `r` as Python code.
Conventional register purpose:
- r1: current task
"""
llmpu.write(0, firmware)
llmpu.write(1, "load r10001 to r1")
llmpu.write(10000, "do nothing")
llmpu.write(10001, "print hello to the screen, then call r10010")
llmpu.write(10010, "print('hello again')\nWRITE(1, READ(10000))")
llmpu.cycle() # r10001 will be loaded to r1
llmpu.cycle() # print "hello", then call r10010, which will print "hello again" and write r10000 to r1
llmpu.cycle() # pass
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file llmpu-0.0.1.tar.gz.
File metadata
- Download URL: llmpu-0.0.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd92b337d5cfcdb8beb027c0c14bc29fd9699e0ebfb451b5390e4550cbf34311
|
|
| MD5 |
2daf84881cb66eadb8d0e1fd7c25b071
|
|
| BLAKE2b-256 |
886b06aaf9312d65a8a85559037969f14539337290e0dfba2479120244eb3804
|
Provenance
The following attestation bundles were made for llmpu-0.0.1.tar.gz:
Publisher:
manual-publish-pypi.yml on yzITI/llmpu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llmpu-0.0.1.tar.gz -
Subject digest:
cd92b337d5cfcdb8beb027c0c14bc29fd9699e0ebfb451b5390e4550cbf34311 - Sigstore transparency entry: 1805290052
- Sigstore integration time:
-
Permalink:
yzITI/llmpu@4338209624e9c83396972714190f2862bf6f7e60 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yzITI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
manual-publish-pypi.yml@4338209624e9c83396972714190f2862bf6f7e60 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file llmpu-0.0.1-py3-none-any.whl.
File metadata
- Download URL: llmpu-0.0.1-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dffce40898f05d32f33dd7b34e2eb3a57fab29d4efb11f1046c4a60f02119601
|
|
| MD5 |
fa8f13ecf403879c34522da6b4138dc2
|
|
| BLAKE2b-256 |
f059c60f1a864388ab646cc073b10b152feb4adcba43f4d86b68a71f095335ce
|
Provenance
The following attestation bundles were made for llmpu-0.0.1-py3-none-any.whl:
Publisher:
manual-publish-pypi.yml on yzITI/llmpu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
llmpu-0.0.1-py3-none-any.whl -
Subject digest:
dffce40898f05d32f33dd7b34e2eb3a57fab29d4efb11f1046c4a60f02119601 - Sigstore transparency entry: 1805290070
- Sigstore integration time:
-
Permalink:
yzITI/llmpu@4338209624e9c83396972714190f2862bf6f7e60 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/yzITI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
manual-publish-pypi.yml@4338209624e9c83396972714190f2862bf6f7e60 -
Trigger Event:
workflow_dispatch
-
Statement type: