Edit model card

Acknowledge terms and conditions to accept the repository

Our team may take 2-3 days to process your request

This is a pretrained model that should be fine-tuned to perform downstream tasks. You agree to not use the model to conduct experiments that cause harm to human subjects, or to perform any medical-related task.

Log in or Sign Up to review the conditions and access this model content.

Igea-3B-v0.0.1 ⚕️🩺

Igea is a biomedical Small Language Model (SLM) for Italian, continually pretrained from Minerva with NMT translated Pubmed Abstracts

🔓: Access to the model is only granted after explicitly acknowledging that you have read the 'Bias, Risk, and Limitation' section of this model card.

This is ongoing research. Do not use it for any medical-related tasks.

Preprint: Igea: a Decoder-Only Language Model for Biomedical Text Generation in Italian.

How to use Igea with Hugging Face transformers

import transformers
import torch

model_id = "bmi-labmedinfo/Igea-3B-v0.1"

# Initialize the pipeline.
pipeline = transformers.pipeline(
    "text-generation",
    model=model_id,
    model_kwargs={"torch_dtype": torch.bfloat16},
    device_map="auto",
)

# Input text for the model.
input_text = "Il fegato è "

# Compute the outputs.
output = pipeline(
  input_text,
  max_new_tokens=128,
)

# Output:
# [{'generated_text': "Il fegato è una ghiandola fondamentale per il metabolismo umano, la più [...]"}]

🚨⚠️🚨 Bias, Risks, and Limitations 🚨⚠️🚨

This section identifies foreseeable harms and misunderstandings.

This is a continued pretraining of a foundation model, not subject to alignment. Model may:

  • Overrepresent some viewpoints and underrepresent others
  • Contain stereotypes
  • Contain personal information
  • Generate:
    • Racist and sexist content
    • Hateful, abusive, or violent language
    • Discriminatory or prejudicial language
    • Content that may not be appropriate for all settings, including sexual content
  • Make errors, including producing incorrect information or historical facts as if it were factual
  • Generate irrelevant or repetitive outputs

We are aware of the biases and potential problematic/toxic content that current pretrained large language models exhibit: more specifically, as probabilistic models of (Italian and English) languages, they reflect and amplify the biases of their training data.

The biomedical setting poses additional threats, including:

  • Disparities in research focus, demographic representation, and reporting standards
  • Reinforcement of existing medical paradigms and overlook emerging or alternative viewpoints, hindering innovation and comprehensive care
  • Generation of incorrect information and false claims, potentially leading to incorrect medical decisions

This model is therefore not intended to be used as it is for any medical-related task.

Training and evaluation data

It achieves the following results on the evaluation set:

  • Loss: 1.5962
  • Accuracy: 0.6194

Training procedure

Training hyperparameters

The following hyperparameters were used during training:

  • learning_rate: 5e-05
  • train_batch_size: 4
  • eval_batch_size: 4
  • seed: 42
  • distributed_type: multi-GPU
  • num_devices: 4
  • gradient_accumulation_steps: 4
  • total_train_batch_size: 64
  • total_eval_batch_size: 16
  • optimizer: Adam with betas=(0.9,0.95) and epsilon=1e-08
  • lr_scheduler_type: cosine
  • lr_scheduler_warmup_ratio: 0.02
  • num_epochs: 1

Training results

Training Loss Epoch Step Accuracy Validation Loss
1.7761 0.0867 5000 0.5896 1.7746
1.725 0.1735 10000 0.5976 1.7231
1.687 0.2602 15000 0.6027 1.6914
1.6709 0.3469 20000 0.6065 1.6682
1.648 0.4337 25000 0.6099 1.6490
1.6367 0.5204 30000 0.6127 1.6332
1.6248 0.6072 35000 0.6151 1.6198
1.6102 0.6939 40000 1.6096 0.6169
1.6009 0.7806 45000 1.6022 0.6183
1.595 0.8674 50000 1.5980 0.6190
1.5934 0.9541 55000 1.5962 0.6194

Framework versions

  • Transformers 4.40.2
  • Pytorch 2.3.0+cu121
  • Datasets 2.19.1
  • Tokenizers 0.19.1

Recommendations

Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.

Evaluation

Evaluation results in terms of normalized accuracy for the Igea models on biomedical and general datasets, translated in Italian. The best performing checkpoint of Minerva has been included for comparison.

Dataset Domain Minerva 3B (best base) Igea 350M Igea 1B Igea 3B
MedMCQA-ITA (0-shot) Biomed 0.293 0.250 0.307 0.313
Hellaswag-IT (0-shot) General 0.519 0.303 0.357 0.491
ARC-IT (0-shot) General 0.305 0.244 0.270 0.287
MMLU-IT (5-shot) General 0.261 0.254 0.255 0.252

Credits

Developed by Tommaso M. Buonocore and Simone Rancati.

Thanks to Michele Montebovi for his precious advices.

Downloads last month
0
Safetensors
Model size
2.89B params
Tensor type
F32
·
Inference Examples
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social visibility and check back later, or deploy to Inference Endpoints (dedicated) instead.

Model tree for bmi-labmedinfo/Igea-3B-v0.1

Finetuned
(2)
this model
Finetunes
1 model
Quantizations
1 model

Datasets used to train bmi-labmedinfo/Igea-3B-v0.1

Collection including bmi-labmedinfo/Igea-3B-v0.1