BERT-Base (hadamard_incoherent_svd) — NeuralOps Compressed & LoRA-Healed Model Zoo
This repository provides a physically compressed and LoRA-healed checkpoint of google-bert/bert-base-uncased fine-tuned on GLUE SST-2, compressed using the hadamard_incoherent_svd (HadamardIncoherentSVDCompressor) engine from the NeuralOps Library at Pareto-selected rank k=32 (3.73x compression ratio, -73.2% parameter reduction).
Compression & Architecture Profile
HadamardIncoherentSVDCompressor: Incoherent Orthogonal SVD & Quantization Preprocessing Engine. Smears activation and weight outliers uniformly across channels: W_rot = W H, SVD(W_rot) = U_r S_r V_r^T When folded back into V_r^T <- V_r^T H^T, the linear layer achieves 40%-65% lower truncation/quantization error with ZERO extra runtime parameters. Factorizes dense linear layers into SVDLinear representations.
| Property | Specification |
|---|---|
Registry Key (COMPRESSOR_REGISTRY) |
hadamard_incoherent_svd |
| NeuralOps Class & Family | HadamardIncoherentSVDCompressor (svd) |
| Source Implementation | neuralops/compression/svd/hadamard_incoherent_svd.py |
| Base Architecture | google-bert/bert-base-uncased (109,483,778 parameters, 12 layers, $D=768$) |
Showcase Rank (k) |
32 (LoRA Recovery Applied: True) |
| Compressed Parameter Count | 29,319,202 (-73.22% reduction, 3.734x physical compression ratio) |
| Teacher Baseline SST-2 Acc | 91.63% |
| Showcase Final SST-2 Acc | 72.13% (Zero-Shot: 47.36%, Parity Delta: -19.50%) |
Multi-Rank Pareto Evaluation (k=256, 128, 64, 32)
Evaluated physically on NVIDIA GeForce RTX 3090 (24GB) on the GLUE SST-2 validation split (872 samples). Whenever zero-shot compression drops accuracy by > 2.0% alongside > 1.10x reduction, NeuralOps applies targeted r=8 LoRA healing (50 steps, lr=2e-4, 45s budget):
Rank (k) |
Physical Ratio | Compressed Params (Reduction) | Zero-Shot Acc | Healed Acc | Parity vs Teacher (91.63%) |
|---|---|---|---|---|---|
256 |
1.64x |
66,838,530 (-39.0%) |
59.75% |
50.92% (LoRA) |
-40.71% |
128 |
2.41x |
45,398,914 (-58.5%) |
52.87% |
50.92% (LoRA) |
-40.71% |
64 |
3.16x |
34,679,106 (-68.3%) |
53.21% |
50.92% (LoRA) |
-40.71% |
32 ⭐ |
3.73x |
29,319,202 (-73.2%) |
47.36% |
72.13% (LoRA) |
-19.50% |
(⭐ indicates the serialized checkpoint packaged in this Hugging Face repository.)
Packaged Artifacts
pytorch_model.bin: Full serialized compressed BERT state dictionary (with low-rank factors / quantization buffers / LoRA healing adapters baked in).config.json: Model configuration tagged withcompression_method: "hadamard_incoherent_svd"andcompression_rank: 32.compression_summary.json: Complete machine-readable telemetry across all evaluated ranks[256, 128, 64, 32].- Tokenizer Assets: Standard
bert-base-uncasedvocabulary (vocab.txt,tokenizer.json,tokenizer_config.json).
Quick Start (Reconstruction & Inference)
import torch
from huggingface_hub import hf_hub_download
from transformers import AutoTokenizer, BertForSequenceClassification
from neuralops.core.compression_pipeline import compress_model
repo_id = "tahamajs/bert-comp-hadamard-incoherent-svd-sst2"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
# Reconstruct compressed NeuralOps topology and load serialized compressed + healed weights
model = BertForSequenceClassification.from_pretrained("google-bert/bert-base-uncased", num_labels=2)
model = compress_model(model, {"compressors": [{"method": "hadamard_incoherent_svd", "rank": 32}]})
ckpt_path = hf_hub_download(repo_id=repo_id, filename="pytorch_model.bin")
state_dict = torch.load(ckpt_path, map_location="cpu")
model.load_state_dict(state_dict, strict=False)
model.eval()
inputs = tokenizer("NeuralOps achieves strong compression without sacrificing downstream accuracy.", return_tensors="pt")
with torch.no_grad():
logits = model(**inputs).logits
pred = logits.argmax(dim=-1).item()
print("Predicted SST-2 Sentiment (0=Negative, 1=Positive):", pred)
Citation
@software{neuralops2026compressorzoo,
title = {NeuralOps: Multi-Rank Compressed BERT-SST2 Zoo with Pareto LoRA Recovery},
author = {Majlesi, Taha},
year = {2026},
url = {https://github.com/tahamajs/NeuralOps}
}