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

ModernBERT-Large-Instruct

Date: 2026-11-15Commit: 9943452Signed: 2DC28CC7B26A283B ✓

Fill mask model with 396M parameters. Safetensors weights, 795 MB in all. Published by answerdotai under Apache-2.0.

396M params795MBModernBERT-Large-Instructsafetensorspermissive
FactsParams396MSize795 MBFormatssafetensorsTaskfill maskLicenseApache-2.0From sourcepermissive
$ fw get answerdotai/ModernBERT-Large-Instruct
# manifest sha256 fadc9f7dd28d… · 795 MB · 7 files
$ fw verify ./ModernBERT-Large-Instruct answerdotai/ModernBERT-Large-Instruct
From sourceHosted (signed)answerdotai/ModernBERT-Large-InstructLast check: 2026-11-15 03:28 UTC

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

Works with

Runs with

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

Overview

Size
795 MB
Weights
792 MB (safetensors)
Parameters
396M
Formats
safetensors
Task
fill mask
License
Apache-2.0 (permissive)
Files
7, each with a sha256
Publisher
answerdotai
Added
2026-11-15
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

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 03:28 UTCpassed

Model card

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

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

7 files · 795 MBWeights 792 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 7 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md6.28 KBaa1656cc32e34fc7611866e63f2bfe7771328fa006472e0d5b58c8616336124a
config.json1.41 KB47b0da6de8a6eb949379b77eb9a595e69f792d5d204d59b9162cadb240db993e
model.safetensors792 MB44bc97cad63c1e4fcfc6ba0f63df443bcef4c37f2f3c04609cf8ae3cbe8962f9
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
9943452941 pinned now2026-11-15 03:28 UTC7 files · 795 MB

Use it

$ fw get answerdotai/ModernBERT-Large-Instruct
# manifest sha256 fadc9f7dd28d… · 795 MB · 7 files
$ fw verify ./ModernBERT-Large-Instruct answerdotai/ModernBERT-Large-Instruct
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/answerdotai/ModernBERT-Large-Instruct.json --dir ./ModernBERT-Large-Instruct $ python3 fw.py verify ./ModernBERT-Large-Instruct ./answerdotai__ModernBERT-Large-Instruct.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download answerdotai/ModernBERT-Large-Instruct --revision 9943452941e79c8c35ede72e78a38a8175a79bb5 --local-dir ./ModernBERT-Large-Instruct

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
aa1656cc32e34fc7611866e63f2bfe7771328fa006472e0d5b58c8616336124a
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: answerdotai <huggingface.co/answerdotai>Newsgroups: alt.freeweights.visionSubject: ModernBERT-Large-InstructDate: 2026-11-15Commit: 9943452Signed: 2DC28CC7B26A283B ✓
Upstream
answerdotai/ModernBERT-Large-Instruct
Pinned commit
9943452941e79c8c35ede72e78a38a8175a79bb5
Manifest
ModernBERT-Large-Instruct.json · .minisig
Manifest sha256
fadc9f7dd28daf165e500fbd4d6c6a48f2724e062b58be083c99ab3f27ab8bdd
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 03:28 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/answerdotai/ModernBERT-Large-Instruct.json $ curl -O https://freeweights.allternit.com/manifests/answerdotai/ModernBERT-Large-Instruct.json.minisig $ minisign -Vm ModernBERT-Large-Instruct.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

1 model in the catalog name this one as their parent.

Quantizations
1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download answerdotai/ModernBERT-Large-Instruct
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.json. Provenance. Takedown history: none.

Variants

1 quantized or adapter build of ModernBERT-Large-Instruct. Each has its own license check and page.

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