Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,15 @@ export const VLM_MODELS: VLMModelType[] = [
},
],
},
{
architecture: 'YoutuVLForConditionalGeneration',
models: [
{
name: 'Youtu-VL',
links: [
'https://huggingface.co/tencent/Youtu-VL-4B-Instruct',
],
},
],
},
];
5 changes: 5 additions & 0 deletions src/cpp/src/visual_language/inputs_embedder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "visual_language/gemma3n/classes.hpp"
#include "visual_language/gemma4/classes.hpp"
#include "visual_language/videochat_flash/classes.hpp"
#include "visual_language/youtu_vl/classes.hpp"

#include "continuous_batching/timer.hpp"
#include "utils.hpp"
Expand Down Expand Up @@ -384,6 +385,8 @@ InputsEmbedder::InputsEmbedder(const std::filesystem::path& model_dir,
m_impl = std::make_shared<InputsEmbedderGemma4>(vlm_config, model_dir, tokenizer, device, device_config);
} else if (vlm_config.model_type == VLMModelType::VIDEOCHAT_FLASH_QWEN) {
m_impl = std::make_shared<InputsEmbedderVideoChatFlashQwen>(vlm_config, model_dir, tokenizer, device, device_config);
} else if (vlm_config.model_type == VLMModelType::YOUTU_VL) {
m_impl = std::make_shared<InputsEmbedderYoutuVL>(vlm_config, model_dir, tokenizer, device, device_config);
} else {
OPENVINO_THROW("Unsupported model type in VLM InputsEmbedder class. Please, create feature request on new model support");
}
Expand Down Expand Up @@ -432,6 +435,8 @@ InputsEmbedder::InputsEmbedder(const ModelsMap& models_map,
m_impl = std::make_shared<InputsEmbedderGemma4>(vlm_config, models_map, tokenizer, config_dir_path, device, device_config);
} else if (vlm_config.model_type == VLMModelType::VIDEOCHAT_FLASH_QWEN) {
m_impl = std::make_shared<InputsEmbedderVideoChatFlashQwen>(vlm_config, models_map, tokenizer, config_dir_path, device, device_config);
} else if (vlm_config.model_type == VLMModelType::YOUTU_VL) {
m_impl = std::make_shared<InputsEmbedderYoutuVL>(vlm_config, models_map, tokenizer, config_dir_path, device, device_config);
} else {
OPENVINO_THROW("Unsupported model type in VLM InputsEmbedder class. Please, create feature request on new model support");
}
Expand Down
1 change: 1 addition & 0 deletions src/cpp/src/visual_language/inputs_embedder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,7 @@ class InputsEmbedder {
friend class InputsEmbedderGemma3n;
friend class InputsEmbedderGemma4;
friend class InputsEmbedderVideoChatFlashQwen;
friend class InputsEmbedderYoutuVL;
};

template <typename Func>
Expand Down
5 changes: 5 additions & 0 deletions src/cpp/src/visual_language/vision_encoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "visual_language/gemma3n/classes.hpp"
#include "visual_language/gemma4/classes.hpp"
#include "visual_language/videochat_flash/classes.hpp"
#include "visual_language/youtu_vl/classes.hpp"

namespace ov::genai {

Expand Down Expand Up @@ -146,6 +147,8 @@ VisionEncoder::Ptr VisionEncoder::create(const std::filesystem::path& model_dir,
return std::make_shared<VisionEncoderGemma4>(model_dir, device, properties);
} else if (model_type == VLMModelType::VIDEOCHAT_FLASH_QWEN) {
return std::make_shared<VisionEncoderVideoChatFlashQwen>(model_dir, device, properties);
} else if (model_type == VLMModelType::YOUTU_VL) {
return std::make_shared<VisionEncoderYoutuVL>(model_dir, device, properties);
} else {
OPENVINO_THROW("Unsupported model type in VLM VisionEncoder class. Please, create feature request on new model support");
}
Expand Down Expand Up @@ -193,6 +196,8 @@ VisionEncoder::Ptr VisionEncoder::create(
return std::make_shared<VisionEncoderGemma4>(models_map, config_dir_path, device, device_config);
} else if (model_type == VLMModelType::VIDEOCHAT_FLASH_QWEN) {
return std::make_shared<VisionEncoderVideoChatFlashQwen>(models_map, config_dir_path, device, device_config);
} else if (model_type == VLMModelType::YOUTU_VL) {
return std::make_shared<VisionEncoderYoutuVL>(models_map, config_dir_path, device, device_config);
} else {
OPENVINO_THROW("Unsupported model type in VLM VisionEncoder class. Please, create feature request on new model support");
}
Expand Down
1 change: 1 addition & 0 deletions src/cpp/src/visual_language/vlm_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ VLMModelType to_vlm_model_type(const std::string& value) {
{"videochat_flash_qwen", VLMModelType::VIDEOCHAT_FLASH_QWEN},
{"qwen3_omni", VLMModelType::QWEN3_OMNI},
{"qwen3_omni_moe", VLMModelType::QWEN3_OMNI},
{"youtu_vl", VLMModelType::YOUTU_VL},
};

auto it = model_types_map.find(value);
Expand Down
1 change: 1 addition & 0 deletions src/cpp/src/visual_language/vlm_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ enum class VLMModelType {
GEMMA4_UNIFIED,
VIDEOCHAT_FLASH_QWEN,
QWEN3_OMNI,
YOUTU_VL,
};

/// @brief A Configuration class passed to VLMPipeline and used to
Expand Down
Loading
Loading