LIVE · Thursday 3 December

Open Weight Classification Models by Situation: ModernBERT, DeBERTa, Qwen3 Embeddings, Qwen3.5-9B, TOD

A buyer's guide to open-weight text classifiers by situation, with licences, a monthly hosting example from $193 to $1,489, and a test plan to run before you commit.

By Surya7 min read

The best open weight model for classification depends on what you already have: fine-tune ModernBERT-base when you have labeled English data. With only label names, use deberta-v3-large-zeroshot-v2.0-c. With many languages, train logistic regression on Qwen3 embeddings. Test Qwen3.5-9B only when labels depend on long rules, and route image and table work to SigLIP 2 and TabPFN.

No source has published a test of all of these models on the same held-out examples, so each recommendation is a starting point for your own test.

Option Fits when Licence Example hosting per month
ModernBERT-base, fine-tuned You have labeled English examples Apache 2.0 About $576 on one L4
DeBERTa-v3 zero-shot v2.0-c You have English label names only MIT, commercially friendly data About $193 on 8 vCPUs
Qwen3-Embedding-0.6B plus logistic regression Text spans many languages Apache 2.0 About $576 on one L4
Qwen3.5-9B, labels constrained Labels depend on long rules Apache 2.0 About $1,296 on one L40S
TOD, hosted Each input has a fixed option list Adapters Apache-2.0, Gemma 4 base $300 per 1 million decisions

The hosting figures assume Hugging Face Inference Endpoints running 720 hours a month at list price.

If you have labeled English examples, fine-tune the ModernBERT-base encoder for classification first

ModernBERT is an encoder that converts text into a representation, and a classification head that you train turns that into a label. The model card says to "fine-tune it following standard BERT fine-tuning recipes," because the released checkpoints are masked language models. You therefore need labeled examples before it classifies anything.

The base model has 149 million parameters and the large model has 395 million. Both accept up to 8,192 tokens, so long documents fit without cutting. Both are Apache 2.0. On the GLUE benchmark, the card reports 88.4 for base, 90.4 for large and 91.4 for DeBERTaV3-large.

Start with base, because it is cheaper to serve. Try large when your validation scores fall short. ModernBERT needs transformers 4.48.0 or later, and the card recommends Flash Attention 2 where your GPU supports it.

If you have only label names, DeBERTa-v3 zero-shot classification with the -c model works without training

The DeBERTa-v3 zero-shot model classifies without training. It places each label into a sentence such as "This text is about {}" and then decides whether the text supports that sentence. Setting multi_label=True lets one text receive several labels.

Its model card reports a mean macro-F1 of 0.676 across 28 classification tasks for the -c version, against 0.497 for facebook/bart-large-mnli. The card reports 0.846 for the version without -c after training on up to 500 examples per class from each task. That difference is a good reason to label examples once the zero-shot version is running.

Choose the -c version for commercial work. The card says the version without -c includes training data "with non-commercial licenses." The model is English only, accepts 512 tokens, and runs on a CPU. Each label is checked as a separate sentence, so long label lists increase the cost of every text.

If your text spans many languages, train logistic regression on Qwen3 embeddings instead of relying on the 8B MTEB score

Qwen3 Embedding converts each text into a vector, and you train a small classifier on those vectors. Qwen's announcement of June 5, 2025 lists 0.6B, 4B and 8B sizes under Apache 2.0, with over 100 languages and 32K-token inputs.

The 8B model's 70.58 score on the MTEB multilingual leaderboard, first on that date, averages many task types. The 8B card's Classification column is the closer figure. It reads 66.83 for 0.6B, 72.33 for 4B and 74.00 for 8B. Those are public benchmark scores, not results on your data.

For the classifier, scikit-learn's LogisticRegression handles three or more classes and returns per-class probabilities. Use class_weight="balanced" when some classes are rare. Start with the 0.6B model and move up only when your validation set shows a gain that is worth a larger GPU. The models need transformers 4.51.0 or sentence-transformers 2.7.0 or later.

If your labels depend on long rules, test Qwen3.5-9B with the output constrained

