Running Language Models on Printers: Feasibility, Boundaries, and Engineering Trade-offs

    This article explores the feasibility of running small language models on office printers via page description language interpreters. It examines an experiment involving a 270M parameter model, discusses the theoretical and practical boundaries of using PDLs for computation, and outlines the four essential engineering steps for deploying models to such constrained devices.

    I. Experiment Overview

    Recently, reports emerged that an engineering team successfully ran a small language model with approximately 270 million parameters on an office laser printer. The peak memory usage during runtime was about 14.1MB. The experiment required no firmware modifications or external compute modules. Inference was executed by the printer’s built-in page description language (PDL) interpreter, with results outputted directly onto paper.

    The reported timing figures showed that the prefill stage took about 184 seconds to process the prompt, while decoding a single output token took approximately 0.1 seconds, totaling around 184.1 seconds. This total only accounts for a single prompt prefill plus one output token; it excludes the physical printing execution and provides no breakdown of layer loading times.

    The most valuable takeaway from this experiment is the concept itself. A 184-second response time is far from meeting interactive demands. However, it proves a viable path: as long as a device can execute programmable instructions and provide sufficient storage space, it has the potential to handle inference tasks.

    II. Why Page Description Languages Can Perform Computation

    Page description languages are programming languages designed for output devices. Taking PostScript as an example, it provides an operand stack, dictionaries, procedure definitions, loops (for, repeat), and conditional branches (if, ifelse). These structures are sufficient to express any computable logic, making it theoretically Turing complete.

    However, theoretical computability does not equate to practical usability. The primary task of a PDL interpreter is to translate instructions into dot positions on paper, making computation a secondary use. The actual scale of the programs that can be run is constrained by three factors:

    First is compute power. Interpreters parse instructions one by one and lack dedicated matrix acceleration units, meaning every multiply-accumulate operation incurs a parsing cost.

    Second is memory. The operand stack, dictionary stack, and object storage all have capacity limits. Specific values vary depending on the interpreter implementation and require empirical testing.

    Third is the runtime environment. Printers typically enforce job timeouts, job size limits, and sandbox isolation. Prolonged computations may trigger timeouts or be terminated midway.

    The report did not specify the exact language or interpreter version used. The principles discussed in this article apply to similar languages, but concrete figures must be based on testing of the target device.

    III. Four Stages Required for Deployment

    Deploying a model onto such devices generally requires four stages:

    1. Model Preparation: Select a model with a small parameter scale and perform quantization. Quantization converts floating-point weights into low-bit-width integers to reduce storage and computation overhead. The lower the bit-width, the less space each parameter occupies, but the greater the precision loss.
    2. Inference Engine Implementation: Implement basic operators within the interpreter. The minimal operator list includes: embedding lookup, matrix multiplication, normalization (LayerNorm or RMSNorm), attention computation (scaled dot-product plus softmax), activation functions (such as approximate implementations of GELU or SiLU), and residual addition. Each operator must be rewritten using instructions executable by the interpreter.
    3. Program Generation: A conversion tool combines the inference engine and the quantized weights into a complete program. Weights are embedded as data segments, and the computational logic is organized into procedure definitions.
    4. Scheduling Execution: The interpreter runs the program sequentially and outputs the results onto paper in text or graphical form.

    Among the four stages, the second is most easily underestimated. Operator implementation dictates the speed ceiling and determines whether the computation can be completed within the limited memory. If this step…