zandervdm commited on
Commit
bc56e63
·
verified ·
1 Parent(s): a267957

Add plain-language explainer

Browse files
Files changed (1) hide show
  1. EXPLANATION.md +91 -0
EXPLANATION.md ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # How this model works
2
+
3
+ A short explainer for why Qevi-2B answers questions the way it does. Assumes no background.
4
+ For usage, see the [model card](README.md).
5
+
6
+ ## What a normal vision model does
7
+
8
+ Show a model a photo and ask "is there a ladder?" and it *writes* an answer: it picks the most
9
+ likely next word, appends that word to its own input, runs the whole model again for the next
10
+ word, and repeats. A thirteen-word reply means thirteen-plus passes through 2.1 billion
11
+ parameters, to communicate what is really one bit of information.
12
+
13
+ Ask ten questions about the same photo and it does that ten times over, re-encoding the photo
14
+ from scratch each time. The photo is ~1,000 tokens and the question is maybe 20, so almost all
15
+ of that work is repeated for nothing.
16
+
17
+ ## What we do instead
18
+
19
+ **1. Read the answer, don't generate it.**
20
+
21
+ Instruction-tuned models follow a rigid script. After your question ends, there is a specific
22
+ position where the model is about to write the first word of its reply. We call it the *sentinel*.
23
+
24
+ ```
25
+ <|im_start|>user
26
+ <|vision_start|>[image tokens]<|vision_end|>
27
+ Statement: There is a ladder in this image.
28
+ Is this statement true of the image? Answer Yes or No.<|im_end|>
29
+ <|im_start|>assistant
30
+ ^ the sentinel: the model's opinion already exists here
31
+ ```
32
+
33
+ At that position the model has already computed a score for every word in its vocabulary. The
34
+ score for `Yes` and the score for `No` are sitting right there. We take those two numbers and
35
+ stop. No generation, no parsing, no chance of it replying in an unexpected format.
36
+
37
+ **2. Ask everything at once.**
38
+
39
+ Because nothing is being generated, we can lay the image down once and append every question
40
+ after it, then use the attention mask to enforce three rules:
41
+
42
+ - every question can see the image
43
+ - every question can see itself
44
+ - **no question can see any other question**
45
+
46
+ Each question therefore behaves exactly as if it had been asked alone. We verified this: shuffle
47
+ the question order and the outputs are bitwise identical. Packing doesn't quietly change answers.
48
+
49
+ The payoff is that the expensive part (encoding the image, ~500 ms) happens once, while each
50
+ extra question costs about 5 ms. Thirty questions run ~24x faster than asking them one at a time.
51
+
52
+ ## What the fine-tune changed
53
+
54
+ The base model could already do this — reading logits works on a stock checkpoint. We fine-tuned
55
+ all 2.13 billion parameters against exactly that objective: cross-entropy over the candidate
56
+ answer logits, nothing else. Train-time and test-time behaviour are identical, which is rarer
57
+ than it sounds.
58
+
59
+ One epoch over 85,500 questions on 28,500 images, ~5 GPU-hours on two consumer cards. Results:
60
+
61
+ | | Base 2B | Qevi-2B |
62
+ |---|---|---|
63
+ | Accuracy, domains seen in training | 0.855 | **0.977** |
64
+ | Accuracy, 12 domains never trained on | 0.745 | **0.889** |
65
+ | Calibration error (held-out, lower better) | 0.160 | **0.054** |
66
+
67
+ The interesting number is the second row. It improved *more* on domains it had never seen
68
+ (+14.4) than on ones it trained on (+12.2), which is the evidence it learned a transferable
69
+ skill rather than memorising 28,500 images.
70
+
71
+ ## What this costs you
72
+
73
+ Every question needs a finite answer set declared up front. The model cannot caption an image,
74
+ describe it freely, or answer something you didn't anticipate. Free-form generation still works
75
+ (we checked) but comes out about 44% shorter than the base model, having been trained on
76
+ one-word answers.
77
+
78
+ For classification, moderation, triage, inspection and tagging, that trade is usually correct.
79
+ For open-ended description, use the base model.
80
+
81
+ ## Honest caveats
82
+
83
+ - Two of 31 domains got **worse**: German traffic signs (0.834 vs 0.879) and heavily pixelated
84
+ car models (0.474 vs 0.501, where both models are near the floor).
85
+ - One epoch, one seed, no ablations — there are no error bars on any of these numbers.
86
+ - The baseline in every comparison is the base model run through the *same* readout, which
87
+ isolates the effect of fine-tuning. It is not a comparison against the base model used
88
+ conversationally.
89
+ - English prompt templates only.
90
+
91
+ See the [model card](README.md) for the full evaluation, per-domain results and limitations.