Downloads · 30 days
5
12% of all-time downloads
sardinelab/SparseModernBERT-alpha2.0
SparseModernBERT-alpha2.0 is a machine learning model from sardinelab. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
SparseModernBERT-alpha2.0 is a masked language model based on ModernBERT that replaces the standard softmax attention with an adaptive sparse attention mechanism (AdaSplash) using Triton.
Downloads · 30 days
5
12% of all-time downloads
All-time downloads
43
Public
Parameters
150M
1.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt1.2 GB · 50%
From the Hugging Face model README
SparseModernBERT-alpha2.0 is a masked language model based on ModernBERT that replaces the standard softmax attention with an adaptive sparse attention mechanism (AdaSplash) using Triton.
The sparsity parameter α = 2.0 yields highly sparse attention patterns, improving efficiency while maintaining performance.
Key features:
Use the codebase from: https://github.com/deep-spin/SparseModernBERT
from transformers import AutoTokenizer
from sparse_modern_bert import CustomModernBertModel
model_id = "sardinelab/SparseModernBERT-alpha2.0"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = CustomModernBertModel.from_pretrained(model_id, trust_remote_code=True)
If you use this model in your work, please cite:
@article{goncalves2025adasplash,
title={AdaSplash: Adaptive Sparse Flash Attention},
author={Gon\c{c}alves, Nuno and Treviso, Marcos and Martins, Andr\'e F. T.},
journal={arXiv preprint arXiv:2502.12082},
year={2025}
}