TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

L2E llama2.c running in a PDF in a Shroedinger PNG [pdf]

6 pointsby AMICABoard4 months ago

2 comments

AMICABoard4 months ago
L2E Llama2.c in a PDF in a Shroedinger PNG<p>Visit: <a href="https:&#x2F;&#x2F;github.com&#x2F;trholding&#x2F;llama2.c">https:&#x2F;&#x2F;github.com&#x2F;trholding&#x2F;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&#x27;t work in Chrome.<p>The PDF contains a version of Karpathy&#x27;s llama2.c running the tiny 260k model. For more details, check: <a href="https:&#x2F;&#x2F;twitter.com&#x2F;VulcanIgnis&#x2F;status&#x2F;1879649889178837025.You" rel="nofollow">https:&#x2F;&#x2F;twitter.com&#x2F;VulcanIgnis&#x2F;status&#x2F;1879649889178837025.Y...</a> can find the image here: <a href="https:&#x2F;&#x2F;github.com&#x2F;trholding&#x2F;llama2.c&#x2F;blob&#x2F;master&#x2F;assets&#x2F;l2e_sky_fun.png">https:&#x2F;&#x2F;github.com&#x2F;trholding&#x2F;llama2.c&#x2F;blob&#x2F;master&#x2F;assets&#x2F;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&#x27;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&#x27;s a tiny 260k model, not super intelligent.<p>I am passionate about PDFs and frustrated with Adobe&#x27;s JS engine, which isn&#x27;t true JS 1.3. This project represents running LLMs inside documents, turning documents into LLM OS. If Adobe doesn&#x27;t fix JS in PDF, I&#x27;m motivated to enhance PDF capabilities myself. This is not the thermodynamic god, just pee&#x2F;acc where we accelerate peedf :)
1fortheroad4 months ago
Didn&#x27;t work for me on phone.