LFMputer: a compiled computer in the LFM3 decoder stack

LFMputer-1.7B

A compiled computer in the LFM3 decoder stack, with explicit memory and analytic computation.

Inspired by Qwenputer. Created by suayptalha.

Quick start ยท Decoder architecture ยท Memory ยท Evaluation ยท Qwenputer comparison ยท License

LFMputer combines LFM3 with a fixed-weight RV32 computer, addressable tensor RAM, a memory bridge, and ten analytic facilities. These components are integrated into the decoder layer sequence itself: 15 machine layers precede 24 pretrained LFM3 language layers.

The language backbone, compiled circuit coefficients, bundled program images, request switch, and conditional adapters are stored together in model.safetensors. Machine instructions execute through tensor operations, while the included runtime handles tokenization, typed calls, execution phases, and result formatting.

Property Implementation
Language backbone LFM3-1.7B, 24 language decoder layers
Machine layers Program control, 11 computer blocks, RAM/files, bridge, analytics
Full decoder sequence 39 layers in model.language_model.model.layers
State widths 2,048 language features; 2,679 machine features
Computer Fixed-weight RV32 circuit with bundled program images
Memory 8 MiB logical RAM, 256-word cache, 256-byte MMIO
Memory bridge 32 KiB transfer at program boundaries
Weights One mixed-precision safetensors file, approximately 3.54 GB
Runtime Included custom loader and phase-aware execution

Decoder architecture

Conceptual execution phases through the decoder stack and explicit machine state

The decoder contains dedicated layers for computer execution, memory operations, analytic computation, and language generation. Each operation enters its owning layers through a shared model execution interface.

Decoder positions Role State and computation
0 Computer control Input embedding, program images, boot control, output maps
1โ€“11 Computer execution Compiled feed-forward and recurrent-memory stages
12 RAM and files Address decoding, request delay, cache, MMIO, versioned files
13 Memory bridge Transfers between CPU working banks and addressable RAM
14 Analytics Ten bounded computation facilities
15โ€“38 Language Pretrained LFM3 decoder blocks

The 11 computer blocks implement 18 ordered circuit stages. Seven blocks combine memory and feed-forward branches, one contains a memory branch, and three contain feed-forward branches.

Computer blocks follow LFM3โ€™s operator โ†’ residual and gated feed-forward โ†’ residual organization, with adapters suited to discrete machine execution:

Component LFM3 language decoder Machine decoder
Residual structure Operator and gated-MLP residual branches Same organization, with unused branches omitted
Normalization RMSNorm Identity normalization
FFN activation SiLU ReLU
FFN projections Dense linear maps Ordered sparse projections
Memory operator Softmax attention or short convolution Recurrent hard-address memory

The machine blocks therefore share LFM3โ€™s decoder organization while using specialized operators for arithmetic and stateful computation.

During language generation, machine layers pass the hidden tensor through unchanged, and the 24 language blocks operate with their native positions and cache indices. During computer execution, the machine layers advance the computational state without running the language backbone on every instruction.

The complete layout is defined in decoder_config.json. The backbone configuration describes the language layers and their KV and convolution caches.

Memory

LFMputer provides explicit, writable tensor RAM. Its 8 MiB logical capacity describes the address space; total RAM and VRAM usage also includes model weights, caches, runtime state, and temporary allocations.

Component Implementation
Addressing Two-level hard attention over fixed binary address keys
Backing store Mutable tensor cells supporting read, write, and compare-and-swap
Request delay Bit-encoded width-7 depthwise convolution; six-cycle latency
Cache 256-word cache with tags and hit/miss accounting
MMIO 256-byte memory-mapped region
CPU working banks Recurrent memory heads in the compiled computer
Bridge First 32 KiB exchanged at program run/pause boundaries
Files Versioned file contents and metadata mapped into RAM views

Language KV caches, convolution state, machine memory, and file state have distinct roles. The memory bridge transfers working data at program boundaries, while the convolutional delay line implements request timing. Mutable session state can be saved separately from the fixed model weights.

