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

AnandSingh
/
hunyuanocr-mlx

Image-Text-to-Text
MLX
Safetensors
multilingual
hunyuan_vl
ocr
hunyuan
vision-language
image-to-text
1B
apple-silicon
metal
conversational
Model card Files Files and versions
xet
Community

Instructions to use AnandSingh/hunyuanocr-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • MLX

    How to use AnandSingh/hunyuanocr-mlx 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("AnandSingh/hunyuanocr-mlx")
    config = load_config("AnandSingh/hunyuanocr-mlx")
    
    # 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
hunyuanocr-mlx
2.25 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 12 commits
AnandSingh's picture
AnandSingh
Upload lm-studio-preset.json with huggingface_hub
5a2f342 verified about 1 month ago
  • .gitattributes
    1.52 kB
    initial commit about 1 month ago
  • LICENSE
    16.3 kB
    Upload LICENSE with huggingface_hub about 1 month ago
  • NOTICE
    713 Bytes
    Upload NOTICE with huggingface_hub about 1 month ago
  • README.md
    3.33 kB
    Upload README.md with huggingface_hub about 1 month ago
  • config.json
    1.89 kB
    Upload config.json with huggingface_hub about 1 month ago
  • hunyuan_ocr_mlx.py
    22.8 kB
    Upload hunyuan_ocr_mlx.py with huggingface_hub about 1 month ago
  • lm-studio-preset.json
    3.3 kB
    Upload lm-studio-preset.json with huggingface_hub about 1 month ago
  • model.safetensors
    2.24 GB
    xet
    Upload model.safetensors with huggingface_hub about 1 month ago
  • preprocessor_config.json
    370 Bytes
    Upload preprocessor_config.json with huggingface_hub about 1 month ago
  • special_tokens_map.json
    146 Bytes
    Upload special_tokens_map.json with huggingface_hub about 1 month ago
  • tokenizer.json
    6.05 MB
    Upload tokenizer.json with huggingface_hub about 1 month ago
  • tokenizer_config.json
    167 kB
    Upload tokenizer_config.json with huggingface_hub about 1 month ago