Spaces:
Sleeping
Sleeping
A newer version of the Streamlit SDK is available:
1.52.1
metadata
title: Gemma Fine-tuning UI
emoji: π€
colorFrom: blue
colorTo: indigo
sdk: streamlit
sdk_version: 1.30.0
app_file: app.py
pinned: false
Gemma Fine-tuning UI
A web-based user interface for fine-tuning Google's Gemma models using Hugging Face infrastructure.
Features
- Dataset Upload: Upload and preprocess your custom training data in CSV, JSON, or JSONL format
- Model Configuration: Configure Gemma model version and hyperparameters
- Training Management: Start, monitor, and manage fine-tuning jobs
- Evaluation: Test your fine-tuned model with interactive generation
- Export Options: Use your model directly from Hugging Face or export in various formats
Installation
- Clone this repository:
git clone https://github.com/yourusername/gemma-finetuning-ui.git
cd gemma-finetuning-ui
- Create a virtual environment and install dependencies:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
pip install -r requirements.txt
- Run the application:
streamlit run app.py
Usage
- Authentication: Provide your Hugging Face API token with write permissions
- Dataset Preparation: Upload your dataset and configure column mappings
- Model Selection: Choose between Gemma 2B or 7B and customize training parameters
- Training: Start the fine-tuning process and monitor progress
- Evaluation: Test your fine-tuned model with custom prompts
- Deployment: Export or directly use your model from Hugging Face
Hugging Face Spaces Deployment
This application is designed to be deployed easily on Hugging Face Spaces:
- Create a new Space on Hugging Face Spaces
- Select Streamlit as the SDK
- Connect your GitHub repository or upload the files directly
- The Space will automatically detect and install the requirements
Requirements
- Python 3.8+
- Streamlit 1.30.0+
- Hugging Face Account with API token
- For training: GPU access (recommended)
Project Structure
.
βββ app.py # Main Streamlit application
βββ pages/ # Multi-page app components
β βββ 01_Dataset_Upload.py
β βββ 02_Model_Configuration.py
β βββ 03_Training_Monitor.py
β βββ 04_Evaluation.py
βββ utils/ # Utility functions
β βββ auth.py # Authentication utilities
β βββ huggingface.py # Hugging Face API integration
β βββ training.py # Training utilities
β βββ ui.py # UI components and styling
βββ data/ # Sample data and uploads
βββ requirements.txt # Project dependencies
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgements
Developed as a simplified interface for fine-tuning Gemma models with Hugging Face.
