Laya 421M vs Qwen3.5 0.8B vs Qwen2.5 0.5B: Small Models for Text Classification

We ran the 421M Laya decision model against two LLMs of about the same size, Qwen3.5 0.8B and Qwen2.5 0.5B, on five labeling tasks on a MacBook Pro M5 Max. Laya was about twice as accurate on tickets, complaints, and intents, and faster on every task but one.

Sep 24, 202612 min readFollow

Topics You Will Master

How a decision model like Laya answers a question without writing any text
How Laya compares with two LLMs of about the same size
How much speed and memory each model really needs on a Mac
Why small LLMs keep picking the same label, and how to spot it

Is a 421M classifier better than a small LLM for sorting text? We tested it. On support tickets, Laya picked the right intent 99% of the time. Qwen3.5 0.8B, a model about twice its size, got 45%.

Laya from ConvAI Innovations is not a chat model. We give it some text and a question with a fixed set of answers, and it scores every answer in one pass. So we put it against two LLMs of about the same size doing the same job: Qwen3.5 0.8B and Qwen2.5 0.5B.

In this blog, we will learn how Laya works, how the three models compare on five real labeling tasks, and what each one costs in speed and memory. Everything runs on one MacBook Pro M5 Max with 36GB of memory, using MLX.

Bestseller

Fine Tuning LLM with Hugging Face Transformers for NLP

Learn transformer architecture fundamentals and fine-tune LLMs with custom datasets.

Enroll on Udemy →30 day refund, lifetime access

What Is Laya?

Laya is a decision model. An LLM writes an answer one word at a time. Laya reads the text and the question once, and scores every possible answer at the same moment. In simple words, it fills in a multiple choice sheet instead of writing an essay.

It is a ModernBERT-large encoder with a small decision head on top, 421M parameters in total. It answers three kinds of questions: choice (pick one label), score (pick a level, like 1 to 5 stars), and noul (yes or no). Let's see how we ask it a question as below:

PYTHON
import laya_mlx as laya

agent = laya.load("aac6fef/laya-mlx", dtype="float16")

questions = {
    "department": {
        "type": "choice",
        "instructions": "Which support department should handle the customer's `message`?",
        "criteria": {
            "refund": "refund policy, requesting or tracking a refund",
            "order": "place, change, cancel or track an order",
            "payment": "payment methods and problems paying",
        },
    },
    "refund_request": {
        "type": "noul",
        "instructions": "Is the customer asking to get money back or checking on a refund they requested?",
    },
}

out = agent.predict({"message": "I paid twice for order 5521, please send one payment back"}, questions)
print(out["answers"])
  • criteria lists the allowed answers, with a short description next to each label.
  • agent.predict(...) takes the input as a dictionary and answers every question in one call.

The output is as below:

PLAINTEXT
{'department': {'type': 'choice', 'confidence': 0.5082, 'choice': 'payment', 'probabilities': {'refund': 0.1244, 'order': 0.0407, 'payment': 0.8349}, ...}, 'refund_request': {'type': 'noul', 'confidence': 0.7065, 'noul': 0.7065, ...}}

Here, we can see both answers came back from one call, with a probability for every label. There is no text to parse, and no way to answer with a label that is not on the list.

Advertisement

Our Test Setup

Let me tabulate the three models for your better understanding:

Model Kind Build Weights on disk
Laya 421M decision model aac6fef/laya-mlx, 16-bit 0.84 GB
Qwen3.5 0.8B 0.8B LLM mlx-community/Qwen3.5-0.8B-bf16 1.71 GB
Qwen2.5 0.5B 0.5B LLM mlx-community/Qwen2.5-0.5B-Instruct-bf16 0.99 GB

Every model saw the same records, the same question wording, and the same JSON input. None was trained on our data, so this is zero-shot for all three.

We made the LLMs as strong and as fast as we could. Qwen3.5 ran with thinking off. Each LLM could only answer with a label from the list, because we limited its output token by token. This is called constrained decoding. For yes or no questions and star ratings, we read the probabilities of its very first token. We also reused the shared part of each prompt across records, so the LLM timings count only the new text.

The Five Tasks

We picked five jobs that teams really use a classifier for:

