tokenfold 0.5.1__tar.gz → 0.5.2__tar.gz
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.
- {tokenfold-0.5.1 → tokenfold-0.5.2}/Cargo.lock +12 -12
- {tokenfold-0.5.1 → tokenfold-0.5.2}/Cargo.toml +1 -1
- {tokenfold-0.5.1 → tokenfold-0.5.2}/PKG-INFO +50 -4
- {tokenfold-0.5.1 → tokenfold-0.5.2}/README.md +49 -3
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-py/Cargo.toml +1 -1
- {tokenfold-0.5.1 → tokenfold-0.5.2}/LICENSE +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/Cargo.toml +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/README.md +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/benches/THRESHOLDS.toml +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/benches/compression_bench.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/allocation.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/budget.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/codec.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/errors.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/filters.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/holdout.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/input.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/lib.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/measurement.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/modes.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/pipeline/mod.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/pipeline/tests.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/profiles.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/report.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/retrieval_store.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/safety.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/stats.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/status.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/token_estimator.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/transforms/diff.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/transforms/json.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/transforms/json_dict.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/transforms/json_fold.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/transforms/json_prune.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/transforms/log_fold.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/transforms/logs.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/transforms/mod.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/transforms/redaction.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/src/transforms/schema.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/tests/golden.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/tests/integration.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-core/tests/property_tests.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/crates/tokenfold-py/src/lib.rs +0 -0
- {tokenfold-0.5.1 → tokenfold-0.5.2}/pyproject.toml +0 -0
|
@@ -847,9 +847,9 @@ dependencies = [
|
|
|
847
847
|
|
|
848
848
|
[[package]]
|
|
849
849
|
name = "rustls"
|
|
850
|
-
version = "0.23.
|
|
850
|
+
version = "0.23.46"
|
|
851
851
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
852
|
-
checksum = "
|
|
852
|
+
checksum = "48e13bd8c0e9365c43cfa5c9e8f9ad49d3c8444926c9aac819e0e4dc503c8fdf"
|
|
853
853
|
dependencies = [
|
|
854
854
|
"log",
|
|
855
855
|
"once_cell",
|
|
@@ -1109,7 +1109,7 @@ dependencies = [
|
|
|
1109
1109
|
|
|
1110
1110
|
[[package]]
|
|
1111
1111
|
name = "tokenfold-adapters"
|
|
1112
|
-
version = "0.5.
|
|
1112
|
+
version = "0.5.2"
|
|
1113
1113
|
dependencies = [
|
|
1114
1114
|
"serde",
|
|
1115
1115
|
"serde_json",
|
|
@@ -1118,7 +1118,7 @@ dependencies = [
|
|
|
1118
1118
|
|
|
1119
1119
|
[[package]]
|
|
1120
1120
|
name = "tokenfold-admin"
|
|
1121
|
-
version = "0.5.
|
|
1121
|
+
version = "0.5.2"
|
|
1122
1122
|
dependencies = [
|
|
1123
1123
|
"ed25519-dalek",
|
|
1124
1124
|
"serde",
|
|
@@ -1128,7 +1128,7 @@ dependencies = [
|
|
|
1128
1128
|
|
|
1129
1129
|
[[package]]
|
|
1130
1130
|
name = "tokenfold-cli"
|
|
1131
|
-
version = "0.5.
|
|
1131
|
+
version = "0.5.2"
|
|
1132
1132
|
dependencies = [
|
|
1133
1133
|
"clap",
|
|
1134
1134
|
"serde",
|
|
@@ -1143,7 +1143,7 @@ dependencies = [
|
|
|
1143
1143
|
|
|
1144
1144
|
[[package]]
|
|
1145
1145
|
name = "tokenfold-core"
|
|
1146
|
-
version = "0.5.
|
|
1146
|
+
version = "0.5.2"
|
|
1147
1147
|
dependencies = [
|
|
1148
1148
|
"proptest",
|
|
1149
1149
|
"regex",
|
|
@@ -1158,25 +1158,25 @@ dependencies = [
|
|
|
1158
1158
|
|
|
1159
1159
|
[[package]]
|
|
1160
1160
|
name = "tokenfold-image"
|
|
1161
|
-
version = "0.5.
|
|
1161
|
+
version = "0.5.2"
|
|
1162
1162
|
|
|
1163
1163
|
[[package]]
|
|
1164
1164
|
name = "tokenfold-learn"
|
|
1165
|
-
version = "0.5.
|
|
1165
|
+
version = "0.5.2"
|
|
1166
1166
|
dependencies = [
|
|
1167
1167
|
"tokenfold-core",
|
|
1168
1168
|
]
|
|
1169
1169
|
|
|
1170
1170
|
[[package]]
|
|
1171
1171
|
name = "tokenfold-output"
|
|
1172
|
-
version = "0.5.
|
|
1172
|
+
version = "0.5.2"
|
|
1173
1173
|
dependencies = [
|
|
1174
1174
|
"tokenfold-core",
|
|
1175
1175
|
]
|
|
1176
1176
|
|
|
1177
1177
|
[[package]]
|
|
1178
1178
|
name = "tokenfold-proxy"
|
|
1179
|
-
version = "0.5.
|
|
1179
|
+
version = "0.5.2"
|
|
1180
1180
|
dependencies = [
|
|
1181
1181
|
"clap",
|
|
1182
1182
|
"ctrlc",
|
|
@@ -1190,7 +1190,7 @@ dependencies = [
|
|
|
1190
1190
|
|
|
1191
1191
|
[[package]]
|
|
1192
1192
|
name = "tokenfold-py"
|
|
1193
|
-
version = "0.5.
|
|
1193
|
+
version = "0.5.2"
|
|
1194
1194
|
dependencies = [
|
|
1195
1195
|
"pyo3",
|
|
1196
1196
|
"serde_json",
|
|
@@ -1199,7 +1199,7 @@ dependencies = [
|
|
|
1199
1199
|
|
|
1200
1200
|
[[package]]
|
|
1201
1201
|
name = "tokenfold-rag"
|
|
1202
|
-
version = "0.5.
|
|
1202
|
+
version = "0.5.2"
|
|
1203
1203
|
dependencies = [
|
|
1204
1204
|
"tokenfold-core",
|
|
1205
1205
|
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: tokenfold
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.2
|
|
4
4
|
Classifier: Development Status :: 4 - Beta
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: License :: OSI Approved :: Apache Software License
|
|
@@ -361,7 +361,53 @@ Tokenfold solves a different problem first: repeated keys, values, schemas, rows
|
|
|
361
361
|
|
|
362
362
|
**When structure ends, rank what matters.**
|
|
363
363
|
|
|
364
|
-
|
|
364
|
+
**Select v2 is the default scorer backend in the optional `tokenfold-select`
|
|
365
|
+
0.5.2 package: local FP32 ONNX inference, original text, whole-group ranking.**
|
|
366
|
+
Provision the separate pinned model artifact, generate explicit runtime approval,
|
|
367
|
+
and invoke `tokenfold --experimental select`. Core remains model-free and
|
|
368
|
+
deterministic; installing or upgrading Tokenfold does not silently load a model
|
|
369
|
+
or enable lossy selection. See the [Select v2 setup and limits](packages/tokenfold-select/README.md).
|
|
370
|
+
The separate model bundle also carries Safetensors weights and a custom reference
|
|
371
|
+
loader; ONNX remains the CLI worker default. V2 is an experimental preview:
|
|
372
|
+
[Both formats are published under Apache-2.0](https://huggingface.co/snchimata/tokenfold-select-v2).
|
|
373
|
+
Synthetic CPU parity is verified, but task-quality and cold/warm performance
|
|
374
|
+
qualification are still open. The [example notebook](examples/quickstart.ipynb#10-tokenfold-select-v2-optional-local-ranking)
|
|
375
|
+
keeps model execution off until you explicitly enable it.
|
|
376
|
+
|
|
377
|
+
<details>
|
|
378
|
+
<summary><strong>Python: try Tokenfold Select v2 (ONNX)</strong></summary>
|
|
379
|
+
|
|
380
|
+
Install `tokenfold-select[onnx]==0.5.2` and `huggingface_hub==1.33.0`, then download
|
|
381
|
+
only the ONNX profile at the pinned release commit:
|
|
382
|
+
|
|
383
|
+
```python
|
|
384
|
+
from pathlib import Path
|
|
385
|
+
from huggingface_hub import snapshot_download
|
|
386
|
+
from tokenfold_select import OnnxScorer
|
|
387
|
+
|
|
388
|
+
root = Path(snapshot_download(
|
|
389
|
+
"snchimata/tokenfold-select-v2",
|
|
390
|
+
revision="78736d9afea819322f212d6d53eedcf68ac7a39b",
|
|
391
|
+
allow_patterns=["model.onnx", "model.onnx.data", "onnx-manifest.json",
|
|
392
|
+
"tokenizer/*", "runtime/*", "LICENSE", "NOTICE.md"],
|
|
393
|
+
)).resolve()
|
|
394
|
+
scorer = OnnxScorer(root, development=True)
|
|
395
|
+
response = scorer.score({
|
|
396
|
+
"schema_version": 1, "model_revision": scorer.revision,
|
|
397
|
+
"query": "Which delivery city?",
|
|
398
|
+
"groups": [{"id": "delivery", "text": "Delivery city: Paris"}],
|
|
399
|
+
})
|
|
400
|
+
print(response) # scores only; your controller owns protection and allocation
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
For Safetensors, use the model card's custom loader rather than a stock
|
|
404
|
+
Transformers classification class. Neither format silently changes Core behavior.
|
|
405
|
+
|
|
406
|
+
</details>
|
|
407
|
+
|
|
408
|
+
### Tokenfold Select v1 (legacy model)
|
|
409
|
+
|
|
410
|
+
The separately published Select v1 is an Apache-2.0 LoRA adapter on
|
|
365
411
|
`ibm-granite/granite-embedding-reranker-english-r2`. It scores candidate spans
|
|
366
412
|
against a query; your allocator applies the token budget and force-keeps
|
|
367
413
|
required content. It is a separately distributed offering. Core remains
|
|
@@ -374,7 +420,7 @@ model-free and deterministic and neither loads nor invokes Select.
|
|
|
374
420
|
| Output | Compressed payload + exact receipt | Ranking logits |
|
|
375
421
|
|
|
376
422
|
<details>
|
|
377
|
-
<summary><strong>Python: load the
|
|
423
|
+
<summary><strong>Legacy v1 Python: load the LoRA adapter and score spans</strong></summary>
|
|
378
424
|
|
|
379
425
|
```python
|
|
380
426
|
from pathlib import Path
|
|
@@ -415,7 +461,7 @@ def score(query: str, spans: list[str]) -> list[float]:
|
|
|
415
461
|
|
|
416
462
|
</details>
|
|
417
463
|
|
|
418
|
-
### Tokenfold Select benchmarks
|
|
464
|
+
### Tokenfold Select v1 benchmarks (not v2 evidence)
|
|
419
465
|
|
|
420
466
|
[Tokenfold Select][tokenfold-select] is Tokenfold's query-aware model for choosing
|
|
421
467
|
what fills a tight context window after structural compression ends.
|
|
@@ -339,7 +339,53 @@ Tokenfold solves a different problem first: repeated keys, values, schemas, rows
|
|
|
339
339
|
|
|
340
340
|
**When structure ends, rank what matters.**
|
|
341
341
|
|
|
342
|
-
|
|
342
|
+
**Select v2 is the default scorer backend in the optional `tokenfold-select`
|
|
343
|
+
0.5.2 package: local FP32 ONNX inference, original text, whole-group ranking.**
|
|
344
|
+
Provision the separate pinned model artifact, generate explicit runtime approval,
|
|
345
|
+
and invoke `tokenfold --experimental select`. Core remains model-free and
|
|
346
|
+
deterministic; installing or upgrading Tokenfold does not silently load a model
|
|
347
|
+
or enable lossy selection. See the [Select v2 setup and limits](packages/tokenfold-select/README.md).
|
|
348
|
+
The separate model bundle also carries Safetensors weights and a custom reference
|
|
349
|
+
loader; ONNX remains the CLI worker default. V2 is an experimental preview:
|
|
350
|
+
[Both formats are published under Apache-2.0](https://huggingface.co/snchimata/tokenfold-select-v2).
|
|
351
|
+
Synthetic CPU parity is verified, but task-quality and cold/warm performance
|
|
352
|
+
qualification are still open. The [example notebook](examples/quickstart.ipynb#10-tokenfold-select-v2-optional-local-ranking)
|
|
353
|
+
keeps model execution off until you explicitly enable it.
|
|
354
|
+
|
|
355
|
+
<details>
|
|
356
|
+
<summary><strong>Python: try Tokenfold Select v2 (ONNX)</strong></summary>
|
|
357
|
+
|
|
358
|
+
Install `tokenfold-select[onnx]==0.5.2` and `huggingface_hub==1.33.0`, then download
|
|
359
|
+
only the ONNX profile at the pinned release commit:
|
|
360
|
+
|
|
361
|
+
```python
|
|
362
|
+
from pathlib import Path
|
|
363
|
+
from huggingface_hub import snapshot_download
|
|
364
|
+
from tokenfold_select import OnnxScorer
|
|
365
|
+
|
|
366
|
+
root = Path(snapshot_download(
|
|
367
|
+
"snchimata/tokenfold-select-v2",
|
|
368
|
+
revision="78736d9afea819322f212d6d53eedcf68ac7a39b",
|
|
369
|
+
allow_patterns=["model.onnx", "model.onnx.data", "onnx-manifest.json",
|
|
370
|
+
"tokenizer/*", "runtime/*", "LICENSE", "NOTICE.md"],
|
|
371
|
+
)).resolve()
|
|
372
|
+
scorer = OnnxScorer(root, development=True)
|
|
373
|
+
response = scorer.score({
|
|
374
|
+
"schema_version": 1, "model_revision": scorer.revision,
|
|
375
|
+
"query": "Which delivery city?",
|
|
376
|
+
"groups": [{"id": "delivery", "text": "Delivery city: Paris"}],
|
|
377
|
+
})
|
|
378
|
+
print(response) # scores only; your controller owns protection and allocation
|
|
379
|
+
```
|
|
380
|
+
|
|
381
|
+
For Safetensors, use the model card's custom loader rather than a stock
|
|
382
|
+
Transformers classification class. Neither format silently changes Core behavior.
|
|
383
|
+
|
|
384
|
+
</details>
|
|
385
|
+
|
|
386
|
+
### Tokenfold Select v1 (legacy model)
|
|
387
|
+
|
|
388
|
+
The separately published Select v1 is an Apache-2.0 LoRA adapter on
|
|
343
389
|
`ibm-granite/granite-embedding-reranker-english-r2`. It scores candidate spans
|
|
344
390
|
against a query; your allocator applies the token budget and force-keeps
|
|
345
391
|
required content. It is a separately distributed offering. Core remains
|
|
@@ -352,7 +398,7 @@ model-free and deterministic and neither loads nor invokes Select.
|
|
|
352
398
|
| Output | Compressed payload + exact receipt | Ranking logits |
|
|
353
399
|
|
|
354
400
|
<details>
|
|
355
|
-
<summary><strong>Python: load the
|
|
401
|
+
<summary><strong>Legacy v1 Python: load the LoRA adapter and score spans</strong></summary>
|
|
356
402
|
|
|
357
403
|
```python
|
|
358
404
|
from pathlib import Path
|
|
@@ -393,7 +439,7 @@ def score(query: str, spans: list[str]) -> list[float]:
|
|
|
393
439
|
|
|
394
440
|
</details>
|
|
395
441
|
|
|
396
|
-
### Tokenfold Select benchmarks
|
|
442
|
+
### Tokenfold Select v1 benchmarks (not v2 evidence)
|
|
397
443
|
|
|
398
444
|
[Tokenfold Select][tokenfold-select] is Tokenfold's query-aware model for choosing
|
|
399
445
|
what fills a tight context window after structural compression ends.
|
|
@@ -16,7 +16,7 @@ name = "tokenfold_py"
|
|
|
16
16
|
crate-type = ["cdylib", "rlib"]
|
|
17
17
|
|
|
18
18
|
[dependencies]
|
|
19
|
-
tokenfold-core = { version = "0.5.
|
|
19
|
+
tokenfold-core = { version = "0.5.2", path = "../tokenfold-core" }
|
|
20
20
|
serde_json = { workspace = true }
|
|
21
21
|
pyo3 = { version = "0.29.0", features = ["abi3-py39"] }
|
|
22
22
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|