nbeerbower commited on
Commit
c7c5ed8
·
verified ·
1 Parent(s): 7848722

Add model card (weights uploading separately)

Browse files
Files changed (1) hide show
  1. README.md +137 -0
README.md ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ pipeline_tag: image-text-to-text
6
+ tags:
7
+ - multimodal
8
+ - vlm
9
+ - artemis-vlm
10
+ - document-understanding
11
+ - chart-understanding
12
+ - ocr
13
+ - mistral
14
+ - qwen3-vl
15
+ - schneewolf-labs
16
+ - a-series
17
+ base_model: schneewolflabs/A3
18
+ datasets:
19
+ - schneewolflabs/ChartDocMix-v1
20
+ ---
21
+
22
+ # A3-Doc
23
+
24
+ **A3-Doc** is a document + chart understanding specialist in the Schneewolf
25
+ Labs A-series — a focused-excellence Stage-2 full fine-tune of
26
+ [**A3**](https://huggingface.co/schneewolflabs/A3) on
27
+ [ChartDocMix-v1](https://huggingface.co/datasets/schneewolflabs/ChartDocMix-v1).
28
+ Where [A3-Instruct](https://huggingface.co/schneewolflabs/A3-Instruct) is the
29
+ generalist sibling, A3-Doc trades breadth for depth on the ChartQA / DocVQA /
30
+ InfoVQA / TextVQA / OCRBench class of tasks.
31
+
32
+ ## What it is
33
+
34
+ | | |
35
+ |---|---|
36
+ | Architecture | Qwen3-VL ViT (frozen, ~0.41 B) + 2-layer MLP projector (trained) + A2/Mistral decoder (full FFT) |
37
+ | Total params | **12.69 B** (12.28 B trainable in Stage-2; ViT frozen) |
38
+ | Base | [`schneewolflabs/A3`](https://huggingface.co/schneewolflabs/A3) |
39
+ | Training corpus | [`schneewolflabs/ChartDocMix-v1`](https://huggingface.co/datasets/schneewolflabs/ChartDocMix-v1) (241,435 rows: ~96% doc/chart/OCR VQA + 4% identity rehearsal) |
40
+ | Epochs | 1 (15,075 steps) |
41
+ | Effective batch | 16 (bs 1 × grad-accum 16) |
42
+ | Optimizer | paged AdamW 8-bit |
43
+ | Learning rate | 1e-5, cosine, warmup 3% |
44
+ | Max seq length | 2048 |
45
+ | **Vision token cap** | **max_pixels = 512×512 (262 K px)** — see the resolution note below |
46
+ | Hardware | 1× NVIDIA GB10 (DGX Spark, 128 GB unified) |
47
+ | Wall-clock | ~3.3 days |
48
+ | Final eval loss | **0.499** (down from 0.647 at the first eval) |
49
+
50
+ The single-domain corpus is far more learnable than the generalist mix: A3-Doc
51
+ reaches eval loss 0.499, well under A3-Instruct's 0.752 on the broad corpus.
52
+
53
+ ## Benchmarks
54
+
55
+ Greedy decoding, lmms-eval terse-answer prompt convention, 500-row validation
56
+ slices (a fast read — see caveats). Metrics: ChartQA relaxed accuracy, DocVQA /
57
+ InfoVQA ANLS, TextVQA VQA-accuracy, OCRBench contains-accuracy.
58
+
59
+ | Benchmark | A3-Doc | Metric |
60
+ |---|---|---|
61
+ | ChartQA | 53.2 | relaxed acc |
62
+ | DocVQA | 48.4 | ANLS |
63
+ | InfoVQA | 34.2 | ANLS |
64
+ | TextVQA | 71.6 | VQA acc |
65
+ | OCRBench | 67.0 (670/1000) | contains |
66
+
67
+ For a Path-B graft trained on 241 K rows, **TextVQA and OCRBench are genuinely
68
+ respectable** — scene-text and OCR transferred well. DocVQA/InfoVQA are the
69
+ weak spots, and the reason is known (below).
70
+
71
+ **Caveats:** numbers are a 500-row slice, not full splits. ChartQA's `test`
72
+ split interleaves `human_test` (harder) and `augmented_test` (easier) and the
73
+ published number averages both — a flat 500-row sample may over-represent one
74
+ type. Treat these as indicative, not leaderboard-final.
75
+
76
+ ## The resolution finding (important)
77
+
78
+ A3-Doc was trained **and** evaluated at `max_pixels = 512×512`. DocVQA and
79
+ InfoVQA are high-resolution document scans where text is tiny, so at 512² much
80
+ of the text is illegible. This is the dominant limiter on those two tasks.
81
+
82
+ Diagnostic — **eval-only**, no retraining, same 200 rows:
83
+
84
+ | Benchmark | @512² (262 K px) | @1280² (1.64 M px) | Δ |
85
+ |---|---|---|---|
86
+ | DocVQA (ANLS) | 0.525 | **0.580** | **+5.5** |
87
+ | InfoVQA (ANLS) | 0.385 | **0.420** | **+3.5** |
88
+
89
+ The frozen ViT + projector + decoder **generalize to higher visual-token
90
+ counts despite only seeing 512² in training**. The eval-only gain is a floor;
91
+ a retrain at higher `max_pixels` should beat it. If you run A3-Doc yourself,
92
+ **raise `max_pixels`** (the `ArtemisVLMProcessor` accepts it) for document
93
+ tasks — it costs more tokens/latency but helps.
94
+
95
+ ## Intended use
96
+
97
+ Document & chart VQA, infographic QA, OCR-style reading, chart captioning. For
98
+ broad conversation/creative use reach for
99
+ [A3-Instruct](https://huggingface.co/schneewolflabs/A3-Instruct); for dense
100
+ image captioning reach for [A3](https://huggingface.co/schneewolflabs/A3).
101
+
102
+ ## Inference
103
+
104
+ ```python
105
+ from transformers import AutoConfig, AutoTokenizer
106
+ from artemis_vlm import ArtemisVLMForConditionalGeneration, ArtemisVLMProcessor
107
+ import torch
108
+
109
+ ckpt = "schneewolflabs/A3-Doc"
110
+ model = ArtemisVLMForConditionalGeneration.from_pretrained(ckpt, dtype=torch.bfloat16).to("cuda")
111
+ cfg = AutoConfig.from_pretrained(ckpt, trust_remote_code=True)
112
+ tok = AutoTokenizer.from_pretrained(ckpt, trust_remote_code=True)
113
+ # raise max_pixels for document tasks (training default was 512*512):
114
+ proc = ArtemisVLMProcessor(tokenizer=tok, vision_config=cfg.vision_config,
115
+ max_pixels=1280*1280)
116
+ ```
117
+
118
+ Also runs in llama.cpp via the `Schneewolf-Labs/llama.cpp` fork's Artemis VLM
119
+ mmproj graft (same pattern as A3 / A3-Instruct).
120
+
121
+ ## Roadmap — A3-Doc-v2
122
+
123
+ The resolution finding points to the obvious next lever: **retrain at
124
+ 1024²–1280² max_pixels** rather than 512². Same corpus, same recipe, higher
125
+ vision budget. Expected to push DocVQA/InfoVQA well past the eval-only gains.
126
+
127
+ ## Lineage
128
+
129
+ - [`schneewolflabs/A3`](https://huggingface.co/schneewolflabs/A3) — Stage-1 base (projector-only alignment)
130
+ - [`schneewolflabs/A2`](https://huggingface.co/schneewolflabs/A2) — text decoder (Mistral 12.3 B)
131
+ - [`schneewolflabs/ChartDocMix-v1`](https://huggingface.co/datasets/schneewolflabs/ChartDocMix-v1) — training corpus
132
+ - [`schneewolflabs/i-DPO`](https://huggingface.co/datasets/schneewolflabs/i-DPO) — identity/voice anti-drift bedrock
133
+
134
+ ## License
135
+
136
+ apache-2.0, consistent with the rest of the A-series lineage. Constituent
137
+ training sources carry their own licenses (see the ChartDocMix-v1 card).