BDRC/tibetan-ocr
Original810.7Mparameters
Fixture535.7Kparameters
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.visual.vision_model.encoder.layers
Original · 27
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| PaddleOCRVisionEncoderLayer | 27 | 2 | ✓ kept |
model.language_model.layers
Original · 26
Fixture · 2
| Kind | Original | Fixture | |
|---|---|---|---|
| PaddleOCRDecoderLayer | 26 | 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.visual.vision_model.encoder.layers | 411.5M | 50.8% | 66.9K | 12.5% |
| model.language_model.layers | 368.1M | 45.4% | 74.0K | 13.8% |
| model.projector | 26.0M | 3.2% | 82.4K | 15.4% |
| model.language_model | 3.6M | 0.4% | 227.9K | 42.5% |
| model.visual | 1.5M | 0.2% | 84.5K | 15.8% |
Preserved properties
| Config | Property | Original | Fixture | |
|---|---|---|---|---|
| model | model_type | paddleocr_vl | paddleocr_vl | ✓ kept |
| model | tie_word_embeddings | True | True | ✓ kept |
| text_config | attention style | GQA (16 heads, 2 KV) | GQA (4 heads, 2 KV) | ✓ kept |
| text_config | RoPE type | default | default | ✓ kept |
| text_config | model_type | paddleocr_vl_text | paddleocr_vl_text | ✓ kept |
| text_config | vocab_size | 3560 | 3560 | ✓ kept |
| text_config | tie_word_embeddings | True | True | ✓ kept |
| text_config | hidden_act | silu | silu | ✓ kept |
| text_config | max_position_embeddings | 131072 | 131072 | ✓ kept |
| vision_config | RoPE type | axial | axial | ✓ kept |
| vision_config | model_type | paddleocr_vl_vision | paddleocr_vl_vision | ✓ kept |
| vision_config | hidden_act | gelu_pytorch_tanh | gelu_pytorch_tanh | ✓ kept |
| vision_config | image_size | 384 | 384 | ✓ kept |
| vision_config | patch_size | 14 | 14 | ✓ kept |
| vision_config | num_channels | 3 | 3 | ✓ kept |
Module classes
Instances of each class in the built model (prefix PaddleOCRVL omitted).
| Class | Original | Fixture |
|---|---|---|
| Linear | 347 | 29 |
| LayerNorm | 56 | 6 |
| PaddleOCRRMSNorm | 53 | 5 |
| GELUTanh | 27 | 2 |
| PaddleOCRVisionAttention | 27 | 2 |
| PaddleOCRVisionEncoderLayer | 27 | 2 |
| PaddleOCRVisionMLP | 27 | 2 |
| PaddleOCRAttention | 26 | 2 |
| PaddleOCRDecoderLayer | 26 | 2 |
| PaddleOCRMLP | 26 | 2 |
| SiLUActivation | 26 | 2 |
| Embedding | 2 | 2 |
| ModuleList | 2 | 2 |
| Conv2d | 1 | 1 |
| GELUActivation | 1 | 1 |
| PaddleOCRProjector | 1 | 1 |
| PaddleOCRRotaryEmbedding | 1 | 1 |
| PaddleOCRTextModel | 1 | 1 |
| ForConditionalGeneration | 1 | 1 |
| Model | 1 | 1 |
| PaddleOCRVisionEmbeddings | 1 | 1 |
| PaddleOCRVisionEncoder | 1 | 1 |
| PaddleOCRVisionModel | 1 | 1 |
| PaddleOCRVisionRotaryEmbedding | 1 | 1 |
| PaddleOCRVisionTransformer | 1 | 1 |
Config changes
10 fields changed, 66 unchanged.
| Field | Original | Fixture |
|---|---|---|
| text_config.head_dim | 128 | 16 |
| text_config.hidden_size | 1024 | 64 |
| text_config.intermediate_size | 3072 | 128 |
| text_config.num_attention_heads | 16 | 4 |
| text_config.num_hidden_layers | 26 | 2 |
| text_config.rope_parameters | {"mrope_section": [16, 24, 24], "rope_theta": 500000, "rope_type": "default",… | {"mrope_section": [2, 3, 3], "rope_theta": 500000, "rope_type": "default", "t… |
| vision_config.hidden_size | 1152 | 64 |
| vision_config.intermediate_size | 4304 | 128 |
| vision_config.num_attention_heads | 16 | 4 |
| vision_config.num_hidden_layers | 27 | 2 |