Repository navigation
Releases
llmpdf v0.3.0
llmpdf v0.3.0
This experimental release adds an embedded Chinese Wikipedia knowledge base with deterministic local retrieval. Factual hits are answered directly from embedded knowledge cards; other prompts fall back to the existing 27M Gemma 4-distilled chat model.
What changed
- embedded 3,943 compact Chinese knowledge cards derived from the Chinese Wikipedia vital-article lists;
- added simplified/traditional and redirect aliases such as
珠穆朗玛峰/珠峰,爱因斯坦,中国, and北京; - implemented a pure-JavaScript local retriever inside the PDF payload;
- added query-aware extraction for capitals, river length, elevation, population, definitions, and summary-style questions;
- added Chinese boundary and intent checks so prompts such as
什么是通货膨胀and神经网络的权重是什么do not false-hit short encyclopedia titles; - knowledge hits bypass generation and return quickly; misses still use the normal incremental model generation path;
- added visible
Chinese Wikipedia (CC BY-SA 4.0)attribution inside the PDF; - updated the demo landing page for the knowledge-enabled release.
Evaluation
Node.js retrieval evaluation (eval/eval_kb.js):
world knowledge: 23/23
correct non-KB routing: 14/14
total: 37/37
Representative answers:
长江有多长? -> 长江全长6300公里。
黄河有多长? -> 黄河全长5464千米。
亚马逊河有多长? -> 亚马逊河全长6,437公里。
中国的首都是哪里? -> 中国的首都是北京市。
珠穆朗玛峰有多高? -> 珠穆朗玛峰海拔8848.86米。
Prompts such as arithmetic, Python/SQL/Git how-to questions, translation, writing, and multi-step reasoning are intentionally routed back to the language model.
Verified
- reproducible PDF build;
- Node.js runtime and KB smoke tests;
- existing model regression tests;
- Chromium PDFium interactive test:
中国的首都是哪里?returns中国的首都是北京市。without token generation; - Chromium PDFium fallback test:
你好still produces a model-generated answer with the livetok/sdisplay.
SHA256
65f374cdb855f26a829e9cfac3908a05f10fd3354021bafcb56b867ed67afa4d llmpdf.pdf
77c6e564745645b0e99973ccc91a8c56919e6780a4ed85fa37b45298a819c8b3 tinygpt27_final.tgq
e288f911f5567283391d6d4344019308541bef63e26552220b5fd2163426e82e kb_zhwiki_vital.jsonl
Licensing note
Unlike the trained weights, the knowledge-base cards directly reproduce Chinese Wikipedia text. The embedded knowledge text is therefore distributed under the applicable CC BY-SA 4.0 attribution/share-alike obligations. The broader model/PDF artifact remains a conservative non-commercial research/demo artifact because parts of the original model-training mixture have restricted or unclear upstream terms. See NOTICE.md and MODEL_CARD.md.
llmpdf v0.2.0
llmpdf v0.2.0
This release refreshes the embedded 27M Chinese chat model with a Gemma 4 E2B-it sequence-level distillation fine-tune.
What changed
- continued training the previous 27M checkpoint on Gemma 4 E2B-it generated Chinese QA;
- added project-generated procedural arithmetic, logic, translation, Python/SQL/Git examples;
- strengthened curated high-frequency QA replay;
- added a small runtime EOS decoding bias so short answers stop cleanly;
- rebuilt
llmpdf.pdf; the PDF still includes the livetok/sdecode-speed display; - updated the JavaScript-runtime evaluation and PDFium smoke-test screenshot.
Verified
- Node.js TGQ runtime smoke test passes;
- reproducible PDF rebuild is byte-identical to the release PDF;
- Chromium PDFium interactive smoke test passes: input
你好, click Send, output你好!有什么可以帮你的吗?, status完成, live speed display1.0 tok/sin the test environment; - heuristic core evaluation improved from 15/31 for the first 27M release to 30/31 for this distilled release; the remaining scorer failure is a false negative caused by exact-string matching of the identity answer.
SHA256
600c8353a26fb05a5bc3a6742fb8c6ff439be25f1708d3523ebbc9a633ee337a llmpdf.pdf
77c6e564745645b0e99973ccc91a8c56919e6780a4ed85fa37b45298a819c8b3 tinygpt27_final.tgq
The weights/PDF remain conservative non-commercial research/demo artifacts because the original base-training mixture includes restricted or unclear upstream data. See NOTICE.md and MODEL_CARD.md.
llmpdf v0.1.1
Patch release with a live decode-speed readout in the PDF chat UI.
Changes
- Added a borderless speed field next to
Output, displayed as| <value> tok/s. - Decode speed is measured from the end of prefill and updated while generation runs.
- Updated the PDFium smoke-test screenshot.
scripts/download_artifacts.shand the Vercel build now default to this release tag.
Artifacts
llmpdf.pdf— 27M-parameter Chinese chat model embedded in a PDFium/pdf.js-executable PDFtinygpt27_final.tgq— Q8-quantized model weights used by the JavaScript runtimetokenizer_pdf_v1.json— byte-level BPE tokenizereval_runtime_27m.json— batch evaluation outputllmpdf_pdfium_smoke.png— PDFium smoke-test screenshot showing the speed readoutsha256sums.txt— checksums for the large artifacts
Compatibility
Manual testing currently shows the best generation performance in Firefox's built-in PDF viewer. Chromium PDFium also works, but runs PDF JavaScript in a jitless V8 environment and is slower.
The code is MIT licensed. Model weights and the generated PDF are research/demo artifacts; see NOTICE.md and MODEL_CARD.md in the source repository for data provenance and licensing limitations.
llmpdf v0.1.0
Initial public release of llmpdf.
This release contains the runnable PDF demo and model artifact. The Git source tree intentionally excludes these large binaries; use scripts/download_artifacts.sh to fetch them into dist/.
Artifacts
llmpdf.pdf— 27M-parameter Chinese chat model embedded in a PDFium-executable PDFtinygpt27_final.tgq— Q8-quantized model weights used by the JavaScript runtimetokenizer_pdf_v1.json— byte-level BPE tokenizereval_runtime_27m.json— batch evaluation outputllmpdf_pdfium_smoke.png— PDFium smoke-test screenshotsha256sums.txt— checksums for the large artifacts
Compatibility
Verified in Chromium's built-in PDFium viewer. Other PDF viewers are not guaranteed to work.
The code is MIT licensed. Model weights and the generated PDF are research/demo artifacts; see NOTICE.md and MODEL_CARD.md in the source repository for data provenance and licensing limitations.