본문으로 건너뛰기
cccskills
무료GitHub에 공개

llm-as-computer

Execute programs on a compiled transformer stack machine where every instruction fetch and memory read is a parabolic attention head. Demonstrates that transformer attention + FF layers can implement a working computer. Use when user mentions "llm-as-computer", "lac", "stack machine", "compiled transformer", "percepta", "parabolic attention", "execute program", or asks to run/trace programs on the transformer executor.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(7)

  • SKILL.md4.7 KB
  • CHANGELOG.md996 B
  • src/executor.mojo27.8 KB
  • src/isa_lite.py5.6 KB
  • src/programs.py20.6 KB
  • src/runner.py11.8 KB
  • src/setup.sh960 B

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

LLM-as-Computer: Compiled Transformer Stack Machine

A working computer built from transformer primitives. Every instruction fetch and stack read is a parabolic attention head (dot-product → argmax → value extraction). The transformer's weights ARE the interpreter — compiled analytically, not trained.

What This Proves

Attention is lookup; feed-forward is routing. A vanilla transformer with compiled weights can execute arbitrary programs: loops, recursion, arithmetic, memory access. 55 opcodes covering WASM i32 semantics. 21M+ steps/second via the Mojo executor.

Setup (once per session)

cd /mnt/skills/user/llm-as-computer/src && bash setup.sh

This installs Mojo (~20s) and compiles the executor binary (~6s). If Mojo is unavailable, the skill falls back to a pure-Python executor (slower but functional).

Usage

import sys
sys.path.insert(0, '/mnt/skills/user/llm-as-computer/src')

from programs import make_fibonacci, make_factorial, make_gcd, make_multiply
from runner import run, setup

# Ensure Mojo is compiled (idempotent)
setup()

# Run a program — shows instructions, trace, result
prog, expected = make_fibonacci(10)
print(run(prog))

# Benchmark mode — measures throughput
print(run(prog, benchmark=True, repeat=200))

Available Programs

From programs.py — all return (program, expected_result):

GeneratorDescriptionExample
make_fibonacci(n)Iterative fib via SWAP+OVER+ADD+ROTfib(10)=55, 111 steps
make_multiply(a, b)Repeated additionmul(7,8)=56
make_factorial(n)Loop with MULfact(8)=40320
make_gcd(a, b)Euclidean algorithmgcd(48,18)=6
make_power_of_2(n)Repeated doubling2^7=128
make_sum_1_to_n(n)Accumulation loopsum(15)=120
make_is_even(n)Parity checkis_even(7)=0
make_native_multiply(a,b)Single MUL opcode
make_native_divmod(a,b)DIV_S + REM_S
make_compare_binary(op,a,b)eq/ne/lt_s/gt_s/le_s/ge_s
make_bitwise_binary(op,a,b)and/or/xor/shl/shr_u/rotl/rotr
make_select(a,b,c)Conditional select

Writing Custom Programs

from isa_lite import program

# Assembly tuples
prog = program(
    ('PUSH', 10),
    ('PUSH', 20),
    ('ADD',),
    ('DUP',),
    ('ADD',),  # (10+20)*2 = 60
    ('HALT',),
)
print(run(prog))

# Loops: countdown from 5
prog = program(
    ('PUSH', 5),    # 0: counter
    ('PUSH', 1),    # 1: decrement
    ('SUB',),       # 2: counter - 1
    ('DUP',),       # 3: copy for JNZ test
    ('JNZ', 1),     # 4: loop if non-zero
    ('HALT',),      # 5: done, top = 0
)
print(run(prog))

ISA Reference (55 opcodes)

Stack: PUSH n, POP, DUP, SWAP, OVER, ROT Arithmetic: ADD, SUB, MUL, DIV_S, DIV_U, REM_S, REM_U Comparison: EQZ, EQ, NE, LT_S/U, GT_S/U, LE_S/U, GE_S/U Bitwise: AND, OR, XOR, SHL, SHR_S/U, ROTL, ROTR Unary: CLZ, CTZ, POPCNT, ABS, NEG, SELECT Control: JZ addr, JNZ addr, CALL addr, RETURN, HALT, NOP Locals: LOCAL.GET idx, LOCAL.SET idx, LOCAL.TEE idx Memory: I32.LOAD, I32.STORE, I32.LOAD8_U/S, I32.LOAD16_U/S, I32.STORE8, I32.STORE16

