Efficient Pruning and Acceleration of Encoder-Based LLM Transformers on eFPGAs
Bibliographic record
Abstract
Transformer encoders such as Bidirectional Encoder Representations from Transformers (BERT) are widely adopted for Natural Language Processing (NLP) tasks, yet their computational and memory requirements hinder deployment on edge devices. While pruning reduces model size, most hardware friendly methods rely on structured, semi-structured, or pattern pruning at the expense of accuracy. Recent unstructured pruning methods have shown promising accuracy-efficiency tradeoffs but have only been demonstrated on decoder models and lack clear hardware deployment pathways. To address this problem, this work applies the state-of-the-art WANDA [17] pruning algorithm to BERT encoders and evaluates the accuracy of both unstructured and semi-structured sparsity regimes. To complement pruning and maximize inference efficiency, we propose a hardware architecture featuring a double-buffered systolic matrix-matrix multiplier with skip-zero support. This approach minimizes bitmask memory storage overhead and hides memory latency through fully overlapping compute and stream operations. Our approach is evaluated using the linear layers of the encoder as a representative workload and is implemented on the Digilent PYNQ-Z1 board, a resource-constrained Field-Programmable Gate Array (FPGA). Compared to dense baselines, our design achieves up to <tex xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">$1.67 \times$</tex> latency improvement with negligible accuracy degradation on the GLUE [28] benchmark.
Fetched live from OpenAlex and de-inverted. Abstracts are not stored in this database: the inverted indexes are 8.6 GB of the frame’s 9.3 GB of text, and the host has 13 GB free.
How this classification was reachedexpand
Full frame distilled prediction
Teacher imitationNot calibrated prevalence, not ground truth. Human validation pending. Learned from the 10,348 direct Codex labels and 10,348 direct Gemma labels. Candidate is the union of thresholded teacher heads; consensus is their intersection. These outputs are machine_predicted_unvalidated and are not human labels or direct frontier model labels.
Codex and Gemma teacher scores by category
| Category | Codex | Gemma |
|---|---|---|
| Metaresearch | 0.000 | 0.000 |
| Meta-epidemiology (narrow) | 0.000 | 0.000 |
| Meta-epidemiology (broad) | 0.000 | 0.000 |
| Bibliometrics | 0.000 | 0.001 |
| Science and technology studies | 0.000 | 0.000 |
| Scholarly communication | 0.000 | 0.000 |
| Open science | 0.000 | 0.000 |
| Research integrity | 0.000 | 0.000 |
| Insufficient payload (model declined to judge) | 0.000 | 0.000 |
Machine scores (provisional)
The two teacher heads of the student model, read on this work. A score orders the frame for review; it never asserts a category, and the validation status ships verbatim with every row.
Baseline scores from an immature model (maturity gate not passed, 7 training rounds). Scores rank; they never assert a category.
score_only:v0-immature-baseline · verbatim from the scoring run: score_only means the number may rank works, and no category label ships from itClassification
machine, unvalidatedMachine predicted; a candidate call from one teacher head, not a consensus.
How this classification was reached, model by model and score by score, is at the end of the page under "How this classification was reached".