alt.freeweights.vision / ModernBERT-Large-Instruct-ONNX
From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.visionSubject:

ModernBERT-Large-Instruct-ONNX

Date: 2026-11-15Commit: f35017eSigned: 2DC28CC7B26A283B ✓

Fill mask model. Onnx weights, 4.03 GB in all. Published by onnx-community under Apache-2.0.

vision4.03GBModernBERT-Large-Instruct-ONNXonnxpermissive
FactsParamsnot statedSize4.03 GBFormatsonnxTaskfill maskLicenseApache-2.0From sourcepermissive
$ fw get onnx-community/ModernBERT-Large-Instruct-ONNX
# manifest sha256 83498158bb6e… · 4.03 GB · 12 files
$ fw verify ./ModernBERT-Large-Instruct-ONNX onnx-community/ModernBERT-Large-Instruct-ONNX
From sourceHosted (signed)onnx-community/ModernBERT-Large-Instruct-ONNXLast check: 2026-11-15 05:30 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Quantized of ModernBERT-Large-Instruct.

Works with

Runs with

Ranked by fit to this model (onnx), then by GitHub stars.

Convert with

Scan with

Overview

Size
4.03 GB
Weights
430 MB (smallest of 6 ONNX variants)
Parameters
not stated
Formats
onnx
Task
fill mask
License
Apache-2.0 (permissive)
Files
12, each with a sha256
Publisher
onnx-community
Added
2026-11-15
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Base model: answerdotai/ModernBERT-Large-Instruct

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 05:30 UTCpassed

Model card

From the publisher at commit f35017e. Shown as plain text with links; images open at the publisher.

ModernBERT-Large-Instruct (ONNX)#

This is an ONNX version of answerdotai/ModernBERT-Large-Instruct. It was automatically converted and uploaded using this Hugging Face Space.

Usage with Transformers.js#

See the pipeline documentation for fill-mask: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.FillMaskPipeline


ModernBERT-Large-Instruct#

Table of Contents#

  1. Model Summary
  2. Usage
  3. Evaluation
  4. Limitations
  5. Training
  6. License
  7. Citation

Model Summary#

ModernBERT-Instruct-Large is a lightly instruction-tuned version of ModernBERT-large, trained using a mixed-objective (Answer Token Prediction & Dummy MLM) on 20M examples sampled from the FLAN collection.

Despite a very straightforward pre-training and inference pipeline, this model proves to be a very strong model in a variety of contexts, in both zero-shot and fully-finetuned settings.

For more details, we recommend checking out the TIL Blog Post, the mini cookbook GitHub repository or the Technical Report.

Usage#

In order to use ModernBERT-Large-Instruct, you need to install a version of transformers which natively supports ModernBERT (4.48+):

pip install -U transformers>=4.48.0

⚠️ If your GPU supports it, we recommend using ModernBERT with Flash Attention 2 to reach the highest efficiency. To do so, install Flash Attention as follows, then use the model as normal:

pip install flash-attn

All tasks are then performed using the Model's Masked Language Modelling head, load via AutoModelForMaskedLM. Here is an example to answer an MMLU question:

import torch
from transformers import AutoTokenizer, AutoModelForMaskedLM

# Load model and tokenizer
model_name = "answerdotai/ModernBERT-Large-Instruct"
tokenizer = AutoTokenizer.from_pretrained(model_name)
device = 'cuda' if torch.cuda.is_available() else 'cpu'
if device == 'cuda':
    model = AutoModelForMaskedLM.from_pretrained(model_name, attn_implementation="flash_attention_2")
else:
    model = AutoModelForMaskedLM.from_pretrained(model_name)

model.to(device)

# Format input for classification or multiple choice. This is a random example from MMLU.
text = """You will be given a question and options. Select the right answer.
QUESTION: If (G, .) is a group such that (ab)^-1 = a^-1b^-1, for all a, b in G, then G is a/an
CHOICES:
- A: commutative semi group
- B: abelian group
- C: non-abelian group
- D: None of these
ANSWER: [unused0] [MASK]"""

# Get prediction
inputs = tokenizer(text, return_tensors="pt").to(device)
outputs = model(**inputs)
mask_idx = (inputs.input_ids == tokenizer.mask_token_id).nonzero()[0, 1]
pred_id = outputs.logits[0, mask_idx].argmax()
answer = tokenizer.decode(pred_id)
print(f"Predicted answer: {answer}")  # Outputs: B

Evaluation#

Results are taken from the technical report. Results for MMLU and MMLU-Pro are taken from SmolLM2 (†) and the MMLU-Pro leaderboard (‡) whenever possible.

Zero-Shot#
ModelMMLUMMLU-ProADEv2NISOSEAverage
0.3-0.5B
Tasksource-NLI36.0816.5465.1758.7221.1139.52
RoBERTa-Large-SST31.3013.6343.6175.0040.6740.84
UniMC38.4818.8323.2973.9636.8838.29
ModernBERT-Large-Instruct43.0617.1653.3185.5320.6243.94
SmoLM2-360M35.8†11.38‡----
Qwen2-0.5B33.7†15.93‡----
1B+
Llama3.2-1B45.8322.6----
SmoLM2-1.7B48.4418.31‡----
Qwen2.5-1.5B59.6732.1‡----
Fine-Tuned#
ModelMNLIYahoo!20ngAGNewsSST-2IMDBSST-5Average
ModernBERT (cls head)90.8†77.7573.9695.3497.1†96.5259.2884.39
ModernBERT-Large-Instruct91.0377.8873.9695.2496.2297.261.1384.67

