Image-Text-to-Text
Transformers
Safetensors
Portuguese
English
llava_next
conversational
text-generation-inference
🇪🇺 Region: EU
Instructions to use amalia-llm/AMALIA-VL-SFT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amalia-llm/AMALIA-VL-SFT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="amalia-llm/AMALIA-VL-SFT") 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 AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("amalia-llm/AMALIA-VL-SFT") model = AutoModelForMultimodalLM.from_pretrained("amalia-llm/AMALIA-VL-SFT", 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=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use amalia-llm/AMALIA-VL-SFT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "amalia-llm/AMALIA-VL-SFT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "amalia-llm/AMALIA-VL-SFT", "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/amalia-llm/AMALIA-VL-SFT
- SGLang
How to use amalia-llm/AMALIA-VL-SFT 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 "amalia-llm/AMALIA-VL-SFT" \ --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": "amalia-llm/AMALIA-VL-SFT", "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 "amalia-llm/AMALIA-VL-SFT" \ --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": "amalia-llm/AMALIA-VL-SFT", "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 amalia-llm/AMALIA-VL-SFT with Docker Model Runner:
docker model run hf.co/amalia-llm/AMALIA-VL-SFT
Update README.md
Browse files
README.md
CHANGED
|
@@ -31,6 +31,9 @@ AMALIA-VL is an open-source vision and language model targeting European Portugu
|
|
| 31 |
AMALIA-VL is developed by a consortium of Portuguese universities and research centres, including NOVA University Lisbon, Instituto Superior Técnico, the University of Coimbra, the University of Porto, the University of Minho, and the Foundation for Science and Technology (FCT). Development also includes collaborations with the University of Beira Interior, the University of Évora, and the Lisbon School of Engineering (ISEL).
|
| 32 |
|
| 33 |
This project is funded by the Government of Portugal's Development and Innovation Programmes, with the goal of creating an effective, sovereign, and transparent LLM, tailored for European Portuguese.
|
|
|
|
|
|
|
|
|
|
| 34 |
### Model Training
|
| 35 |
|
| 36 |
The model was trained on open-source data only, following a 3-stage training approach:
|
|
@@ -40,6 +43,8 @@ The model was trained on open-source data only, following a 3-stage training app
|
|
| 40 |
|
| 41 |
All training phases were carried out on the [MareNostrum5](https://www.bsc.es/marenostrum/marenostrum-5) supercomputer hosted at the Barcelona Supercomputing Center and the [DEUCALION](https://rnca.fccn.pt/en/deucalion/) supercomputer hosted at Minho Advanced Computing Center.
|
| 42 |
|
|
|
|
|
|
|
| 43 |
### Datasets
|
| 44 |
|
| 45 |
To train the model we used a combination of open-source datasets and synthetic data generated by the team to target specific model behaviours and extend the share of European Portuguese data. Additionally, many of the public datasets collected were partially translated to European Portuguese to ensure the model is well-aligned with the target language variant.
|
|
@@ -134,13 +139,18 @@ curl http://localhost:8000/v1/chat/completions \
|
|
| 134 |
}'
|
| 135 |
```
|
| 136 |
|
| 137 |
-
###
|
|
|
|
|
|
|
|
|
|
| 138 |
|
| 139 |
-
|
|
|
|
|
|
|
|
|
|
| 140 |
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
* **A base model for downstream development**. Given its open release, AMALIA is intended to be fine-tuned, adapted, and built upon by other developers and researchers, for example, in public-sector and sovereign AI applications.
|
| 144 |
|
| 145 |
The model targets **European Portuguese** specifically. While it will handle other Portuguese variants to some degree, it is optimized and curated for pt-PT and should not be assumed equivalent across variants.
|
| 146 |
|
|
|
|
| 31 |
AMALIA-VL is developed by a consortium of Portuguese universities and research centres, including NOVA University Lisbon, Instituto Superior Técnico, the University of Coimbra, the University of Porto, the University of Minho, and the Foundation for Science and Technology (FCT). Development also includes collaborations with the University of Beira Interior, the University of Évora, and the Lisbon School of Engineering (ISEL).
|
| 32 |
|
| 33 |
This project is funded by the Government of Portugal's Development and Innovation Programmes, with the goal of creating an effective, sovereign, and transparent LLM, tailored for European Portuguese.
|
| 34 |
+
|
| 35 |
+
AMALIA was made publicly available on July 1st, 2026.
|
| 36 |
+
|
| 37 |
### Model Training
|
| 38 |
|
| 39 |
The model was trained on open-source data only, following a 3-stage training approach:
|
|
|
|
| 43 |
|
| 44 |
All training phases were carried out on the [MareNostrum5](https://www.bsc.es/marenostrum/marenostrum-5) supercomputer hosted at the Barcelona Supercomputing Center and the [DEUCALION](https://rnca.fccn.pt/en/deucalion/) supercomputer hosted at Minho Advanced Computing Center.
|
| 45 |
|
| 46 |
+
The model's knowledge cutoff is June 2024.
|
| 47 |
+
|
| 48 |
### Datasets
|
| 49 |
|
| 50 |
To train the model we used a combination of open-source datasets and synthetic data generated by the team to target specific model behaviours and extend the share of European Portuguese data. Additionally, many of the public datasets collected were partially translated to European Portuguese to ensure the model is well-aligned with the target language variant.
|
|
|
|
| 139 |
}'
|
| 140 |
```
|
| 141 |
|
| 142 |
+
### Intended Use
|
| 143 |
+
|
| 144 |
+
AMALIA processes and understands both images and natural language, and generates natural language text. It is intended as a general-purpose, open vision-language model for **European Portuguese (pt-PT)**.
|
| 145 |
+
AMALIA can be accessed, used, and fine-tuned by any person or entity, but it is important to take into account its capabilities and limitations. The model's usage should always respect responsible AI usage principles, applicable legislation, and data protection good practices.
|
| 146 |
|
| 147 |
+
Its primary intended uses include:
|
| 148 |
+
- **Short-form assistance and visual instruction following** in European Portuguese: question answering, summarization, drafting, rewriting, translation, visual text extraction, image labeling, visual question answering, and document-based question asnwering.
|
| 149 |
+
- **Research and educational applications** focused on the Portuguese language and culture, including Portuguese-language NLP and CV research and the study of European Portuguese specifically.
|
| 150 |
+
- **A base model for downstream development**. Given its open release, AMALIA is intended to be fine-tuned, adapted, and built upon by other developers and researchers, for example, in public-sector and sovereign AI applications.
|
| 151 |
|
| 152 |
+
Applications of AMALIA to any of these are expected and desirable, but these must follow the guidance and recommendations present in this model card. Furthermore, we recommend that any application using AMALIA should consider the inclusion of knowledge bases adequate to the intended use cases.
|
| 153 |
+
The responsibility for any outputs and outcomes of any applications of AMALIA lies exclusively with the applications' authors.
|
|
|
|
| 154 |
|
| 155 |
The model targets **European Portuguese** specifically. While it will handle other Portuguese variants to some degree, it is optimized and curated for pt-PT and should not be assumed equivalent across variants.
|
| 156 |
|