L2E Llama2.c in a PDF in a Shroedinger PNG<p>Visit: <a href="https://github.com/trholding/llama2.c">https://github.com/trholding/llama2.c</a><p>Download the header image from my repo, which is a Polyglot PNG (both a PNG and a PDF). Rename the extension from .png to .pdf and open it in Firefox to run llama2.c inside the PDF! Note that this doesn't work in Chrome.<p>The PDF contains a version of Karpathy's llama2.c running the tiny 260k model. For more details, check: <a href="https://twitter.com/VulcanIgnis/status/1879649889178837025.You" rel="nofollow">https://twitter.com/VulcanIgnis/status/1879649889178837025.Y...</a> can find the image here: <a href="https://github.com/trholding/llama2.c/blob/master/assets/l2e_sky_fun.png">https://github.com/trholding/llama2.c/blob/master/assets/l2e...</a>.<p>Pure PDF versions of the smaller and smol models are compatible with both Chrome and Firefox, but Adobe Acrobat is not yet supported. I created the PDF part back in November, planning to turn it into a self-regenerating comic demo and add Acrobat support. If Adobe doesn't update their JS engine or improve documentation, I might fork my own reader with WASM for better performance and AI capabilities in PDFs.<p>Emscripten was used to compile this to something between ASM.JS and JS. Enjoy experimenting with this, though remember it's a tiny 260k model, not super intelligent.<p>I am passionate about PDFs and frustrated with Adobe's JS engine, which isn't true JS 1.3. This project represents running LLMs inside documents, turning documents into LLM OS. If Adobe doesn't fix JS in PDF, I'm motivated to enhance PDF capabilities myself. This is not the thermodynamic god, just pee/acc where we accelerate peedf :)