Limitations#

ModernBERT’s training data is primarily English and code, so performance is best on these languages. ModernBERT-Large-Instruct is a first version, demonstrating the strong potential of using the MLM head for downstream tasks without complex pipelines. However, it is very likely to have failure cases and it could be improved further.

License#

Apache 2.0

Citation#

If you use ModernBERT-Large-Instruct in your work, please cite:

@misc{clavié2025itsmasksimpleinstructiontuning,
      title={It's All in The [MASK]: Simple Instruction-Tuning Enables BERT-like Masked Language Models As Generative Classifiers}, 
      author={Benjamin Clavié and Nathan Cooper and Benjamin Warner},
      year={2025},
      eprint={2502.03793},
      archivePrefix={arXiv},
      primaryClass={cs.CL},
      url={https://arxiv.org/abs/2502.03793}, 
}

Files

12 files · 4.03 GBWeights 430 MB (smallest of 6 ONNX variants). Sizes and sha256 from the signed manifest.
Hide all 12 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md6.83 KB176418488aab0e363b3e294a173924fed4d2b97c89114b3cf3c8bc367e8f6a5f
config.json1.22 KBea7c765edf07440b2ceab27417b6d52142c36e3e35287e4ff70ae8fc5b87f51f
onnx/model.onnx1.79 GB5a6f0a86aa1a9f69bcf6cbdda15e6206d9ce1ae5b476941d7a307c4b4cffabe6
onnx/model_bnb4.onnx430 MBbb263b1cddc07b2cb6b21f8d67e13f76edc4da962ce33dbc778a3d97bdc9f398
onnx/model_int8.onnx449 MBd090defdc41ec59cf89d91f2da5bad775c1a85b94201e4dd631a40c418b3e765
onnx/model_q4.onnx455 MBac295810e0c28b5fe59b990977f4c37a803024baba57bad7020b542e77840a54
onnx/model_quantized.onnx449 MBd090defdc41ec59cf89d91f2da5bad775c1a85b94201e4dd631a40c418b3e765
onnx/model_uint8.onnx449 MBc79740df7ce346056c8c8ec788b6a7c998da626c851d761a612139aaec6e7c74
special_tokens_map.json694 Bea97ecdbcc73713039d8d64dbb05e3689495c96657fbd9a18f5bed381be81049
tokenizer.json3.58 MBbc2788d5ddc9e2ced5d7a6aa695b30bb0c56751e60fd65ac595b16b9f0784812
tokenizer_config.json20.9 KB3ec26e7bbe413b8737ea2f2ea3a445912a045435af21f05fe955705ab5dea3bc
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
f35017e0d9 pinned now2026-11-15 05:30 UTC12 files · 4.03 GB

Use it

$ fw get onnx-community/ModernBERT-Large-Instruct-ONNX
# manifest sha256 83498158bb6e… · 4.03 GB · 12 files
$ fw verify ./ModernBERT-Large-Instruct-ONNX onnx-community/ModernBERT-Large-Instruct-ONNX
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/onnx-community/ModernBERT-Large-Instruct-ONNX.json --dir ./ModernBERT-Large-Instruct-ONNX $ python3 fw.py verify ./ModernBERT-Large-Instruct-ONNX ./onnx-community__ModernBERT-Large-Instruct-ONNX.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/ModernBERT-Large-Instruct-ONNX --revision f35017e0d9f5125c52ac28df6d1b0e1382290d64 --local-dir ./ModernBERT-Large-Instruct-ONNX

License

Name
Apache License 2.0
Id
Apache-2.0
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
176418488aab0e363b3e294a173924fed4d2b97c89114b3cf3c8bc367e8f6a5f
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.visionSubject: ModernBERT-Large-Instruct-ONNXDate: 2026-11-15Commit: f35017eSigned: 2DC28CC7B26A283B ✓
Upstream
onnx-community/ModernBERT-Large-Instruct-ONNX
Pinned commit
f35017e0d9f5125c52ac28df6d1b0e1382290d64
Manifest
ModernBERT-Large-Instruct-ONNX.json · .minisig
Manifest sha256
83498158bb6e4c0908be0d375e94f36b1869fbbddf3aec0520425e732daedae0
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:30 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/onnx-community/ModernBERT-Large-Instruct-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/ModernBERT-Large-Instruct-ONNX.json.minisig $ minisign -Vm ModernBERT-Large-Instruct-ONNX.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

answerdotai/ModernBERT-Large-Instruct · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/ModernBERT-Large-Instruct-ONNX
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. ModernBERT-Large-Instruct-ONNX.json. Provenance. Takedown history: none.
From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: onnx-community <huggingface.co/onnx-community>Subject: AI-Anime-Image-Detector-ViT-ONNX
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX