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
Download Apertus_1_5_EU_Code_of_Practice.pdf from Infomaniak-AI/Apertus-1.5-70B-Instruct: direct link, hf CLI and curl.
- Browser
- Download file 152 kB
-
https://huggingface.co/Infomaniak-AI/Apertus-1.5-70B-Instruct/resolve/main/Apertus_1_5_EU_Code_of_Practice.pdf
- Command line
-
hf download hf://Infomaniak-AI/Apertus-1.5-70B-Instruct/Apertus_1_5_EU_Code_of_Practice.pdf
-
curl -L -o Apertus_1_5_EU_Code_of_Practice.pdf https://huggingface.co/Infomaniak-AI/Apertus-1.5-70B-Instruct/resolve/main/Apertus_1_5_EU_Code_of_Practice.pdf
152 kB
- Xet hash:
- c3264366dd52019f0636f53e73f4ccfb7741573aa555e0a71cac59cb2cbf58f3
- Size of remote file:
- 152 kB
- SHA256:
- 2e4b304b04e445632f074ae10481386a72e97945c8a6b8ae8788a73f2b3c72e5
·
Xet efficiently stores Large Files inside Git, intelligently splitting files into unique chunks and accelerating uploads and downloads. More info.