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, MiMo-7B-RL reads the batch you choose and says whether a payload is hidden there, and a family-naming model then decides which kind of attack it is.

Batching is what keeps a long document inside one ZeroGPU grant: 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.

Two models, because they are good at different questions. MiMo answers is there a payload here? — F1 0.945 on the corpus it was measured against — and quotes the substring that convinced it. It is poor at which kind?, naming the family correctly only 43% of the time, which mattered because the remediation advice is chosen by family. So the family is named instead by a gradient-boosted model fitted on four cheap signals (structural signatures, MiMo's own opinion, seventeen document-shape measurements, and a vote of the nearest corpus files): P@1 0.994 on files carrying one of the twelve known signatures, 0.691 on files carrying none. The report says which of those two regimes your file fell into rather than quoting one number for both.

None of it is guaranteed correct — not the verdict, not the family, not the treatment. A clean verdict is not proof of a clean file. 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 is no longer MiMo's job anyway.

Running MiMo in 4-bit NF4 — Part B's own configuration — at about 4.2s per region. The family-naming model is 915 KB and runs on the CPU in under a second.

Examples

One document per attack type.

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.

Runs the family-naming model and Part A's lookup. Adds a one-off 550 MB embedding-model download. Off, the family shown is MiMo's own guess.

Upload a PDF to see what will be read.