Commit
·
e591627
1
Parent(s):
4695104
Enhance README with example visualization and add batch size option for GPU processing
Browse files
README.md
CHANGED
|
@@ -5,7 +5,9 @@ tags: [uv-script]
|
|
| 5 |
|
| 6 |
# 🗺️ Atlas Export - One-Click Embedding Visualizations
|
| 7 |
|
| 8 |
-
Generate and deploy interactive embedding visualizations to HuggingFace Spaces with a single command.
|
|
|
|
|
|
|
| 9 |
|
| 10 |
## Quick Start
|
| 11 |
|
|
@@ -17,6 +19,8 @@ uv run atlas-export.py stanfordnlp/imdb --space-name my-imdb-viz
|
|
| 17 |
# https://huggingface.co/spaces/YOUR_USERNAME/my-imdb-viz
|
| 18 |
```
|
| 19 |
|
|
|
|
|
|
|
| 20 |
## Examples
|
| 21 |
|
| 22 |
### Image Datasets
|
|
@@ -68,24 +72,35 @@ hf jobs uv run --flavor t4-small \
|
|
| 68 |
--space-name imdb-viz \
|
| 69 |
--model sentence-transformers/all-mpnet-base-v2 \
|
| 70 |
--sample 10000
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
```
|
| 72 |
|
| 73 |
-
Note: Replace `your-token-here` with your actual token. Available GPU flavors: `t4-small`, `t4-medium`, `l4x1`, `a10g-small`.
|
| 74 |
|
| 75 |
## Key Options
|
| 76 |
|
| 77 |
-
| Option
|
| 78 |
-
|
| 79 |
-
| `dataset_id`
|
| 80 |
-
| `--space-name`
|
| 81 |
-
| `--model`
|
| 82 |
-
| `--text-column`
|
| 83 |
-
| `--image-column` | Column containing images
|
| 84 |
-
| `--sample`
|
| 85 |
-
| `--
|
| 86 |
-
| `--
|
| 87 |
-
| `--
|
| 88 |
-
| `--
|
|
|
|
| 89 |
|
| 90 |
Run without arguments to see all options and more examples.
|
| 91 |
|
|
@@ -104,4 +119,4 @@ Built on [Embedding Atlas](https://github.com/apple/embedding-atlas) by Apple. S
|
|
| 104 |
|
| 105 |
---
|
| 106 |
|
| 107 |
-
Part of the [UV Scripts](https://huggingface.co/uv-scripts) collection 🚀
|
|
|
|
| 5 |
|
| 6 |
# 🗺️ Atlas Export - One-Click Embedding Visualizations
|
| 7 |
|
| 8 |
+
Generate and deploy interactive embedding visualizations to HuggingFace Spaces with a single command using Apple's [Embedding Atlas](https://github.com/apple/embedding-atlas) library!
|
| 9 |
+
|
| 10 |
+

|
| 11 |
|
| 12 |
## Quick Start
|
| 13 |
|
|
|
|
| 19 |
# https://huggingface.co/spaces/YOUR_USERNAME/my-imdb-viz
|
| 20 |
```
|
| 21 |
|
| 22 |
+
**⚠️ Note:** Currently this approach is limited by storage capacity for files on Spaces so for big datasets consider using the `--sample` option to limit the number of points visualized!
|
| 23 |
+
|
| 24 |
## Examples
|
| 25 |
|
| 26 |
### Image Datasets
|
|
|
|
| 72 |
--space-name imdb-viz \
|
| 73 |
--model sentence-transformers/all-mpnet-base-v2 \
|
| 74 |
--sample 10000
|
| 75 |
+
|
| 76 |
+
# With larger GPU and custom batch size for faster processing
|
| 77 |
+
hf jobs uv run --flavor a10g-large \
|
| 78 |
+
-s HF_TOKEN=your-token-here \
|
| 79 |
+
https://huggingface.co/datasets/uv-scripts/build-atlas/raw/main/atlas-export.py \
|
| 80 |
+
your-dataset \
|
| 81 |
+
--space-name your-atlas \
|
| 82 |
+
--batch-size 64 \
|
| 83 |
+
--sample 50000 \
|
| 84 |
+
--text-column output
|
| 85 |
```
|
| 86 |
|
| 87 |
+
Note: Replace `your-token-here` with your actual token. Available GPU flavors: `t4-small`, `t4-medium`, `l4x1`, `a10g-small`, `a10g-large`.
|
| 88 |
|
| 89 |
## Key Options
|
| 90 |
|
| 91 |
+
| Option | Description | Default |
|
| 92 |
+
| ---------------- | ----------------------------------- | ---------------------- |
|
| 93 |
+
| `dataset_id` | HuggingFace dataset to visualize | Required |
|
| 94 |
+
| `--space-name` | Name for your Space | Required |
|
| 95 |
+
| `--model` | Embedding model to use | Auto-selected |
|
| 96 |
+
| `--text-column` | Column containing text | "text" |
|
| 97 |
+
| `--image-column` | Column containing images | None |
|
| 98 |
+
| `--sample` | Number of samples to visualize | All |
|
| 99 |
+
| `--batch-size` | Batch size for embedding generation | 32 (text), 16 (images) |
|
| 100 |
+
| `--split` | Dataset split to use | "train" |
|
| 101 |
+
| `--local-only` | Generate locally without deploying | False |
|
| 102 |
+
| `--output-dir` | Local output directory | Temp dir |
|
| 103 |
+
| `--hf-token` | HuggingFace API token | From env/CLI |
|
| 104 |
|
| 105 |
Run without arguments to see all options and more examples.
|
| 106 |
|
|
|
|
| 119 |
|
| 120 |
---
|
| 121 |
|
| 122 |
+
Part of the [UV Scripts](https://huggingface.co/uv-scripts) collection 🚀
|