narinzar commited on
Commit
bef4b69
·
verified ·
1 Parent(s): d23d699

Add sample MiniLM embeddings, throughput summary, and dataset card

Browse files
Files changed (4) hide show
  1. README.md +61 -0
  2. sample_embeddings.npy +3 -0
  3. sample_ids.txt +200 -0
  4. throughput.json +33 -0
README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ task_categories:
4
+ - feature-extraction
5
+ language:
6
+ - en
7
+ tags:
8
+ - embeddings
9
+ - sentence-transformers
10
+ - all-MiniLM-L6-v2
11
+ - feature-extraction
12
+ pretty_name: Distributed Embedding Generation Queue Sample
13
+ size_categories:
14
+ - n<1K
15
+ ---
16
+
17
+ # Distributed Embedding Generation Queue - Sample Embeddings
18
+
19
+ Sample text embeddings produced by a durable producer/consumer GPU queue with
20
+ resume-on-crash support. Source code:
21
+ [github.com/narinzar/distributed-embedding-generation-queue](https://github.com/narinzar/distributed-embedding-generation-queue).
22
+
23
+ ## Generation method
24
+
25
+ - **Model:** `sentence-transformers/all-MiniLM-L6-v2` (384-dimensional vectors).
26
+ - **Pipeline:** a durable SQLite task queue (WAL mode) feeds a GPU worker pool.
27
+ Items are claimed atomically, embedded in batches, written as `.npy` files, and
28
+ marked done. Orphaned `in_progress` items are re-queued on restart, so a run
29
+ resumes without re-embedding finished items. Batch size is tuned to GPU headroom
30
+ by an autobatcher (grows with free VRAM, shrinks on a caught OOM).
31
+ - **Run:** 500 text items embedded on an RTX 5090 at 33.9 items/s (wall 14.76s,
32
+ single worker). This was a small-scale single-worker run; the architecture
33
+ supports scaling the worker count, and multi-worker throughput scaling is
34
+ reproducible on Linux.
35
+
36
+ ## Contents
37
+
38
+ - `sample_embeddings.npy` - a 200 x 384 `float32` array, the first 200 vectors of
39
+ the 500-item run.
40
+ - `sample_ids.txt` - the item ids for those 200 vectors, one per line, aligned by
41
+ row order.
42
+ - `throughput.json` - the run summary: model, device, autobatch configuration,
43
+ queue transition counts, and measured throughput.
44
+
45
+ ## Usage
46
+
47
+ ```python
48
+ import numpy as np
49
+ from huggingface_hub import hf_hub_download
50
+
51
+ path = hf_hub_download(
52
+ repo_id="narinzar/distributed-embedding-generation-queue",
53
+ filename="sample_embeddings.npy",
54
+ repo_type="dataset",
55
+ )
56
+ vecs = np.load(path) # (200, 384) float32
57
+ ```
58
+
59
+ ## License
60
+
61
+ MIT.
sample_embeddings.npy ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c2488e6cc90eb143a9799ba547e9db1fe7fd1fa5f8e8354a26e982be033cbda0
3
+ size 307328
sample_ids.txt ADDED
@@ -0,0 +1,200 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ item_00000000
2
+ item_00000001
3
+ item_00000002
4
+ item_00000003
5
+ item_00000004
6
+ item_00000005
7
+ item_00000006
8
+ item_00000007
9
+ item_00000008
10
+ item_00000009
11
+ item_00000010
12
+ item_00000011
13
+ item_00000012
14
+ item_00000013
15
+ item_00000014
16
+ item_00000015
17
+ item_00000016
18
+ item_00000017
19
+ item_00000018
20
+ item_00000019
21
+ item_00000020
22
+ item_00000021
23
+ item_00000022
24
+ item_00000023
25
+ item_00000024
26
+ item_00000025
27
+ item_00000026
28
+ item_00000027
29
+ item_00000028
30
+ item_00000029
31
+ item_00000030
32
+ item_00000031
33
+ item_00000032
34
+ item_00000033
35
+ item_00000034
36
+ item_00000035
37
+ item_00000036
38
+ item_00000037
39
+ item_00000038
40
+ item_00000039
41
+ item_00000040
42
+ item_00000041
43
+ item_00000042
44
+ item_00000043
45
+ item_00000044
46
+ item_00000045
47
+ item_00000046
48
+ item_00000047
49
+ item_00000048
50
+ item_00000049
51
+ item_00000050
52
+ item_00000051
53
+ item_00000052
54
+ item_00000053
55
+ item_00000054
56
+ item_00000055
57
+ item_00000056
58
+ item_00000057
59
+ item_00000058
60
+ item_00000059
61
+ item_00000060
62
+ item_00000061
63
+ item_00000062
64
+ item_00000063
65
+ item_00000064
66
+ item_00000065
67
+ item_00000066
68
+ item_00000067
69
+ item_00000068
70
+ item_00000069
71
+ item_00000070
72
+ item_00000071
73
+ item_00000072
74
+ item_00000073
75
+ item_00000074
76
+ item_00000075
77
+ item_00000076
78
+ item_00000077
79
+ item_00000078
80
+ item_00000079
81
+ item_00000080
82
+ item_00000081
83
+ item_00000082
84
+ item_00000083
85
+ item_00000084
86
+ item_00000085
87
+ item_00000086
88
+ item_00000087
89
+ item_00000088
90
+ item_00000089
91
+ item_00000090
92
+ item_00000091
93
+ item_00000092
94
+ item_00000093
95
+ item_00000094
96
+ item_00000095
97
+ item_00000096
98
+ item_00000097
99
+ item_00000098
100
+ item_00000099
101
+ item_00000100
102
+ item_00000101
103
+ item_00000102
104
+ item_00000103
105
+ item_00000104
106
+ item_00000105
107
+ item_00000106
108
+ item_00000107
109
+ item_00000108
110
+ item_00000109
111
+ item_00000110
112
+ item_00000111
113
+ item_00000112
114
+ item_00000113
115
+ item_00000114
116
+ item_00000115
117
+ item_00000116
118
+ item_00000117
119
+ item_00000118
120
+ item_00000119
121
+ item_00000120
122
+ item_00000121
123
+ item_00000122
124
+ item_00000123
125
+ item_00000124
126
+ item_00000125
127
+ item_00000126
128
+ item_00000127
129
+ item_00000128
130
+ item_00000129
131
+ item_00000130
132
+ item_00000131
133
+ item_00000132
134
+ item_00000133
135
+ item_00000134
136
+ item_00000135
137
+ item_00000136
138
+ item_00000137
139
+ item_00000138
140
+ item_00000139
141
+ item_00000140
142
+ item_00000141
143
+ item_00000142
144
+ item_00000143
145
+ item_00000144
146
+ item_00000145
147
+ item_00000146
148
+ item_00000147
149
+ item_00000148
150
+ item_00000149
151
+ item_00000150
152
+ item_00000151
153
+ item_00000152
154
+ item_00000153
155
+ item_00000154
156
+ item_00000155
157
+ item_00000156
158
+ item_00000157
159
+ item_00000158
160
+ item_00000159
161
+ item_00000160
162
+ item_00000161
163
+ item_00000162
164
+ item_00000163
165
+ item_00000164
166
+ item_00000165
167
+ item_00000166
168
+ item_00000167
169
+ item_00000168
170
+ item_00000169
171
+ item_00000170
172
+ item_00000171
173
+ item_00000172
174
+ item_00000173
175
+ item_00000174
176
+ item_00000175
177
+ item_00000176
178
+ item_00000177
179
+ item_00000178
180
+ item_00000179
181
+ item_00000180
182
+ item_00000181
183
+ item_00000182
184
+ item_00000183
185
+ item_00000184
186
+ item_00000185
187
+ item_00000186
188
+ item_00000187
189
+ item_00000188
190
+ item_00000189
191
+ item_00000190
192
+ item_00000191
193
+ item_00000192
194
+ item_00000193
195
+ item_00000194
196
+ item_00000195
197
+ item_00000196
198
+ item_00000197
199
+ item_00000198
200
+ item_00000199
throughput.json ADDED
@@ -0,0 +1,33 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "modality": "text",
3
+ "model": "sentence-transformers/all-MiniLM-L6-v2",
4
+ "device": "cuda",
5
+ "gpu": "NVIDIA GeForce RTX 5090",
6
+ "embedding_dim": 384,
7
+ "autobatch": {
8
+ "min_batch": 8,
9
+ "max_batch": 512,
10
+ "start_batch": 32,
11
+ "grow_free_fraction": 0.5,
12
+ "shrink_free_fraction": 0.2,
13
+ "grow_factor": 1.5,
14
+ "shrink_factor": 0.5,
15
+ "oom_factor": 0.5
16
+ },
17
+ "runs": [
18
+ {
19
+ "num_workers": 1,
20
+ "pre_run_counts": {
21
+ "pending": 500,
22
+ "in_progress": 0,
23
+ "done": 0,
24
+ "failed": 0,
25
+ "requeued": 0
26
+ },
27
+ "total_processed": 500,
28
+ "wall_seconds": 14.76,
29
+ "throughput": 33.9,
30
+ "note": "small-scale single-worker RTX 5090 run"
31
+ }
32
+ ]
33
+ }