moondream-1.8b

PyTorch

1 versions

moondream2 is a small vision language model designed to run efficiently on edge devices.

Run this model

  1. Install our magic package manager:

    curl -ssL https://magic.modular.com/ | bash

    Then run the source command that's printed in your terminal.

  2. Install Max Pipelines in order to run this model.

    magic global install max-pipelines
  3. Start a local endpoint for moondream/1.8b:

    max-serve serve --huggingface-repo-id vikhyatk/moondream2

    The endpoint is ready when you see the URI printed in your terminal:

    Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
  4. Now open another terminal to send a request using curl:

    curl -N http://0.0.0.0:8000/v1/chat/completions -H "Content-Type: application/json" -d '{
        "model": "moondream/1.8b",
        "stream": true,
        "messages": [
            {
              "role": "user",
              "content": [
                {
                  "type": "text",
                  "text": "What is in this image?"
                },
                {
                  "type": "image_url",
                  "image_url": {
                    "url": "https://upload.wikimedia.org/wikipedia/commons/1/13/Tunnel_View%2C_Yosemite_Valley%2C_Yosemite_NP_-_Diliff.jpg"
                  }
                }
              ]
            }
        ]
    
    }' | grep -o '"content":"[^"]*"' | sed 's/"content":"//g' | sed 's/"//g' | tr -d '
    ' | sed 's/\n/
    /g'
  5. 🎉 Hooray! You’re running Generative AI. Our goal is to make this as easy as possible.

About

🌔 Moondream 2

"a tiny vision language model that kicks ass and runs anywhere"

Limitations

  • The model may generate inaccurate statements and struggle to understand intricate or nuanced instructions.

  • The model may not be free from societal biases. Users should be aware of this and exercise caution and critical thinking when using the model.

  • The model may generate offensive, inappropriate, or hurtful content if it is prompted to do so.

References

GitHub

Hugging Face

DETAILS

MODEL CLASS
PyTorch

MODULAR GITHUB

Modular

CREATED BY

vikhyatk

MODEL

vikhyatk/moondream2

TAGS

autotrain_compatible
custom_code
doi:10.57967/hf/3219
endpoints_compatible
gguf
image-text-to-text
license:apache-2.0
moondream1
region:us
safetensors
text-generation
transformers

@ Copyright - Modular Inc - 2024