File size: 1,948 Bytes
bef4b69 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 | ---
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.
|