From 9d6f8968daa9e49a64bd880762e1bd0d26aab271 Mon Sep 17 00:00:00 2001 From: ModelHub XC Date: Sun, 21 Jun 2026 10:58:13 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=EF=BC=8C=E7=94=B1ModelHub=20XC=E7=A4=BE=E5=8C=BA=E6=8F=90?= =?UTF-8?q?=E4=BE=9B=E6=A8=A1=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Model: QuantFactory/Clinical-BR-LlaMA-2-7B-GGUF Source: Original Platform --- .gitattributes | 49 ++++++++++++++++++++++++++++++ Clinical-BR-LlaMA-2-7B.Q2_K.gguf | 3 ++ Clinical-BR-LlaMA-2-7B.Q3_K_L.gguf | 3 ++ Clinical-BR-LlaMA-2-7B.Q3_K_M.gguf | 3 ++ Clinical-BR-LlaMA-2-7B.Q3_K_S.gguf | 3 ++ Clinical-BR-LlaMA-2-7B.Q4_0.gguf | 3 ++ Clinical-BR-LlaMA-2-7B.Q4_1.gguf | 3 ++ Clinical-BR-LlaMA-2-7B.Q4_K_M.gguf | 3 ++ Clinical-BR-LlaMA-2-7B.Q4_K_S.gguf | 3 ++ Clinical-BR-LlaMA-2-7B.Q5_0.gguf | 3 ++ Clinical-BR-LlaMA-2-7B.Q5_1.gguf | 3 ++ Clinical-BR-LlaMA-2-7B.Q5_K_M.gguf | 3 ++ Clinical-BR-LlaMA-2-7B.Q5_K_S.gguf | 3 ++ Clinical-BR-LlaMA-2-7B.Q6_K.gguf | 3 ++ Clinical-BR-LlaMA-2-7B.Q8_0.gguf | 3 ++ README.md | 41 +++++++++++++++++++++++++ configuration.json | 1 + 17 files changed, 133 insertions(+) create mode 100644 .gitattributes create mode 100644 Clinical-BR-LlaMA-2-7B.Q2_K.gguf create mode 100644 Clinical-BR-LlaMA-2-7B.Q3_K_L.gguf create mode 100644 Clinical-BR-LlaMA-2-7B.Q3_K_M.gguf create mode 100644 Clinical-BR-LlaMA-2-7B.Q3_K_S.gguf create mode 100644 Clinical-BR-LlaMA-2-7B.Q4_0.gguf create mode 100644 Clinical-BR-LlaMA-2-7B.Q4_1.gguf create mode 100644 Clinical-BR-LlaMA-2-7B.Q4_K_M.gguf create mode 100644 Clinical-BR-LlaMA-2-7B.Q4_K_S.gguf create mode 100644 Clinical-BR-LlaMA-2-7B.Q5_0.gguf create mode 100644 Clinical-BR-LlaMA-2-7B.Q5_1.gguf create mode 100644 Clinical-BR-LlaMA-2-7B.Q5_K_M.gguf create mode 100644 Clinical-BR-LlaMA-2-7B.Q5_K_S.gguf create mode 100644 Clinical-BR-LlaMA-2-7B.Q6_K.gguf create mode 100644 Clinical-BR-LlaMA-2-7B.Q8_0.gguf create mode 100644 README.md create mode 100644 configuration.json diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..b76d008 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,49 @@ +*.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 +Clinical-BR-LlaMA-2-7B.Q4_K_M.gguf filter=lfs diff=lfs merge=lfs -text +Clinical-BR-LlaMA-2-7B.Q4_1.gguf filter=lfs diff=lfs merge=lfs -text +Clinical-BR-LlaMA-2-7B.Q4_0.gguf filter=lfs diff=lfs merge=lfs -text +Clinical-BR-LlaMA-2-7B.Q8_0.gguf filter=lfs diff=lfs merge=lfs -text +Clinical-BR-LlaMA-2-7B.Q6_K.gguf filter=lfs diff=lfs merge=lfs -text +Clinical-BR-LlaMA-2-7B.Q5_K_M.gguf filter=lfs diff=lfs merge=lfs -text +Clinical-BR-LlaMA-2-7B.Q5_K_S.gguf filter=lfs diff=lfs merge=lfs -text +Clinical-BR-LlaMA-2-7B.Q5_0.gguf filter=lfs diff=lfs merge=lfs -text +Clinical-BR-LlaMA-2-7B.Q5_1.gguf filter=lfs diff=lfs merge=lfs -text +Clinical-BR-LlaMA-2-7B.Q2_K.gguf filter=lfs diff=lfs merge=lfs -text +Clinical-BR-LlaMA-2-7B.Q3_K_L.gguf filter=lfs diff=lfs merge=lfs -text +Clinical-BR-LlaMA-2-7B.Q3_K_M.gguf filter=lfs diff=lfs merge=lfs -text +Clinical-BR-LlaMA-2-7B.Q3_K_S.gguf filter=lfs diff=lfs merge=lfs -text +Clinical-BR-LlaMA-2-7B.Q4_K_S.gguf filter=lfs diff=lfs merge=lfs -text diff --git a/Clinical-BR-LlaMA-2-7B.Q2_K.gguf b/Clinical-BR-LlaMA-2-7B.Q2_K.gguf new file mode 100644 index 0000000..b98bd34 --- /dev/null +++ b/Clinical-BR-LlaMA-2-7B.Q2_K.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0116389165d0cd79754ab128bca4df472c0b0e3d5f8f86c1d0ae9a958e36b6a4 +size 2532864480 diff --git a/Clinical-BR-LlaMA-2-7B.Q3_K_L.gguf b/Clinical-BR-LlaMA-2-7B.Q3_K_L.gguf new file mode 100644 index 0000000..0bb98d8 --- /dev/null +++ b/Clinical-BR-LlaMA-2-7B.Q3_K_L.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:a7c314a1fc3a4c5602c4355dccb4970bc03dfd80d7a1c13e0eaccdabde9a42cd +size 3597111776 diff --git a/Clinical-BR-LlaMA-2-7B.Q3_K_M.gguf b/Clinical-BR-LlaMA-2-7B.Q3_K_M.gguf new file mode 100644 index 0000000..670f3c8 --- /dev/null +++ b/Clinical-BR-LlaMA-2-7B.Q3_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:adf7584505bc864f19fc8aeb37eb05279b02d1dba9b42ff855e192f9d58a7c11 +size 3298005472 diff --git a/Clinical-BR-LlaMA-2-7B.Q3_K_S.gguf b/Clinical-BR-LlaMA-2-7B.Q3_K_S.gguf new file mode 100644 index 0000000..1fa935f --- /dev/null +++ b/Clinical-BR-LlaMA-2-7B.Q3_K_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f50b8d325c9011651c0480f943b3bc541873a3abd32f828a6aaaab61c6c7d8b3 +size 2948305376 diff --git a/Clinical-BR-LlaMA-2-7B.Q4_0.gguf b/Clinical-BR-LlaMA-2-7B.Q4_0.gguf new file mode 100644 index 0000000..04c0d62 --- /dev/null +++ b/Clinical-BR-LlaMA-2-7B.Q4_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c770fa8652147e16dea0a581347722c0172af06a4ff9e8d748122be0ff6bf658 +size 3825807840 diff --git a/Clinical-BR-LlaMA-2-7B.Q4_1.gguf b/Clinical-BR-LlaMA-2-7B.Q4_1.gguf new file mode 100644 index 0000000..3109c22 --- /dev/null +++ b/Clinical-BR-LlaMA-2-7B.Q4_1.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:332b6bb043ce6e80478f704087483b6eac897cd0f7a27167e5ab87f96d044d25 +size 4238750176 diff --git a/Clinical-BR-LlaMA-2-7B.Q4_K_M.gguf b/Clinical-BR-LlaMA-2-7B.Q4_K_M.gguf new file mode 100644 index 0000000..59cd679 --- /dev/null +++ b/Clinical-BR-LlaMA-2-7B.Q4_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e4aac1511ea3a75285dee3ccd27527495264450c2075991a7ce3fa9ecbaabdf4 +size 4081005024 diff --git a/Clinical-BR-LlaMA-2-7B.Q4_K_S.gguf b/Clinical-BR-LlaMA-2-7B.Q4_K_S.gguf new file mode 100644 index 0000000..fe9d93a --- /dev/null +++ b/Clinical-BR-LlaMA-2-7B.Q4_K_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:575a6bb759a6d22525a5b533a15d5bdd79987efea75d3006430650b2646f67cb +size 3856740832 diff --git a/Clinical-BR-LlaMA-2-7B.Q5_0.gguf b/Clinical-BR-LlaMA-2-7B.Q5_0.gguf new file mode 100644 index 0000000..8bc8819 --- /dev/null +++ b/Clinical-BR-LlaMA-2-7B.Q5_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:0245af13cdbcaf0ba9ba24dbaf4c429ddf8cba9feaa459fe74b59a498bfc33c1 +size 4651692512 diff --git a/Clinical-BR-LlaMA-2-7B.Q5_1.gguf b/Clinical-BR-LlaMA-2-7B.Q5_1.gguf new file mode 100644 index 0000000..80b6a94 --- /dev/null +++ b/Clinical-BR-LlaMA-2-7B.Q5_1.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:e3eb9c2d9ee2684a9846e864f051de8f6cc9dac50adec20dc94f2cf36fd48acb +size 5064634848 diff --git a/Clinical-BR-LlaMA-2-7B.Q5_K_M.gguf b/Clinical-BR-LlaMA-2-7B.Q5_K_M.gguf new file mode 100644 index 0000000..4ca8021 --- /dev/null +++ b/Clinical-BR-LlaMA-2-7B.Q5_K_M.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5513572045a0c7752cd94b96434e26661ee5ec0578ee515ce051c4188e91fe96 +size 4783157728 diff --git a/Clinical-BR-LlaMA-2-7B.Q5_K_S.gguf b/Clinical-BR-LlaMA-2-7B.Q5_K_S.gguf new file mode 100644 index 0000000..d000745 --- /dev/null +++ b/Clinical-BR-LlaMA-2-7B.Q5_K_S.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:dd822c36213eecf5ba846b476b573e4452012691819804fefe3dc17faaeee0e9 +size 4651692512 diff --git a/Clinical-BR-LlaMA-2-7B.Q6_K.gguf b/Clinical-BR-LlaMA-2-7B.Q6_K.gguf new file mode 100644 index 0000000..d08df7a --- /dev/null +++ b/Clinical-BR-LlaMA-2-7B.Q6_K.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:02c3978a8edeefb9b9c7ea4d8cfc27e11d4e937f7e908355cb09810fb111a79b +size 5529194976 diff --git a/Clinical-BR-LlaMA-2-7B.Q8_0.gguf b/Clinical-BR-LlaMA-2-7B.Q8_0.gguf new file mode 100644 index 0000000..c70903e --- /dev/null +++ b/Clinical-BR-LlaMA-2-7B.Q8_0.gguf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8c1fe51efa64fa5a38b02b7369c0e6870fd9ee7dd01bb3eba337c1dffad301e3 +size 7161090528 diff --git a/README.md b/README.md new file mode 100644 index 0000000..da8d9e2 --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ + +--- + +license: apache-2.0 +language: +- pt +base_model: meta-llama/Llama-2-7b +pipeline_tag: text-generation + +--- + +![](https://lh7-rt.googleusercontent.com/docsz/AD_4nXeiuCm7c8lEwEJuRey9kiVZsRn2W-b4pWlu3-X534V3YmVuVc2ZL-NXg2RkzSOOS2JXGHutDuyyNAUtdJI65jGTo8jT9Y99tMi4H4MqL44Uc5QKG77B0d6-JfIkZHFaUA71-RtjyYZWVIhqsNZcx8-OMaA?key=xt3VSDoCbmTY7o-cwwOFwQ) + +# QuantFactory/Clinical-BR-LlaMA-2-7B-GGUF +This is quantized version of [pucpr-br/Clinical-BR-LlaMA-2-7B](https://huggingface.co/pucpr-br/Clinical-BR-LlaMA-2-7B) created using llama.cpp + +# Original Model Card + + +# MED-LLM-BR: Medical Large Language Models for Brazilian Portuguese +MED-LLM-BR is a collaborative project between [HAILab](https://github.com/HAILab-PUCPR) and [Comsentimento](https://www.comsentimento.com.br/), which aims to develop multiple medical LLMs for Portuguese language, including base models and task-specific models, with different sizes. + +## Introduction +Clinical-BR-LlaMA-2-7B is a fine-tuned language model specifically designed for generating clinical notes in Portuguese. This model builds on the strengths of LlaMA 2 7B, adapting it through targeted fine-tuning techniques to meet the unique demands of clinical text generation. By focusing on the nuances and complexities of medical language in Portuguese, Clinical-BR-LlaMA-2-7B aims to support healthcare professionals with contextually accurate and relevant clinical documentation. + +## Fine-Tuning Approach +To enhance memory efficiency and reduce computational demands, we implemented LoRA with 16-bit precision on the q_proj and v_proj projections. We configured LoRA with R set to 8, Alpha to 16, and Dropout to 0.1, allowing the model to adapt effectively while preserving output quality. For optimization, the AdamW optimizer was used with parameters β1 = 0.9 and β2 = 0.999, achieving a balance between fast convergence and training stability. This careful tuning process ensures robust performance in generating accurate and contextually appropriate clinical text in Portuguese. + +## Data +The fine-tuning of Clinical-BR-LlaMA-2-7B utilized 2.4GB of text from three clinical datasets. The SemClinBr project provided diverse clinical narratives from Brazilian hospitals, while the BRATECA dataset contributed admission notes from various departments in 10 hospitals. Additionally, data from Lopes et al., 2019, added neurology-focused texts from European Portuguese medical journals. These datasets collectively improved the model’s ability to generate accurate clinical notes in Portuguese. + +## Provisional Citation: +``` +@inproceedings{pinto2024clinicalLLMs, + title = {Developing Resource-Efficient Clinical LLMs for Brazilian Portuguese}, + author = {João Gabriel de Souza Pinto and Andrey Rodrigues de Freitas and Anderson Carlos Gomes Martins and Caroline Midori Rozza Sawazaki and Caroline Vidal and Lucas Emanuel Silva e Oliveira}, + booktitle = {Proceedings of the 34th Brazilian Conference on Intelligent Systems (BRACIS)}, + year = {2024}, + note = {In press}, +} +``` diff --git a/configuration.json b/configuration.json new file mode 100644 index 0000000..9e26dfe --- /dev/null +++ b/configuration.json @@ -0,0 +1 @@ +{} \ No newline at end of file