
Valdam Vision 2.5
Valdam Vision 2.5 is an Inserloft-developed Vision-Language Model (VLM) designed for image understanding and text generation. Its primary capabilities include visual scene description, OCR-oriented text extraction, and zero-shot image content screening.
The model combines a pretrained Vision Transformer (ViT) visual encoder with a custom projection layer and an autoregressive Transformer decoder. This hybrid architecture connects visual representations with natural-language generation.
Valdam Vision 2.5 supports English and Spanish.
Overview
| Property | Details |
|---|---|
| Model | Valdam Vision 2.5 |
| Organization | Inserloft |
| Model type | Vision-Language Model |
| Primary task | Image-to-text |
| Architecture | Hybrid ViT Encoder + Transformer Decoder |
| Visual backbone | google/vit-huge-patch14-224-in21k |
| Text generation | Autoregressive |
| Supported languages | English, Spanish |
| Weight format | Safetensors |
| License | Apache 2.0 |
Key Features
Image Understanding
Uses visual patch representations extracted by a Vision Transformer encoder. These representations are projected into the model's shared embedding space and passed to the text decoder.
Autoregressive Text Generation
Generates text sequentially through a Transformer decoder. Cross-attention allows the decoder to use the visual information extracted by the encoder when producing its output.
OCR-Oriented Text Extraction
Designed to interpret text contained in images, including text-heavy visual material such as screenshots, documents, and graphic compositions.
The current inference interface returns a generated text sequence. It does not expose dedicated bounding-box coordinates or a structured document-layout representation.
Valdam Shield
A separate image-screening component based on CLIP ViT-L/14 semantic similarity.
It compares an image against predefined text categories, including:
- Normal or safe imagery.
- Explicit or nudity-related content.
- Violence and graphic imagery.
- Hate-related symbols or content.
Valdam Shield provides a similarity-based screening signal. Its output should not be interpreted as a calibrated probability or as a replacement for comprehensive human-reviewed moderation.
Architecture
Valdam Vision 2.5 uses a hybrid architecture composed of the following components:
1. Visual Encoder
A pretrained Vision Transformer provides the visual representations. The current implementation loads:
google/vit-huge-patch14-224-in21k
2. Projection and Normalization
A linear projection maps the encoder's hidden representations to the embedding dimension used by the decoder. Layer normalization is then applied.
3. Transformer Decoder
A custom decoder built with PyTorch's Transformer components generates text using causal self-attention and cross-attention over the visual representations.
4. Output Vocabulary
The decoder projects its hidden states into the vocabulary space to predict the next token.
Training and Initialization
Valdam Vision 2.5 is an Inserloft-developed hybrid model, not a fully from-scratch visual architecture. Its current implementation uses a pretrained visual backbone alongside the model's custom projection and decoder components.
The final behavior and capabilities depend on the training data, optimization process, and weights used for the released checkpoint.
Repository Structure
The following files are used by the local inference implementation:
Valdam-Vision-2.5/
├── architecture.py
├── inference.py
├── model.safetensors
├── config.json
├── vocab.json
└── README.md
| File | Description |
|---|---|
architecture.py | Defines the visual encoder, Transformer decoder, complete model, and Valdam Shield component. |
inference.py | Implements local model initialization and autoregressive prediction. |
model.safetensors | Stores the model parameters in Safetensors format. |
config.json | Contains architecture and hyperparameter configuration. |
vocab.json | Maps vocabulary tokens to their corresponding IDs. |
The weight, configuration, and vocabulary files must be available locally for the inference example below.
Quickstart
Requirements
Install the core dependencies:
pip install torch torchvision transformers safetensors pillow
The architecture module also imports OpenAI CLIP:
pip install ftfy regex tqdm
pip install git+https://github.com/openai/CLIP.git
Local Inference
The predictor expects an image tensor preprocessed for the ViT visual encoder.
import torch
from PIL import Image
from transformers import ViTImageProcessor
from inference import ValdamVisionLocalPredictor
# Select an available device
device = "cuda" if torch.cuda.is_available() else "cpu"
# Load the image processor
processor = ViTImageProcessor.from_pretrained(
"google/vit-huge-patch14-224-in21k"
)
# Initialize Valdam Vision 2.5
predictor = ValdamVisionLocalPredictor(
safetensors_weights_path="model.safetensors",
config_path="config.json",
vocab_path="vocab.json",
device=device
)
# Prepare an image
image = Image.open("example.jpg").convert("RGB")
inputs = processor(
images=image,
return_tensors="pt"
)
# Generate a description
image_tensor = inputs["pixel_values"]
result = predictor.predict(
image_tensor,
max_len=64
)
print("Valdam Vision 2.5:", result)
Important Implementation Notes
- The image must be converted to RGB and preprocessed before inference.
- The model configuration and vocabulary must match the released checkpoint.
- The current implementation initializes the visual backbone through Hugging Face Transformers. The corresponding pretrained checkpoint may need to be downloaded on first initialization.
- Generation is autoregressive, meaning tokens are produced sequentially.
- Inference speed and memory consumption depend on the hardware, model configuration, and runtime environment.
Evaluation
BLEU, METEOR, and ROUGE are relevant metrics for evaluating generated text against reference descriptions.
No numerical benchmark results are reported in this model card. Performance comparisons should include the evaluation dataset, preprocessing configuration, generation settings, hardware, and measurement methodology.
Limitations
Valdam Vision 2.5 has several important limitations:
- Generated descriptions may omit details or misinterpret visual content.
- OCR performance may vary with image resolution, typography, language, and image quality.
- Generated text is not guaranteed to preserve the exact wording or layout of the original image.
- Valdam Shield uses predefined semantic categories and may produce false positives or false negatives.
- The model's autoregressive generation can be affected by vocabulary coverage and decoding limits.
- The current inference interface does not return structured bounding boxes or spatial coordinates.
The model should be evaluated on the intended application before being used in production workflows.
License
Valdam Vision 2.5 is released under the Apache License 2.0, subject to the applicable terms of its included components and dependencies.
About Inserloft
Valdam Vision 2.5 is part of Inserloft's research and development ecosystem, focused on building independent AI models and exploring new approaches to machine learning.
Research: research.inserloft.com
Organization: Inserloft on Hugging Face