# vatsalmalkari/lora-finetuning-project architecture

> Architecture diagram of the GitHub repository vatsalmalkari/lora-finetuning-project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vatsalmalkari/lora-finetuning-project
- Repository: https://github.com/vatsalmalkari/lora-finetuning-project

## Overview

This repository is a Colab-oriented research project comparing Gemma 3 1B zero-shot, few-shot, LoRA, and QLoRA performance on baseball questions. The documented workflow builds and splits a dataset, establishes baselines, fine-tunes adapters, evaluates accuracy and efficiency, then summarizes results. The tree exposes only one notebook, and no source excerpts were provided, so component boundaries and relationships below reflect README-described stages rather than verified notebook implementation details.

Main entry points: [`zero_shot_with_gamma.ipynb`](https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb) (Question dataset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Dataset preparation"]
  node_question_data[("Question dataset")]
  node_data_checks["Split and overlap checks"]
end

subgraph group_experiments["Model experiments"]
  node_baseline["Zero/few-shot baseline"]
  node_pipeline_check["Pipeline check"]
  node_lora["LoRA training"]
  node_qlora["QLoRA training"]
  node_comparisons["Rank/module comparisons"]
end

subgraph group_analysis["Evaluation and reporting"]
  node_scoring["Held-out scoring"]
  node_metrics["Accuracy and efficiency metrics"]
  node_results["Results summary"]
end

node_researcher(("Researcher"))
node_lahman[("Lahman statistics")]
node_gemma["Gemma 3 1B IT"]
node_huggingface["Hugging Face"]
node_colab["Colab T4 GPU"]

node_researcher -->|"builds"| node_question_data
node_lahman -->|"supplies stats"| node_question_data
node_question_data -->|"checks overlap"| node_data_checks
node_data_checks -->|"provides test set"| node_baseline
node_huggingface -->|"provides access"| node_gemma
node_gemma -->|"runs inference"| node_baseline
node_researcher -->|"runs"| node_baseline
node_colab -->|"hosts run"| node_pipeline_check
node_researcher -->|"runs"| node_pipeline_check
node_question_data -->|"provides examples"| node_pipeline_check
node_gemma -->|"is adapted"| node_lora
node_gemma -->|"is adapted"| node_qlora
node_question_data -->|"provides training set"| node_lora
node_question_data -->|"provides training set"| node_qlora
node_colab -->|"hosts training"| node_lora
node_colab -->|"hosts training"| node_qlora
node_researcher -->|"runs"| node_lora
node_researcher -->|"runs"| node_qlora
node_lora -->|"informs"| node_comparisons
node_qlora -->|"informs"| node_comparisons
node_baseline -->|"saves outputs"| node_scoring
node_lora -->|"evaluates on"| node_scoring
node_qlora -->|"evaluates on"| node_scoring
node_scoring -->|"computes"| node_metrics
node_metrics -->|"summarizes"| node_results
node_researcher -->|"writes report"| node_results

click node_question_data "https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb"
click node_data_checks "https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb"
click node_baseline "https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb"
click node_pipeline_check "https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb"
click node_lora "https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb"
click node_qlora "https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb"
click node_comparisons "https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb"
click node_scoring "https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb"
click node_metrics "https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb"
click node_results "https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_question_data,node_data_checks toneBlue
class node_baseline,node_pipeline_check,node_lora,node_qlora,node_comparisons,node_lahman toneAmber
class node_scoring,node_metrics,node_results toneMint
class node_researcher,node_gemma,node_huggingface,node_colab toneIndigo
```

## Components

### Dataset preparation

- [Question dataset](https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb): `zero_shot_with_gamma.ipynb`
- [Split and overlap checks](https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb): `zero_shot_with_gamma.ipynb`

### Model experiments

- [Zero/few-shot baseline](https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb): `zero_shot_with_gamma.ipynb`
- [Pipeline check](https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb): `zero_shot_with_gamma.ipynb`
- [LoRA training](https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb): `zero_shot_with_gamma.ipynb`
- [QLoRA training](https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb): `zero_shot_with_gamma.ipynb`
- [Rank/module comparisons](https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb): `zero_shot_with_gamma.ipynb`

### Evaluation and reporting

- [Held-out scoring](https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb): `zero_shot_with_gamma.ipynb`
- [Accuracy and efficiency metrics](https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb): `zero_shot_with_gamma.ipynb`
- [Results summary](https://github.com/vatsalmalkari/lora-finetuning-project/blob/main/zero_shot_with_gamma.ipynb): `zero_shot_with_gamma.ipynb`

### Other components

- **Researcher**
- **Lahman statistics**
- **Gemma 3 1B IT**
- **Hugging Face**
- **Colab T4 GPU**

## Connections

- Researcher → Question dataset: builds (evidence: `README.md`)
- Lahman statistics → Question dataset: supplies stats (evidence: `README.md`)
- Question dataset → Split and overlap checks: checks overlap (evidence: `README.md`)
- Split and overlap checks → Zero/few-shot baseline: provides test set (evidence: `README.md`)
- Hugging Face → Gemma 3 1B IT: provides access (evidence: `README.md`)
- Gemma 3 1B IT → Zero/few-shot baseline: runs inference (evidence: `README.md`)
- Researcher → Zero/few-shot baseline: runs (evidence: `README.md`)
- Colab T4 GPU → Pipeline check: hosts run (evidence: `README.md`)
- Researcher → Pipeline check: runs (evidence: `README.md`)
- Question dataset → Pipeline check: provides examples (evidence: `README.md`)
- Gemma 3 1B IT → LoRA training: is adapted (evidence: `README.md`)
- Gemma 3 1B IT → QLoRA training: is adapted (evidence: `README.md`)
- Question dataset → LoRA training: provides training set (evidence: `README.md`)
- Question dataset → QLoRA training: provides training set (evidence: `README.md`)
- Colab T4 GPU → LoRA training: hosts training (evidence: `README.md`)
- Colab T4 GPU → QLoRA training: hosts training (evidence: `README.md`)
- Researcher → LoRA training: runs (evidence: `README.md`)
- Researcher → QLoRA training: runs (evidence: `README.md`)
- LoRA training → Rank/module comparisons: informs (evidence: `README.md`)
- QLoRA training → Rank/module comparisons: informs (evidence: `README.md`)
- Zero/few-shot baseline → Held-out scoring: saves outputs (evidence: `README.md`)
- LoRA training → Held-out scoring: evaluates on (evidence: `README.md`)
- QLoRA training → Held-out scoring: evaluates on (evidence: `README.md`)
- Held-out scoring → Accuracy and efficiency metrics: computes (evidence: `README.md`)
- Accuracy and efficiency metrics → Results summary: summarizes (evidence: `README.md`)
- Researcher → Results summary: writes report (evidence: `README.md`)
