Spaces:
Running
Running
Add benchmark leaderboard (HumanEval+/MBPP+/TurkishMMLU) + live model catalog
Browse files- README.md +74 -9
- app.py +385 -0
- requirements.txt +3 -0
README.md
CHANGED
|
@@ -1,15 +1,80 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
-
python_version: '3.13'
|
| 9 |
app_file: app.py
|
| 10 |
-
pinned:
|
| 11 |
license: cc-by-4.0
|
| 12 |
-
short_description:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
---
|
| 14 |
|
| 15 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: RunLocalAI leaderboard & catalog
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: yellow
|
| 5 |
+
colorTo: red
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 5.49.1
|
|
|
|
| 8 |
app_file: app.py
|
| 9 |
+
pinned: true
|
| 10 |
license: cc-by-4.0
|
| 11 |
+
short_description: Local-AI benchmark leaderboard + open-weight catalog
|
| 12 |
+
tags:
|
| 13 |
+
- local-ai
|
| 14 |
+
- llm
|
| 15 |
+
- leaderboard
|
| 16 |
+
- benchmark
|
| 17 |
+
- humaneval
|
| 18 |
+
- mbpp
|
| 19 |
+
- embedding
|
| 20 |
+
- asr
|
| 21 |
+
- tts
|
| 22 |
+
- diffusion
|
| 23 |
+
- catalog
|
| 24 |
---
|
| 25 |
|
| 26 |
+
# RunLocalAI β local AI leaderboard & catalog
|
| 27 |
+
|
| 28 |
+
A **live, read-only** view of the [RunLocalAI](https://www.runlocalai.co) corpus, in two tabs.
|
| 29 |
+
|
| 30 |
+
## π Benchmark leaderboard
|
| 31 |
+
|
| 32 |
+
Reproducible quality scores on **real consumer hardware** β HumanEval+, MBPP+, and TurkishMMLU.
|
| 33 |
+
Every run is **measured first-party** and carries:
|
| 34 |
+
|
| 35 |
+
- a public **run log** (linked per row),
|
| 36 |
+
- a one-line **reproduction command**, and
|
| 37 |
+
- explicit **first-party / community / verified** provenance status.
|
| 38 |
+
|
| 39 |
+
Pick a benchmark to see the head-to-head ranking (π₯π₯π₯). No vibes, no leaderboard laundering β
|
| 40 |
+
the source is `GET /api/v1/quality-benchmarks`.
|
| 41 |
+
|
| 42 |
+
## π οΈ Model catalog
|
| 43 |
+
|
| 44 |
+
Every open-weight model worth running on your own hardware β text LLMs, vision-language models,
|
| 45 |
+
embeddings, rerankers, ASR, TTS, image diffusion, and vision encoders.
|
| 46 |
+
|
| 47 |
+
- Filter by **modality** (text / vision / audio / embedding / rerank / image-gen)
|
| 48 |
+
- Filter by **commercial-license-OK** to skip non-commercial license traps
|
| 49 |
+
- Cap **max parameters** for SLM-only discovery
|
| 50 |
+
- **Search** by model name, vendor, or HuggingFace repo
|
| 51 |
+
- Each row links to the full **operator-grade page** on runlocalai.co with hardware fit,
|
| 52 |
+
prompt template, runtime + quant recommendation, and common-mistakes section
|
| 53 |
+
|
| 54 |
+
## Why a mirror?
|
| 55 |
+
|
| 56 |
+
The source-of-truth lives at **[runlocalai.co](https://www.runlocalai.co)** and is served via the
|
| 57 |
+
public, keyless endpoints below. This Space exists so the HuggingFace community can browse the
|
| 58 |
+
catalog and leaderboard from inside HF β and so HF discovery surfaces (search, trending) can index
|
| 59 |
+
local-AI rows.
|
| 60 |
+
|
| 61 |
+
## Catalog license
|
| 62 |
+
|
| 63 |
+
Catalog data and benchmark results are licensed **CC-BY-4.0**. Attribute to runlocalai.co
|
| 64 |
+
with a link.
|
| 65 |
+
|
| 66 |
+
## Catalog hubs (read on runlocalai.co)
|
| 67 |
+
|
| 68 |
+
- [/small-language-models](https://www.runlocalai.co/small-language-models) β every model β€ 3.5B
|
| 69 |
+
- [/embeddings](https://www.runlocalai.co/embeddings) β embedding + reranker models
|
| 70 |
+
- [/audio](https://www.runlocalai.co/audio) β ASR + TTS
|
| 71 |
+
- [/image-models](https://www.runlocalai.co/image-models) β diffusion + vision encoders
|
| 72 |
+
- [/coding-models](https://www.runlocalai.co/coding-models) β coder-specialised LLMs
|
| 73 |
+
- [/turkish-models](https://www.runlocalai.co/turkish-models) β Turkish open-weight LLMs
|
| 74 |
+
- [/benchmarks/quality](https://www.runlocalai.co/benchmarks/quality) β quality benchmark leaderboards
|
| 75 |
+
|
| 76 |
+
## Machine-readable endpoints
|
| 77 |
+
|
| 78 |
+
- Models JSON: `https://www.runlocalai.co/api/v1/models`
|
| 79 |
+
- Quality benchmarks: `https://www.runlocalai.co/api/v1/quality-benchmarks`
|
| 80 |
+
- OpenAPI spec: `https://www.runlocalai.co/api/v2/openapi`
|
app.py
ADDED
|
@@ -0,0 +1,385 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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|
+
"""
|
| 2 |
+
RunLocalAI catalog + leaderboard β HuggingFace Space.
|
| 3 |
+
|
| 4 |
+
Two live, read-only surfaces over the RunLocalAI corpus:
|
| 5 |
+
|
| 6 |
+
1. π Benchmark leaderboard β reproducible quality scores
|
| 7 |
+
(HumanEval+, MBPP+, TurkishMMLU) ranked per benchmark, each row
|
| 8 |
+
carrying provenance: run log, reproduction command, first-party /
|
| 9 |
+
community status. Source: GET /api/v1/quality-benchmarks.
|
| 10 |
+
|
| 11 |
+
2. π οΈ Model catalog β every open-weight model worth running locally,
|
| 12 |
+
with license tone, params, context, and vendor. Source:
|
| 13 |
+
GET /api/v1/models.
|
| 14 |
+
|
| 15 |
+
Both endpoints are public, keyless, CC-BY-4.0. The catalog at
|
| 16 |
+
runlocalai.co is the source of truth β this Space is a discovery surface
|
| 17 |
+
for the HuggingFace community. Click any model name to read the full
|
| 18 |
+
operator-grade page.
|
| 19 |
+
"""
|
| 20 |
+
|
| 21 |
+
import gradio as gr
|
| 22 |
+
import pandas as pd
|
| 23 |
+
import requests
|
| 24 |
+
|
| 25 |
+
SITE_URL = "https://www.runlocalai.co"
|
| 26 |
+
MODELS_URL = f"{SITE_URL}/api/v1/models"
|
| 27 |
+
QB_URL = f"{SITE_URL}/api/v1/quality-benchmarks"
|
| 28 |
+
API_LIMIT = 200 # /api/v1/models caps at 200; rows come pre-sorted by popularity
|
| 29 |
+
|
| 30 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 31 |
+
# Leaderboard (tab 1) β GET /api/v1/quality-benchmarks
|
| 32 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 33 |
+
|
| 34 |
+
STATUS_DISPLAY = {
|
| 35 |
+
"first-party": "β First-party",
|
| 36 |
+
"community": "π₯ Community",
|
| 37 |
+
"verified": "β
Verified",
|
| 38 |
+
"pending": "β³ Pending",
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
LB_COLS = ["Rank", "Benchmark", "Model", "Params (B)", "Quant", "Runtime", "Score", "Status", "Proof", "Tested"]
|
| 42 |
+
LB_DATATYPES = ["str", "str", "markdown", "number", "str", "str", "number", "str", "markdown", "str"]
|
| 43 |
+
ALL_BENCHMARKS = "All benchmarks"
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
def fetch_leaderboard():
|
| 47 |
+
"""Fetch quality-benchmark runs. Returns (runs_df, benchmarks_meta)."""
|
| 48 |
+
try:
|
| 49 |
+
r = requests.get(QB_URL, timeout=30)
|
| 50 |
+
r.raise_for_status()
|
| 51 |
+
payload = r.json()
|
| 52 |
+
except Exception as exc: # noqa: BLE001
|
| 53 |
+
return pd.DataFrame({"Error": [f"Could not fetch leaderboard: {exc}"]}), {}
|
| 54 |
+
|
| 55 |
+
benchmarks = {b.get("slug"): b for b in payload.get("benchmarks", []) if isinstance(b, dict)}
|
| 56 |
+
runs = payload.get("runs", []) or []
|
| 57 |
+
if not runs:
|
| 58 |
+
return pd.DataFrame({"Status": ["No benchmark runs yet"]}), benchmarks
|
| 59 |
+
|
| 60 |
+
records = []
|
| 61 |
+
for run in runs:
|
| 62 |
+
if not isinstance(run, dict):
|
| 63 |
+
continue
|
| 64 |
+
bslug = run.get("benchmark") or ""
|
| 65 |
+
bdef = benchmarks.get(bslug, {})
|
| 66 |
+
bname = bdef.get("name") or bslug or "β"
|
| 67 |
+
|
| 68 |
+
mslug = run.get("model_slug") or ""
|
| 69 |
+
mname = run.get("model_name") or mslug or "β"
|
| 70 |
+
model_link = f"[{mname}]({SITE_URL}/models/{mslug})" if mslug else mname
|
| 71 |
+
|
| 72 |
+
score = run.get("score")
|
| 73 |
+
score_val = round(float(score), 1) if isinstance(score, (int, float)) else None
|
| 74 |
+
|
| 75 |
+
log_url = run.get("test_run_log_url") or ""
|
| 76 |
+
proof = f"[run log]({log_url})" if log_url else "β"
|
| 77 |
+
|
| 78 |
+
status = run.get("submission_status") or ""
|
| 79 |
+
tested = (run.get("tested_at") or "")[:10]
|
| 80 |
+
|
| 81 |
+
records.append({
|
| 82 |
+
"Benchmark": bname,
|
| 83 |
+
"Model": model_link,
|
| 84 |
+
"Params (B)": run.get("model_params_b"),
|
| 85 |
+
"Quant": run.get("quant") or "β",
|
| 86 |
+
"Runtime": run.get("runtime") or "β",
|
| 87 |
+
"Score": score_val,
|
| 88 |
+
"Status": STATUS_DISPLAY.get(status, status or "β"),
|
| 89 |
+
"Proof": proof,
|
| 90 |
+
"Tested": tested or "β",
|
| 91 |
+
"_benchmark": bname,
|
| 92 |
+
"_score_raw": float(score) if isinstance(score, (int, float)) else -1.0,
|
| 93 |
+
})
|
| 94 |
+
|
| 95 |
+
return pd.DataFrame(records), benchmarks
|
| 96 |
+
|
| 97 |
+
|
| 98 |
+
def leaderboard_view(df: pd.DataFrame, benchmark_label: str) -> pd.DataFrame:
|
| 99 |
+
"""Filter to a benchmark (or all), rank by score within each, add medals."""
|
| 100 |
+
if "_score_raw" not in df.columns: # error / empty passthrough
|
| 101 |
+
return df
|
| 102 |
+
out = df.copy()
|
| 103 |
+
if benchmark_label and benchmark_label != ALL_BENCHMARKS:
|
| 104 |
+
out = out[out["_benchmark"] == benchmark_label]
|
| 105 |
+
if out.empty:
|
| 106 |
+
return pd.DataFrame({"Status": ["No runs for this benchmark yet"]})
|
| 107 |
+
|
| 108 |
+
out = out.sort_values(["_benchmark", "_score_raw"], ascending=[True, False])
|
| 109 |
+
ranks = out.groupby("_benchmark")["_score_raw"].rank(ascending=False, method="min").astype(int)
|
| 110 |
+
medal = {1: "π₯", 2: "π₯", 3: "π₯"}
|
| 111 |
+
out["Rank"] = [medal.get(int(rk), str(int(rk))) for rk in ranks]
|
| 112 |
+
return out[LB_COLS].reset_index(drop=True)
|
| 113 |
+
|
| 114 |
+
|
| 115 |
+
def benchmark_blurb(benchmarks: dict) -> str:
|
| 116 |
+
"""Render the 'what these benchmarks measure' note from API metadata."""
|
| 117 |
+
if not benchmarks:
|
| 118 |
+
return ""
|
| 119 |
+
lines = ["### What these scores mean\n"]
|
| 120 |
+
for b in benchmarks.values():
|
| 121 |
+
name = b.get("name", "")
|
| 122 |
+
metric = b.get("metric", {}) or {}
|
| 123 |
+
unit = f"{metric.get('label', '')} {metric.get('unit', '')}".strip()
|
| 124 |
+
src = b.get("source", {}) or {}
|
| 125 |
+
authors = src.get("authors", "")
|
| 126 |
+
url = src.get("url", "")
|
| 127 |
+
cats = ", ".join(b.get("categories", []) or [])
|
| 128 |
+
src_link = f"[dataset]({url})" if url else ""
|
| 129 |
+
lines.append(f"- **{name}** β {unit} Β· _{cats}_ Β· {authors} {src_link}".rstrip())
|
| 130 |
+
lines.append(
|
| 131 |
+
"\nEvery run is **measured first-party** on real consumer hardware and carries a public "
|
| 132 |
+
"run log + a one-line reproduction command. "
|
| 133 |
+
f"Methodology: [runlocalai.co/benchmarks/methodology]({SITE_URL}/benchmarks/methodology)."
|
| 134 |
+
)
|
| 135 |
+
return "\n".join(lines)
|
| 136 |
+
|
| 137 |
+
|
| 138 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 139 |
+
# Catalog (tab 2) β GET /api/v1/models
|
| 140 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 141 |
+
|
| 142 |
+
MODALITY_DISPLAY = {
|
| 143 |
+
"text": "π¬ Text",
|
| 144 |
+
"vision": "ποΈ Vision",
|
| 145 |
+
"audio": "ποΈ Audio",
|
| 146 |
+
"video": "π₯ Video",
|
| 147 |
+
"embedding": "π Embedding",
|
| 148 |
+
"rerank": "π Rerank",
|
| 149 |
+
"image-gen": "π¨ Image-gen",
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
CAT_HIDDEN = ["_modality_raw", "_params_raw", "_commercial_raw", "_family"]
|
| 153 |
+
CAT_DATATYPES = ["markdown", "str", "str", "str", "str", "str", "str", "markdown", "number", "number"]
|
| 154 |
+
|
| 155 |
+
|
| 156 |
+
def fetch_catalog() -> pd.DataFrame:
|
| 157 |
+
"""Fetch the latest model catalog. Falls back gracefully on error."""
|
| 158 |
+
try:
|
| 159 |
+
r = requests.get(MODELS_URL, params={"limit": API_LIMIT}, timeout=30)
|
| 160 |
+
if r.status_code == 401:
|
| 161 |
+
return pd.DataFrame(
|
| 162 |
+
{"Error": ["Catalog API requires a key right now. "
|
| 163 |
+
"Browse the full catalog at runlocalai.co/models"]}
|
| 164 |
+
)
|
| 165 |
+
r.raise_for_status()
|
| 166 |
+
payload = r.json()
|
| 167 |
+
if isinstance(payload, dict):
|
| 168 |
+
rows = payload.get("data") or payload.get("models") or []
|
| 169 |
+
elif isinstance(payload, list):
|
| 170 |
+
rows = payload
|
| 171 |
+
else:
|
| 172 |
+
rows = []
|
| 173 |
+
except Exception as exc: # noqa: BLE001
|
| 174 |
+
return pd.DataFrame({"Error": [f"Could not fetch catalog: {exc}"]})
|
| 175 |
+
|
| 176 |
+
if not rows:
|
| 177 |
+
return pd.DataFrame({"Status": ["Catalog is empty"]})
|
| 178 |
+
|
| 179 |
+
records = []
|
| 180 |
+
for m in rows:
|
| 181 |
+
if not isinstance(m, dict):
|
| 182 |
+
continue
|
| 183 |
+
modalities = m.get("modalities") or ["text"]
|
| 184 |
+
modality = modalities[0] if isinstance(modalities, list) and modalities else "text"
|
| 185 |
+
|
| 186 |
+
params_b = m.get("parameter_count_b") or 0
|
| 187 |
+
if params_b and params_b < 1:
|
| 188 |
+
params_label = f"{int(round(params_b * 1000))}M"
|
| 189 |
+
elif params_b:
|
| 190 |
+
params_label = f"{params_b}B"
|
| 191 |
+
else:
|
| 192 |
+
params_label = "β"
|
| 193 |
+
|
| 194 |
+
commercial = "β
Yes" if m.get("license_commercial_ok") else "β οΈ Restricted"
|
| 195 |
+
license_short = (m.get("license") or "β")[:24]
|
| 196 |
+
|
| 197 |
+
ctx = m.get("context_length") or 0
|
| 198 |
+
ctx_label = f"{int(ctx / 1024)}K" if ctx >= 1024 else (f"{ctx}" if ctx > 0 else "β")
|
| 199 |
+
|
| 200 |
+
slug = m.get("slug", "") or ""
|
| 201 |
+
name = m.get("name") or slug or "β"
|
| 202 |
+
name_link = f"[{name}]({SITE_URL}/models/{slug})" if slug else name
|
| 203 |
+
|
| 204 |
+
hf_repo = m.get("hf_repo") or ""
|
| 205 |
+
hf_link = f"[hf.co/{hf_repo}](https://huggingface.co/{hf_repo})" if hf_repo else "β"
|
| 206 |
+
|
| 207 |
+
rating = m.get("our_rating_score")
|
| 208 |
+
rating_val = round(float(rating), 1) if isinstance(rating, (int, float)) else 0.0
|
| 209 |
+
|
| 210 |
+
records.append({
|
| 211 |
+
"Model": name_link,
|
| 212 |
+
"Modality": MODALITY_DISPLAY.get(modality, modality),
|
| 213 |
+
"Params": params_label,
|
| 214 |
+
"Context": ctx_label,
|
| 215 |
+
"License": license_short,
|
| 216 |
+
"Commercial": commercial,
|
| 217 |
+
"Vendor": m.get("vendor") or "β",
|
| 218 |
+
"HuggingFace": hf_link,
|
| 219 |
+
"Rating": rating_val,
|
| 220 |
+
"Popularity": m.get("popularity_score") or 0,
|
| 221 |
+
"_modality_raw": modality,
|
| 222 |
+
"_params_raw": float(params_b) if params_b else 0.0,
|
| 223 |
+
"_commercial_raw": bool(m.get("license_commercial_ok")),
|
| 224 |
+
"_family": m.get("family") or "other",
|
| 225 |
+
})
|
| 226 |
+
|
| 227 |
+
if not records:
|
| 228 |
+
return pd.DataFrame({"Status": ["Catalog is empty"]})
|
| 229 |
+
|
| 230 |
+
df = pd.DataFrame(records)
|
| 231 |
+
return df.sort_values("Popularity", ascending=False).reset_index(drop=True)
|
| 232 |
+
|
| 233 |
+
|
| 234 |
+
def apply_filters(df, modality, commercial_only, max_params, family, search):
|
| 235 |
+
if not all(c in df.columns for c in CAT_HIDDEN): # error / status passthrough
|
| 236 |
+
return df
|
| 237 |
+
out = df.copy()
|
| 238 |
+
if modality and modality != "All":
|
| 239 |
+
out = out[out["_modality_raw"] == modality]
|
| 240 |
+
if commercial_only:
|
| 241 |
+
out = out[out["_commercial_raw"]]
|
| 242 |
+
if max_params and max_params < 200: # 200 = no cap
|
| 243 |
+
out = out[out["_params_raw"] <= max_params]
|
| 244 |
+
if family and family != "All":
|
| 245 |
+
out = out[out["_family"] == family]
|
| 246 |
+
if search:
|
| 247 |
+
s = search.lower().strip()
|
| 248 |
+
mask = (
|
| 249 |
+
out["Model"].str.lower().str.contains(s, na=False)
|
| 250 |
+
| out["Vendor"].str.lower().str.contains(s, na=False)
|
| 251 |
+
| out["HuggingFace"].str.lower().str.contains(s, na=False)
|
| 252 |
+
)
|
| 253 |
+
out = out[mask]
|
| 254 |
+
return out.drop(columns=CAT_HIDDEN)
|
| 255 |
+
|
| 256 |
+
|
| 257 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 258 |
+
# Initial data load
|
| 259 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 260 |
+
|
| 261 |
+
LB_DATA, BENCHMARKS = fetch_leaderboard()
|
| 262 |
+
CATALOG = fetch_catalog()
|
| 263 |
+
|
| 264 |
+
benchmark_options = [ALL_BENCHMARKS] + sorted(
|
| 265 |
+
{b.get("name") for b in BENCHMARKS.values() if b.get("name")}
|
| 266 |
+
)
|
| 267 |
+
modality_options = ["All"] + sorted({m for m in CATALOG.get("_modality_raw", []) if isinstance(m, str)})
|
| 268 |
+
family_options = ["All"] + sorted({f for f in CATALOG.get("_family", []) if isinstance(f, str)})
|
| 269 |
+
|
| 270 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 271 |
+
# UI
|
| 272 |
+
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 273 |
+
|
| 274 |
+
with gr.Blocks(
|
| 275 |
+
title="RunLocalAI β local AI leaderboard & catalog",
|
| 276 |
+
theme=gr.themes.Soft(primary_hue="amber", neutral_hue="slate"),
|
| 277 |
+
) as demo:
|
| 278 |
+
gr.Markdown(
|
| 279 |
+
f"""
|
| 280 |
+
# π οΈ RunLocalAI β local AI leaderboard & catalog
|
| 281 |
+
|
| 282 |
+
Reproducible benchmark scores and the full open-weight model catalog for running AI on
|
| 283 |
+
**your own hardware**. Every benchmark is measured first-party with a public run log and a
|
| 284 |
+
one-line reproduction command β no vibes, no leaderboard laundering.
|
| 285 |
+
|
| 286 |
+
Source of truth: **[runlocalai.co]({SITE_URL})** Β· Data license: **CC-BY-4.0** Β·
|
| 287 |
+
Click any model name for the full operator-grade page.
|
| 288 |
+
"""
|
| 289 |
+
)
|
| 290 |
+
|
| 291 |
+
with gr.Tabs():
|
| 292 |
+
# ββ Tab 1: Leaderboard ββββββββββββββββββββββββββββββββββββββββββββ
|
| 293 |
+
with gr.Tab("π Benchmark leaderboard"):
|
| 294 |
+
gr.Markdown(
|
| 295 |
+
"Ranked, reproducible quality scores on real consumer GPUs. "
|
| 296 |
+
"Pick a benchmark to see the head-to-head ranking."
|
| 297 |
+
)
|
| 298 |
+
benchmark_dd = gr.Dropdown(
|
| 299 |
+
benchmark_options, value=ALL_BENCHMARKS, label="Benchmark", interactive=True
|
| 300 |
+
)
|
| 301 |
+
lb_table = gr.Dataframe(
|
| 302 |
+
value=leaderboard_view(LB_DATA, ALL_BENCHMARKS),
|
| 303 |
+
interactive=False,
|
| 304 |
+
wrap=True,
|
| 305 |
+
datatype=LB_DATATYPES,
|
| 306 |
+
)
|
| 307 |
+
lb_refresh = gr.Button("π Refresh leaderboard", variant="secondary")
|
| 308 |
+
gr.Markdown(benchmark_blurb(BENCHMARKS))
|
| 309 |
+
|
| 310 |
+
def _lb_filter(label):
|
| 311 |
+
return leaderboard_view(LB_DATA, label)
|
| 312 |
+
|
| 313 |
+
def _lb_refresh(label):
|
| 314 |
+
global LB_DATA, BENCHMARKS
|
| 315 |
+
LB_DATA, BENCHMARKS = fetch_leaderboard()
|
| 316 |
+
return leaderboard_view(LB_DATA, label)
|
| 317 |
+
|
| 318 |
+
benchmark_dd.change(_lb_filter, inputs=benchmark_dd, outputs=lb_table)
|
| 319 |
+
lb_refresh.click(_lb_refresh, inputs=benchmark_dd, outputs=lb_table)
|
| 320 |
+
|
| 321 |
+
# ββ Tab 2: Catalog ββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 322 |
+
with gr.Tab("π οΈ Model catalog"):
|
| 323 |
+
gr.Markdown(
|
| 324 |
+
"Every open-weight model worth running locally β LLMs, embeddings, rerankers, "
|
| 325 |
+
"ASR, TTS, diffusion, vision encoders β with license tone and VRAM math."
|
| 326 |
+
)
|
| 327 |
+
with gr.Row():
|
| 328 |
+
modality_dd = gr.Dropdown(modality_options, value="All", label="Modality", interactive=True)
|
| 329 |
+
family_dd = gr.Dropdown(family_options, value="All", label="Family", interactive=True)
|
| 330 |
+
max_params_slider = gr.Slider(
|
| 331 |
+
minimum=0.1, maximum=200, value=200, step=0.5,
|
| 332 |
+
label="Max params (B). 200 = no cap.",
|
| 333 |
+
)
|
| 334 |
+
with gr.Row():
|
| 335 |
+
search_box = gr.Textbox(
|
| 336 |
+
label="Search (model / vendor / hf repo)",
|
| 337 |
+
placeholder="qwen, kokoro, gemma, deepseek β¦",
|
| 338 |
+
)
|
| 339 |
+
commercial_only = gr.Checkbox(label="Commercial-license only", value=False)
|
| 340 |
+
|
| 341 |
+
cat_table = gr.Dataframe(
|
| 342 |
+
value=apply_filters(CATALOG, "All", False, 200, "All", ""),
|
| 343 |
+
interactive=False,
|
| 344 |
+
wrap=True,
|
| 345 |
+
datatype=CAT_DATATYPES,
|
| 346 |
+
)
|
| 347 |
+
cat_refresh = gr.Button("π Refresh catalog", variant="secondary")
|
| 348 |
+
|
| 349 |
+
cat_inputs = [modality_dd, commercial_only, max_params_slider, family_dd, search_box]
|
| 350 |
+
|
| 351 |
+
def _cat_filter(mod, com, mp, fam, search):
|
| 352 |
+
return apply_filters(CATALOG, mod, com, mp, fam, search)
|
| 353 |
+
|
| 354 |
+
def _cat_refresh(mod, com, mp, fam, search):
|
| 355 |
+
global CATALOG
|
| 356 |
+
CATALOG = fetch_catalog()
|
| 357 |
+
return apply_filters(CATALOG, mod, com, mp, fam, search)
|
| 358 |
+
|
| 359 |
+
for ctrl in cat_inputs:
|
| 360 |
+
ctrl.change(_cat_filter, inputs=cat_inputs, outputs=cat_table)
|
| 361 |
+
cat_refresh.click(_cat_refresh, inputs=cat_inputs, outputs=cat_table)
|
| 362 |
+
|
| 363 |
+
gr.Markdown(
|
| 364 |
+
f"""
|
| 365 |
+
---
|
| 366 |
+
**Catalog hubs:**
|
| 367 |
+
[Small LMs]({SITE_URL}/small-language-models) Β·
|
| 368 |
+
[Embeddings]({SITE_URL}/embeddings) Β·
|
| 369 |
+
[Audio]({SITE_URL}/audio) Β·
|
| 370 |
+
[Image]({SITE_URL}/image-models) Β·
|
| 371 |
+
[Coding]({SITE_URL}/coding-models) Β·
|
| 372 |
+
[Turkish]({SITE_URL}/turkish-models) Β·
|
| 373 |
+
[Benchmarks]({SITE_URL}/benchmarks)
|
| 374 |
+
|
| 375 |
+
**Machine-readable:**
|
| 376 |
+
[models]({MODELS_URL}) Β·
|
| 377 |
+
[quality-benchmarks]({QB_URL}) Β·
|
| 378 |
+
[OpenAPI]({SITE_URL}/api/v2/openapi)
|
| 379 |
+
|
| 380 |
+
Data licensed **CC-BY-4.0** β attribute to runlocalai.co with a link.
|
| 381 |
+
"""
|
| 382 |
+
)
|
| 383 |
+
|
| 384 |
+
if __name__ == "__main__":
|
| 385 |
+
demo.launch()
|
requirements.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
gradio==5.49.1
|
| 2 |
+
pandas==2.2.3
|
| 3 |
+
requests==2.32.3
|