NOSSLETTER.techLIVE
back to archive

feat: add Inkling 2 support (text + vision)

Language: C+++1667 -30feature
concepts demonstrated
Model conversionMulti-modal processing (text and vision)Modular feature additionLarge-scale codebase integration
The Issue & Context

Before this PR, the codebase lacked support for loading and running Inkling 2 models, which include both text and vision capabilities, limiting users to earlier model formats.

Root Cause Analysis

The existing llama.cpp architecture and conversion tools were designed around earlier model formats and did not accommodate Inkling 2's combined text and vision tensor layouts or its specific model metadata and tensor mappings.

Solution Strategy & Architectural Pattern

This PR introduces a new conversion script (conversion/inkling2.py) to handle Inkling 2 model files and extends the tensor mapping definitions (gguf-py/gguf/tensor_mapping.py) and constants to support Inkling 2's format. It also updates core llama architecture files (src/llama-arch.cpp/h) and related components to load and run these models without changing operators, ensuring compatibility with both text and vision inputs.

Key Takeaway for Contributors

Supporting new model formats in a performant inference engine often requires coordinated updates across conversion tools, tensor metadata handling, and core architecture code, highlighting the importance of modular design that cleanly separates format-specific logic from operator implementations.