Image-Text-to-Text
Transformers
Safetensors
isaac
text-generation
perceptron
issac-0.1
conversational
custom_code
Run this model with HF Jobs
Run PerceptronAI/Isaac-0.1 on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs and TRL to fine-tune https://huggingface.co/PerceptronAI/Isaac-0.1. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/PerceptronAI/Isaac-0.1 on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Evaluate on a benchmark
Use HF Jobs to evaluate https://huggingface.co/PerceptronAI/Isaac-0.1. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.
Quantize for lower memory use
Use HF Jobs to create a 4-bit version of https://huggingface.co/PerceptronAI/Isaac-0.1. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.
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)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("PerceptronAI/Isaac-0.1", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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
5.0 structure fixes
#7
by philippguevorguian - opened
Files changed (4)
- model-00002-of-00003.safetensorsDeleted-3
- model-00003-of-00003.safetensorsDeleted-3
- model-00001-of-00003.safetensors → model.safetensorsRenamed+2-2
- modular_isaac.py+24-16
123version https://git-lfs.github.com/spec/v1oid sha256:b73a606d306a09519e3fbe7bfd29077d39db48fee47ce19521b6b5c398cdcc32size 4054187824123version https://git-lfs.github.com/spec/v1oid sha256:6941d35ff1feae1603946f8746a71205bb86343b57968402df2e737faf9258a2size 124465984012323version https://git-lfs.github.com/spec/v1oid sha256:f60b6bc3c8ed16d95c88b5b6d33101d0aa9464f5f3f33e204342859b12e371bbsize 4969539560oid sha256:b84184ec79aa409631e68dc76c3133bc1bbae76d61842fdcd4fe553dd6a3b579size 1026838822495 unmodified lines9697989999100101870 unmodified lines9729739749759769779789799809819829839849859869879889899909919929939943 unmodified lines998999100098598610019889899909919921002100310041005573 unmodified lines1579158015811572157315821583158415851586158745 unmodified lines16331634163516251626162716281636163716385 unmodified lines16441645164616401647164816491650452 unmodified lines21032104210521062107210821092102211095 unmodified lines Siglip2Attention, Siglip2Encoder, Siglip2EncoderLayer, Siglip2VisionTransformer)
870 unmodified lines # Return the full sequence of embeddings return hidden_states
class IsaacMultiModalProjector(nn.Module): def __init__(self, config: IsaacConfig): super().__init__() self.vision_hidden_size = config.vision_config.hidden_size * ( config.vision_config.pixel_shuffle_scale_factor**2 ) self.backbone_hidden_size = config.hidden_size self.linear_1 = nn.Linear(self.vision_hidden_size, 4 * self.vision_hidden_size, bias=False) self.silu = nn.SiLU() self.linear_2 = nn.Linear(4 * self.vision_hidden_size, self.backbone_hidden_size, bias=False)
def forward(self, image_features): hidden_states = self.linear_1(image_features) hidden_states = self.silu(hidden_states) hidden_states = self.linear_2(hidden_states) return hidden_states
class IsaacVisionEmbedding(nn.Module): """Vision embedding wrapper exposing tower and projector."""3 unmodified lines def __init__(self, config: IsaacConfig): super().__init__() vision_cfg = config.vision_config hidden_dim = vision_cfg.hidden_size * (vision_cfg.pixel_shuffle_scale_factor**2)
self.vision_tower = IsaacVisionTransformer(vision_cfg) self.multimodal_projector = nn.Sequential( nn.Linear(hidden_dim, 4 * hidden_dim, bias=False), nn.SiLU(), nn.Linear(4 * hidden_dim, config.hidden_size, bias=False), ) self.multimodal_projector = IsaacMultiModalProjector(config)
def forward(self, vision_tokens: tuple[torch.Tensor, torch.Tensor]) -> torch.Tensor: hidden_states = self.vision_tower(vision_tokens)573 unmodified lines raise ValueError("IsaacConfig should always have vision_config")
self.vision_embedding = IsaacVisionEmbedding(config) self.vision_embedding._supports_sdpa = True
self.vision_tower = IsaacVisionTransformer(config.vision_config) self.multimodal_projector = IsaacMultiModalProjector(config)
# Dispatch table for TensorStream balanced embedding (text + vision) self.embed_fns = {45 unmodified lines def vision_model(self) -> nn.Module: return self.vision_embedding.vision_tower
@property def vision_tower(self) -> nn.Module: return self.vision_embedding.vision_tower
def embed_text_tokens(self, token_ids: torch.Tensor) -> torch.Tensor: """Embed text tokens, squeezing singleton dimensions.""" # Text events are shaped as (..., 1); squeeze the singleton index dim5 unmodified lines def embed_vision(self, vision_tokens: tuple[torch.Tensor, torch.Tensor]) -> torch.Tensor: """Embed vision tokens using the vision encoder.""" # vision tokens is (seq_patches, token_grids) return self.vision_embedding(vision_tokens) return self.multimodal_projector(self.vision_tower(vision_tokens))
def embed_stream(self, tensor_stream: TensorStream) -> torch.Tensor: """452 unmodified lines__all__ = [ "IsaacConfig", "IsaacModel", "IsaacPreTrainedModel", # noqa: F822 "IsaacForConditionalGeneration", "IsaacImageProcessorFast", "IsaacProcessor",]]model-00002-of-00003.safetensorsDeleted-3
model-00003-of-00003.safetensorsDeleted-3
model-00001-of-00003.safetensors → model.safetensorsRenamed+2-2
modular_isaac.py+24-16