初始化项目,由ModelHub XC社区提供模型

Model: duarteocarmo/AMALIA-9B-0626-DPO-GGUF
Source: Original Platform
This commit is contained in:
ModelHub XC
2026-08-09 04:49:16 +08:00
commit 21f624f85a
14 changed files with 258 additions and 0 deletions

47
.gitattributes vendored Normal file
View File

@@ -0,0 +1,47 @@
*.7z filter=lfs diff=lfs merge=lfs -text
*.arrow filter=lfs diff=lfs merge=lfs -text
*.bin filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.ckpt filter=lfs diff=lfs merge=lfs -text
*.ftz filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.h5 filter=lfs diff=lfs merge=lfs -text
*.joblib filter=lfs diff=lfs merge=lfs -text
*.lfs.* filter=lfs diff=lfs merge=lfs -text
*.mlmodel filter=lfs diff=lfs merge=lfs -text
*.model filter=lfs diff=lfs merge=lfs -text
*.msgpack filter=lfs diff=lfs merge=lfs -text
*.npy filter=lfs diff=lfs merge=lfs -text
*.npz filter=lfs diff=lfs merge=lfs -text
*.onnx filter=lfs diff=lfs merge=lfs -text
*.ot filter=lfs diff=lfs merge=lfs -text
*.parquet filter=lfs diff=lfs merge=lfs -text
*.pb filter=lfs diff=lfs merge=lfs -text
*.pickle filter=lfs diff=lfs merge=lfs -text
*.pkl filter=lfs diff=lfs merge=lfs -text
*.pt filter=lfs diff=lfs merge=lfs -text
*.pth filter=lfs diff=lfs merge=lfs -text
*.rar filter=lfs diff=lfs merge=lfs -text
*.safetensors filter=lfs diff=lfs merge=lfs -text
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
*.tar.* filter=lfs diff=lfs merge=lfs -text
*.tar filter=lfs diff=lfs merge=lfs -text
*.tflite filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.wasm filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text
*tfevents* filter=lfs diff=lfs merge=lfs -text
AMALIA-9B-0626-DPO-BF16.gguf filter=lfs diff=lfs merge=lfs -text
AMALIA-9B-0626-DPO-Q8_0.gguf filter=lfs diff=lfs merge=lfs -text
AMALIA-9B-0626-DPO-Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text
AMALIA-9B-0626-DPO-Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text
AMALIA-9B-0626-DPO-Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text
AMALIA-9B-0626-DPO-Q6_K.gguf filter=lfs diff=lfs merge=lfs -text
AMALIA-9B-0626-DPO-Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text
AMALIA-9B-0626-DPO-Q2_K.gguf filter=lfs diff=lfs merge=lfs -text
AMALIA-9B-0626-DPO-Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text
AMALIA-9B-0626-DPO-Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text
AMALIA-9B-0626-DPO-Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text
AMALIA-9B-0626-DPO-IQ4_XS.gguf filter=lfs diff=lfs merge=lfs -text

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1f7082bf9f5a3a3027783dc3774abf88f55c5d00ecb2ba5861c8a9d94131fa5d
size 18308422400

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3edff830d55d5d2a9e13e6d7962d726ce7898162acc4dc9949fed003a0666de7
size 5084863232

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:304afdd8f87d9a456c1d46960ec87ff0a22547890d82d35cc92b66e8b6d54dfb
size 3593067264

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ccc9672ad1eb804833ae2b98f4a4a17f15e17df591341412eb6eba774e915769
size 4913847040

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:3e5ab5bc2bf2466d320b1e9875c86091a776eddf0170035f4723e57d2f65a508
size 4553136896

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1cf4c6021bd774e9d954eca446d078158131888e64e4e479985f766f7d84cbce
size 4141767424

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:86b8e576153638b3bb638dd1e774f64750226deab6f86ddc4307e95c0236bcad
size 5582838528

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:e46095afe6ea53ff1dce9d6e0105dc54c86056559b4f47853d907e147a53db5e
size 5321186048

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6a31fb0b1f631da4df693405d07f9f3c3244485d8c7961fe006f5c7acc5db308
size 6518168320

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:881fbdaca21b8faf05019a63965812bff0de0deec9035f8f59b87fb54eac1396
size 6366092032

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ffc57a8d8af0ad244631f65688abccea5249a72612c68ee9cd7029f2bd6bfe37
size 7511956224

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:52240d0f717fe098673b9ab3cd923f118e9b1778ffb4e49685b637720a04f3dd
size 9728449280

