narinzar's picture
Add sample MiniLM embeddings, throughput summary, and dataset card
bef4b69 verified
|
Raw
History Blame Contribute Delete
1.95 kB
---
license: mit
task_categories:
- feature-extraction
language:
- en
tags:
- embeddings
- sentence-transformers
- all-MiniLM-L6-v2
- feature-extraction
pretty_name: Distributed Embedding Generation Queue Sample
size_categories:
- n<1K
---
# Distributed Embedding Generation Queue - Sample Embeddings
Sample text embeddings produced by a durable producer/consumer GPU queue with
resume-on-crash support. Source code:
[github.com/narinzar/distributed-embedding-generation-queue](https://github.com/narinzar/distributed-embedding-generation-queue).
## Generation method
- **Model:** `sentence-transformers/all-MiniLM-L6-v2` (384-dimensional vectors).
- **Pipeline:** a durable SQLite task queue (WAL mode) feeds a GPU worker pool.
Items are claimed atomically, embedded in batches, written as `.npy` files, and
marked done. Orphaned `in_progress` items are re-queued on restart, so a run
resumes without re-embedding finished items. Batch size is tuned to GPU headroom
by an autobatcher (grows with free VRAM, shrinks on a caught OOM).
- **Run:** 500 text items embedded on an RTX 5090 at 33.9 items/s (wall 14.76s,
single worker). This was a small-scale single-worker run; the architecture
supports scaling the worker count, and multi-worker throughput scaling is
reproducible on Linux.
## Contents
- `sample_embeddings.npy` - a 200 x 384 `float32` array, the first 200 vectors of
the 500-item run.
- `sample_ids.txt` - the item ids for those 200 vectors, one per line, aligned by
row order.
- `throughput.json` - the run summary: model, device, autobatch configuration,
queue transition counts, and measured throughput.
## Usage
```python
import numpy as np
from huggingface_hub import hf_hub_download
path = hf_hub_download(
repo_id="narinzar/distributed-embedding-generation-queue",
filename="sample_embeddings.npy",
repo_type="dataset",
)
vecs = np.load(path) # (200, 384) float32
```
## License
MIT.