language:
- fr
- en
- de
- es
license: apache-2.0
library_name: transformers
tags:
- medical
datasets:
- nuvocare/MSD_instruct
pipeline_tag: text-generation
Model Card for NuvoChat
Model Details
NuvoChat is a fine-tuned version of the Mistral-7b-Instruct-v0.2 on a medical domain. The fine-tuning was done with LoRA and a quantized version of the model.
Model Description
- Developed by: Samuel Caineau, Nuvocare
- Funded by [Nuvocare]: Nuvocare
- Language(s) (NLP): English, French, Spanish and German
- Finetuned from model [Mistral 7B Instruct v0.2]: Base model
Uses
Direct Use
NuvoChat is made to assist patients and clinicians by providing relevant, adapted and clear information. The model knows how to adapt effectively its tone and vocabulary absed on the user's background. This is done by providing the model with a specific template where the status of the user (patient or professionnals) is explicitly provided.
The model can be used for:
- Chatting with patients (with or without a RAG set-up)
- Chatting with clinicians (with or without a RAG set-up)
- Medical explanation translation
Downstream Use [optional]
The model can be used for text summarization.
Bias, Risks, and Limitations
The model is trained on an unknown dataset by Mistral and fine-tuned on a multilingual dataset from MSD. The model might have different performances depending on the language used.
How to Get Started with the Model
Use the code below to get started with the model.
from transformers import AutoTokenizer, AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("nuvocare/NuvoChat", device = "auto")
tokenizer = AutoTokenizer.from_pretrained("mistralai/Mistral-7B-Instruct-v0.2")
prompt = "[INST] Je suis un patient qui souhaite connaitre des informations sur la chirurgie de la cataracte [/INST]"
input = tokenizer(prompt).to("cuda")
answer = tokenizer.decode(model.generate(**input, max_new_tokens = 200, pad_token = tokenizer.eos_token)[0])
Training Details
Training Data
You can check dataset card.
Training Procedure
Trained over 7000 steps with a total batch size of 32 (corresponding to a bit more than 1 epoch) and a sequence length of 2048.