175
README.md Normal file
View File

@@ -0,0 +1,175 @@
---
library_name: gguf
license: apache-2.0
datasets:
- amalia-llm/DPO-Dataset
language:
- pt
pipeline_tag: text-generation
base_model: amalia-llm/AMALIA-9B-0626-DPO
base_model_relation: quantized
quantized_by: duarteocarmo
tags:
- gguf
- llama.cpp
- llama
- conversational
- portuguese
- european-portuguese
- portuguese-european
- portuguese-portugal
- pt-pt
- eu-pt
- amalia
- dpo
---
# AMALIA-9B-0626-DPO GGUF
> [!NOTE]
> This repository contains GGUF conversions of [`amalia-llm/AMALIA-9B-0626-DPO`](https://huggingface.co/amalia-llm/AMALIA-9B-0626-DPO) for use with [`llama.cpp`](https://github.com/ggml-org/llama.cpp).
>
> The BF16 GGUF was generated from the original Hugging Face safetensors with `convert_hf_to_gguf.py --outtype bf16`. The quantized files were generated from that BF16 GGUF with `llama-quantize`. No additional training or fine-tuning was performed.
## Files
| File | Quantization | Size |
| --- | --- | --- |
| `AMALIA-9B-0626-DPO-BF16.gguf` | `BF16` | 17.05 GB |
| `AMALIA-9B-0626-DPO-IQ4_XS.gguf` | `IQ4_XS` | 4.74 GB |
| `AMALIA-9B-0626-DPO-Q2_K.gguf` | `Q2_K` | 3.35 GB |
| `AMALIA-9B-0626-DPO-Q3_K_L.gguf` | `Q3_K_L` | 4.58 GB |
| `AMALIA-9B-0626-DPO-Q3_K_M.gguf` | `Q3_K_M` | 4.24 GB |
| `AMALIA-9B-0626-DPO-Q3_K_S.gguf` | `Q3_K_S` | 3.86 GB |
| `AMALIA-9B-0626-DPO-Q4_K_M.gguf` | `Q4_K_M` | 5.20 GB |
| `AMALIA-9B-0626-DPO-Q4_K_S.gguf` | `Q4_K_S` | 4.96 GB |
| `AMALIA-9B-0626-DPO-Q5_K_M.gguf` | `Q5_K_M` | 6.07 GB |
| `AMALIA-9B-0626-DPO-Q5_K_S.gguf` | `Q5_K_S` | 5.93 GB |
| `AMALIA-9B-0626-DPO-Q6_K.gguf` | `Q6_K` | 7.00 GB |
| `AMALIA-9B-0626-DPO-Q8_0.gguf` | `Q8_0` | 9.06 GB |
## Running with llama.cpp
From a local file:
```bash
llama-cli -m AMALIA-9B-0626-DPO-Q5_K_M.gguf -ngl all -c 8192 -cnv
```
Or directly from Hugging Face with a recent `llama.cpp` build:
```bash
llama-cli -hf duarteocarmo/AMALIA-9B-0626-DPO-GGUF:Q5_K_M -ngl all -c 8192 -cnv
```
## Original model card
<div align="center">
<img width="400px" src="https://github.com/AMALIA-LLM/amalia-llm.github.io/blob/main/source/_static/logo/logo-color-black.png?raw=true">
[![AMALIA](https://img.shields.io/badge/AMALIA-Website-1A1A1A?labelColor=FDE000&style=for-the-badge)](https://amaliallm.pt/)
[![Paper](https://img.shields.io/badge/%20-Paper-1A1A1A?labelColor=FDE000&logo=googlescholar&logoColor=black&style=for-the-badge)](https://aclanthology.org/2026.propor-1.38/)
[![Data](https://img.shields.io/badge/%20-Data-1A1A1A?labelColor=FDE000&logo=huggingface&logoColor=black&style=for-the-badge)](https://huggingface.co/datasets/amalia-llm/DPO-Dataset)
[![Main Repo](https://img.shields.io/badge/%20-Main%20Repo-1A1A1A?labelColor=FDE000&logo=github&logoColor=black&style=for-the-badge)](https://github.com/AMALIA-LLM/AMALIA)
[![Eval Repo](https://img.shields.io/badge/%20-Eval%20Repo-1A1A1A?labelColor=FDE000&logo=github&logoColor=black&style=for-the-badge)](https://github.com/AMALIA-LLM/amalia-lm-eval)
</div>
### Model Card
AMALIA is an open-source language model targeting European Portuguese.
### Model Description
AMALIA 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).
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.
AMALIA uses open-source data in its training, such as data from [Arquivo.pt](https://arquivo.pt/), along with curated data specifically in European Portuguese. Training was carried out in two phases: pre-training and post-training. Post-training applied *Supervised Fine-Tuning (SFT)* and *Preference Tuning* techniques (using *Direct Preference Optimization*, DPO).
### Training Details
#### Training Data
The following data were included in AMALIA's pre-training phase:
- Data from [Arquivo.pt](https://arquivo.pt/), obtained after processing collections of public web pages and free books;
- Pre-training data from the [EuroLLM](https://arxiv.org/abs/2506.04079) model;
- Long-context data samples from [Stack-v2](https://arxiv.org/abs/2402.19173);
- Synthetic data to improve long-context retention, filtered from public datasets ([needle-llama3-16x8k](https://huggingface.co/datasets/lvwerra/needle-llama3-16x8k), [needle_32k_finetuning_dataset](https://huggingface.co/datasets/nanotron/needle_32k_finetuning_dataset)).
The post-training SFT component used a mixture of manually created, synthetically generated, and publicly available data. For the DPO component, a preference dataset was created, including on-policy pairs, created by leveraging responses generated in part by AMALIA-SFT itself. We release the [SFT](https://huggingface.co/datasets/amalia-llm/AMALIA-LLM-0626-SFT-Dataset) and [DPO](https://huggingface.co/datasets/amalia-llm/DPO-Dataset) datasets. For full details on both training datasets, please refer to the technical report.
#### Training Process
We extend EuroLLM pretraining to better cover European Portuguese knowledge and extend the maximum sequence length to 32k tokens.
The SFT phase aims to improve AMALIA's conversational and instruction-following capabilities, with a special focus on European Portuguese, using the datasets described in Training Data. Training ran for 76 hours, using 64 NVIDIA H100 GPUs, for a total of 14k steps.
The DPO phase aims to align AMALIA's behaviour with human preferences, refining the model's responses through learning based on pairwise comparisons. In this phase, the model learns to distinguish between higher- and lower-quality responses to the same instruction, optimizing itself to generate more useful, safe, and value-aligned outputs, while simultaneously minimizing undesired behaviours such as hallucinations, toxicity, or deviations from the given instructions. Training ran for 12 hours, using 64 NVIDIA H100 GPUs. All benchmark results can be accessed in the [technical report](https://arxiv.org/abs/2603.26511).
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.
### Intended Use
AMALIA is intended as a general-purpose, open language model for **European Portuguese (pt-PT)**. Its primary intended uses include:
- **Conversational assistance and instruction following** in European Portuguese: question answering, summarization, drafting, rewriting, translation, and general text generation.
- **Research and educational applications** focused on the Portuguese language and culture, including Portuguese-language NLP research and the study of European Portuguese specifically.
- **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.
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.
### Out-of-Scope Use
The following uses fall outside what AMALIA is designed or validated for:
- **High-stakes, unsupervised decision-making without qualified human oversight**. AMALIA should not be used as a decision-making authority in domains where errors carry serious consequences, without a qualified human in the loop.
- **Use as a sole source of factual truth**. The model can hallucinate. Outputs should be verified before use in any context that demands factuality. AMALIA was trained to support retrieval-augmented generation (RAG), so grounding responses in retrieved source documents is the recommended approach for factual or knowledge-intensive tasks. Even so, outputs should be checked in any factual-critical context.
- **Languages and cultural contexts other than Portuguese and English.**
- **Reliance on safety guarantees**. Safety tuning reduces but does not eliminate harmful, toxic, or biased outputs; the model should not be deployed in settings that assume it is fully safe by default. Instead, **developers should employ appropriate guardrails and safety mechanisms tailored to their application, and ensure logging and traceability**.
- **Generation of harmful, toxic or violated content**. AMALIA must not be used to intentionally produce content that is harmful, abusive, discriminatory, or otherwise violating, including hate speech, harassment, or material that exploits or endangers individuals.
- **Production deployment without further evaluation**. As an open model, AMALIA should undergo task-specific and domain-specific testing before being deployed in any production system.
- **Uses that violate applicable law**. AMALIA must not be deployed in ways that conflict with the EU AI Act, the General Data Protection Regulation (GDPR), or other applicable legal frameworks. This includes prohibited AI practices under the AI Act, namely all [high-risk applications](https://artificialintelligenceact.eu/annex/3/) that have not undergone the required conformity assessment, and any processing of personal data without a valid legal basis.
## Ethical Considerations and Risk
Developing large language models raises a number of ethical concerns. By releasing AMALIA as an open model for European Portuguese, the consortium considered the following:
- **Bias and fairness**. Language models trained on large-scale, real-world text reflect the socio-cultural biases present in their training material. The model is also explicitly targeted at European Portuguese, and its handling of the pt-PT/pt-BR distinction is itself a fairness consideration that the consortium treats as a first-class evaluation dimension.
- **Misinformation and misuse**. Like any LLM, AMALIA can produce text that is false, misleading, or harmful. Developers building on AMALIA are encouraged to communicate these limitations to end users and to provide mechanisms for reporting misuse.
- **Transparency and accountability**. This card documents the model's training data, training process, and intended and out-of-scope uses so that developers and researchers can make informed decisions. Releasing AMALIA openly is intended to make European Portuguese language technology accessible to the wider research and developer community.
**Risks identified and mitigations:**
- **Generation of harmful content**. AMALIA's post-training included safety data in both the SFT and DPO phases, and the DPO phase explicitly targets reductions in toxicity and harmful output. These measures reduce but do not eliminate the risk; downstream developers should add their own content-safety safeguards appropriate to their product and use case.
- **Misuse for malicious purposes**. The consortium provides documentation of the model's intended use and limitations, and encourages developers who build on AMALIA to establish their own mechanisms for users to report misuse within their applications.
- **Perpetuation of biases**. Continuous monitoring, through evaluation metrics and human review, and the use of de-biasing techniques during training, fine-tuning, and downstream adaptation were encouraged to limit the reinforcement of existing biases.
- **Adversarial inputs and prompt injection**. Applications built on AMALIA may be vulnerable to prompt injection and other adversarial inputs. Developers should apply input validation and output filtering appropriate to their deployment context.
## Citation
If you use AMALIA in your work, please cite:
```
@inproceedings{simplicio-etal-2026-amalia,
title = "{AMALIA}: A Fully Open Large Language Model for {E}uropean {P}ortuguese",
author = "Simpl{{\'i}}cio, Afonso and Vinagre, Gon{{\c{{c}}}}alo and Ramos, Miguel Moura and Tavares, Diogo and Ferreira, Rafael and Attanasio, Giuseppe and Alves, Duarte M. and Calvo, In{{\^e}}s and Vieira, In{{\^e}}s and Guerra, Rui and Furtado, James and Canaverde, Beatriz and Paulo, Iago and Ramos, Vasco and Gl{{\'o}}ria-Silva, Diogo and Faria, Miguel and Treviso, Marcos and Gomes, Daniel and Gomes, Pedro and Semedo, David and Martins, Andr{{\'e}} and Magalh{{\~a}}es, Jo{{\~a}}o",
booktitle = "Proceedings of the 17th International Conference on Computational Processing of {{P}}ortuguese ({{PROPOR}} 2026) - Vol. 1",
month = apr,
year = "2026",
address = "Salvador, Brazil",
publisher = "Association for Computational Linguistics",
url = "https://aclanthology.org/2026.propor-1.38/",
pages = "380--391",
isbn = "979-8-89176-387-6"
}
```