Image-Text-to-Text
Transformers
English
vision-language-model
vlm
surveillance
iot
gemma
vl-jepa
multimodal
object-detection
video-analytics
Instructions to use hardiksa/arcisvlm with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use hardiksa/arcisvlm with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="hardiksa/arcisvlm")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("hardiksa/arcisvlm", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use hardiksa/arcisvlm with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "hardiksa/arcisvlm" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hardiksa/arcisvlm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/hardiksa/arcisvlm
- SGLang
How to use hardiksa/arcisvlm 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 "hardiksa/arcisvlm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hardiksa/arcisvlm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "hardiksa/arcisvlm" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "hardiksa/arcisvlm", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use hardiksa/arcisvlm with Docker Model Runner:
docker model run hf.co/hardiksa/arcisvlm
Hardik Sanghvi
Claude Opus 4.6 (1M context)
feat: integrate Gemma 4 E2B backbone for production-quality VLM inference
7a564e3 Download tests/test_dreamer.py from hardiksa/arcisvlm: direct link, hf CLI and curl.
- Browser
- Download file 3.54 kB
-
https://huggingface.co/hardiksa/arcisvlm/resolve/main/tests/test_dreamer.py
- Command line
-
hf download hf://hardiksa/arcisvlm/tests/test_dreamer.py
-
curl -L -o test_dreamer.py https://huggingface.co/hardiksa/arcisvlm/resolve/main/tests/test_dreamer.py
3.54 kB
| """Tests for LatentDreamer — future frame prediction in JEPA space.""" | |
| import pytest | |
| import torch | |
| from model.latent_dreamer import LatentDreamer | |
| class TestLatentDreamer: | |
| """Test the latent visual dreaming module.""" | |
| def dreamer(self): | |
| return LatentDreamer( | |
| embed_dim=256, # Smaller for testing | |
| n_heads=4, | |
| n_layers=2, | |
| max_future_steps=8, | |
| max_context_frames=16, | |
| ) | |
| def test_dream_single_frame(self, dreamer): | |
| """Dream from a single context frame.""" | |
| ctx = torch.randn(2, 256) # [B, D] — single frame | |
| results = dreamer.dream(ctx, n_steps=3) | |
| assert len(results) == 3 | |
| for emb, conf in results: | |
| assert emb.shape == (2, 256) | |
| assert conf.shape == (2, 1) | |
| def test_dream_multi_frame(self, dreamer): | |
| """Dream from multiple context frames.""" | |
| ctx = torch.randn(2, 8, 256) # [B, 8, D] | |
| results = dreamer.dream(ctx, n_steps=4) | |
| assert len(results) == 4 | |
| for emb, conf in results: | |
| assert emb.shape == (2, 256) | |
| assert conf.shape == (2, 1) | |
| def test_dream_sequence(self, dreamer): | |
| """Test stacked tensor output.""" | |
| ctx = torch.randn(2, 4, 256) | |
| embs, confs = dreamer.dream_sequence(ctx, n_steps=3) | |
| assert embs.shape == (2, 3, 256) | |
| assert confs.shape == (2, 3, 1) | |
| def test_confidence_range(self, dreamer): | |
| """Confidence should be in [0, 1].""" | |
| ctx = torch.randn(2, 4, 256) | |
| results = dreamer.dream(ctx, n_steps=4) | |
| for _, conf in results: | |
| assert (conf >= 0).all() and (conf <= 1).all() | |
| def test_max_steps_clamped(self, dreamer): | |
| """Should not generate more than max_future_steps.""" | |
| ctx = torch.randn(1, 4, 256) | |
| results = dreamer.dream(ctx, n_steps=100) # Way over max | |
| assert len(results) == dreamer.max_future_steps | |
| def test_dream_loss(self, dreamer): | |
| """Test training loss computation.""" | |
| pred = torch.randn(2, 4, 256, requires_grad=True) | |
| actual = torch.randn(2, 4, 256) | |
| conf = torch.sigmoid(torch.randn(2, 4, 1, requires_grad=True)) | |
| loss_dict = dreamer.compute_dream_loss(pred, actual, conf) | |
| assert "total_loss" in loss_dict | |
| assert "mse_loss" in loss_dict | |
| assert "cosine_loss" in loss_dict | |
| assert "calibration_loss" in loss_dict | |
| assert "mean_cosine_sim" in loss_dict | |
| assert loss_dict["total_loss"].requires_grad | |
| def test_dream_loss_perfect_prediction(self, dreamer): | |
| """Loss should be near zero for identical predictions.""" | |
| x = torch.randn(2, 3, 256) | |
| conf = torch.ones(2, 3, 1) | |
| loss_dict = dreamer.compute_dream_loss(x, x.clone(), conf) | |
| assert loss_dict["mse_loss"].item() < 1e-5 | |
| assert loss_dict["cosine_loss"].item() < 1e-5 | |
| def test_gradient_flow(self, dreamer): | |
| """Ensure gradients flow through the dreamer.""" | |
| dreamer.train() | |
| ctx = torch.randn(1, 4, 256, requires_grad=True) | |
| results = dreamer.dream(ctx, n_steps=2) | |
| loss = sum(emb.sum() for emb, _ in results) | |
| loss.backward() | |
| # At least some dreamer parameters should have gradients | |
| has_grads = any( | |
| p.grad is not None and p.grad.abs().sum() > 0 | |
| for p in dreamer.parameters() | |
| if p.requires_grad | |
| ) | |
| assert has_grads, "No gradients flowed through the dreamer" | |