GrokVision<T>
Models & Types · AiDotNet.VisionLanguage.Proprietary
Grok Vision: reference implementation of xAI’s real-time multimodal model.
Inheritance: NeuralNetworkBase<T> → VisionLanguageModelBase<T> → GrokVision<T>
Implements: IProprietaryVLM<T>
For Beginners
Grok Vision is a proprietary multimodal model from xAI with real-time data access and visual understanding. Default values follow the model’s recommended settings.
How It Works
Grok Vision is a reference implementation of xAI’s real-time multimodal model. Grok processes images alongside text with access to real-time data, featuring a large context window and multimodal understanding capabilities for visual question answering, image analysis, and document understanding.
References:
- Grok Vision: real-time data processing with multimodal input (xAI, 2024-2025)
Example
// Create a Grok Vision model for real-time multimodal understanding
// with real-time data processing and multimodal input from xAI
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 GrokVision<double>(architecture, "grokvision.onnx");
// Training mode with native layers
var trainModel = new GrokVision<double>(architecture, new GrokVisionOptions());
Constructors
| Constructor | Summary |
|---|---|
GrokVision(NeuralNetworkArchitecture<T> architecture, GrokVisionOptions options, IGradientBasedOptimizer<T, Tensor<T>, Tensor<T>> optimizer) |
|
GrokVision(NeuralNetworkArchitecture<T> architecture, string modelPath, GrokVisionOptions options) |
Properties
| Property | Summary |
|---|---|
int DecoderEmbeddingDim { get; } |
|
int EmbeddingDimension { get; } |
|
int MaxGenerationLength { get; } |
|
string LanguageModelName { get; } |
|
string Provider { get; } |
Methods
| Method | Summary |
|---|---|
ModelMetadata<T> GetModelMetadata() |
|
Tensor<T> Chat(Tensor<T> image, string prompt) |
|
Tensor<T> EncodeImage(Tensor<T> image) |
|
Tensor<T> GenerateFromImage(Tensor<T> image, string prompt) |
Generates text from an image using Grok’s real-time multimodal architecture. |