Zero-Shot Classification
Transformers
Safetensors
matilda_jev
feature-extraction
matilda
jev
decision-model
classification
maincode
custom_code
Instructions to use Maincode/matilda-jev-v1.5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Maincode/matilda-jev-v1.5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("zero-shot-classification", model="Maincode/matilda-jev-v1.5", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("Maincode/matilda-jev-v1.5", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download modeling_matilda_jev.py from Maincode/matilda-jev-v1.5: direct link, hf CLI and curl.
- Browser
- Download file 1.3 kB
-
https://huggingface.co/Maincode/matilda-jev-v1.5/resolve/main/modeling_matilda_jev.py
- Command line
-
hf download hf://Maincode/matilda-jev-v1.5/modeling_matilda_jev.py
-
curl -L -o modeling_matilda_jev.py https://huggingface.co/Maincode/matilda-jev-v1.5/resolve/main/modeling_matilda_jev.py
1.3 kB
| """MATILDA backbone alias. The separate JEV decision readout is loaded by the bundled runtime.""" | |
| from transformers import AutoModel | |
| from transformers.models.qwen3_5.modeling_qwen3_5 import Qwen3_5Model, Qwen3_5TextModel, Qwen3_5VisionModel | |
| from .configuration_matilda_jev import MatildaJevConfig, MatildaJevTextConfig, MatildaJevVisionConfig | |
| class MatildaJevTextModel(Qwen3_5TextModel): | |
| config_class = MatildaJevTextConfig | |
| class MatildaJevVisionModel(Qwen3_5VisionModel): | |
| config_class = MatildaJevVisionConfig | |
| # The multimodal backbone instantiates both submodels through AutoModel. | |
| AutoModel.register(MatildaJevTextConfig, MatildaJevTextModel, exist_ok=True) | |
| AutoModel.register(MatildaJevVisionConfig, MatildaJevVisionModel, exist_ok=True) | |
| class MatildaJevModel(Qwen3_5Model): | |
| config_class = MatildaJevConfig | |
| def __init__(self, config): | |
| # Local dynamic modules may load configuration and model dependencies into | |
| # different content-hash namespaces. Register the actual config types too. | |
| AutoModel.register(type(config.text_config), MatildaJevTextModel, exist_ok=True) | |
| AutoModel.register(type(config.vision_config), MatildaJevVisionModel, exist_ok=True) | |
| super().__init__(config) | |
| MatildaJevModel.register_for_auto_class("AutoModel") | |