rizzo-pii quotes its RAM three ways, and the container pins a different transformers than the bundle
Local-first privacy guard: anonymize your documents before sharing with LLMs.
At a glance
- What is it?
- An Italian-first token classifier for 22 categories of personal data, including fiscal, VAT and cadastral identifiers, that swaps real values for stable placeholders so a cloud model never receives them. The page gives a single micro-F1 figure, compares itself to two named products on undated numbers, and ships a model pinned to its own version line while the app carries another.
- Who is it for?
- This is one of the few anonymization tools that takes the Italian legal identifiers seriously, and the reversible approach is a genuine advantage over redaction for real legal work. Two things to check before you rely on it.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- Rizzo-AI-Academy/rizzo-pii1,271 ★ · +318
| Repository | 2026-09-10 | 2026-11-15 |
|---|---|---|
| Rizzo-AI-Academy/rizzo-pii | 953 | 1.3k |
318 Stars in the last 66 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The RAM requirement is stated three times and the three figures disagree
One number, three values, on the same page.
The statistics table gives a RAM footprint of about 0.5 GB with a CPU qualifier. The accessibility bullet says the model runs on a CPU in well under 1 GB of RAM, and adds that the privacy layer costs nothing extra in hardware. The comparison table then gives memory to load as 0.5 to 1.2 GB.
So a reader planning a machine gets 0.5 GB from the table, a reassurance of well under 1 GB from the prose, and an upper bound of 1.2 GB from the comparison. The first two are compatible with each other. The third is not, and it is the one that appears in the row a buyer is most likely to read, because it sits next to what the alternatives are said to need.
The likely cause is that the two tables measure different things, a footprint at rest against a peak during load, and the page does not say so. For a tool whose selling point is that it runs on an ordinary laptop, the number that matters is the upper bound, and the page presents the smaller figure first.
The rest of the headline figures are stated once each: about 0.3B parameters on an mmBERT base backbone, 22 categories, and a micro-F1 of 0.989 described as real Italian validation.
The model and the application version separately, and only one of them is pinned
There are two version lines in this project and the page never connects them.
The application releases are v1.0.0, named for the three platforms it shipped on, and v2.0.0, named after the product. Those are the tags in the header.
The model has its own. The compose file passes it as build arguments:
MODEL_REPO: rizzoaiacademy/rizzo-pii-0.3B
MODEL_REVISION: v1.5.0So the container builds against a model repository whose name carries 0.3B and whose revision is v1.5.0, while the application around it is at 2.0.0. A developer changing the model pin changes a build argument in a compose file rather than a version in a manifest, and there is no statement anywhere on the page about which model revision is validated against which application release.
That matters because the model is downloaded at image build time, not at runtime. The compose file sets `HF_HUB_OFFLINE: 1` and `TRANSFORMERS_OFFLINE: 1` and comments that there are no Hugging Face calls at runtime because the model is already in the image. So a container is a frozen combination of an application version and a model revision, and the only record of that pairing is the compose file it was built from.
The page also states that the project runs without an API key, with no telemetry and no upload, which is consistent with a design where the model is bundled rather than fetched.
Two images hold different transformers majors, and the file says so
The webapp Dockerfile explains its own pins and then names its counterpart's version in a parenthetical. The comment is in Italian, and it reads: torch and transformers are pinned to the versions the image was verified with, because without a pin the same build six months from now pulls a different major and something that worked yesterday becomes a bug to reproduce. To update them, raise the numbers and rebuild. And then the note: transformers 5.x here, while Dockerfile.linux stays on 4.57.3 for PyInstaller.
That parenthetical is the whole story. There are two container paths in this repository, the Flask webapp image and the Linux bundle image, and they deliberately sit on different major versions of the same library. The webapp tracks the newer major; the Linux image stays on a pinned older version for its packaging toolchain.
The project's own requirements file takes a third position, declaring `transformers>=4.57`, a range that admits both.
So a developer working locally resolves whatever satisfies a lower bound, the webapp container runs one major, and the Linux bundle runs another. That is a defensible arrangement when a packaging tool pins a transitive dependency, and it is also a maintenance cost that anyone patching a model behaviour change has to discover empirically rather than from a table.
The reason for pinning at all is the good part, and it generalises: an unpinned major in a build image means a green build today is a different build next quarter.
The local requirements are almost entirely unbounded while the image they build is narrow
The Python requirements file is a list of lower bounds and nothing else. `torch>=2.11`, `transformers>=4.57`, `accelerate>=1.14`, and then `numpy`, `pandas`, `huggingface_hub`, `wandb`, `python-dotenv`, `flask`, `pymupdf` and `matplotlib` with no constraint at all. The header says the project is tested with Python 3.11 and up on Windows.
The Dockerfile that consumes it pins exactly the two libraries the comment above it says must be pinned. So the shipped container is reproducible and a local checkout is not, which is a defensible split, though it means a local bug that a colleague cannot reproduce is often a version difference rather than a code difference.
The requirements file also carries two warnings that are worth more than most of the entries themselves. The first is about the GPU: for training on NVIDIA Blackwell cards, which it names as the RTX 50xx series and sm_120, the cu128 build must be installed, and the comment says the CPU and cu121 wheels do not support that compute capability. Inference is unaffected, since it is CPU.
The second names an exact import failure: do not install torchvision or torchaudio, because they are not used here and old versions break the transformers import with `operator torchvision::nms does not exist`. That is a dependency conflict recorded as a string, which is the only kind of record that will actually be found by the next person who tries to add image support.
The optional-by-absence behaviour is handled in the environment file instead, where every key is described as optional: no tracking key disables experiment tracking, and no model key means the legal templates cannot be regenerated while the rest works.
Reversibility moves the security obligation rather than removing it
The architecture is a four-step loop. Locally, every span of personal data is tagged and replaced with a stable, type-aware placeholder such as `[FULLNAME_1]`, `[IBAN_1]` or `[CF_1]`, and the mapping from placeholder to real value is recorded in a dictionary that stays on disk. The anonymized text goes to a frontier model, and when the answer returns a local pass swaps the placeholders back.
Two details make that work on real text. Identical values share the same placeholder, so the model sees a coherent document rather than one where the same person has several different names. And the placeholders are type-aware, so the model can still reason about structure, which is the point of typing them.
The page is explicit that this is pseudonymization rather than redaction, and the comparison table carries the same distinction as a row, with a local reversible dictionary against masking and against anonymization. That is the real difference between this tool and a redaction pipeline, and it is a genuine advantage for legal work, where the answer has to contain the actual clause and the actual number.
It also relocates the risk. A redacted document is safe because the information is gone. A pseudonymised document is safe only while the dictionary is secret, and the dictionary on disk is now the single artefact whose loss or theft undoes the entire guarantee. The page says the dictionary stays on disk and nowhere describes how that file is protected, so this is a question to ask before the tool is pointed at a firm's document store.
The other side of the same coin is that the tool is only as good as its detection. That is what the checksums are for.
One micro-F1 number, one validation, and an undated comparison against two products
The performance claim is one figure. The statistics table gives 0.989 micro-F1, qualified as real Italian validation. There is no test-set size, no precision and recall pair, no per-category breakdown, and no statement of what the validation set contains. A linked technical report as a PDF is offered for the detail.
For a tool that claims coverage of 22 categories, an aggregate score hides the distribution. A model can post 0.989 micro-F1 overall while doing poorly on the three categories the project exists for, and the categories the page singles out as its differentiator, the fiscal code, the VAT number and the cadastral reference, are exactly the ones a reader would want to see scored individually. The page does argue that a generic English-first model has no label for those three and would leave them in the clear, which is a claim about the absence of a capability rather than about this model's accuracy on them.
The comparison table names OpenAI Privacy Filter and MS Presidio and makes eight rows of assertions about them: architecture type, parameter counts including 1.5B total and about 50M active for a sparse mixture of experts, memory to load, where each runs, category counts of 22 against 8 and configurable, Italian identifier support marked no and not by default, primary language, checksum validation, and reversibility.
No version, date or source is given for any figure in the other two columns. A row asserting that a competitor supports eight categories and no Italian identifiers is only as good as the release it was measured against, and the page does not say which one.
The one row that does not rely on the competitors is the checksum safety net, which is described in the text as mod-97 for IBAN, Luhn for cards, and the official algorithms for the fiscal code and VAT number. That is a deterministic check the model can be backed by, and it is a more verifiable claim than a score.
The container listens on every interface and the published port is the boundary
The compose file draws the network boundary in one line and explains it in Italian. The service sets `PII_HOST: 0.0.0.0` and `PII_PORT: 5005` inside the container, and publishes `127.0.0.1:5005:5005` on the host. The comment says only localhost, because the app processes documents containing personal data, Docker puts the network boundary there, and the 127.0.0.1 prefix should be removed only if you really need to reach it from the LAN.
That is a correct separation and a clear explanation of it. The container binding is a container concern, and the host binding is the security decision. The same default appears in the environment example, which lists the precedence as CLI arguments over environment variables over config.json over a default of 127.0.0.1:5005, and again in the Dockerfile's own run example.
Two operational details are handled carefully. The health check has a 120 second start period, with the comment that the endpoint answers 503 until the model is loaded and the start period covers the cold load, followed by 30 second intervals, a 5 second timeout and three retries. So an orchestrator will not kill a container that is still loading a 0.3B model.
The other is `OMP_NUM_THREADS: 4`, with a comment saying to raise it if the machine is dedicated. Torch's CPU kernels otherwise take every core. The Dockerfile installs libgomp1 for the same reason, since the OpenMP runtime is required by those kernels, and it states that the image is CPU-only, with a GPU deployment needing the cu128 torch build and the NVIDIA runtime.
Three macOS build scripts, two PyInstaller specs, a Tauri app and an Inno Setup installer
The root of this repository is a packaging manifest as much as a source tree, and one detail in it looks accidental.
There are three build shell scripts: `build_linux.sh`, `build_mac.sh` and `build_macos.sh`. Two of those are for macOS under two spellings of the same name, so a reader looking for the macOS build has two candidates and no indication of which is current. There is also `build_macos.example.env`'s counterpart in the form of `.env.notarize.example`, which implies macOS notarization is a separate credentialed step from the build itself.
Two PyInstaller spec files sit alongside them, `build.spec` and `build_sidecar.spec`, so the desktop application has a main target and a sidecar. The Tauri directory is separate again, and `installer.iss` is an Inno Setup script, which is the Windows installer. So four packaging systems are represented at the root for three platforms: PyInstaller for the desktop bundle, Tauri for a shell, Inno Setup for Windows, and Docker for the webapp, with a second Dockerfile for the Linux image.
The two release tags are named by two different conventions as well. v1.0.0 spells out the platforms it shipped on, and v2.0.0 is named after the product with its version.
A couple of other root files are worth noting. `create_mock_model.py` sits next to the build scripts, which suggests a path for working without the real 0.3B weights. `THIRD_PARTY_LICENSES.md` accompanies an MIT license, which is the right pairing for a project bundling a model. And there are two report directories, `report/` holding the linked PDF and `reports/` beside it, which is the kind of near-duplicate that a repository accumulates and nobody deletes.
Editorial conclusion
This is one of the few anonymization tools that takes the Italian legal identifiers seriously, and the reversible approach is a genuine advantage over redaction for real legal work. Two things to check before you rely on it. The reported 0.989 micro-F1 is a single number on a single Italian validation with no per-category breakdown, so ask for the per-category figures before you know it catches a cadastral reference as reliably as a person name. And treat reversibility as a security decision rather than a feature: the local dictionary that makes restoration possible is the asset an attacker wants, so its storage and permissions deserve the attention a redaction tool would not need. On deployment, the offline flags in the compose file are the part worth copying, and the two images holding different transformers majors on purpose is a maintenance cost you should know about before you build on either.
Frequently asked questions
What does rizzo-pii detect and what does it leave behind?
It detects 22 categories of personal data in BIO format, including the Italian legal identifiers codice fiscale, partita IVA and dati catastali. Each detected span is replaced by a stable, type-aware placeholder such as [FULLNAME_1] or [CF_1], and identical values share one placeholder. The placeholder-to-value mapping is kept in a local dictionary on disk.
How accurate is rizzo-pii?
The page gives one figure, 0.989 micro-F1, described as real Italian validation. It does not publish a test set size, a precision and recall pair, or per-category scores, and it links a technical report PDF for the detail.
How much memory does rizzo-pii need?
The page gives three figures for the same thing: about 0.5 GB in the statistics table, well under 1 GB in the prose, and 0.5 to 1.2 GB in the comparison table as memory to load. The model is described as about 0.3B parameters on an mmBERT base backbone, running on CPU.
Does rizzo-pii send my documents anywhere?
The anonymization and the restoration both run locally on the user's CPU, and only placeholder text is sent to the frontier model. The compose file bakes the model into the image and sets HF_HUB_OFFLINE and TRANSFORMERS_OFFLINE so there are no model calls at runtime, and publishes the port on 127.0.0.1 only.
What does the rizzo-pii container need to run the model?
A CPU image is enough for inference. For training on NVIDIA Blackwell cards, the RTX 50xx series and sm_120, the requirements file says the cu128 torch build is mandatory because the CPU and cu121 wheels do not support that compute capability. The webapp image sets OMP_NUM_THREADS to 4 so torch does not take every core.
Which transformers version does rizzo-pii use?
It depends on the path. The local requirements file declares a lower bound of 4.57, the webapp Dockerfile pins transformers 5.x, and the note in that Dockerfile says Dockerfile.linux stays on 4.57.3 for PyInstaller. The two images deliberately hold different majors of the same library.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/rizzo-ai-academy-rizzo-pii)Star history chart for your README
[](https://hysenlabs.com/projects/rizzo-ai-academy-rizzo-pii)Was this useful?