A generative model helps when the right label depends on a policy, a set of examples or other context that cannot fit in a label name. Qwen3.5-9B is Apache 2.0, has 9 billion language parameters plus a vision encoder, and takes 262,144 tokens natively.

The model card makes no classification claims. Its use here is an inference from its design, not a demonstrated result. Turn off thinking mode, which is on by default, with "chat_template_kwargs": {"enable_thinking": False}. Constrain the output to your label list in vLLM or SGLang so that every answer maps to a class. If it works well, its labeled outputs can also train a cheaper ModernBERT model after you review them.

If every input arrives with a fixed option list, TOD is a hosted alternative to test

Parsec's TOD scores a list of options that you supply, with descriptions, and returns one probability per option, summing to 1. It generates no free text. The release consists of LoRA adapters on Google's gemma-4-12B-it and a ModernBERT-base retriever that shortens long option lists. The base weights are not included, and users accept the Gemma 4 licence separately. Parsec's TOD page prices hosted use at $0.30 per 1,000 decisions, and a confidence gate passes uncertain cases to a parent model that you pay for separately. On the public JevBench decision benchmark, the page reports 84.4% accuracy against 86.2% for the untrained base, with a fix planned. Its accuracy on classification datasets has not been measured, and neither has the calibration of its probabilities on your labels. It therefore belongs in the zero-shot group of your test.

If you classify images or tables, start with Google SigLIP 2 or TabPFN and check the weight licence

For images, Google's SigLIP 2 card says the model supports "zero-shot image classification and image-text retrieval." You pass candidate labels to the Transformers zero-shot-image-classification pipeline, and the licence is Apache 2.0.

For tables, TabPFN predicts in a single forward pass after pretraining on synthetic data. The repository code is Apache 2.0, but the weights differ by version. TabPFN-2 weights are Apache 2.0 with attribution. The repository says that TabPFN-2.5 and later weights, including the default TabPFN-3.5, are under non-commercial licences. The TabPFN-2.5 licence says the model and its outputs "cannot be used for any commercial or production purpose" without a commercial licence from Prior Labs. The repository recommends a GPU, because TabPFN is slow on a CPU.

A mixed setup for 1 million texts a month costs about $1,489 to host

The worked example uses Hugging Face Inference Endpoints list prices, which are billed by the minute. It makes four assumptions.

  • The workload is 1 million English texts a month.
  • Every endpoint runs all 30 days, which is 720 hours.
  • Each model gets its own single instance.
  • One instance per model carries the traffic, which has not been measured for any of these models.

On those assumptions, the single-model costs are as follows.

  1. DeBERTa zero-shot on an 8-vCPU Intel instance costs $0.268 × 720, or about $193.
  2. ModernBERT-base on one NVIDIA L4 costs $0.80 × 720, or about $576. Qwen3-Embedding-0.6B on the same instance costs the same.
  3. Qwen3.5-9B on one 48 GB L40S costs $1.80 × 720, or about $1,296. Its roughly 10 billion parameters take about 20 GB in bf16.

One possible setup sends every text to DeBERTa and sends low-confidence cases to Qwen3.5-9B. Because both endpoints run all month, that setup costs $193 plus $1,296, or about $1,489, whatever share of texts falls back. Labeling a few hundred examples and fine-tuning ModernBERT-base would replace both with one $576 endpoint, if it passes the same test.

A held-out test on your own data is needed to choose between the options

The cost and licence differences are clear, but the accuracy differences on your data are unknown until you measure them. The following steps give a fair comparison.

  1. Hold out real examples before training, with every class represented.
  2. Start with a rules or logistic regression baseline, and keep it in every comparison.
  3. Run zero-shot options apart from fine-tuned options, and test any adapter release against its frozen base model.
  4. Pin checkpoints, prompts, label descriptions, software, hardware, precision, batch size and input length.
  5. Report macro-F1 and per-class recall, and set multilabel thresholds on validation data only.
  6. Check calibration with scikit-learn's CalibratedClassifierCV, using the sigmoid method below about 1,000 samples because isotonic regression overfits on small sets.
  7. Record coverage at a fixed error rate, p50 and p95 latency, peak memory and total cost including fallback.

Sources

More in Models

All Models →