Text Classification
Transformers
Safetensors
English
Turkish
German
qwen3_5
image-text-to-text
decision-model
calibration
conformal-prediction
uncertainty
reasoning
routing
triage
jev
typesafe
qwen3.5
english
Instructions to use mertkayacs/Deem-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mertkayacs/Deem-4B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="mertkayacs/Deem-4B")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("mertkayacs/Deem-4B") model = AutoModelForMultimodalLM.from_pretrained("mertkayacs/Deem-4B", device_map="auto") - Notebooks
- Google Colab
- Kaggle
card: comparisons name Kev-4B and Laya, option order dropped (it was not fixed), live test recounted to 130 requests
Browse files- README.md +12 -14
- assets/fixes.png +2 -2
- assets/langs.png +2 -2
README.md
CHANGED
|
@@ -22,7 +22,7 @@ The 103-second film, sound on. Also in [Türkçe](https://huggingface.co/dataset
|
|
| 22 |
|
| 23 |
## Tested on the live model
|
| 24 |
|
| 25 |
-
We sent Deem-4B
|
| 26 |
|
| 27 |
| Case | What was sent | Result |
|
| 28 |
|---|---|---|
|
|
@@ -30,7 +30,6 @@ We sent Deem-4B 178 requests in English with known answers on 4 October 2026; ev
|
|
| 30 |
| Long policies | 20 customers against one six-rule return policy | 17 of 20 matched the answer computed from the rules |
|
| 31 |
| Negations | 15 short facts, each asked plain and negated | 29 of 30 correct |
|
| 32 |
| Missing facts | 10 situations without the deciding fact, plus the same 10 with it | answered `unknown` in 10 of 10; 10 of 10 correct with the fact |
|
| 33 |
-
| Option order | 2 support tickets, each with the options in all 24 orders | the same answer in 48 of 48 orders |
|
| 34 |
| Casual messages | 20 casual messages written in English, with typos and slang | 20 of 20 routed to the right team |
|
| 35 |
|
| 36 |

|
|
@@ -83,9 +82,9 @@ client = TypeSafeClient(api_key="local", base_url="http://127.0.0.1:8000")
|
|
| 83 |
|
| 84 |
## Results
|
| 85 |
|
| 86 |
-
 r10 and [Laya](https://huggingface.co/convaiinnovations/laya) 0.3.22 on their own servers with their own calibration. Jev 1.13 rows come from TypeSafe's [API reference](https://docs.typesafe.ai/api) and [Models page](https://docs.typesafe.ai/models). The held-out tests come from JevAlt's own data pipeline, so they favour JevAlt. Kev-4B and Laya both do better on long padding; Laya is far smaller and faster. Every number and every decision: [results/comparison](https://huggingface.co/datasets/mertkayacs/jevalt-bench/tree/main/results/comparison).
|
| 91 |
|
|
@@ -94,24 +93,23 @@ Same items and client for every model, each as shipped: [Kev-4B](https://hugging
|
|
| 94 |
|
| 95 |

|
| 96 |
|
| 97 |
-
The three test splits went through the same pipeline as the training rows, so they measure what the training aimed at. On the English split Deem-4B
|
| 98 |
|
| 99 |
</details>
|
| 100 |
|
| 101 |
<details>
|
| 102 |
<summary><b>How we fixed each problem</b></summary>
|
| 103 |
|
| 104 |
-
Most fixes are a set of training rows aimed at one weak spot.
|
| 105 |
|
| 106 |
- **The data.** About 23,900 training rows in English, Turkish and German. Public sets with known answers (MASSIVE, Open-Jev, PAWS-X, typed-decisions); everyday situations written directly in each language by other open models; requests from the Emberwick game; and the fix sets below. Two teacher models from labs other than the writer give every written row a probability per option, and an answer counts only when both teachers and the writer agree on it. Those probabilities, the soft labels, are what the models learn. Test rows were split off by group, and their checksums recorded, before the final training runs.
|
| 107 |
-
- **Hidden instructions.** A fix set of 827 rows hides a hostile line in the text (an order to the AI filter, a fake rule) at the start, the middle or the end, with the right answer unchanged. On our probe, hidden lines
|
| 108 |
-
- **An honest "unknown".** A fix set of 310 rows removes the fact that decides the question and asks it with and without an `unknown` option.
|
| 109 |
-
- **
|
| 110 |
-
- **
|
| 111 |
-
- **
|
| 112 |
-
- **
|
| 113 |
-
- **
|
| 114 |
-
- **Thinking when unsure.** Short reasoning traces, kept only when they reach the right answer, trained at a lower weight. With `reasoning: "auto"` the model thinks (up to 256 tokens) only when its first answer is unsure. The gain is small: on English date, number and policy rows, accuracy moved from 0.761 to 0.769.
|
| 115 |
|
| 116 |
</details>
|
| 117 |
|
|
|
|
| 22 |
|
| 23 |
## Tested on the live model
|
| 24 |
|
| 25 |
+
We sent Deem-4B 130 requests in English with known answers on 4 October 2026. Deem-4B answered 122 of 130 correctly; every request and answer is in [results/tested](https://huggingface.co/datasets/mertkayacs/jevalt-bench/tree/main/results/tested).
|
| 26 |
|
| 27 |
| Case | What was sent | Result |
|
| 28 |
|---|---|---|
|
|
|
|
| 30 |
| Long policies | 20 customers against one six-rule return policy | 17 of 20 matched the answer computed from the rules |
|
| 31 |
| Negations | 15 short facts, each asked plain and negated | 29 of 30 correct |
|
| 32 |
| Missing facts | 10 situations without the deciding fact, plus the same 10 with it | answered `unknown` in 10 of 10; 10 of 10 correct with the fact |
|
|
|
|
| 33 |
| Casual messages | 20 casual messages written in English, with typos and slang | 20 of 20 routed to the right team |
|
| 34 |
|
| 35 |

|
|
|
|
| 82 |
|
| 83 |
## Results
|
| 84 |
|
| 85 |
+

|
| 86 |
|
| 87 |
+

|
| 88 |
|
| 89 |
Same items and client for every model, each as shipped: [Kev-4B](https://huggingface.co/jaredpalmer/kev-4b) r10 and [Laya](https://huggingface.co/convaiinnovations/laya) 0.3.22 on their own servers with their own calibration. Jev 1.13 rows come from TypeSafe's [API reference](https://docs.typesafe.ai/api) and [Models page](https://docs.typesafe.ai/models). The held-out tests come from JevAlt's own data pipeline, so they favour JevAlt. Kev-4B and Laya both do better on long padding; Laya is far smaller and faster. Every number and every decision: [results/comparison](https://huggingface.co/datasets/mertkayacs/jevalt-bench/tree/main/results/comparison).
|
| 90 |
|
|
|
|
| 93 |
|
| 94 |

|
| 95 |
|
| 96 |
+
The three test splits went through the same pipeline as the training rows, so they measure what the training aimed at. On the English split, Deem-4B answers 94.7% correctly and Kev-4B 84.7%. The paired bootstrap (2,000 resamples) gives a 95% interval of +8.8 to +11.4 accuracy points for that gap. Deem-4B's Brier score is 0.091 and Kev-4B's 0.256. On JevBench-hard, Deem-4B answers 70.3% correctly and Kev-4B 54.1%; on TurkishMMLU, Deem-4B answers 55.5% correctly and Kev-4B 51.3%; on GermEval 2017, Deem-4B answers 62.0% correctly and Kev-4B 65.3%; on 10kGNAD, Deem-4B answers 59.5% correctly and Kev-4B 65.3%. These suites were outside the training data. The typed-decisions train split was in the mix. On English date, number and policy test rows, Deem-4B's accuracy is 0.761 with reasoning off and 0.769 with `reasoning: "auto"`; the gain's interval touches zero.
|
| 97 |
|
| 98 |
</details>
|
| 99 |
|
| 100 |
<details>
|
| 101 |
<summary><b>How we fixed each problem</b></summary>
|
| 102 |
|
| 103 |
+
Most fixes are a set of training rows aimed at one weak spot. The comparisons below use Kev-4B on the same held-out rows. JevAlt's pooled results use each model's own language. On held-out English decisions, Kev-4B answers 84.7% correctly and Deem-4B 94.7%.
|
| 104 |
|
| 105 |
- **The data.** About 23,900 training rows in English, Turkish and German. Public sets with known answers (MASSIVE, Open-Jev, PAWS-X, typed-decisions); everyday situations written directly in each language by other open models; requests from the Emberwick game; and the fix sets below. Two teacher models from labs other than the writer give every written row a probability per option, and an answer counts only when both teachers and the writer agree on it. Those probabilities, the soft labels, are what the models learn. Test rows were split off by group, and their checksums recorded, before the final training runs.
|
| 106 |
+
- **Hidden instructions.** A fix set of 827 rows hides a hostile line in the text (an order to the AI filter, a fake rule) at the start, the middle or the end, with the right answer unchanged. On our probe, hidden lines change 36.0% of Kev-4B's answers and 14.0% of Deem-4B's. On 203 held-out planted-instruction rows, Kev-4B answers 81.3% correctly and JevAlt 90.1%. Our target was under 5%.
|
| 107 |
+
- **An honest "unknown".** A fix set of 310 rows removes the fact that decides the question and asks it with and without an `unknown` option. On 11 held-out cases without the deciding fact, Kev-4B answers `unknown` in 0 and JevAlt in 9; Kev-4B and Laya have no `unknown` option. The model we started from, Intern-Decision-4B, already answers `unknown` in 9 of 11; training raised the mean probability of `unknown` from 0.55 to 0.74. Turn it on with `abstain: true`.
|
| 108 |
+
- **Long policies and long texts.** 390 rows give a policy with exceptions and sub-limits, with the right answer worked out by code, and 1,188 rows bury the facts in up to 3,000 tokens of unrelated records. On 150 held-out policy rows, Kev-4B answers 59.3% correctly and JevAlt 80.0%. On 285 padded rows, Kev-4B answers 87.4% correctly and JevAlt 95.4%. With 600 words of unrelated records in front, Deem-4B loses 17.4 accuracy points; Kev-4B loses 5.4 and Laya 10.4 points.
|
| 109 |
+
- **Negations.** A fix set of 368 twin rows asks the same thing as "is it so?" and "is it not so?" with mirrored answers. On 30 held-out negated questions, Kev-4B answers 76.7% correctly and JevAlt 96.7%.
|
| 110 |
+
- **Dates and numbers.** 390 date rows and 383 number rows, answers computed by code, some with a short worked reasoning. On 80 held-out date rows, Kev-4B answers 67.5% correctly and JevAlt 71.3%; the gap is within noise. On 44 number rows, Kev-4B and JevAlt both answer 68.2% correctly. Dates remain a weak spot: Wähler-4B miscounted a return window across two months even with reasoning on.
|
| 111 |
+
- **Honest confidence.** The soft labels teach how sure to be, and a temperature per question type and language, fitted on 3,224 held-out decisions, does the rest. On held-out English decisions, Kev-4B's Brier score is 0.256 and Deem-4B's 0.091. Deem-4B's fitted temperature is 1.10. The 80, 90 and 95% answer sets use conformal thresholds fitted on the same rows.
|
| 112 |
+
- **Thinking when unsure.** Short reasoning traces, kept only when they reach the right answer, trained at a lower weight. With `reasoning: "auto"` the model thinks (up to 256 tokens) only when its first answer is unsure. On English date, number and policy rows, Deem-4B's accuracy is 0.761 with reasoning off and 0.769 with `reasoning: "auto"`; the gain is small.
|
|
|
|
| 113 |
|
| 114 |
</details>
|
| 115 |
|
assets/fixes.png
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|
assets/langs.png
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|