@lmzhen/dsh-evolution-merge-engine 0.0.0 → 0.30.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,333 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "modelsRoot": "models",
4
+ "recipes": {
5
+ "fp16-cast": {
6
+ "builderVer": 1,
7
+ "description": "把 FP32 静态表分块转为 FP16(每块 40000 行),更新 config.embedding_dtype=float16",
8
+ "params": {
9
+ "sourceDtype": "F32",
10
+ "targetDtype": "F16",
11
+ "step": 40000,
12
+ "configPatch": {
13
+ "embedding_dtype": "float16"
14
+ }
15
+ }
16
+ },
17
+ "int8-per-row": {
18
+ "builderVer": 1,
19
+ "description": "逐行对称 int8 量化:scale=max_abs(row)/127(0→1e-8),q=clip(round_half_even(x/scale),-127,127)",
20
+ "params": {
21
+ "dtype": "I8",
22
+ "scalesFile": "scales.f32",
23
+ "scalesDtype": "F32",
24
+ "maxQ": 127,
25
+ "minQ": -127,
26
+ "scaleFormula": "max_abs/127",
27
+ "zeroScale": 1e-8,
28
+ "rounding": "half-even",
29
+ "configPatch": {
30
+ "embedding_dtype": "int8",
31
+ "quantization": "per_row_symmetric",
32
+ "scales_file": "scales.f32",
33
+ "source_model": "potion-multilingual-128M-F16"
34
+ }
35
+ }
36
+ },
37
+ "pca-project-int8": {
38
+ "builderVer": 1,
39
+ "description": "PCA 投影到 64 维后逐行 int8:采样 step=rows//50000,cov=X^T X(double),eigh 取 top64,proj=x@U,再 int8-per-row",
40
+ "params": {
41
+ "dims": 64,
42
+ "sampleStepFormula": "rows//50000",
43
+ "covariance": "double",
44
+ "eigen": "eigh",
45
+ "quantize": "int8-per-row",
46
+ "scalesFile": "scales.f32",
47
+ "configPatch": {
48
+ "hidden_dim": 64,
49
+ "embedding_dtype": "int8",
50
+ "quantization": "per_row_symmetric",
51
+ "scales_file": "scales.f32",
52
+ "pca_proj_file": "pca_proj.f32",
53
+ "pca_dims": 64,
54
+ "orig_hidden_dim": 256,
55
+ "source_model": "potion-multilingual-128M-F16",
56
+ "pca_fit": "50k evenly-spaced rows, torch covariance"
57
+ }
58
+ }
59
+ }
60
+ },
61
+ "artifacts": [
62
+ {
63
+ "id": "potion-base-f32",
64
+ "kind": "source",
65
+ "origin": "hf",
66
+ "repo": "minishlab/potion-multilingual-128M",
67
+ "description": "HF 原始 fp32 静态表(embedding 512,361,560 B)",
68
+ "target": "potion-multilingual-128M-fp32",
69
+ "files": [
70
+ {
71
+ "path": "model.safetensors",
72
+ "sha256": "14b5eb39cb4ce5666da8ad1f3dc6be4346e9b2d601c073302fa0a31bf7943397",
73
+ "bytes": 512361560,
74
+ "lfs": true
75
+ },
76
+ {
77
+ "path": "tokenizer.json",
78
+ "sha256": "19f1909063da3cfe3bd83a782381f040dccea475f4816de11116444a73e1b6a1",
79
+ "bytes": 18616131,
80
+ "lfs": true
81
+ },
82
+ {
83
+ "path": "config.json",
84
+ "sha256": "595e4cab2093732efd5dbe084fd5c1826b5eea693b73b4c1fd971672867d2e54",
85
+ "bytes": 271
86
+ }
87
+ ]
88
+ },
89
+ {
90
+ "id": "potion-base-f16",
91
+ "kind": "derived",
92
+ "recipe": "fp16-cast",
93
+ "base": "potion-base-f32",
94
+ "target": "potion-multilingual-fp16",
95
+ "manifest": {
96
+ "dtype": "F16",
97
+ "dim": 256,
98
+ "rows": 500353,
99
+ "tokenizerSha": "19f1909063da3cfe3bd83a782381f040dccea475f4816de11116444a73e1b6a1",
100
+ "builderVer": 1
101
+ },
102
+ "files": [
103
+ {
104
+ "path": "model.safetensors",
105
+ "sha256": "ccc3e2a930029660672855dc4936dadef9fdfb778729ffb11c6d6c6dc2a33f58",
106
+ "bytes": 256180824
107
+ },
108
+ {
109
+ "path": "tokenizer.json",
110
+ "sha256": "19f1909063da3cfe3bd83a782381f040dccea475f4816de11116444a73e1b6a1",
111
+ "bytes": 18616131
112
+ },
113
+ {
114
+ "path": "config.json",
115
+ "sha256": "e73c9e4782048819e3488c294edbd8f36ba3d5c043e19aac3fa271609b328fb0",
116
+ "bytes": 292
117
+ }
118
+ ]
119
+ },
120
+ {
121
+ "id": "pca64-proj",
122
+ "kind": "source",
123
+ "origin": "repo",
124
+ "description": "PCA-64 投影矩阵(256×64 F32,随仓库分发;Node 不做特征分解)",
125
+ "target": "pca64",
126
+ "files": [
127
+ {
128
+ "path": "proj.f32",
129
+ "sha256": "28cbc252208d3ee6767de33f88da60de056a602d0e939e48e3e44ebf72400668",
130
+ "bytes": 65536
131
+ }
132
+ ]
133
+ },
134
+ {
135
+ "id": "local:int8-256",
136
+ "kind": "derived",
137
+ "recipe": "int8-per-row",
138
+ "base": "potion-base-f16",
139
+ "target": "potion-multilingual-128M-int8",
140
+ "manifest": {
141
+ "dtype": "I8",
142
+ "dim": 256,
143
+ "rows": 500353,
144
+ "tokenizerSha": "19f1909063da3cfe3bd83a782381f040dccea475f4816de11116444a73e1b6a1",
145
+ "scalesDtype": "F32",
146
+ "builderVer": 1
147
+ },
148
+ "files": [
149
+ {
150
+ "path": "model.safetensors",
151
+ "sha256": "7f4be8f9a3410990204b0dd56358bdd041ec5062448fa9edd7bacbca62e5ed12",
152
+ "bytes": 128090456
153
+ },
154
+ {
155
+ "path": "scales.f32",
156
+ "sha256": "0a3b1b1a20bc3bafcbaba71b20915337d0726e7bd8aa53f3a3ba1200abb16771",
157
+ "bytes": 2001412
158
+ },
159
+ {
160
+ "path": "tokenizer.json",
161
+ "sha256": "19f1909063da3cfe3bd83a782381f040dccea475f4816de11116444a73e1b6a1",
162
+ "bytes": 18616131
163
+ },
164
+ {
165
+ "path": "config.json",
166
+ "sha256": "040d017a12f0a65e7544cef3b78f4aa98d990b65a62288d7a11429bc0e33b497",
167
+ "bytes": 412
168
+ }
169
+ ]
170
+ },
171
+ {
172
+ "id": "local:pca64-int8",
173
+ "kind": "derived",
174
+ "recipe": "pca-project-int8",
175
+ "base": "potion-base-f16",
176
+ "proj": "pca64-proj",
177
+ "target": "potion-multilingual-128M-pca64-int8",
178
+ "manifest": {
179
+ "dtype": "I8",
180
+ "dim": 64,
181
+ "rows": 500353,
182
+ "tokenizerSha": "19f1909063da3cfe3bd83a782381f040dccea475f4816de11116444a73e1b6a1",
183
+ "scalesDtype": "F32",
184
+ "projSha": "28cbc252208d3ee6767de33f88da60de056a602d0e939e48e3e44ebf72400668",
185
+ "builderVer": 1,
186
+ "reproducibility": "numeric"
187
+ },
188
+ "files": [
189
+ {
190
+ "path": "model.safetensors",
191
+ "sha256": "09a3b11f1da69b0f54a08b2bfaec6eee42eedd9226777a56dc15b12f84bccf81",
192
+ "bytes": 32022680
193
+ },
194
+ {
195
+ "path": "scales.f32",
196
+ "sha256": "a65761f9e2ecaa1c80cf1124e7b5267fe9e8c76f92672a6b48e4ce9f26dc163b",
197
+ "bytes": 2001412
198
+ },
199
+ {
200
+ "path": "tokenizer.json",
201
+ "sha256": "19f1909063da3cfe3bd83a782381f040dccea475f4816de11116444a73e1b6a1",
202
+ "bytes": 18616131
203
+ },
204
+ {
205
+ "path": "config.json",
206
+ "sha256": "fb5117bf741e618e521113b70172979ece3f0fa99c81c2a5c168b2d704a8dd95",
207
+ "bytes": 551
208
+ }
209
+ ]
210
+ },
211
+ {
212
+ "id": "ranker:startlux-0.8b",
213
+ "kind": "source",
214
+ "origin": "hf",
215
+ "optional": true,
216
+ "repo": "startlux-models/StartLux-Decision-v1-0.8B-Q8_0-GGUF",
217
+ "description": "可选:本地精排(llama-server)GGUF;首启不下载,按需 npm run fetch-models -- --include ranker",
218
+ "target": "startlux",
219
+ "files": [
220
+ {
221
+ "path": "StartLux-Decision-0.8B-Q8_0.gguf",
222
+ "sha256": "dd2bcf3ca81737c5a22e9a781c46e5389fc572a015ce7f36227722da0ba21457",
223
+ "bytes": 811843200,
224
+ "lfs": true
225
+ }
226
+ ]
227
+ },
228
+ {
229
+ "id": "onnx:e5-small",
230
+ "kind": "source",
231
+ "origin": "hf",
232
+ "optional": true,
233
+ "repo": "Xenova/multilingual-e5-small",
234
+ "description": "可选:ONNX 本机 embedding 后端(G7.1;需 onnxruntime-node 可选依赖,默认不下载)",
235
+ "target": "onnx/e5-small",
236
+ "files": [
237
+ {
238
+ "path": "onnx/model_quantized.onnx",
239
+ "sha256": "f80102d3f2a1229f387d3c81909990d8945513e347b0eab049f7de3c6f98c193",
240
+ "bytes": 118308185,
241
+ "lfs": true
242
+ },
243
+ {
244
+ "path": "tokenizer.json",
245
+ "sha256": "0b44a9d7b51c3c62626640cda0e2c2f70fdacdc25bbbd68038369d14ebdf4c39",
246
+ "bytes": 17082730,
247
+ "lfs": true
248
+ }
249
+ ]
250
+ }
251
+ ],
252
+ "models": [
253
+ {
254
+ "id": "qwen3-embedding-8b",
255
+ "provider": "siliconflow",
256
+ "compute": "api",
257
+ "overrideField": "embed_primary",
258
+ "transport": {
259
+ "kind": "openai-embeddings",
260
+ "model": "Qwen/Qwen3-Embedding-8B"
261
+ },
262
+ "floors": {
263
+ "body": 0.75,
264
+ "summary": 0.85
265
+ },
266
+ "price": {
267
+ "cnyPerKtok": 0.00028
268
+ }
269
+ },
270
+ {
271
+ "id": "bge-m3",
272
+ "provider": "siliconflow",
273
+ "compute": "api",
274
+ "overrideField": "embed_fallback",
275
+ "transport": {
276
+ "kind": "openai-embeddings",
277
+ "model": "BAAI/bge-m3"
278
+ },
279
+ "floors": {
280
+ "body": 0.8,
281
+ "summary": 0.6
282
+ },
283
+ "price": {
284
+ "cnyPerKtok": 0
285
+ }
286
+ },
287
+ {
288
+ "id": "local:int8-256",
289
+ "provider": "local",
290
+ "compute": "local-static",
291
+ "artifactRef": "local:int8-256",
292
+ "overrideField": "embedder_model",
293
+ "floors": {
294
+ "body": 0.95,
295
+ "summary": 0.6
296
+ }
297
+ },
298
+ {
299
+ "id": "local:pca64-int8",
300
+ "provider": "local",
301
+ "compute": "local-static",
302
+ "artifactRef": "local:pca64-int8",
303
+ "overrideField": "embedder_model_last",
304
+ "floors": {
305
+ "body": 0.95,
306
+ "summary": 0.6
307
+ }
308
+ }
309
+ ],
310
+ "tiers": [
311
+ {
312
+ "id": "qwen3-embedding-8b",
313
+ "modelRef": "qwen3-embedding-8b",
314
+ "floorPreset": "qwen3-embedding-8b"
315
+ },
316
+ {
317
+ "id": "bge-m3",
318
+ "modelRef": "bge-m3",
319
+ "floorPreset": "bge-m3"
320
+ },
321
+ {
322
+ "id": "local:int8-256",
323
+ "modelRef": "local:int8-256",
324
+ "floorPreset": "local:int8-256"
325
+ },
326
+ {
327
+ "id": "local:pca64-int8",
328
+ "modelRef": "local:pca64-int8",
329
+ "floorPreset": "local:pca64-int8"
330
+ }
331
+ ],
332
+ "calibration": null
333
+ }
package/package.json CHANGED
@@ -1,6 +1,36 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-merge-engine",
3
- "version": "0.0.0",
4
- "description": "placeholder",
5
- "license": "MIT"
6
- }
3
+ "description": "Vendored skill-merge Node pipeline engine (byte-identical upstream) for DSH evolution-merge (community build)",
4
+ "version": "0.30.0",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "types": "lib/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./lib/index.d.ts",
11
+ "default": "./lib/index.js"
12
+ },
13
+ "./package.json": "./package.json"
14
+ },
15
+ "files": [
16
+ "lib/",
17
+ "data/",
18
+ "LICENSE",
19
+ "NOTICE",
20
+ "UPSTREAM.json"
21
+ ],
22
+ "scripts": {
23
+ "build": "node scripts/build.mjs",
24
+ "test": "node --test \"vendor/skill-merge-pipeline/test/*.test.js\"",
25
+ "verify:upstream": "node verify-upstream.mjs"
26
+ },
27
+ "license": "MIT",
28
+ "engines": {
29
+ "dsh": ">=0.2.1-rc.1 <0.2.2-0"
30
+ },
31
+ "repository": {
32
+ "type": "git",
33
+ "url": "git+https://github.com/lmzhen/dsh-evolution.git",
34
+ "directory": "packages/evolution-merge-engine"
35
+ }
36
+ }
package/README.md DELETED
@@ -1 +0,0 @@
1
- placeholder