Image-Text-to-Text
Transformers
mistral_large4
vLLM
SGLang
llama.cpp
conversational
Eval Results
fp8
Instructions to use mistralai/Mistral-Large-4-1T-A52B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use mistralai/Mistral-Large-4-1T-A52B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="mistralai/Mistral-Large-4-1T-A52B") 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("mistralai/Mistral-Large-4-1T-A52B") model = AutoModelForMultimodalLM.from_pretrained("mistralai/Mistral-Large-4-1T-A52B", 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 mistralai/Mistral-Large-4-1T-A52B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "mistralai/Mistral-Large-4-1T-A52B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "mistralai/Mistral-Large-4-1T-A52B", "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/mistralai/Mistral-Large-4-1T-A52B
- SGLang
How to use mistralai/Mistral-Large-4-1T-A52B 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 "mistralai/Mistral-Large-4-1T-A52B" \ --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": "mistralai/Mistral-Large-4-1T-A52B", "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 "mistralai/Mistral-Large-4-1T-A52B" \ --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": "mistralai/Mistral-Large-4-1T-A52B", "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 mistralai/Mistral-Large-4-1T-A52B with Docker Model Runner:
docker model run hf.co/mistralai/Mistral-Large-4-1T-A52B
Commit ·
eb92e22
1
Parent(s): f12dabd
technical-report (#12)
Browse files- Add technical report (f78605a327030a5cbed338077f761f5703930965)
- .gitattributes +1 -0
- README.md +1 -1
- assets/technical_report.pdf +3 -0
.gitattributes
CHANGED
|
@@ -35,3 +35,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tekken.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
| 35 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
| 36 |
tekken.json filter=lfs diff=lfs merge=lfs -text
|
| 37 |
tokenizer.json filter=lfs diff=lfs merge=lfs -text
|
| 38 |
+
*.pdf filter=lfs diff=lfs merge=lfs -text
|
README.md
CHANGED
|
@@ -53,7 +53,7 @@ Mistral Large 4 is our largest and most capable model to date: a 1 trillion-para
|
|
| 53 |
|
| 54 |
Mistral Large 4 unifies instruction following, reasoning, coding, and agentic workflows in a single set of weights. While a generalist model, it shows especially good performance on workloads such as cybersecurity, finance, and law, and it surpasses frontier closed models on visual grounding. It is natively fluent in 160+ languages, including every official language of the European Union.
|
| 55 |
|
| 56 |
-
Find more information on our [blog](https://mistral.ai/news/mistral-large-4-oss/). The model is also served on the [Mistral API](https://docs.mistral.ai/models/mistral-large-4-0) as `mistral-large-4`.
|
| 57 |
|
| 58 |
> [!Note]
|
| 59 |
> The checkpoint ships with an embedded DSpark speculative decoding draft head — see [Speculative decoding (DSpark)](#speculative-decoding-dspark).
|
|
|
|
| 53 |
|
| 54 |
Mistral Large 4 unifies instruction following, reasoning, coding, and agentic workflows in a single set of weights. While a generalist model, it shows especially good performance on workloads such as cybersecurity, finance, and law, and it surpasses frontier closed models on visual grounding. It is natively fluent in 160+ languages, including every official language of the European Union.
|
| 55 |
|
| 56 |
+
Find more information on our [blog](https://mistral.ai/news/mistral-large-4-oss/) and our [technical report](https://huggingface.co/mistralai/Mistral-Large-4-1T-A52B/blob/main/assets/technical_report.pdf). The model is also served on the [Mistral API](https://docs.mistral.ai/models/mistral-large-4-0) as `mistral-large-4`.
|
| 57 |
|
| 58 |
> [!Note]
|
| 59 |
> The checkpoint ships with an embedded DSpark speculative decoding draft head — see [Speculative decoding (DSpark)](#speculative-decoding-dspark).
|
assets/technical_report.pdf
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cda5aa4c3bbe62b8d2158c8320632722bf467519807a4d3ab49b35c6d6bc1082
|
| 3 |
+
size 5511884
|