Instructions to use immanuelpeter/Inkling-2-Mini-Vision with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- timm
How to use immanuelpeter/Inkling-2-Mini-Vision with timm:
import timm model = timm.create_model("hf-hub:immanuelpeter/Inkling-2-Mini-Vision", pretrained=True) - PerceptionEncoder
How to use immanuelpeter/Inkling-2-Mini-Vision with PerceptionEncoder:
# Use any PE model as a vision encoder import core.vision_encoder.pe as pe model = pe.VisionTransformer.from_config("immanuelpeter/Inkling-2-Mini-Vision", pretrained=True) - Notebooks
- Google Colab
- Kaggle
Inkling-2-Mini-Vision
This repository packages the vision Tower and Projector from Inkling 2 Mini. Initialized from Meta's PE-Lang L, its weights differ from both PE-Lang L and Inkling-2-Small-Vision after co-training with the language model.
Contents
| File | Tensors | What it holds |
|---|---|---|
model.safetensors |
420 | Tower tensors from model.visual.backbone.* |
projector.safetensors |
2 | Projector (proj_in, proj_out) |
inkling2_vision.py |
timm Tower loader, 2x2 merge and Projector | |
config.json |
Vision configuration and native resolution | |
export_manifest.json |
Source pin and tensor counts |
Architecture
| Component | Details |
|---|---|
| Tower | 23 blocks, 1024 hidden, 16 heads, patch size 20, 2D RoPE, exact GELU, LayerScale |
| Token compression | 2x2 spatial grouping to 4096, no learned parameters |
| Projector | Linear(4096, 4096), exact GELU, Linear(4096, 2304), no biases |
At 640 px this gives 1024 Tower tokens (1024-d), 256 merged tokens (4096-d), and 256 projected tokens (2304-d).
Usage
See examples/inference.py for image feature extraction.
Validation
The parity check verifies all 422 tensors against the pinned parent with torch.equal, confirms they differ from PE-Lang L and Inkling 2 Small, and checks forward outputs against vLLM's reference.
Reproduction
The export script reads model.visual.* from the pinned parent and writes the original BF16 tensors.
Credits
Thinking Machines released the Inkling 2 Mini weights; Meta released PE-Lang L. The vision forward follows vLLM.
License
Apache-2.0, as declared on the source model card.
- Downloads last month
- 16
Model tree for immanuelpeter/Inkling-2-Mini-Vision
Base model
thinkingmachines/Inkling-2-Mini