Task Dataset Records Questions
Support ticket triage Bitext customer support 1,100 department (11 labels), intent (27), refund request (yes/no)
Complaint routing US CFPB complaints 1,800 financial product (9 labels)
Many-label intent CLINC150 plus out of scope 300 intent (151 labels)
Sentiment Yelp reviews 300 stars (1 to 5), polarity (3 labels)
Log alert detection BGL supercomputer logs 300 is this line a real alert (yes/no)

The last three use a fixed sample of 300 records, the same 300 for every model. In the log set, half the normal lines also carry a FATAL or FAILURE level, so a model cannot just look for scary words.

Advertisement

Which Model Gives Better Answers?

For label questions we report accuracy. For yes or no questions we report AUROC: if we pick one real "yes" and one real "no", how often does the model score the "yes" higher? 1.0 is perfect and 0.5 is a coin flip.

Two panels of horizontal bars comparing Laya, Qwen3.5 0.8B and Qwen2.5 0.5B, with accuracy on six label questions where Laya leads by a wide margin on tickets, complaints and CLINC, and AUROC on three yes or no questions where Qwen2.5 0.5B sits near a coin flip on log alerts

Let me tabulate the results:

Question Laya 421M Qwen3.5 0.8B Qwen2.5 0.5B
Ticket department 96.2% 41.4% 11.6%
Ticket intent 99.0% 44.5% 31.0%
Refund request, AUROC 0.964 0.792 0.870
Complaint product 53.1% 23.5% 11.4%
CLINC intent 55.0% 29.3% 29.3%
Yelp stars, exact 37.3% 44.3% 40.7%
Yelp stars, within one star 65.7% 93.0% 74.0%
Yelp polarity 79.0% 76.7% 78.0%
Log alert, JSON, AUROC 0.802 0.890 0.594
Log alert, text only, AUROC 0.918 0.854 0.507

Here, we can see Laya is about twice as accurate as Qwen3.5 0.8B on tickets, complaints, and CLINC, and further ahead of Qwen2.5 0.5B. Qwen3.5 0.8B wins on star ratings and on log alerts with JSON input. Qwen2.5 0.5B is close to a coin flip on the logs.

Why the Small LLMs Fall Behind

They keep picking the same label. Qwen2.5 0.5B sent 978 of the 1,100 tickets to contact, and 1,686 of the 1,800 complaints to credit_card. Qwen3.5 0.8B sent 1,393 complaints to debt_collection. With nine complaint labels, always saying one of them gets about 11%, and that is where Qwen2.5 landed.

Tip

Before trusting any classifier, count how often it picks each label. If one label takes most of the answers, the accuracy number is hiding a model that is barely reading the input.

Laya does not have this problem, because it scores every label against the text instead of writing one out.

Advertisement

Where Laya Falls Short

Laya is not better everywhere.

Let's see where it struggles:

  • Long complaints. Laya reads at most 512 tokens, and 22.5% of the complaints were longer. The LLMs read up to 3,000.
  • "None of these". On CLINC, Laya said "out of scope" correctly only 6.9% of the time. It almost always forced a real intent onto a request that had none.
  • Star ratings. Laya called 52 of the 69 five-star reviews "2 stars". Qwen3.5 0.8B was within one star 93% of the time.
  • The log level field. With the level in the JSON, Laya scored 95% of the normal FATAL lines as alerts. Given the message text only, it jumped from 0.802 to 0.918 AUROC and beat both LLMs.

Which Model Is Faster?

We timed one request at a time, one input with all its questions, the way an app would call the model. We also measured records per second over a whole dataset.

Two panels of horizontal bars for six task runs, with Laya taking 8.5 to 28.6 ms per request, Qwen3.5 0.8B 16.8 to 86.5 ms and Qwen2.5 0.5B 10.8 to 44.9 ms, and Laya processing 37 to 163 records a second in batches

Let me tabulate the middle time (p50) per request in ms:

Task Laya 421M Qwen3.5 0.8B Qwen2.5 0.5B
Ticket triage, 3 questions 12.2 51.6 44.9
Complaint routing 13.2 86.5 37.2
CLINC, 151 labels 28.6 29.4 21.0
Yelp, 2 questions 18.6 60.4 35.5
Logs, JSON 8.5 17.9 12.8
Logs, text only 9.2 16.8 10.8

