# aaronmueller/cs599-fall26-hw2 architecture

> Architecture diagram of the GitHub repository aaronmueller/cs599-fall26-hw2, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/aaronmueller/cs599-fall26-hw2
- Repository: https://github.com/aaronmueller/cs599-fall26-hw2

## Overview

This repository is a post-training homework package, not a complete training application: the README describes an assignment and directs students to implement missing functions, while the sampled runtime code provides model loading, math-answer grading, and vLLM helpers. A typical intended workflow is to use prompt/data resources with a model and evaluate generated answers, but the shown files do not establish a training orchestrator or connect those resources to the helpers. The graph therefore shows only supported runtime relationships; dataset groupings reflect the tree, not inspected dataset contents.

Main entry points: [`student/vllm_utils.py`](https://github.com/aaronmueller/cs599-fall26-hw2/blob/main/student/vllm_utils.py) (vLLM helpers), [`student/checkpoint.py`](https://github.com/aaronmueller/cs599-fall26-hw2/blob/main/student/checkpoint.py) (Model loader), [`student/drgrpo_grader.py`](https://github.com/aaronmueller/cs599-fall26-hw2/blob/main/student/drgrpo_grader.py) (Math grader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_model["Model and inference"]
  node_loader["Model loader<br/>[checkpoint.py]"]
  node_checkpoint["Model checkpoint"]
  node_vllm["vLLM helpers<br/>[vllm_utils.py]"]
  node_vllm_service["vLLM server"]
end

subgraph group_evaluation["Answer evaluation"]
  node_grader["Math grader<br/>[drgrpo_grader.py]"]
end

subgraph group_corpora["Homework datasets"]
  node_math_data[("Math reasoning")]
  node_preference_data[("Human preferences")]
  node_knowledge_data[("MMLU questions")]
  node_safety_data[("Safety examples")]
  node_eval_data[("Alpaca evaluations")]
end

node_user(("Assignment user"))

node_user -->|"loads model"| node_loader
node_loader -->|"loads weights"| node_checkpoint
node_user -.->|"requests inference"| node_vllm
node_vllm -->|"controls server"| node_vllm_service
node_vllm -->|"requests completions"| node_vllm_service
node_vllm -->|"syncs weights"| node_vllm_service
node_user -.->|"grades answers"| node_grader

click node_loader "https://github.com/aaronmueller/cs599-fall26-hw2/blob/main/student/checkpoint.py"
click node_vllm "https://github.com/aaronmueller/cs599-fall26-hw2/blob/main/student/vllm_utils.py"
click node_grader "https://github.com/aaronmueller/cs599-fall26-hw2/blob/main/student/drgrpo_grader.py"
click node_math_data "https://github.com/aaronmueller/cs599-fall26-hw2/tree/main/data/gsm8k"
click node_preference_data "https://github.com/aaronmueller/cs599-fall26-hw2/tree/main/data/hh"
click node_knowledge_data "https://github.com/aaronmueller/cs599-fall26-hw2/tree/main/data/mmlu"
click node_safety_data "https://github.com/aaronmueller/cs599-fall26-hw2/tree/main/data/simple_safety_tests"
click node_eval_data "https://github.com/aaronmueller/cs599-fall26-hw2/tree/main/data/alpaca_eval"

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_loader,node_checkpoint,node_vllm,node_vllm_service,node_user toneBlue
class node_grader toneAmber
class node_math_data,node_preference_data,node_knowledge_data,node_safety_data,node_eval_data toneMint
```

## Components

### Model and inference

- [Model loader](https://github.com/aaronmueller/cs599-fall26-hw2/blob/main/student/checkpoint.py): `student/checkpoint.py`
- **Model checkpoint**
- [vLLM helpers](https://github.com/aaronmueller/cs599-fall26-hw2/blob/main/student/vllm_utils.py): `student/vllm_utils.py`
- **vLLM server**

### Answer evaluation

- [Math grader](https://github.com/aaronmueller/cs599-fall26-hw2/blob/main/student/drgrpo_grader.py): `student/drgrpo_grader.py`

### Homework datasets

- [Math reasoning](https://github.com/aaronmueller/cs599-fall26-hw2/tree/main/data/gsm8k): `data/gsm8k`
- [Human preferences](https://github.com/aaronmueller/cs599-fall26-hw2/tree/main/data/hh): `data/hh`
- [MMLU questions](https://github.com/aaronmueller/cs599-fall26-hw2/tree/main/data/mmlu): `data/mmlu`
- [Safety examples](https://github.com/aaronmueller/cs599-fall26-hw2/tree/main/data/simple_safety_tests): `data/simple_safety_tests`
- [Alpaca evaluations](https://github.com/aaronmueller/cs599-fall26-hw2/tree/main/data/alpaca_eval): `data/alpaca_eval`

### Other components

- **Assignment user**

## Connections

- Assignment user → Model loader: loads model (evidence: `student/checkpoint.py`)
- Model loader → Model checkpoint: loads weights (evidence: `student/checkpoint.py`)
- Assignment user → vLLM helpers: requests inference
- vLLM helpers → vLLM server: controls server (evidence: `student/vllm_utils.py`)
- vLLM helpers → vLLM server: requests completions (evidence: `student/vllm_utils.py`)
- vLLM helpers → vLLM server: syncs weights (evidence: `student/vllm_utils.py`)
- Assignment user → Math grader: grades answers
