stepfun-ai/GOT-OCR-2.0-hf
Original560.5Mparameters
Fixture13.0Mparameters
Layer stacks2compared
Findings0to review
✓ Same architecture, smaller
Every module class, layer kind and checked property of the original is in the fixture.
Layer stacks
One square per layer, colored by kind: the layer's module classes and type attributes. Hover a square for its index and kind.
model.vision_tower.layers
Original · 12
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| MLPBlock | 12 | 2 | ✓ kept |
model.language_model.layers
Original · 24
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| Qwen2DecoderLayer | 24 | 2 | ✓ kept |
Where the parameters are
Share of each model's parameters per component. Vocabulary and patch sizes are kept, so embeddings usually take a larger share of the fixture.
Original
Fixture
| Component | Original | Share | Fixture | Share |
|---|---|---|---|---|
| model.language_model.layers | 308.4M | 55.0% | 82.6K | 0.6% |
| model.language_model | 155.5M | 27.7% | 9.7M | 74.6% |
| model.vision_tower.layers | 85.1M | 15.2% | 828.2K | 6.4% |
| model.multi_modal_projector | 6.9M | 1.2% | 1.5M | 11.4% |
| model.vision_tower | 4.5M | 0.8% | 918.6K | 7.1% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | got_ocr2 | got_ocr2 | ✓ kept |
| model | tie_word_embeddings | True | True | ✓ kept |
| vision_config | model_type | got_ocr2_vision | got_ocr2_vision | ✓ kept |
| vision_config | hidden_act | gelu | gelu | ✓ kept |
| vision_config | image_size | 1024 | 1024 | ✓ kept |
| vision_config | patch_size | 16 | 16 | ✓ kept |
| vision_config | num_channels | 3 | 3 | ✓ kept |
| text_config | attention style | MHA (16 heads, 16 KV) | MHA (4 heads, 4 KV) | ✓ kept |
| text_config | RoPE type | default | default | ✓ kept |
| text_config | model_type | qwen2 | qwen2 | ✓ kept |
| text_config | vocab_size | 151860 | 151860 | ✓ kept |
| text_config | tie_word_embeddings | True | True | ✓ kept |
| text_config | hidden_act | silu | silu | ✓ kept |
| text_config | max_position_embeddings | 32768 | 32768 | ✓ kept |
Module classes
Instances of each class in the built model (prefix GotOcr2 omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 218 | 24 |
| Qwen2RMSNorm | 49 | 5 |
| LayerNorm | 24 | 4 |
| Qwen2Attention | 24 | 2 |
| Qwen2DecoderLayer | 24 | 2 |
| Qwen2MLP | 24 | 2 |
| SiLUActivation | 24 | 2 |
| GELUActivation | 12 | 2 |
| MLPBlock | 12 | 2 |
| VisionAttention | 12 | 2 |
| VisionLayer | 12 | 2 |
| Conv2d | 5 | 5 |
| LayerNorm | 2 | 2 |
| ModuleList | 2 | 2 |
| Embedding | 1 | 1 |
| ForConditionalGeneration | 1 | 1 |
| Model | 1 | 1 |
| MultiModalProjector | 1 | 1 |
| PatchEmbeddings | 1 | 1 |
| VisionEncoder | 1 | 1 |
| VisionNeck | 1 | 1 |
| Qwen2Model | 1 | 1 |
| Qwen2RotaryEmbedding | 1 | 1 |
Config changes
9 fields changed, 60 unchanged.
| Field | Original | Fixture |
|---|---|---|
| text_config.hidden_size | 1024 | 64 |
| text_config.intermediate_size | 2816 | 128 |
| text_config.layer_types | 24 entries: 24× full_attention | ["full_attention", "full_attention"] |
| text_config.num_attention_heads | 16 | 4 |
| text_config.num_hidden_layers | 24 | 2 |
| text_config.num_key_value_heads | 16 | 4 |
| vision_config.hidden_size | 768 | 64 |
| vision_config.num_attention_heads | 12 | 4 |
| vision_config.num_hidden_layers | 12 | 2 |