SMELT: Schema-Aware Markdown Compilation for Efficient Local Token Inference

Read full text Summarise with VIRAT
Authors: Edmund Lister
Cited by: 0

Summary

No summary yet. VIRAT can read this paper and write a plain-language summary of its aim, methods, key findings and limitations.

Summarise with VIRAT Free to try with your Science Catalogs account.

Abstract

Every time a user sends a message through an AI agent framework, the system resends the entire workspace context to the model. Not once per session, but on every single call. In a typical deployment, this means thousands of tokens of static workspace files are reprocessed for every message, and in a 50-message session that overhead alone can exceed 350,000 tokens. For API users paying per token, this is direct cost. For providers serving millions of users, it is infrastructure waste at scale. For local model users on fixed hardware, it is latency on every response. This paper presents SMELT (Schema-aware Markdown compilation for Efficient Local Token inference), a system that compiles agent workspace files into a denser runtime form, reducing this overhead by 78 to 97% on query-conditioned retrieval and 6% on full startup bundles. On the tested corpus, a direct factual query that would normally consume 1,373 tokens of workspace context requires only 73 tokens after SMELT compilation, a 95% reduction that compounds across every call in a session. Baseline comparisons against raw markdown, heading-stripped markdown, and naive JSON conversion confirm that SMELT outperforms all tested alternatives by a wide margin. SMELT operates across four layers: lossless archival storage with SHA-256 round-trip verification, schema-aware semantic compilation that reduces structural redundancy while preserving values, macro-level dictionary compression, and query-conditioned selective emission that delivers only the context relevant to a given prompt. Evaluated on a production OpenClaw workspace running Qwen 3.5 VL 122B A10B (8-bit, MLX) on Apple M3-Ultra hardware with measured wall-clock latency, the system achieves high fidelity on most tested files. The system preserves full provenance, enabling decompilation from runtime format back to the original source. SMELT treats agent context as a systems problem: source files remain human-readable; runtime context is compiled.

Fields of Study & Subjects

Topic Modeling Natural Language Processing Techniques Software Engineering Research

Publication details

Journal / source
Zenodo (CERN European Organization for Nuclear Research)
Publication date
2 April 2026
Language
EN
Document type
Preprint