Back to browse
GitHub Repository

Let LLMs see your codebase just like you do.

9 starsPython

Pixrep – Turn code repositories into PDFs for multimodal LLMs

by TingjiaInFuture·Feb 19, 2026·1 point·0 comments

AI Analysis

●●●BangerBig BrainZero to OneWizardry

DeepSeek-OCR–inspired visual tokenization saves 40% tokens vs text, with academic validation.

Strengths
  • Academic backing from three peer-reviewed papers (2025–2026) validating the core premise of visual code encoding.
  • Measurable 40% token savings on real Gemini 3 Pro benchmark (31.8k → 19k tokens), not hand-waved claims.
  • Syntax highlighting + semantic minimaps (UML/call graphs) + linter heatmaps go beyond simple PDFs—genuinely adds structure.
Weaknesses
  • Token savings are single-benchmark evidence; needs validation across diverse repos, languages, and model families.
  • No evidence this beats existing code context solutions (Cursor, Continue, Codeium) in real development workflows.
Target Audience

Backend developers, AI researchers, prompt engineers using multimodal LLMs

Similar To

Continue · Cursor · Codeium

Post Description

Hey HN, creator here.

I've been experimenting heavily with large-context multimodal LLMs (like Gemini 3 Pro) for coding tasks. I noticed that feeding raw text files consumes a massive amount of tokens and often clutters the context window.

Inspired by recent research (like the DeepSeek-OCR paper) suggesting visual encoders can be more efficient than text tokenizers for structured data, I built pixrep.

It’s a CLI tool that converts your codebase into a structured, syntax-highlighted PDF hierarchy.

Key features: - Token Efficiency: In my local benchmark, a repo requiring ~31k text tokens was compressed to ~19k tokens when fed as a visual PDF (using the `onepdf` mode). - Semantic Minimap: It uses Python's `ast` (and regex for other langs) to generate a UML/call-graph minimap at the top of each file. - Linter Heatmap: It can run `ruff` or `eslint` and overlay a heatmap on the PDF to warn the LLM about risky lines visually. - OnePDF Mode: Packs the core code into a single, ASCII-optimized PDF file for single-shot uploading.

It's written in Python and uses ReportLab for PDF generation.

I'd love to hear your thoughts on "Visual RAG" or any feedback on the implementation!

repo: https://github.com/TingjiaInFuture/pixrep

Similar Projects