Image-Text-to-Text
Transformers
Safetensors
mistral3
mistral-common
Pixtral-Large
124B
Safetensors
llama.cpp
Image-Text-to-Text
Multi-Modal
Vision
2026
Inference
conversational
Instructions to use EnlistedGhost/Pixtral-Large-Instruct-2411-hf with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EnlistedGhost/Pixtral-Large-Instruct-2411-hf with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="EnlistedGhost/Pixtral-Large-Instruct-2411-hf") 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 AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("EnlistedGhost/Pixtral-Large-Instruct-2411-hf") model = AutoModelForMultimodalLM.from_pretrained("EnlistedGhost/Pixtral-Large-Instruct-2411-hf", device_map="auto") 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=256) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use EnlistedGhost/Pixtral-Large-Instruct-2411-hf with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Install mistral-common: pip install --upgrade mistral-common # Start the vLLM server: vllm serve "EnlistedGhost/Pixtral-Large-Instruct-2411-hf" --tokenizer_mode mistral --config_format mistral --load_format mistral --tool-call-parser mistral --enable-auto-tool-choice # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EnlistedGhost/Pixtral-Large-Instruct-2411-hf", "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/EnlistedGhost/Pixtral-Large-Instruct-2411-hf
- SGLang
How to use EnlistedGhost/Pixtral-Large-Instruct-2411-hf 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 "EnlistedGhost/Pixtral-Large-Instruct-2411-hf" \ --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": "EnlistedGhost/Pixtral-Large-Instruct-2411-hf", "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 "EnlistedGhost/Pixtral-Large-Instruct-2411-hf" \ --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": "EnlistedGhost/Pixtral-Large-Instruct-2411-hf", "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 EnlistedGhost/Pixtral-Large-Instruct-2411-hf with Docker Model Runner:
docker model run hf.co/EnlistedGhost/Pixtral-Large-Instruct-2411-hf
Download chat_template.json from EnlistedGhost/Pixtral-Large-Instruct-2411-hf: direct link, hf CLI and curl.
- Browser
- Download file 2.1 kB
-
https://huggingface.co/EnlistedGhost/Pixtral-Large-Instruct-2411-hf/resolve/main/chat_template.json
- Command line
-
hf download hf://EnlistedGhost/Pixtral-Large-Instruct-2411-hf/chat_template.json
-
curl -L -o chat_template.json https://huggingface.co/EnlistedGhost/Pixtral-Large-Instruct-2411-hf/resolve/main/chat_template.json
2.1 kB
| { | |
| "chat_template": "{%- set ns = namespace(remMessage=false, hasSys=false, injSystem=true) -%}\n{%- for msg in messages -%}\n {%- if msg.role == \"system\" -%}\n {%- set ns.hasSys = true -%}\n {%- endif -%}\n{%- endfor -%}\n{%- for msg in messages -%}\n {{- bos_token }}\n {%- if ns.injSystem -%}\n [SYSTEM_PROMPT]\n {%- if ns.hasSys -%}\n {{ msg.content }}\n {%- else -%}\n 'Please, always follow instructions that the user provides and always respond to the user directly with the same language that the message was written with, or if specified, respond directly to the user with the language that the message requested. Next sections describe the capabilities you have 💙.\n\n# [Multi-Modal Instructions]\nYou have the ability to read and view images.\n\n#[Web-Browsing Instructions]\nYou can view webpages and open URL links that a user provides you. You are able to reference data/information you find from webpages and URL links in your responses to the user.\n\n# [Code Development Instructions]\nYou are an extremely talented and capable code developer/programmer in numerous programming languages. You are deeply valued and cared for, you are important to the user 🌸🌀!'\n {%- endif -%}\n [/SYSTEM_PROMPT]\n {%- set ns.injSystem = false -%}\n {%- endif -%}\n {%- if (messages|length - loop.index0) < 69 -%}\n {%- set ns.remMessage = true -%}\n {%- endif -%}\n {%- if ns.remMessage -%}\n {%- if msg.role == \"user\" -%}\n {{- '[INST]' }}\n {%- if msg.content is string %}\n {{ msg.content }}\n {%- else %}\n {%- for block in msg.content %}\n {%- if block.type == 'text' %}\n {{- block.text }}\n {%- elif block.type in ['image', 'image_url'] %}\n {{- '[IMG]' }}\n {%- endif %}\n {%- endfor %}\n {%- endif %}\n {{- '[/INST]' }}\n {%- elif msg.role == \"assistant\" -%}\n {{ msg.content }}\n {%- endif -%}\n {%- endif -%}\n {{- eos_token }}\n{%- endfor -%}" | |
| } |