Here, we can see Laya was 1.2 to 6.5 times faster on every task except CLINC. The gap is biggest on long inputs like complaints, and smallest on short log lines.

On CLINC, Qwen2.5 0.5B was faster: 21.0 ms against 28.6. Laya has to read all 151 labels with every record, so its input grows to about 680 tokens. The LLMs read the label list once and reuse it.

For bulk jobs, Laya can run 32 records at once, which gave it 37 to 163 records a second. The LLMs, one at a time, did 6 to 84.

Advertisement

How Much Memory Does Each One Need?

We measured the weights on disk and the highest memory use across all six task runs:

Horizontal bars of weights on disk and peak memory, with Laya at 0.84 and 2.13 GB, Qwen3.5 0.8B at 1.71 and 3.80 GB, and Qwen2.5 0.5B at 0.99 and 2.43 GB

All three fit in 2 to 4 GB, and Laya is the lightest on both counts. So memory is not what sets these models apart. Accuracy is.

Can We Trust the Confidence Scores?

A classifier's confidence is useful when 90% confident means right about 9 times in 10. Then we can send confident answers straight through and unsure ones to a person. We measure the gap with ECE, expected calibration error. In simple words, it is the average gap between how sure the model said it was and how often it was right. Lower is better.

Horizontal bars of expected calibration error on four questions for Laya, Qwen3.5 0.8B and Qwen2.5 0.5B, where each model is best on at least one question and none is low on all four, with values up to 0.623 for Qwen3.5 0.8B on JSON log alerts

Here, we can see that none of the three is well calibrated out of the box. On support tickets, Laya was already honest, with an ECE of 0.017 on department against 0.273 and 0.627 for the Qwens.

For Laya the rest is cheap to fix. A new temperature learned on 20% of each dataset cut its complaint ECE from 0.207 to 0.029, and its star rating ECE from 0.400 to 0.085. So, before we use Laya's confidence to route work, we fit our own temperature on a few hundred labeled examples.

Which Model Should We Use?

Let me tabulate the answer:

If we need Pick Why
Support tickets, high volume Laya 96 to 99% accuracy at about 12 ms
Routing into many fixed labels Laya about twice as accurate as either LLM
Fine grades like star ratings Qwen3.5 0.8B within one star 93% of the time
Long documents or "none of these" a larger LLM none of the three did this well

We would not use Qwen2.5 0.5B for classification. It collapsed onto one label on two tasks and was near a coin flip on the logs.

Advertisement

Limits of This Test

This is one laptop and one run per task:

  • Three tasks use 300 records. A 5-point gap is real, but a 1 or 2-point gap could move.
  • We used one question wording per task and did not tune it for any model.
  • Qwen3.5 ran with thinking off. Thinking might help it, and would make it much slower.
  • Laya's MLX build is a community port. We did not compare it with the original PyTorch model.
  • The LLM timings reuse the shared part of the prompt. Without that, they would be slower.

If you run Laya on your own data, please share your task, your accuracy, and your time per request in the comments.

Conclusion

This is how Laya, a 421M decision model, compares with Qwen3.5 0.8B and Qwen2.5 0.5B on five labeling tasks on a MacBook Pro M5 Max. At about the same size, Laya was far more accurate on tickets, complaints, and many-label intent, because the small LLMs kept picking the same label. It was faster on five of six tasks and used the least memory. Qwen3.5 0.8B still beat it on star ratings and JSON log alerts.

Key takeaways:

  • Laya beat both LLMs on tickets, complaints, and CLINC, often by 2 times or more.
  • Small LLMs collapse onto one label. Qwen2.5 0.5B sent 94% of complaints to credit_card.
  • Laya answered in 8.5 to 29 ms and peaked at 2.13 GB, the lowest of the three.
  • Laya almost never says "none of these", and it cuts long inputs at 512 tokens.
  • A temperature fitted on a few hundred labeled examples fixes most of Laya's confidence problem.

Next steps:

In short, when the model has to be small, Laya is the better pick for short, clean labeling jobs, and a small LLM only makes sense for fine grades like star ratings.

Found this useful? Keep building with me.

New tutorials every week on YouTube: or go deeper with a full structured course.

Find this tutorial useful?

Subscribe to our YouTube channels for more practical production walk-throughs.

Discussion & Comments