Commit ·
6891a80
1
Parent(s): f93691f
Update README with bucket pipeline docs and benchmarks
Browse filesReorganize to lead with the new bucket-based pipeline (Jobs + Buckets +
Spaces) as the recommended approach. Add performance benchmarks, flow
diagram, and prep step examples. Move static export scripts to legacy section.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
README.md
CHANGED
|
@@ -1,30 +1,105 @@
|
|
| 1 |
---
|
| 2 |
viewer: false
|
| 3 |
-
tags: [uv-script, hf-jobs]
|
| 4 |
---
|
| 5 |
|
| 6 |
# Atlas Export
|
| 7 |
|
| 8 |
-
[Embedding Atlas](https://github.com/apple/embedding-atlas) is an open-source library from Apple for creating interactive, browser-based visualizations of embedding spaces. It renders millions of data points with WebGPU acceleration, supports real-time search and filtering, and automatically generates cluster labels
|
| 9 |
|
| 10 |
-
These scripts wrap Embedding Atlas to make it easy to go from a HuggingFace dataset to a deployed visualization
|
| 11 |
|
| 12 |

|
| 13 |
|
| 14 |
## Scripts
|
| 15 |
|
| 16 |
-
This repo contains two scripts:
|
| 17 |
-
|
| 18 |
| Script | Description | Best for |
|
| 19 |
|--------|-------------|----------|
|
| 20 |
-
| `atlas-
|
| 21 |
-
| `atlas-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
|
| 23 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
|
| 25 |
-
|
| 26 |
|
| 27 |
-
##
|
| 28 |
|
| 29 |
### Basic (data embedded in Space)
|
| 30 |
|
|
@@ -32,7 +107,7 @@ This repo contains two scripts:
|
|
| 32 |
uv run atlas-export.py stanfordnlp/imdb --space-name my-imdb-viz
|
| 33 |
```
|
| 34 |
|
| 35 |
-
### Remote data
|
| 36 |
|
| 37 |
```bash
|
| 38 |
uv run atlas-export-remote.py stanfordnlp/imdb \
|
|
@@ -215,13 +290,14 @@ Run either script without arguments to see all options.
|
|
| 215 |
|
| 216 |
## Live Examples
|
| 217 |
|
|
|
|
|
|
|
| 218 |
- [arxiv-cs-atlas](https://huggingface.co/spaces/librarian-bots/arxiv-cs-atlas) — 215K arXiv CS papers (lance format)
|
| 219 |
-
- [finephrase-faq-atlas](https://huggingface.co/spaces/davanstrien/finephrase-faq-atlas) — 50K FAQ entries (glob pattern)
|
| 220 |
|
| 221 |
## Credits
|
| 222 |
|
| 223 |
-
Built on [Embedding Atlas](https://github.com/apple/embedding-atlas) by Apple (>= 0.
|
| 224 |
|
| 225 |
---
|
| 226 |
|
| 227 |
-
Part of the [UV Scripts](https://huggingface.co/uv-scripts) collection
|
|
|
|
| 1 |
---
|
| 2 |
viewer: false
|
| 3 |
+
tags: [uv-script, hf-jobs, hf-buckets]
|
| 4 |
---
|
| 5 |
|
| 6 |
# Atlas Export
|
| 7 |
|
| 8 |
+
[Embedding Atlas](https://github.com/apple/embedding-atlas) is an open-source library from Apple for creating interactive, browser-based visualizations of embedding spaces. It renders millions of data points with WebGPU acceleration, supports real-time search and filtering, and automatically generates cluster labels.
|
| 9 |
|
| 10 |
+
These scripts wrap Embedding Atlas to make it easy to go from a HuggingFace dataset to a deployed visualization. See [open-library-atlas](https://huggingface.co/spaces/davanstrien/atlas-bucket-test) for a live example (2M books).
|
| 11 |
|
| 12 |

|
| 13 |
|
| 14 |
## Scripts
|
| 15 |
|
|
|
|
|
|
|
| 16 |
| Script | Description | Best for |
|
| 17 |
|--------|-------------|----------|
|
| 18 |
+
| **`atlas-e2e.py`** | End-to-end: dataset to deployed Space (experimental) | One-command pipeline |
|
| 19 |
+
| **`atlas-build-gpu.py`** | GPU atlas build with cuml.accel UMAP | Running as an HF Job |
|
| 20 |
+
| **`atlas-deploy.py`** | Deploy a Space from bucket data | Deploying existing builds |
|
| 21 |
+
| `atlas-export.py` | All-in-one static export | Small datasets (<10GB) |
|
| 22 |
+
| `atlas-export-remote.py` | Static export with remote data | Medium datasets |
|
| 23 |
+
|
| 24 |
+
## Bucket Pipeline (Recommended)
|
| 25 |
+
|
| 26 |
+
The new pipeline uses [Storage Buckets](https://huggingface.co/docs/hub/storage-buckets) + [Jobs](https://huggingface.co/docs/hub/jobs) + [Spaces](https://huggingface.co/docs/hub/spaces) for large-scale visualizations:
|
| 27 |
+
|
| 28 |
+
```
|
| 29 |
+
atlas-e2e.py (local orchestrator)
|
| 30 |
+
│
|
| 31 |
+
├─ 1. Creates Storage Bucket
|
| 32 |
+
│
|
| 33 |
+
├─ 2. Submits GPU Job (atlas-build-gpu.py)
|
| 34 |
+
│ • Embeds text/images on GPU
|
| 35 |
+
│ • UMAP via cuml.accel (~50x faster)
|
| 36 |
+
│ • Writes parquet to bucket
|
| 37 |
+
│
|
| 38 |
+
└─ 3. Deploys Docker Space (atlas-deploy.py)
|
| 39 |
+
• Mounts bucket (read-only)
|
| 40 |
+
• Serves embedding-atlas in server mode
|
| 41 |
+
• Server-side DuckDB (not browser WASM)
|
| 42 |
+
```
|
| 43 |
+
|
| 44 |
+
### Quick Start
|
| 45 |
+
|
| 46 |
+
```bash
|
| 47 |
+
# One command: dataset → deployed Space
|
| 48 |
+
uv run atlas-e2e.py stanfordnlp/imdb \
|
| 49 |
+
--text text --split train \
|
| 50 |
+
--name imdb-atlas --sample 50000
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
### Step by Step
|
| 54 |
+
|
| 55 |
+
```bash
|
| 56 |
+
# 1. Build atlas on GPU (runs as HF Job)
|
| 57 |
+
hf jobs uv run --flavor a100-large \
|
| 58 |
+
-v hf://buckets/user/atlas-data:/data \
|
| 59 |
+
-s HF_TOKEN --timeout 2h \
|
| 60 |
+
atlas-build-gpu.py my-org/my-dataset \
|
| 61 |
+
--text text --name my-atlas --sample 1000000
|
| 62 |
+
|
| 63 |
+
# 2. Deploy Space from bucket
|
| 64 |
+
uv run atlas-deploy.py \
|
| 65 |
+
--name my-atlas \
|
| 66 |
+
--bucket user/atlas-data \
|
| 67 |
+
--space-id user/my-atlas-viz
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
### With a Prep Step (for filtering/enrichment)
|
| 71 |
+
|
| 72 |
+
```bash
|
| 73 |
+
# Prep: filter and add categories with DuckDB
|
| 74 |
+
hf jobs uv run --flavor cpu-upgrade \
|
| 75 |
+
-v hf://buckets/user/atlas-data:/output \
|
| 76 |
+
-s HF_TOKEN \
|
| 77 |
+
open-library-prep.py --output /output/books/books.parquet
|
| 78 |
+
|
| 79 |
+
# Build: embed the prepped data
|
| 80 |
+
hf jobs uv run --flavor a100-large \
|
| 81 |
+
-v hf://buckets/user/atlas-data:/data \
|
| 82 |
+
-s HF_TOKEN --timeout 2h \
|
| 83 |
+
atlas-build-gpu.py /data/books/books.parquet \
|
| 84 |
+
--text title --name books-atlas --sample 2000000
|
| 85 |
+
|
| 86 |
+
# Deploy
|
| 87 |
+
uv run atlas-deploy.py --name books-atlas --bucket user/atlas-data
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
### GPU UMAP Performance
|
| 91 |
+
|
| 92 |
+
The build script uses [cuml.accel](https://docs.rapids.ai/api/cuml/stable/cuml-accel/) for zero-code-change GPU acceleration of UMAP. No changes to embedding-atlas needed — just an environment variable.
|
| 93 |
|
| 94 |
+
| Dataset | Rows | Time (A100) | Cost |
|
| 95 |
+
|---------|------|-------------|------|
|
| 96 |
+
| IMDB | 5K | ~1 min | $0.04 |
|
| 97 |
+
| TinyStories | 1M | ~20 min | $0.83 |
|
| 98 |
+
| Open Library | 2M | ~40 min | $1.67 |
|
| 99 |
|
| 100 |
+
For comparison: CPU UMAP on 250K rows took >2 hours.
|
| 101 |
|
| 102 |
+
## Legacy Scripts
|
| 103 |
|
| 104 |
### Basic (data embedded in Space)
|
| 105 |
|
|
|
|
| 107 |
uv run atlas-export.py stanfordnlp/imdb --space-name my-imdb-viz
|
| 108 |
```
|
| 109 |
|
| 110 |
+
### Remote data
|
| 111 |
|
| 112 |
```bash
|
| 113 |
uv run atlas-export-remote.py stanfordnlp/imdb \
|
|
|
|
| 290 |
|
| 291 |
## Live Examples
|
| 292 |
|
| 293 |
+
- [open-library-atlas](https://huggingface.co/spaces/davanstrien/atlas-bucket-test) — 2M books with category coloring (bucket pipeline)
|
| 294 |
+
- [nemotron-v3-atlas](https://huggingface.co/spaces/davanstrien/nemotron-v3-atlas) — 250K NVIDIA training data samples
|
| 295 |
- [arxiv-cs-atlas](https://huggingface.co/spaces/librarian-bots/arxiv-cs-atlas) — 215K arXiv CS papers (lance format)
|
|
|
|
| 296 |
|
| 297 |
## Credits
|
| 298 |
|
| 299 |
+
Built on [Embedding Atlas](https://github.com/apple/embedding-atlas) by Apple (>= 0.19.1). GPU UMAP via [cuML](https://docs.rapids.ai/api/cuml/stable/cuml-accel/).
|
| 300 |
|
| 301 |
---
|
| 302 |
|
| 303 |
+
Part of the [UV Scripts](https://huggingface.co/uv-scripts) collection
|