Feature Extraction
Transformers
Safetensors
English
matilda_jev
decision-model
typed-decisions
jev
maincode
custom_code
Instructions to use Maincode/matilda-jev-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Maincode/matilda-jev-v1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="Maincode/matilda-jev-v1", trust_remote_code=True)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Maincode/matilda-jev-v1", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,536 Bytes
d10ad42 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | """MATILDA multimodal aliases with an explicit loader for the frozen preprocessing configuration."""
from transformers.models.qwen2_vl.image_processing_qwen2_vl import Qwen2VLImageProcessor
from transformers.models.qwen3_vl.processing_qwen3_vl import Qwen3VLProcessor
from transformers.models.qwen3_vl.video_processing_qwen3_vl import Qwen3VLVideoProcessor
from .tokenization_matilda_jev import MatildaJevTokenizer
class MatildaJevImageProcessor(Qwen2VLImageProcessor):
pass
class MatildaJevVideoProcessor(Qwen3VLVideoProcessor):
pass
class MatildaJevProcessor(Qwen3VLProcessor):
@classmethod
def _get_arguments_from_pretrained(cls, pretrained_model_name_or_path, processor_dict=None, **kwargs):
if processor_dict is None:
raise ValueError("MATILDA requires its processor_config.json")
image = dict(processor_dict["image_processor"])
video = dict(processor_dict["video_processor"])
image.pop("image_processor_type", None)
video.pop("video_processor_type", None)
image.pop("auto_map", None)
video.pop("auto_map", None)
tokenizer = MatildaJevTokenizer.from_pretrained(pretrained_model_name_or_path, **kwargs)
components = {
"image_processor": MatildaJevImageProcessor(**image),
"tokenizer": tokenizer,
"video_processor": MatildaJevVideoProcessor(**video),
}
return [components[name] for name in cls.get_attributes()]
MatildaJevProcessor.register_for_auto_class("AutoProcessor")
|