ai newsFr., 16. Okt.
EilmeldungMeta may use sweeping new commercial TOS to avoid millions in AI licensing fees

I Built an AI That Scores Sensitive Data Entirely Offline - No Cloud, No Data Leaks

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle What I Built Airgap is a desktop-style web dashboard that turns a spreadsheet into risk scores, with no cloud, no training run and no data scientist. You drop in a CSV or Excel file, pick one of three jobs, and

dev.toFreitag 16:48 · 16.10.4 Min. Lesezeit
Bild: dev.to

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission 💸

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle

Airgap is a desktop-style web dashboard that turns a spreadsheet into risk scores, with no cloud, no training run and no data scientist. You drop in a CSV or Excel file, pick one of three jobs, and TabPFN (Prior Labs' tabular foundation model) scores every row on your own GPU. A local LLM then writes the one-page summary. Nothing leaves the machine.

Small teams sit on small, sensitive tables: a few hundred to a few thousand rows. The tools that would help them either need a data scientist to tune a model, or they send the data to a cloud service they are not allowed to use.

The buyer is whoever holds the table and cannot upload it. My hypothesis for the side hustle: one person installs Airgap on a clinic, plant or lender's own machine and charges per site or per seat. This is untested. I have not sold it yet, and the licensing note in "Why Open Innovation Matters" applies before anyone charges for it.

Decision support, not a decision-maker. Scores should never replace a clinician, an engineer or a credit committee. The dashboard says so, and so do the generated summaries.

What the demo shows: loading real hospital data, pressing Score it, and getting scored rows, tiers, drivers and a written summary, all on a laptop RTX 4090 with the network unplugged.

Real data: Diabetes 130-US Hospitals (UCI, CC BY 4.0), 8,000 rows and 47 columns. 7,800 rows have a known outcome. 200 have a blank outcome and are scored as "new patients".

I am showing this number on purpose. Readmission is a noisy outcome, and an AUC around 0.67 is realistic for it. A dashboard that reported 0.99 on this data would be hiding a leak. Known rows are always scored out-of-fold, so a patient's own outcome never helps score that patient.

The strongest driver, number of prior inpatient visits, is also the best-known predictor for this dataset, which is a useful sanity check. The model drivers show influence on the score, not causation. For example, "A1C result missing" mostly reflects who gets tested.

airgap/ ├── server.py FastAPI app, job queue (one analysis at a time keeps the GPU predictable) ├── app/ │ ├── engine.py TabPFN wrapper: picks CUDA when torch sees it, exposes GPU name to the UI │ ├── analysis.py CSV -> features -> cross-validation -> final fit -> explanations │ ├── narrative.py local LLM summary with a number guardrail + template fallback │ └── samples.py synthetic demo data ├── static/index.html the whole UI: one file, loads nothing from the internet ├── prepare_datasets.py downloads and cleans the four real datasets ├── check_gpu.py times a real TabPFN run on the GPU and caches the weights ├── install.bat CUDA build of PyTorch, dependencies, GPU check └── run.bat starts the server offline Enter fullscreen mode Exit fullscreen mode Run it (Windows, NVIDIA GPU): run install.bat once while online, then run.bat. After the first weight download, it starts in offline mode.

Stack: TabPFN (3.5 weights) · PyTorch with CUDA 12.8 · FastAPI · pandas and scikit-learn · Ollama running qwen3:8b · a single static HTML page.

1. TabPFN does all the scoring. There is no model to train and no hyperparameters. Your known rows are the context, and TabPFN predicts from them in one forward pass. Classification gives calibrated probabilities. Regression gives a prediction plus an 80% interval, which powers the yield mode's "outside the expected range" flag.

2. Honest accuracy by default. Rows with a known outcome are scored by 5-fold cross-validation (3-fold for very large files). Rows with a blank outcome are scored from everything known. The dashboard's accuracy numbers come from the first group, so they are not flattered by memorization.

3. Explanations by occlusion. For the 10 columns most related to the outcome, I swap in a typical value and watch the score move. The columns that move it most are listed per record, with an up or down arrow.

4. A local LLM that is not allowed to invent numbers. qwen3:8b writes the summary through Ollama from a small JSON of facts. Every number in its text is checked against the results. If the model cites a figure that was not in the facts, the summary is rejected and a built-in template is used instead. The page tells you which one you got and why.

5. Cleaning real data without cheating. prepare_datasets.py drops columns that give away the answer (for example, the five failure-type columns in the machine dataset), removes patients who died or went to hospice (they cannot be readmitted), keeps the best-filled sensors without looking at the outcome, and blanks the outcome on the last rows so the "new rows" path is exercised.

Because the whole product is a promise: your data never leaves your computer. A closed API cannot make that promise.

A caveat I want to be upfront about: TabPFN's weights are open-weight under Prior Labs' licence. The free licence is non-commercial, so selling Airgap would need a commercial licence from Prior Labs. This is a hackathon prototype, and checking that licence is the first step of the side hustle.

Quelle: dev.to (dev.to). Original öffnen