Image-Text-to-Text
Transformers
Safetensors
internvl
vision-action
inverse-dynamics-model
embodied-ai
game-ai
conversational
Instructions to use open-world-agents/Generalist-IDM-1B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use open-world-agents/Generalist-IDM-1B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="open-world-agents/Generalist-IDM-1B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("open-world-agents/Generalist-IDM-1B") model = AutoModelForMultimodalLM.from_pretrained("open-world-agents/Generalist-IDM-1B") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use open-world-agents/Generalist-IDM-1B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "open-world-agents/Generalist-IDM-1B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "open-world-agents/Generalist-IDM-1B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/open-world-agents/Generalist-IDM-1B
- SGLang
How to use open-world-agents/Generalist-IDM-1B with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "open-world-agents/Generalist-IDM-1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "open-world-agents/Generalist-IDM-1B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "open-world-agents/Generalist-IDM-1B" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "open-world-agents/Generalist-IDM-1B", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use open-world-agents/Generalist-IDM-1B with Docker Model Runner:
docker model run hf.co/open-world-agents/Generalist-IDM-1B
Update model card for D2E: Add metadata, links, image, and sample usage
#1
by nielsr HF Staff - opened
This PR significantly improves the model card for the D2E model by:
- Adding
pipeline_tag: roboticsto categorize the model accurately, as it focuses on embodied AI and robotics tasks. - Including
library_name: transformersto enable the "how to use" widget, as evidenced by the sample code in the GitHub README. - Providing a link to the official paper: D2E: Scaling Vision-Action Pretraining on Desktop Data for Transfer to Embodied AI.
- Adding a link to the project page: https://worv-ai.github.io/d2e/.
- Including a link to the GitHub repository: https://github.com/worv-ai/D2E.
- Adding an illustrative image from the GitHub README.
- Adding a detailed sample usage code snippet directly from the GitHub README for easy replication.
Please review and merge this PR.
Hi! Thanks for the PR. This Generalist IDM operates differently from a standard Hub VLM model, so it cannot run without our custom inference code. We are planning to publish a model card, the inference code, and an HF Space demo next week. I’ll keep it in mind for your suggestion when writing the model card.
Thanks! Would be great to add the paper link and metadata tags