Views
No views yet
transformers on any platform.Qwen/Qwen3-4B-Instruct-2507, QLoRA over a 4-bit nf4 base| model | compiled | glyphs lost | same-line | right-align | recall | score |
|---|---|---|---|---|---|---|
| Qwen3-4B base (bf16) | 25/34 | 138 | 0.584 | 0.386 | 0.569 | 0.2486 |
| + LoRA v3 (this) | 27/34 | 299 | 0.641 | 0.395 | 0.578 | 0.2388 |
Given a PDF's extracted text, word boxes, and declared fonts, the model emits a single.texthat compiles on the first XeLaTeX run with zero missing-character warnings. The rendered result matches the source page count, with matched word positions within N = 3pt.
1from peft import PeftModel
2from transformers import AutoModelForCausalLM, AutoTokenizer
3
4tok = AutoTokenizer.from_pretrained("Qwen/Qwen3-4B-Instruct-2507")
5m = AutoModelForCausalLM.from_pretrained("Qwen/Qwen3-4B-Instruct-2507")
6m = PeftModel.from_pretrained(m, "camtr0n/unrender-qwen3-4b-lora-v3").merge_and_unload()do_sample=True, temperature=0.7, top_p=0.8, top_k=20, and
max_new_tokens at least 10000 — outputs are long and a tight cap truncates
mid-command.src/unrender/extract.py in the code repo for the exact format.