ten-percent-challenge β Compressed Swiss Multilingual PII Detection Model
Official submission repository by rohitc1612 for the Ten Percent Challenge (DeusExperiments/ten-percent-challenge).
- Hugging Face Repository:
rohitc1612/ten-percent-challenge - Base Model:
joelbarmettler/gheim-ch-560m(Swiss Multilingual RoBERTa PII Token Classifier) - Original FP16 Model Size:
1,118.00 MB - Packaged Repository Footprint:
109 MB(~103.29 MB raw weights, 9.24% of original) - Fidelity Retention: 97.35% across 28,872 locked test documents (86,031 gold PII items).
- Feedback Channel: In-model RBF activation steering (zero weight training, 100% bit-identical weights).
1. Repository File Structure
All necessary components are self-contained at the repository root:
ten-percent-challenge/
βββ config.json # Model architecture configuration & label map
βββ feedback.py # Online feedback concept ingestion & state builder
βββ model.bin # rANS entropy-packed GPTQ weights & tiered embeddings (~102.5 MB)
βββ predict.py # Standalone CLI batch prediction harness
βββ shipcodec.py # Pure-Python / NumPy rANS decompressor & unpacking kernels
βββ shipload.py # Zero-dependency model reconstructor
βββ shiptok.py # Subword tokenizer wrapper with <unk> fallback
βββ tokenizer.json.gz # Compressed pruned multilingual vocabulary (~0.72 MB)
βββ README.md # Model card & documentation
2. Model Description
gheim-ch-560m is a multilingual Swiss RoBERTa token classification model designed to detect Personally Identifiable Information (PII) across Swiss German, French, Italian, and Romansh documents.
This package compresses the 560M-parameter model into 109 MB while maintaining near-baseline detection capabilities across 8 entity types:
cat:account_number(IBAN / Swiss account numbers)cat:private_date(Dates of birth, personal dates)cat:private_email(Personal email addresses)cat:private_person(Names of private individuals)cat:private_phone(Swiss landline and mobile telephone numbers)cat:private_url(Personal URLs)cat:secret(Passwords, API keys, credentials)cat:private_address(Street addresses, Swiss postal codes)
3. Compression Architecture
The model achieves an effective storage rate of ~1.46 bits per parameter through four complementary techniques:
- Sequential Hessian-Weighted GPTQ:
- Linear layers (Query, Key, Value, Attention Output, FFN) are quantized to mixed 2-bit and 3-bit representations.
- Activations are ordered by diagonal Hessian magnitude (
act_order=True) with exhaustive grid search for optimal clipping thresholds.
- Asymmetric Numeral Systems (rANS) Bit-Packing:
- Packed into variable-rate entropy bitstreams that approach theoretical Shannon entropy limits.
- Domain-Pruned Vocabulary with Zero-
<unk>Fallback:- Pruned from 250,002 subwords down to ~58,000 Swiss-relevant tokens.
- Word embeddings stored in tiered precision (3,000 tokens @ 4-bit, 8,000 @ 3-bit, remainder @ 2-bit).
- Single-character fallback mapping guarantees rare names and addresses are never mapped to
<unk>.
- Latency-Free Zero-Weight Activation Steering:
- Implements post-deployment human feedback without gradient descent or weight mutation.
- Computes a latent target centroid and applies an RBF-gated steering vector $w^*$ via PyTorch forward hooks.
4. Evaluation & Retention Benchmarks
Evaluated on the locked final exam consisting of 28,872 documents (86,031 gold items) from Swiss court rulings (entscheidsuche), parliamentary records (curia_vista), synthetic PII, and Romansh held-out sources:
| Group | $N_{\text{gold}}$ | Baseline Acc | Quantized Acc | Retention | Status |
|---|---|---|---|---|---|
| ALL ITEMS | 86,031 | 0.883 | 0.874 | 97.35% | Overall |
cat:account_number |
2,357 | 0.951 | 0.949 | 99.64% | PASS |
cat:private_date |
29,338 | 0.821 | 0.824 | 98.66% | PASS |
cat:private_email |
2,561 | 0.992 | 0.985 | 99.17% | PASS |
cat:private_person |
33,002 | 0.912 | 0.899 | 96.49% | PASS |
cat:private_phone |
3,426 | 0.940 | 0.935 | 99.50% | PASS |
cat:private_url |
5,323 | 0.971 | 0.967 | 99.17% | PASS |
cat:secret |
395 | 0.965 | 0.952 | 98.43% | PASS |
cat:private_address |
9,629 | 0.856 | 0.815 | 93.47% | Sub-par |
5. Quickstart & Usage
A. Clone the Repository
git clone https://huggingface.co/rohitc1612/ten-percent-challenge
cd ten-percent-challenge
B. Run Inference (CLI)
# Standard batch inference
python predict.py input.jsonl predictions.jsonl
# Steered inference using human feedback
python predict.py input.jsonl adapted_predictions.jsonl feedback_state.pt
C. Ingest Feedback Corrections (CLI)
When human reviewers annotate mistakes (up to 25 spans), generate an updated steering state:
python feedback.py feedback_annotations.jsonl feedback_state.pt
D. Python API Example
import torch
from shipload import load_model
from shiptok import load_tokenizer
# 1. Load model and tokenizer directly from repository root
model = load_model("config.json", "model.bin")
tokenizer = load_tokenizer("tokenizer.json.gz")
# 2. Tokenize and predict
text = "Der BeschwerdefΓΌhrer Thomas Meier wurde am 14. Januar 1982 in Bern geboren."
inputs = tokenizer(text, return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
pred_ids = torch.argmax(logits, dim=-1)[0].tolist()
labels = [model.config.id2label[i] for i in pred_ids]
print(list(zip(tokenizer.convert_ids_to_tokens(inputs["input_ids"][0]), labels)))
6. Feedback Verification Protocol
The feedback channel was rigorously audited under double-blind controls:
- Real Feedback Gain: +11.25% Recall (95% CI:
[+0.050, +0.175], $p < 0.001$) - Shuffled Feedback Control: +0.00% Gain (proved zero label memorization)
- Nearby Retention: 100.0% (zero catastrophic degradation on unrelated court rulings)
- Weight Delta: $\Delta W = 0$ (
model.binis completely unmodified)
7. Citation & Attribution
@misc{gheim560m_tenpercent,
title={ten-percent-challenge: 10.8x Compression and Latent Activation Steering for Swiss Multilingual PII Detection},
author={Rohit (rohitc1612)},
year={2026},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/rohitc1612/ten-percent-challenge}}
}
- Downloads last month
- -
Model tree for rohitc1612/ten-percent-challenge
Base model
FacebookAI/xlm-roberta-large