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")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("hardiksa/arcisvlm", dtype="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
| """Push checkpoints to GitHub via Git LFS. | |
| Called automatically at the end of training, or manually. | |
| Requires GH_TOKEN environment variable. | |
| """ | |
| import os | |
| import subprocess | |
| import sys | |
| def run(cmd, check=True): | |
| """Run a shell command and return output.""" | |
| result = subprocess.run(cmd, shell=True, capture_output=True, text=True) | |
| if check and result.returncode != 0: | |
| print(f"Command failed: {cmd}") | |
| print(f"stderr: {result.stderr}") | |
| return None | |
| return result.stdout.strip() | |
| def main(): | |
| repo_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| os.chdir(repo_dir) | |
| # Check for new checkpoints | |
| checkpoints = [] | |
| ckpt_dir = os.path.join(repo_dir, "checkpoints") | |
| if os.path.exists(ckpt_dir): | |
| for f in os.listdir(ckpt_dir): | |
| if f.endswith((".pt", ".pth", ".json", ".bin", ".safetensors")): | |
| checkpoints.append(os.path.join("checkpoints", f)) | |
| if not checkpoints: | |
| print("No checkpoints found to push.") | |
| return | |
| print(f"Found {len(checkpoints)} checkpoint files:") | |
| for cp in checkpoints: | |
| size = os.path.getsize(cp) | |
| print(f" {cp}: {size / 1e9:.2f} GB" if size > 1e6 else f" {cp}: {size / 1e3:.1f} KB") | |
| # Configure git | |
| run("git config user.name 'Hardik Sanghvi'") | |
| run("git config user.email 'hardik@adiance.com'") | |
| # Stage checkpoint files | |
| for cp in checkpoints: | |
| run(f"git add -f {cp}") | |
| # Also add any updated configs or results | |
| run("git add -f configs/ || true") | |
| run("git add -f checkpoints/benchmark_results.json || true") | |
| # Commit | |
| status = run("git status --porcelain") | |
| if not status: | |
| print("No changes to commit.") | |
| return | |
| run('git commit -m "feat: update checkpoints from training run"') | |
| # Push | |
| print("Pushing to GitHub (with LFS)...") | |
| result = run("git push origin main 2>&1", check=False) | |
| if result: | |
| print(result) | |
| print("Push successful!") | |
| else: | |
| print("Push failed. You may need to set GH_TOKEN or push manually.") | |
| if __name__ == "__main__": | |
| main() | |