Quick start

Download the repository, including its runtime code and tokenizer:

python -m pip install "huggingface-hub==2.3.0"
hf download suayptalha/LFMputer-1.7B --local-dir LFMputer-1.7B
cd LFMputer-1.7B
python -m pip install -r requirements.txt

python chat.py --device cuda \
  --prompt "Use calc to evaluate 123456789 * 987654321. Return only the result."

From the downloaded folder:

from modeling_lfmputer import LFMputer

model = LFMputer.load(".", device="cuda")

result = model(
    mode="chat",
    prompt=(
        "Compute XOR element by element for "
        "left=[17,23] and right=[5,9]. Return JSON."
    ),
)

print(result["answer"])
print(model.decoder_layout)
print(len(model.language_model.model.layers))  # 39

Use the included loader to initialize the complete architecture. The default chat runtime executes serially and uses the built-in computation facilities without an external Python interpreter.

Precision: the language backbone uses BF16, computer and memory operators require FP32, and selected analytic operators require FP64. Do not cast the entire model to BF16 or FP16.

Built-in facilities

Compiled computer

The RV32 computer includes the bundled calc, c-sort, c-crc32, and mpy-s1 program images. Ahead-of-time compilation produces the circuit coefficients and program data stored in the weights; inference executes those stored programs through the tensor circuit.

Analytic computation

The analytic decoder provides ten bounded facilities:

Facility Purpose
Schema checking Validate structured fields and types
Workflow dependencies Check dependencies between operations
Byte indexing Index and retrieve byte-oriented data
Delimiter and scope checking Track supported structural constraints
Polynomial arithmetic Perform supported polynomial operations
Text constraints Check supported textual rules
Unit analysis Evaluate dimensions using a finite unit registry
SAT Solve bounded Boolean satisfiability problems
Graph reachability Compute supported connectivity relations
Bit and byte operations Perform supported binary transformations

Capacities and supported operations are defined in computer_config.json and lfmputer_runtime/analytics.

Request policy

A learned switch uses language features to enable the computation facilities when appropriate. Conditional LoRA supports circuit use on the enabled path, and the language model selects individual facilities through typed calls.

The switch controls the facilities together; individual operations are selected by the language model. Correct execution still depends on selecting the appropriate operation and supplying valid arguments.

Execution and validation

Machine execution uses ordered sparse projections, ReLU gates, recurrent memory operators, and explicit state transitions. Language execution passes through the machine layers by tensor identity before entering the pretrained language blocks.

Validation covers tensor loading, logits, language caches, machine transitions, RAM and bridge operations, analytic results, generated tokens, and session persistence. Checkpoint serialization and offline loading are also tested.

See validation.json for the recorded checks, release.json for artifact identities, and DESIGN.md for the numerical operators and execution model.

These checks cover the tested inputs and execution environment. Runtime timing fields vary naturally, and behavior across other backends or library versions is outside that validation scope.

Evaluation

Results use matched evaluation subsets, not full leaderboard protocols. Changes are expressed in percentage points (pp).

Agent and coding tasks

Evaluation LFM3 LFM3 + Python LFMputer
IFBench subset 24.18% 25.27% 29.67%
BFCL V4, Python AST subset 80.00% 82.50% 81.67%
LiveCodeBench, v6-only subset 28.93% 28.93% 31.40%

All conditions use matched questions. Python denotes an isolated interpreter provided by the evaluation harness.

Protocol: greedy decoding, repetition penalty 1.1; 6,144 total output tokens, 3,072 per turn; up to 4 auxiliary calls; 24,576-token context.

Note. These are subset measurements, not full leaderboard scores. Batching and numerical backends can affect results. The formal-computation and Qwenputer tables describe separate circuit-design studies, not measurements of this checkpoint.

Formal computation tasks

These purpose-built synthetic tasks use families related to the circuit-use training data. They measure in-family computation support, not broad out-of-distribution coding ability.