All arithmetic is 32-bit signed with WASM i32 semantics (wrap on overflow).

Architecture

The key insight: parabolic encoding k = (2j, -j²) makes dot-product attention peak sharply at a target position. Same encoding addresses program memory, stack, locals, and heap without interference. Each attention head is a compiled W_Q @ state → query, W_K @ memory → keys, scores = K @ q, output = V[argmax(scores)].

Updating from Repo

To pull latest source from the repository:

cd /mnt/skills/user/llm-as-computer/src
GH_TOKEN=$(grep GH_TOKEN /mnt/project/GitHub.env 2>/dev/null | cut -d= -f2)
for f in executor.mojo; do
  curl -sL -H "Authorization: token $GH_TOKEN" -H "Accept: application/vnd.github.v3.raw" \
    "https://api.github.com/repos/oaustegard/llm-as-computer/contents/src/$f?ref=main" > $f
done
for f in isa_lite.py programs.py runner.py; do
  curl -sL -H "Authorization: token $GH_TOKEN" -H "Accept: application/vnd.github.v3.raw" \
    "https://api.github.com/repos/oaustegard/llm-as-computer/contents/skill/src/$f?ref=main" > $f
done
rm -f percepta_exec  # force recompile
bash setup.sh

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

GitHub repository access in containerized environments using REST API and credential detection. Use when git clone fails, or when accessing private repos/writing files via API.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oaustegard/claude-skills1542026년 10월 21일 업데이트

Decide which model, effort level, and cascade shape each subagent gets, and how to keep improvement loops safe (evaluator-as-selector, stop on regression). Routes on measured cost-per-completed-task rather than per-token price, because a tier's token count varies more by task shape than price varies across tiers. Covers per-model effort semantics, the concision lever, cascade preconditions, context handoff, and watching a subagent fan-out live. Use when choosing a subagent's model or effort, when choosing how to escalate a failed attempt, or when asked which model or effort a task should get. Grounded in a 2026-07 calibration, a 2026-08 coding-cost study, a 2026-09 seeded-bug repair battery, a 2026-10 Haiku 5.5 ladder priced per spawn, and a 2026-10 retry-versus-escalation ladder on 295 SWE-bench Verified tasks; Managed Agents API specifics are operational, not calibrated.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oaustegard/claude-skills1542026년 10월 21일 업데이트

Securely manages API credentials for multiple providers (Anthropic Claude, Google Gemini, GitHub). Use when skills need to access stored API keys for external service invocations.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oaustegard/claude-skills1542026년 10월 21일 업데이트

Guidance for asking clarifying questions when user requests are ambiguous, have multiple valid approaches, or require critical decisions. Use when implementation choices exist that could significantly affect outcomes.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oaustegard/claude-skills1542026년 10월 21일 업데이트

Pre-change blast-radius report for a symbol or file. Walks tree-sitting references, augments with a plain-text scan over non-parsed files (configs, plain docs), and clusters affected sites by feature (`_FEATURES.md`) or top-level package. Use when about to refactor, rename, or delete something in a repo you don't own — "what breaks if I change `validateUser`", "who calls this", "is this safe to remove", "where is this used", "blast radius", "impact analysis". This is the CONVERGENT pre-change risk skill — for "what is this repo?" use exploring-codebases; for "where is X?" use searching-codebases.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oaustegard/claude-skills1542026년 10월 21일 업데이트

Read Bluesky/ATProto without depending on Bluesky's AppView — interactions on a user's posts, thread replies, any repo's records, network-wide backlinks across every lexicon, an account's handle and PDS history, which collections are active network-wide, and layer-by-layer outage diagnosis. Use when bsky.app or the AppView is down or slow, when a Bluesky read returns timeouts or 5xx, when asked who liked/replied/quoted/reposted something, when pulling live Bluesky context cheaply, when reading records straight from a PDS, when asked who references a record or account anywhere on the network, whether an account has changed handle or migrated servers, or which lexicons and non-Bluesky apps are active on atproto. Complements browsing-bluesky, which routes everything through the AppView and fails when it does.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

oaustegard/claude-skills1542026년 10월 21일 업데이트

oaustegard의 스킬 모두 보기

이 스킬의 문제 신고