PDF Injection Detector — MiMo-7B

Upload a PDF. It is rendered to text with the extractor that built the project corpus, the regions carrying structural markers are ranked and cut into batches that fit one run of the model, and MiMo-7B-RL reads the batch you choose — reporting whether a payload is hidden there, and the substring that convinced it.

Batching is what keeps a long document inside the runtime's limit: one batch is one run, and you decide how many runs to spend. The report always states how much of the file is still unread.

None of what it tells you is guaranteed correct — not the verdict, not the family, not the treatment. On the corpus it was measured against, MiMo got the injected/clean call right often enough to score F1 0.945, but it named the attack family correctly only 43% of the time — so more often than not the family shown, and therefore the remediation advice attached to it, belongs to a different attack. A clean verdict is not proof of a clean file either. Read every output as a prompt to look closer yourself, never as a decision that has already been made.

This is a coursework artefact built on a synthetic corpus of 1,100 PDFs carrying harmless EICAR/AMTSO/WICAR/RANSIM test markers. It is not a general malware scanner, and real malware does not announce itself the way these samples do.

Why MiMo and not Gemma? Part B's winner was Gemma-2-9B at F1 0.969, against MiMo's 0.945. But Gemma is gated behind a licence and a token, and it is 2.6× slower per window (10.95 s vs 4.18 s). On free ZeroGPU — one grant capped at 300 s, and roughly five minutes of GPU per day — that is the difference between a working demo and one that refuses strangers at the door and then runs out of quota. The cost of the swap is 0.024 F1 and family-naming dropping from 63% to 43%.

Running on the GPU runtime (4-bit NF4 — Part B’s own configuration), about 4.2s per region.

1 8
Batch to check

Each batch is a separate run — spend as many as you like.

Off = marker regions only, which is the shape Part B measured. On = the batches cover the whole file, at the cost of regions MiMo often will not answer about.

Adds a one-off 550 MB embedding-model download.

Upload a PDF to see what will be read.