Task family LFM3 LFMputer Change
Bit operations 0.0% 80.0% +80.0 pp
Polynomials 20.0% 100.0% +80.0 pp
SAT 0.0% 100.0% +100.0 pp
Graph reachability 22.0% 100.0% +78.0 pp
Units 28.0% 32.0% +4.0 pp
Overall 14.0% 82.4% +68.4 pp

These measurements use a short generated-text budget: 1,536 total tokens and 768 per LFM generation turn. LFM3 truncation was 86.0%; LFMputer truncation was 0.0%. Inserted LFMputer circuit-result text was outside its generated-token budget. The difference therefore includes the ability to complete within a short budget rather than measuring arithmetic accuracy alone.

Qwenputer comparison

Task family Qwenputer LFMputer Change
Bit operations 0.0% 80.0% +80.0 pp
Polynomials 0.0% 100.0% +100.0 pp
SAT 5.0% 100.0% +95.0 pp
Graph reachability 35.0% 100.0% +65.0 pp
Units 20.0% 25.0% +5.0 pp
Overall 12.0% 81.0% +69.0 pp

Note. These results cover our matched synthetic tasks, including families seen during LFMputer training; they do not establish general superiority. Evaluation budgets and native facilities differ. Correct answers must complete within execution limits; truncated responses count as failures.

Repository layout

Path Purpose
model.safetensors Complete single-file tensor checkpoint
modeling_lfmputer.py Public model loader and request policy
decoder_config.json Full machine/language decoder layout
computer_config.json Circuit, program, memory, and analytic capacities
routing_config.json Request policy, adapters, and logical tensor aliases
backbone/ LFM3 implementation, configuration, and license
lfmputer_runtime/decoder.py Decoder cells, phase dispatch, and tensor transport
lfmputer_runtime/computer/ Compiled computer primitives and runner
lfmputer_runtime/memory/ RAM, files, bridge, and persistence
lfmputer_runtime/analytics/ Bounded circuits, codecs, and generation driver
chat.py Serial inference CLI
assets/ Architecture illustration and conceptual animation

Checkpoint keys use stable logical component names; the loader places their tensors into the decoder-owned modules. This separates file layout from execution-layer positions without adding a second weight file.

Limitations

  • This custom decoder runtime is required; loading only the backbone does not activate the computer.
  • Mutable machine state and discrete operations remain explicit. The architecture is not a stateless dense FFN and does not claim that stock LFM3 attention provides writable RAM.
  • The default chat context is 8K. Gate features reject overlong inputs instead of silently truncating; the full model's long-context behavior has not been validated.
  • Token/call/chip limits, malformed calls and incomplete reasoning remain failure modes. Thinking-disabled prompts do not guarantee short responses.
  • Runtime latency and peak memory depend on the execution path. This is not a validated 4-bit or mobile release.

Credits

Created by suayptalha. LFM3 is developed by Liquid AI. The compiled-computer design is inspired by and builds on Qwenputer by Divyansh Agrawal. The LFM3 decoder integration, explicit RAM/bridge subsystem, analytic facilities, and request policy are part of LFMputer. This is an independent project, not an official Liquid AI or Qwenputer release.

License

The model uses the LFM Open License v1.0, matching LFM3. Read LICENSE for the complete terms. Original model and implementation notices, including applicable MIT and Apache-2.0 notices, are retained in NOTICE and licenses/.

Citation

@misc{kocabay2026lfmputer,
  author = {Kocabay, ลžuayp Talha},
  title = {LFMputer-1.7B: A Compiled Computer in the LFM3 Decoder Stack},
  year = {2026},
  url = {https://huggingface.co/suayptalha/LFMputer-1.7B}
}
Downloads last month
217
Safetensors
Model size
2B params
Tensor type
I64
ยท
F64
ยท
F32
ยท
I32
ยท
BF16
ยท
BOOL
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for suayptalha/LFMputer-1.7B

Finetuned
(12)
this model