Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

malusama
/
M2-Encoder-1B

Zero-Shot Image Classification
Transformers
ONNX
Chinese
English
m2_encoder
feature-extraction
multimodal
image-text-retrieval
bilingual
chinese
english
vision-language
custom-code
custom_code
Eval Results (legacy)
Model card Files Files and versions
xet
Community

Instructions to use malusama/M2-Encoder-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Transformers

    How to use malusama/M2-Encoder-1B with Transformers:

    # Use a pipeline as a high-level helper
    from transformers import pipeline
    
    pipe = pipeline("zero-shot-image-classification", model="malusama/M2-Encoder-1B", trust_remote_code=True)
    pipe(
        "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/hub/parrots.png",
        candidate_labels=["animals", "humans", "landscape"],
    )
    # Load model directly
    from transformers import AutoModel
    model = AutoModel.from_pretrained("malusama/M2-Encoder-1B", trust_remote_code=True, dtype="auto")
  • Notebooks
  • Google Colab
  • Kaggle
M2-Encoder-1B
5.84 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 10 commits
malusama's picture
malusama
Add top-of-page benchmark figure
dcdf562 verified 4 months ago
  • examples
    Add runnable ONNX example script 4 months ago
  • onnx
    Add ONNX exports and ONNXRuntime examples 4 months ago
  • vlmo
    Fix auto_map warning and remove __pycache__ 4 months ago
  • .gitattributes
    366 Bytes
    Add ONNX exports and ONNXRuntime examples 4 months ago
  • README.md
    8.72 kB
    Add top-of-page benchmark figure 4 months ago
  • config.json
    833 Bytes
    Fix auto_map warning and remove __pycache__ 4 months ago
  • configuration_m2_encoder.py
    3.2 kB
    Fix model card repo names and safetensors wording 4 months ago
  • handler.py
    4.55 kB
    Add Inference Endpoints handler 4 months ago
  • image_processing_m2_encoder.py
    1.48 kB
    Upload safetensors export 4 months ago
  • m2_encoder_1B.safetensors
    2.92 GB
    xet
    Upload safetensors export 4 months ago
  • modeling_m2_encoder.py
    5.17 kB
    Upload safetensors export 4 months ago
  • preprocessor_config.json
    237 Bytes
    Upload safetensors export 4 months ago
  • processing_m2_encoder.py
    1.89 kB
    Upload safetensors export 4 months ago
  • processor_config.json
    131 Bytes
    Upload safetensors export 4 months ago
  • requirements.txt
    159 Bytes
    Upload safetensors export 4 months ago
  • sp.model
    2.27 MB
    xet
    Upload safetensors export 4 months ago
  • tokenization_glm.py
    13.8 kB
    Upload safetensors export 4 months ago
  • tokenizer_config.json
    387 Bytes
    Upload safetensors export 4 months ago
  • upload_to_hub.py
    1.17 kB
    Fix auto_map warning and remove __pycache__ 4 months ago