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
      • Hardware
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

mlx-community
/
GOT-OCR2_0-bf16

Image-Text-to-Text
MLX
Safetensors
multilingual
GOT
ocr
ocr2.0
vision-language
got
custom_code
Model card Files Files and versions
xet
Community

Instructions to use mlx-community/GOT-OCR2_0-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use mlx-community/GOT-OCR2_0-bf16 with MLX:

    # Make sure mlx-vlm is installed
    # pip install --upgrade mlx-vlm
    
    from mlx_vlm import load, generate
    from mlx_vlm.prompt_utils import apply_chat_template
    from mlx_vlm.utils import load_config
    
    # Load the model
    model, processor = load("mlx-community/GOT-OCR2_0-bf16")
    config = load_config("mlx-community/GOT-OCR2_0-bf16")
    
    # Prepare input
    image = ["http://images.cocodataset.org/val2017/000000039769.jpg"]
    prompt = "Describe this image."
    
    # Apply chat template
    formatted_prompt = apply_chat_template(
        processor, config, prompt, num_images=1
    )
    
    # Generate output
    output = generate(model, processor, formatted_prompt, image)
    print(output)
  • Notebooks
  • Google Colab
  • Kaggle
  • Local Apps Settings
  • LM Studio
  • Atomic Chat
GOT-OCR2_0-bf16
1.12 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
axiom-of-choice's picture
axiom-of-choice
Add MLX conversion from GOT-OCR2_0-bf16
27f43fa verified about 13 hours ago
  • .gitattributes
    1.52 kB
    initial commit about 13 hours ago
  • README.md
    5.03 kB
    Add MLX conversion from GOT-OCR2_0-bf16 about 13 hours ago
  • config.json
    1.16 kB
    Add MLX conversion from GOT-OCR2_0-bf16 about 13 hours ago
  • generation_config.json
    117 Bytes
    Add MLX conversion from GOT-OCR2_0-bf16 about 13 hours ago
  • got_vision_b.py
    16.1 kB
    Add MLX conversion from GOT-OCR2_0-bf16 about 13 hours ago
  • model.safetensors
    1.12 GB
    xet
    Add MLX conversion from GOT-OCR2_0-bf16 about 13 hours ago
  • model.safetensors.index.json
    37.2 kB
    Add MLX conversion from GOT-OCR2_0-bf16 about 13 hours ago
  • modeling_GOT.py
    33.8 kB
    Add MLX conversion from GOT-OCR2_0-bf16 about 13 hours ago
  • qwen.tiktoken
    2.56 MB
    Add MLX conversion from GOT-OCR2_0-bf16 about 13 hours ago
  • render_tools.py
    1.99 kB
    Add MLX conversion from GOT-OCR2_0-bf16 about 13 hours ago
  • special_tokens_map.json
    149 Bytes
    Add MLX conversion from GOT-OCR2_0-bf16 about 13 hours ago
  • tokenization_qwen.py
    9.47 kB
    Add MLX conversion from GOT-OCR2_0-bf16 about 13 hours ago
  • tokenizer_config.json
    372 Bytes
    Add MLX conversion from GOT-OCR2_0-bf16 about 13 hours ago