Instructions to use PerceptronAI/Isaac-0.1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use PerceptronAI/Isaac-0.1 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="PerceptronAI/Isaac-0.1", trust_remote_code=True) 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 AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("PerceptronAI/Isaac-0.1", trust_remote_code=True, dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use PerceptronAI/Isaac-0.1 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "PerceptronAI/Isaac-0.1" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "PerceptronAI/Isaac-0.1", "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/PerceptronAI/Isaac-0.1
- SGLang
How to use PerceptronAI/Isaac-0.1 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 "PerceptronAI/Isaac-0.1" \ --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": "PerceptronAI/Isaac-0.1", "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 "PerceptronAI/Isaac-0.1" \ --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": "PerceptronAI/Isaac-0.1", "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 PerceptronAI/Isaac-0.1 with Docker Model Runner:
docker model run hf.co/PerceptronAI/Isaac-0.1
Upload modular_isaac.py
Hello and congrats for the release!
This PR makes this model load with no additional dependency, only transformers, which is very convenient for the users:
from transformers import AutoTokenizer, AutoConfig, AutoModelForCausalLM, AutoProcessor
tokenizer = AutoTokenizer.from_pretrained("Perceptron/Isaac-0.1", trust_remote_code=True, use_fast=False)
config = AutoConfig.from_pretrained("Perceptron/Isaac-0.1", trust_remote_code=True)
processor = AutoProcessor.from_pretrained("Perceptron/Isaac-0.1", tokenizer=tokenizer, config=config)
model = AutoModelForCausalLM.from_pretrained("Perceptron/Isaac-0.1", trust_remote_code=True)
you can also add a small inference notebook I made by replacing the username to Perceptron: https://colab.research.google.com/drive/1BHl2ZT8cYZ0HlP_q4HllFuCXWIBX_R_2?usp=sharing
if you add the "notebook.ipynb" repo to it's one-click open in the repository, making it easier for people to try out your model as well!
What is your recommendation around this for the core transformers repo: https://github.com/huggingface/transformers/pull/40962
TensorStream is a core abstraction for us which we will continue to optimize and improve - our intention of keeping it in the perceptron package was to make it easier to centralize improvements across open code bases.