Thibault-GAREL/ILab_Hackathon-Resiliant_AI-test

Benchmark framework for Gemma 4 E2B model compression. Measures accuracy, latency & energy impact for the Resilient AI Challenge - First working code

1

stars

14

commits

Python

primary language

May 21, 2026

updated

README

🤖 Gemma 4 E4B Model Compression — Resilient AI Challenge

Python PyTorch CUDA MLflow

License Contributions

Resilient AI Challenge Logo

📝 Project Description

This project is part of the Resilient AI Challenge, a France-India-UNESCO collaboration challenging teams to compress state-of-the-art models while maintaining performance. We focus on compressing Google's Gemma 4 E4B for the Image-to-Text task. The goal is to reduce model size and latency without sacrificing accuracy—essential for deploying AI on resource-constrained devices.

This work is conducted at Intelligence Lab (ECE Paris), where we combine research, prototyping, and innovation to solve real-world AI challenges.


⚙️ Features

🎯 Target Gemma 4 E4B model compression for image-to-text tasks

📉 Implement quantization and pruning techniques to reduce model size

⚡ Optimize inference latency on edge devices

📊 Track experiments with MLflow for reproducibility

🧪 Comprehensive validation metrics (BLEU, CIDEr, METEOR)

🔧 Modular architecture: easy to swap compression techniques

🌍 Collaborative framework supporting multi-region teams


📂 Repository structure

├── src/                           # Source code
│   ├── models/
│   │   ├── model.py              # Model architecture
│   │   └── train.py              # Training loop with MLflow
│   ├── data/
│   │   └── make_dataset.py        # Dataset preparation
│   ├── validation/
│   │   ├── metrics.py            # Evaluation metrics
│   │   └── test_infer_gemma4.py  # Inference testing
│   ├── config.py                 # Configuration (Pydantic)
│   └── utils.py                  # Utilities
│
├── tests/
│   └── visualization/
│       └── model_viewer.py        # Model inspection tools
│
├── data/
│   ├── 1-raw/                    # Original datasets
│   ├── 2-processed/              # Preprocessed data
│   └── 3-external/               # External resources
│
├── outputs/
│   ├── models/                   # Compressed models
│   ├── logs/                     # Training logs
│   └── results/                  # Evaluation results
│
├── .env                          # Environment variables
├── mlflow.db                     # MLflow experiment tracking
├── requirements.txt              # Python dependencies
├── LICENSE
└── README.md

💻 Run it on Your PC

Clone the repository and set up the environment:

git clone https://github.com/Thibault-GAREL/ILab_Hackathon-Resiliant_AI-test.git
cd ILab_Hackathon-Resiliant_AI-test

# Create a virtual environment
python -m venv .venv  # if you don't have a virtual environment
source .venv/bin/activate    # Linux / macOS
.venv\Scripts\activate       # Windows

# Install dependencies
pip install -r requirements.txt

⚠️ You need a CUDA-compatible GPU (NVIDIA recommended) and sufficient VRAM (~6-24 GB depending on model size).

Train the model

python -m src.models.train

Validate / Evaluate

python -m src.validation.test_infer_gemma4

Track experiments with MLflow

mlflow ui

Then open http://localhost:5000 in your browser.


👥 Team Members


📖 Inspiration / Sources

This project is part of the Sustainable AI Coalition's Resilient AI Challenge:

Code created by the Resilient AI Team 😎 — Intelligence Lab


⚠️ Note: This project is work in progress 🚨. Compression techniques are still being evaluated and optimized.

Contributors

Thibault-GAREL

14 commits

Thibault-GAREL/ILab_Hackathon-Resiliant_AI-test

Benchmark framework for Gemma 4 E2B model compression. Measures accuracy, latency & energy impact for the Resilient AI Challenge - First working code

1

stars

14

commits

Python

primary language

May 21, 2026

updated

README

🤖 Gemma 4 E4B Model Compression — Resilient AI Challenge

Python PyTorch CUDA MLflow

License Contributions

Resilient AI Challenge Logo

📝 Project Description

This project is part of the Resilient AI Challenge, a France-India-UNESCO collaboration challenging teams to compress state-of-the-art models while maintaining performance. We focus on compressing Google's Gemma 4 E4B for the Image-to-Text task. The goal is to reduce model size and latency without sacrificing accuracy—essential for deploying AI on resource-constrained devices.

This work is conducted at Intelligence Lab (ECE Paris), where we combine research, prototyping, and innovation to solve real-world AI challenges.


⚙️ Features

🎯 Target Gemma 4 E4B model compression for image-to-text tasks

📉 Implement quantization and pruning techniques to reduce model size

⚡ Optimize inference latency on edge devices

📊 Track experiments with MLflow for reproducibility

🧪 Comprehensive validation metrics (BLEU, CIDEr, METEOR)

🔧 Modular architecture: easy to swap compression techniques

🌍 Collaborative framework supporting multi-region teams


📂 Repository structure

├── src/                           # Source code
│   ├── models/
│   │   ├── model.py              # Model architecture
│   │   └── train.py              # Training loop with MLflow
│   ├── data/
│   │   └── make_dataset.py        # Dataset preparation
│   ├── validation/
│   │   ├── metrics.py            # Evaluation metrics
│   │   └── test_infer_gemma4.py  # Inference testing
│   ├── config.py                 # Configuration (Pydantic)
│   └── utils.py                  # Utilities
│
├── tests/
│   └── visualization/
│       └── model_viewer.py        # Model inspection tools
│
├── data/
│   ├── 1-raw/                    # Original datasets
│   ├── 2-processed/              # Preprocessed data
│   └── 3-external/               # External resources
│
├── outputs/
│   ├── models/                   # Compressed models
│   ├── logs/                     # Training logs
│   └── results/                  # Evaluation results
│
├── .env                          # Environment variables
├── mlflow.db                     # MLflow experiment tracking
├── requirements.txt              # Python dependencies
├── LICENSE
└── README.md

💻 Run it on Your PC

Clone the repository and set up the environment:

git clone https://github.com/Thibault-GAREL/ILab_Hackathon-Resiliant_AI-test.git
cd ILab_Hackathon-Resiliant_AI-test

# Create a virtual environment
python -m venv .venv  # if you don't have a virtual environment
source .venv/bin/activate    # Linux / macOS
.venv\Scripts\activate       # Windows

# Install dependencies
pip install -r requirements.txt

⚠️ You need a CUDA-compatible GPU (NVIDIA recommended) and sufficient VRAM (~6-24 GB depending on model size).

Train the model

python -m src.models.train

Validate / Evaluate

python -m src.validation.test_infer_gemma4

Track experiments with MLflow

mlflow ui

Then open http://localhost:5000 in your browser.


👥 Team Members


📖 Inspiration / Sources

This project is part of the Sustainable AI Coalition's Resilient AI Challenge:

Code created by the Resilient AI Team 😎 — Intelligence Lab


⚠️ Note: This project is work in progress 🚨. Compression techniques are still being evaluated and optimized.

Contributors

Thibault-GAREL

14 commits

Languages

Python

94.1%

Dockerfile

5.9%