# Local Inference Hardware Decision Dashboard

## PURPOSE
A Streamlit + Plotly dashboard that turns the video's decision framework into an
interactive screen. Choose a model size, and it shows which machines fit, their
bandwidth-bound generation ceiling, price per gigabyte, and the "window" of roughly
120-160 GB models that run on the AMD 495 "Gorgon Halo" but not on the 395. It visualizes
the transcript's rivals side by side: the AMD 395 (128 GB), AMD 495 (192 GB, $7,299),
Nvidia DGX Spark (128 GB, $6,950), the Mac Studio M5 Ultra (1.2 TB/s pipe), and the
four-box Framework cluster.

## WHY THIS MATTERS
The presenter keeps saying the same thing in different ways: capacity and throughput are
different axes, and a claim is not a measurement. Generation speed tracks the memory pipe
(256 vs 273 GB/s ~ 7%), prefill tracks compute (DGX Spark ~1,700 vs Strix Halo ~340 tps),
and totality of memory decides fit. A dashboard lets a student drag the model-size slider
and watch the "fit" answer flip — making the 395-vs-495 decision visceral, including the
$52-per-extra-GB jump versus Apple's ~$25/GB.

## HOW TO BUILD
Put the catalog in a list of dicts, load it into a Pandas DataFrame in Streamlit, and draw
with Plotly. Sidebar inputs drive filtering:

```python
import streamlit as st
import plotly.express as px

model_gb = st.sidebar.slider("Model size (GB)", 40, 512, 142)
df["fits"] = df["gpu_alloc_gb"] >= model_gb
df["ceiling_tps"] = df["bandwidth_gbps"] / model_gb
fig = px.scatter(df, x="total_gb", y="bandwidth_gbps",
                 size="price_usd", color="fits", hover_name="name")
st.plotly_chart(fig, use_container_width=True)
```

Add a price-per-GB bar chart, a fit table, and a callout for the 120-160 GB window.

## WHEN TO USE IN PRODUCTION
Use it as an internal sizing portal or a client-facing "will this model run here" explainer
that non-engineers can use. Use it to compare a fleet at a glance before deep-diving into
one SKU. Do NOT use it as a benchmark — the ceiling is derived math, not measured
tokens/sec. Do NOT present it without the provenance caveat: label calculated numbers as
such, since the video explicitly warns that vendor charts and math ceilings differ.

## HOW IT HELPS STUDENTS
Students learn Streamlit layout and state, Plotly scatter/bar visuals with encodings
(size=price, color=fit), and how to communicate a hardware trade-off honestly using
provenance-labelled figures.

## STARTER CODE
See `starter/main.py` for a runnable Streamlit app with the catalog, sidebar controls,
fit/ceiling computation, and three Plotly figures, plus `# TODO` markers for live pricing.
