# huggingface/smol-course architecture

> Architecture diagram of the GitHub repository huggingface/smol-course, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-20). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/huggingface/smol-course
- Repository: https://github.com/huggingface/smol-course

## Overview

##### Main System Components

a) Educational Content Layer
- Multilingual support (es, ja, ko, pt-br, vi) as parallel tracks

b) Technical Infrastructure Layer
- Jupyter Notebook Environment
- Model Training Components
- Evaluation Systems
- Dataset Management

##### Core Architectural Elements

**[Course Content Management]**
- ↓
**[Training Infrastructure]**
- Instruction Tuning
- Preference Alignment
- Parameter-efficient Fine-tuning
- Vision-language Models
- ↓
**[Evaluation & Benchmarking]**
- ↓
**[Deployment & Inference]**

##### Integration Points

Key integration points with distinct connectors:
- GitHub Integration (workflows, PR templates)
- Local Development Environment (.devcontainer)
- Model Hub Connections
- Dataset Pipeline Flow

##### Specific Implementation Details

Create subsystems showing:
a) Training Pipeline
**[Raw Data] → [Synthetic Dataset Generation] → [Fine-tuning] → [Evaluation]**

b) Model Adaptation Flow
**[Base SmolLM2] → [Parameter Efficient Fine-tuning] → [Aligned Model]**

##### Technical Details

Annotations showing:
- Python 3.11 requirement
- GPU requirements (minimal)
- Local execution capability
- Package management (uv/pip)

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph "Educational Content Layer"
        Modules["Course Modules"]
        M1["1. Instruction Tuning"]:::completed
        M2["2. Preference Alignment"]:::completed
        M3["3. Parameter-efficient Fine-tuning"]:::completed
        M4["4. Evaluation"]:::completed
        M5["5. Vision-language Models"]:::inprogress
        M6["6. Synthetic Datasets"]:::inprogress
        M7["7. Deployment & Inference"]:::inprogress
        M8["8. Agent Systems"]:::planned
        
        Modules --> M1 & M2 & M3 & M4 & M5 & M6 & M7 & M8
    end

    subgraph "Technical Infrastructure"
        DevEnv["Development Environment"]:::infra
        JupyterEnv["Jupyter Environment"]:::infra
        ModelTraining["Model Training Components"]:::training
        EvalSystem["Evaluation Systems"]:::eval
        DataMgmt["Dataset Management"]:::data
    end

    subgraph "Training Pipeline"
        RawData["Raw Data"]:::data
        SyntheticGen["Synthetic Dataset Generation"]:::process
        FineTuning["Fine-tuning"]:::training
        Eval["Evaluation"]:::eval
        
        RawData --> SyntheticGen --> FineTuning --> Eval
    end

    subgraph "Model Adaptation"
        BaseModel["Base SmolLM2"]:::model
        PEFT["Parameter Efficient Fine-tuning"]:::process
        AlignedModel["Aligned Model"]:::model
        
        BaseModel --> PEFT --> AlignedModel
    end

    subgraph "Multilingual Support"
        ES["Spanish (es)"]:::lang
        JA["Japanese (ja)"]:::lang
        KO["Korean (ko)"]:::lang
        PT["Portuguese (pt-br)"]:::lang
        VI["Vietnamese (vi)"]:::lang
    end

    M1 --> ModelTraining
    M2 --> ModelTraining
    M3 --> ModelTraining
    M4 --> EvalSystem
    M5 --> ModelTraining
    M6 --> DataMgmt
    M7 --> Deployment["Deployment & Inference"]:::deploy
    M8 --> AgentSys["Agent Systems"]:::system

    %% Click events for component mapping
    click M1 "https://github.com/huggingface/smol-course/tree/main/1_instruction_tuning"
    click M2 "https://github.com/huggingface/smol-course/tree/main/2_preference_alignment"
    click M3 "https://github.com/huggingface/smol-course/tree/main/3_parameter_efficient_finetuning"
    click M4 "https://github.com/huggingface/smol-course/tree/main/4_evaluation"
    click M5 "https://github.com/huggingface/smol-course/tree/main/5_vision_language_models"
    click M6 "https://github.com/huggingface/smol-course/tree/main/6_synthetic_datasets"
    click M7 "https://github.com/huggingface/smol-course/tree/main/7_inference"
    click M8 "https://github.com/huggingface/smol-course/tree/main/8_agents"
    click DevEnv "https://github.com/huggingface/smol-course/blob/main/.devcontainer/devcontainer.json"
    click ES "https://github.com/huggingface/smol-course/tree/main/es"
    click JA "https://github.com/huggingface/smol-course/tree/main/ja"
    click KO "https://github.com/huggingface/smol-course/tree/main/ko"
    click PT "https://github.com/huggingface/smol-course/tree/main/pt-br"
    click VI "https://github.com/huggingface/smol-course/tree/main/vi"

    %% Styling
    classDef completed fill:#a8e6cf
    classDef inprogress fill:#ffd3b6
    classDef planned fill:#ffaaa5
    classDef infra fill:#3498db,color:#fff
    classDef training fill:#2ecc71,color:#fff
    classDef eval fill:#f1c40f
    classDef data fill:#9b59b6,color:#fff
    classDef process fill:#e74c3c,color:#fff
    classDef model fill:#34495e,color:#fff
    classDef deploy fill:#1abc9c,color:#fff
    classDef system fill:#95a5a6
    classDef lang fill:#bdc3c7

    %% Legend
    subgraph Legend
        L1["Completed Module"]:::completed
        L2["In Progress Module"]:::inprogress
        L3["Planned Module"]:::planned
        L4["Infrastructure"]:::infra
        L5["Training Component"]:::training
        L6["Evaluation"]:::eval
        L7["Data Management"]:::data
    end
```
