# alisakour/s-dpq architecture

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

- Interactive diagram: https://gitdiagram.com/alisakour/s-dpq
- Repository: https://github.com/alisakour/s-dpq

## Overview

This repository is a PyTorch reference implementation of S-DPQ, intended to reproduce the paper’s data-free ternary-quantization experiments. The documented user workflow is to upload and run `main.ipynb` in Google Colab; the README identifies Hugging Face checkpoints and SST-2/MRPC datasets used by the implementation. The notebook’s internal stages and exact runtime call relationships cannot be verified because no source excerpts are available, so the graph shows only documented relationships.

Main entry points: [`main.ipynb`](https://github.com/alisakour/s-dpq/blob/main/main.ipynb) (S-DPQ notebook)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_implementation["Reference implementation"]
  node_notebook["S-DPQ notebook<br/>[main.ipynb]"]
end

subgraph group_inputs["External assets"]
  node_checkpoints[("HF checkpoints")]
  node_datasets[("SST-2 / MRPC")]
end

node_user(("Colab user"))
node_pytorch["PyTorch"]
node_hf_datasets["HF datasets"]

node_user -->|"runs in Colab"| node_notebook
node_notebook -->|"uses checkpoints"| node_checkpoints
node_notebook -->|"loads datasets"| node_hf_datasets
node_hf_datasets -->|"provides datasets"| node_datasets
node_notebook -->|"uses implementation"| node_pytorch

click node_notebook "https://github.com/alisakour/s-dpq/blob/main/main.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_notebook,node_user toneBlue
class node_checkpoints,node_datasets toneAmber
class node_pytorch,node_hf_datasets toneIndigo
```

## Components

### Reference implementation

- [S-DPQ notebook](https://github.com/alisakour/s-dpq/blob/main/main.ipynb): `main.ipynb`

### External assets

- **HF checkpoints**
- **SST-2 / MRPC**

### Other components

- **Colab user**
- **PyTorch**
- **HF datasets**

## Connections

- Colab user → S-DPQ notebook: runs in Colab (evidence: `README.md`)
- S-DPQ notebook → HF checkpoints: uses checkpoints (evidence: `README.md`)
- S-DPQ notebook → HF datasets: loads datasets (evidence: `README.md`)
- HF datasets → SST-2 / MRPC: provides datasets (evidence: `README.md`)
- S-DPQ notebook → PyTorch: uses implementation (evidence: `README.md`)
