Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cabelo/MED-LLM-BR-openvino
https://github.com/cabelo/MED-LLM-BR-openvino
Last synced: 23 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/cabelo/MED-LLM-BR-openvino
- Owner: cabelo
- License: apache-2.0
- Created: 2024-09-01T02:07:08.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-12-23T23:07:10.000Z (about 2 months ago)
- Last Synced: 2025-01-17T15:56:55.453Z (28 days ago)
- Language: Python
- Size: 43.9 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-openvino - MED-LLM-BR-OpenVINO - These models were specially developed for the clinical context in Brazilian Portuguese, proving to be efficient in generating synthetic clinical data. The models are essential not only for direct applications in healthcare, but also for training larger models, overcoming the difficulty in accessing patient record data. (Table of content / Generative AI)
README
![]()
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
# MED-LLM-BR-OpenVINO: [![Mentioned in Awesome OpenVINO](https://awesome.re/mentioned-badge-flat.svg)](https://github.com/openvinotoolkit/awesome-openvino)
# Medical Large Language Models for Brazilian Portuguese for OpenVINO
MED-LLM-BR-OpenVINO is a **model converted** of the [MED-LLM-BR](https://github.com/HAILab-PUCPR/MED-LLM-BR) 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.## Contributions:
### Developing Resource-Efficient Clinical LLMs for Brazilian Portuguese
This project leverages LLama and Mistral as base models, adapting them through fine-tuning techniques to enhance their performance in clinical text generation tasks.To optimize resource utilization during the fine-tuning process, we employed Low-Rank Adaptation (LoRA). This approach enables effective model adaptation with significantly reduced computational and memory requirements, making the fine-tuning process more efficient without compromising the quality of the generated clinical text.
#### Model Description
LLama: LLama is a state-of-the-art language model known for its scalability and efficiency in handling diverse natural language processing tasks. In this project, LLama serves as one of the base models for fine-tuning, aimed at adapting it to the specific requirements of clinical text generation in Portuguese.#### How to use the models with HuggingFace
Link model FP16 : [Clinical-BR-LlaMA-2-7B-fp16-ov](https://huggingface.co/cabelo/Clinical-BR-LlaMA-2-7B-fp16-ov)
Link model Int8 : [Clinical-BR-LlaMA-2-7B-int8-ov](https://huggingface.co/cabelo/Clinical-BR-LlaMA-2-7B-int8-ov)
1. Install the required packages:
```bash
$ pip install -r requirements.txt
```
2 . Run example.
```bash
python inference-MD-LLM-BR.py
LLM model: cabelo/Clinical-BR-LlaMA-2-7B-fp16-ov, FP16
Compiling the model to CPU ...
Question: Paciente admitido com angina instável, progredindo para infarto agudo do miocárdio
(IAM) inferior no primeiro dia de internação; encaminhado para unidade de hemodinâmica, onde
foi feita angioplastia com implante de stent na ponte de safenaPaciente submeteu-se a uma cirurgia cardíaca em 2014, sendo que o procedimento teve sucesso
e sem complicações graves ou leves. Em julho deste ano apresentou-se ao nosso centro de
emergencia com sintomatologia clínicamente similar à da última crise de IAM, porém com
menor gravidade e evoluência bem melhorada quando comparada as anteriores. Foi realizada
novamente angiografia coronária que mostrou lesões restritivas em ambas artérias
circunflexa e marginal esquerda (figura). Realizado exame eletricofisiológico com
resultados normais. Apresentando-se como paciente com quadro de dor torácica,
auscultação normal e laboratórios normais, foi iniciada terapia farmacologica de classe B.
Após 3 dias de uso, o cuidado médico optou pelo retorno aos medicamentos de classe C,
já que os primeiros não foram capazes de controlar a dor torácica e a frequencia
cardiométrica.```