InternVL25<T>
Models & Types · AiDotNet.VisionLanguage.InstructionTuned
InternVL2.5: improved training data and strategy over InternVL2 with InternLM2.5 backbone.
Inheritance: NeuralNetworkBase<T> → VisionLanguageModelBase<T> → InternVL25<T>
Implements: IInstructionTunedVLM<T>
For Beginners
InternVL 2.5 refines InternVL2 with better training data and improved training strategies while keeping the same pixel shuffle and dynamic resolution architecture. The key improvements are in data curation — more carefully selected and filtered training examples — and optimized training recipes that help the model learn more effectively. It uses InternLM2.5 as the language backbone, achieving stronger benchmark scores across diverse tasks including document understanding, chart reasoning, and visual question answering. Default values follow the original paper settings.
How It Works
InternVL2.5 (Chen et al., 2024) refines InternVL2 with improved training data curation and strategy, using InternLM2.5 as the language backbone. It maintains the pixel shuffle and dynamic resolution architecture while achieving stronger benchmark performance.
References:
- Paper: “Expanding Performance Boundaries of Open-Source Multimodal Models with InternVL 2.5” (Chen et al., 2024)
Example
// Create an InternVL 2.5 model with improved training recipes
// using InternViT-6B encoder with InternLM2.5 backbone
var architecture = new NeuralNetworkArchitecture<double>(
inputType: InputType.TwoDimensional,
taskType: NeuralNetworkTaskType.ImageClassification,
inputHeight: 224, inputWidth: 224, inputDepth: 3, outputSize: 512);
// ONNX inference mode with pre-trained model
var model = new InternVL25<double>(architecture, "internvl25.onnx");
// Training mode with native layers
var trainModel = new InternVL25<double>(architecture, new InternVL25Options());
Constructors
| Constructor | Summary |
|---|---|
InternVL25(NeuralNetworkArchitecture<T> architecture, InternVL25Options options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) |
|
InternVL25(NeuralNetworkArchitecture<T> architecture, string modelPath, InternVL25Options options) |
Properties
| Property | Summary |
|---|---|
int DecoderEmbeddingDim { get; } |
|
int EmbeddingDimension { get; } |
|
int MaxGenerationLength { get; } |
|
string LanguageModelName { get; } |
Methods
| Method | Summary |
|---|---|
ModelMetadata<T> GetModelMetadata() |
|
Tensor<T> Chat(Tensor<T> image, IEnumerable<ValueTuple<string, string>> conversationHistory, string userMessage) |
|
Tensor<T> EncodeImage(Tensor<T> image) |
|
Tensor<T> GenerateFromImage(Tensor<T> image, string prompt) |
Generates text using InternVL2.5’s improved pixel shuffle + dynamic resolution. |