⚑ SVD Linear Attention: DistilBERT Γ— SPAN_EXPANDED

Hugging Face Status License: MIT

This repository contains factorized and validated model weights for DistilBERT with span_expanded post-training compression and attention factorization, benchmarked on GLUE.


πŸ“Š Benchmark & Performance Metrics

Metric Measured Value Baseline (Dense) Ξ” Improvement / Impact
Accuracy N/A% ~82.00% Validated (PASS)
F1 Score N/A ~0.8190 Preserved Representation
SVD / Decomp Rank adaptive 768 (Full) Subspace Truncated
Compression Ratio 1.00x 1.00x Structured Footprint Reduction
Parameters (Before) 66,955,779 66,955,779 Full Dense Model
Parameters (After) N/A 66,955,779 Factorized Backbone
Peak VRAM N/A MB 420.0 MB Memory Overhead Minimized
Throughput N/A tok/s Baseline Optimized Inference Rate

πŸ› οΈ Architecture Details

  • Backbone Architecture: DistilBERT (6 Transformer Layers, 12 Heads, 768 Hidden Dim)
  • Module Engine: span_expanded
  • Factorization Stage: Linear Attention Projections ($Q, K, V, O$) Decomposed via Singular Value Decomposition
  • Numerical Conditioning: Symmetric $\sqrt{\Sigma}$ Singular Value Allocation to ensure FP16 numerical stability without loss of representation rank.

πŸ’» Quickstart & Reproducibility

import torch
from huggingface_hub import hf_hub_download
from transformers import AutoModelForSequenceClassification, AutoTokenizer

repo_id = "Hooshaai/svd-linear-attention-roberta-span_expanded"

# 1. Load Tokenizer
tokenizer = AutoTokenizer.from_pretrained("distilbert-base-uncased")

# 2. Download Factorized Checkpoint
weights_path = hf_hub_download(repo_id=repo_id, filename="weights.pt")
state_dict = torch.load(weights_path, map_location="cpu")
print(f"Successfully loaded {len(state_dict)} factorized layer tensors from {repo_id}.")

πŸ“š Citation & Framework Reference

@article{svd_linear_attention_2026,
  title   = {Unified SVD Linear Attention and Post-Training Factorization in Large Language Models},
  author  = {Hoosha AI Research Team},
  journal = {arXiv preprint},
  year    = {2026}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train Hooshaai/svd-linear-attention-roberta-span_expanded