Image-Text-to-Text
Transformers
Safetensors
apertus1p5
text-generation
multilingual
multimodal
switzerland
swiss-ai
apertus
conversational
Instructions to use Infomaniak-AI/Apertus-1.5-70B-Instruct with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Infomaniak-AI/Apertus-1.5-70B-Instruct with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="Infomaniak-AI/Apertus-1.5-70B-Instruct") 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 AutoModelForSeq2SeqLM model = AutoModelForSeq2SeqLM.from_pretrained("Infomaniak-AI/Apertus-1.5-70B-Instruct", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Infomaniak-AI/Apertus-1.5-70B-Instruct with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Infomaniak-AI/Apertus-1.5-70B-Instruct" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Infomaniak-AI/Apertus-1.5-70B-Instruct", "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/Infomaniak-AI/Apertus-1.5-70B-Instruct
- SGLang
How to use Infomaniak-AI/Apertus-1.5-70B-Instruct 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 "Infomaniak-AI/Apertus-1.5-70B-Instruct" \ --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": "Infomaniak-AI/Apertus-1.5-70B-Instruct", "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 "Infomaniak-AI/Apertus-1.5-70B-Instruct" \ --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": "Infomaniak-AI/Apertus-1.5-70B-Instruct", "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 Infomaniak-AI/Apertus-1.5-70B-Instruct with Docker Model Runner:
docker model run hf.co/Infomaniak-AI/Apertus-1.5-70B-Instruct
Commit ·
aeba489
1
Parent(s): dd0b87b
[gh-mirror] Sync `apertus_1.5` from GitHub PR #10 (#3)
Browse files- [gh-mirror] Sync `apertus_1.5` from GitHub PR #10 (7d792912b311e7bd025a945653ef2aad995b55e4)
Co-authored-by: Aryan Ahadinia <aryan-ahadinia@users.noreply.huggingface.co>
- README.md +1 -1
- assets/visual_performance_plot.png +2 -2
README.md
CHANGED
|
@@ -300,7 +300,7 @@ Text benchmarks cover various domains like knowledge (MMLU, MMLU-Pro, AGIEval, A
|
|
| 300 |
|
| 301 |

|
| 302 |
|
| 303 |
-
Image benchmarks cover general VQA and perception (GQA, MMStar, RealWorldQA, VQAv2), robustness and bias (MMVP, VLMs-Are-Biased, VLMsAreBlind), documents and OCR (ChartQA, DocVQA, SEED-Bench-2-Plus), visual math and logic (BabyVision, MathVision), STEM knowledge (AI2D, MMMU), remote sensing (FRIEDA, GeoBench, VRSBench
|
| 304 |
|
| 305 |
## Training
|
| 306 |
|
|
|
|
| 300 |
|
| 301 |

|
| 302 |
|
| 303 |
+
Image benchmarks cover general VQA and perception (GQA, MMStar, RealWorldQA, VQAv2, V\*Bench, CountBench), robustness and bias (MMVP, VLMs-Are-Biased, VLMsAreBlind), documents and OCR (ChartQA, DocVQA, SEED-Bench-2-Plus, InfoVQA, OmniDocBench), visual math and logic (BabyVision, MathVision, MathVista), STEM knowledge (AI2D, MMMU, MMMU-Pro, ScienceQA), spatial intelligence (MMSI, ViewSpatial, MindCube, EmbSpatial), remote sensing (FRIEDA, GeoBench, VRSBench-VQA), hallucination alignment (POPE), and medical imaging (PathVQA, PMC-VQA, SLAKE, VQA-RAD).
|
| 304 |
|
| 305 |
## Training
|
| 306 |
|
assets/visual_performance_plot.png
CHANGED
|
Git LFS Details
|
|
Git LFS Details
|