semhash 0.4.2__tar.gz → 0.5.0__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.
Files changed (52) hide show
  1. {semhash-0.4.2 → semhash-0.5.0}/PKG-INFO +5 -5
  2. {semhash-0.4.2 → semhash-0.5.0}/README.md +3 -3
  3. {semhash-0.4.2 → semhash-0.5.0}/benchmarks/README.md +44 -43
  4. semhash-0.5.0/benchmarks/results/image_train_benchmark_results.json +20 -0
  5. semhash-0.5.0/benchmarks/results/image_train_test_benchmark_results.json +22 -0
  6. semhash-0.5.0/benchmarks/results/train_benchmark_results.json +155 -0
  7. semhash-0.5.0/benchmarks/results/train_test_benchmark_results.json +172 -0
  8. {semhash-0.4.2 → semhash-0.5.0}/pyproject.toml +2 -1
  9. {semhash-0.4.2 → semhash-0.5.0}/semhash/datamodels.py +69 -30
  10. {semhash-0.4.2 → semhash-0.5.0}/semhash/index.py +16 -15
  11. {semhash-0.4.2 → semhash-0.5.0}/semhash/records.py +26 -25
  12. {semhash-0.4.2 → semhash-0.5.0}/semhash/semhash.py +104 -149
  13. {semhash-0.4.2 → semhash-0.5.0}/semhash/utils.py +49 -2
  14. {semhash-0.4.2 → semhash-0.5.0}/semhash/version.py +1 -1
  15. {semhash-0.4.2 → semhash-0.5.0}/semhash.egg-info/PKG-INFO +5 -5
  16. {semhash-0.4.2 → semhash-0.5.0}/semhash.egg-info/requires.txt +1 -1
  17. semhash-0.5.0/semhash.egg-info/scm_version.json +8 -0
  18. {semhash-0.4.2 → semhash-0.5.0}/tests/test_datamodels.py +29 -37
  19. {semhash-0.4.2 → semhash-0.5.0}/tests/test_semhash.py +133 -15
  20. {semhash-0.4.2 → semhash-0.5.0}/uv.lock +8 -5
  21. semhash-0.4.2/benchmarks/results/image_train_benchmark_results.json +0 -20
  22. semhash-0.4.2/benchmarks/results/image_train_test_benchmark_results.json +0 -22
  23. semhash-0.4.2/benchmarks/results/train_benchmark_results.json +0 -155
  24. semhash-0.4.2/benchmarks/results/train_test_benchmark_results.json +0 -172
  25. semhash-0.4.2/semhash.egg-info/scm_version.json +0 -8
  26. {semhash-0.4.2 → semhash-0.5.0}/.github/workflows/ci.yaml +0 -0
  27. {semhash-0.4.2 → semhash-0.5.0}/.github/workflows/release.yaml +0 -0
  28. {semhash-0.4.2 → semhash-0.5.0}/.gitignore +0 -0
  29. {semhash-0.4.2 → semhash-0.5.0}/.pre-commit-config.yaml +0 -0
  30. {semhash-0.4.2 → semhash-0.5.0}/CITATION.cff +0 -0
  31. {semhash-0.4.2 → semhash-0.5.0}/LICENSE +0 -0
  32. {semhash-0.4.2 → semhash-0.5.0}/Makefile +0 -0
  33. {semhash-0.4.2 → semhash-0.5.0}/assets/images/semhash_logo.png +0 -0
  34. {semhash-0.4.2 → semhash-0.5.0}/assets/images/semhash_logo_v2.png +0 -0
  35. {semhash-0.4.2 → semhash-0.5.0}/benchmarks/__init__.py +0 -0
  36. {semhash-0.4.2 → semhash-0.5.0}/benchmarks/data.py +0 -0
  37. {semhash-0.4.2 → semhash-0.5.0}/benchmarks/run_image_benchmarks.py +0 -0
  38. {semhash-0.4.2 → semhash-0.5.0}/benchmarks/run_text_benchmarks.py +0 -0
  39. {semhash-0.4.2 → semhash-0.5.0}/semhash/__init__.py +0 -0
  40. {semhash-0.4.2 → semhash-0.5.0}/semhash/py.typed +0 -0
  41. {semhash-0.4.2 → semhash-0.5.0}/semhash.egg-info/SOURCES.txt +0 -0
  42. {semhash-0.4.2 → semhash-0.5.0}/semhash.egg-info/dependency_links.txt +0 -0
  43. {semhash-0.4.2 → semhash-0.5.0}/semhash.egg-info/scm_file_list.json +0 -0
  44. {semhash-0.4.2 → semhash-0.5.0}/semhash.egg-info/top_level.txt +0 -0
  45. {semhash-0.4.2 → semhash-0.5.0}/setup.cfg +0 -0
  46. {semhash-0.4.2 → semhash-0.5.0}/tests/conftest.py +0 -0
  47. {semhash-0.4.2 → semhash-0.5.0}/tests/data/test_model/README.md +0 -0
  48. {semhash-0.4.2 → semhash-0.5.0}/tests/data/test_model/config.json +0 -0
  49. {semhash-0.4.2 → semhash-0.5.0}/tests/data/test_model/model.safetensors +0 -0
  50. {semhash-0.4.2 → semhash-0.5.0}/tests/data/test_model/modules.json +0 -0
  51. {semhash-0.4.2 → semhash-0.5.0}/tests/data/test_model/tokenizer.json +0 -0
  52. {semhash-0.4.2 → semhash-0.5.0}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: semhash
3
- Version: 0.4.2
3
+ Version: 0.5.0
4
4
  Summary: Fast Multimodal Semantic Deduplication & Filtering
5
5
  Author-email: Thomas van Dongen <thomasvdongen@proton.me>, Stéphan Tulkens <stephantul@gmail.com>
6
6
  License: MIT License
@@ -42,7 +42,7 @@ Classifier: Natural Language :: English
42
42
  Requires-Python: >=3.10
43
43
  Description-Content-Type: text/markdown
44
44
  Requires-Dist: model2vec>=0.3.4
45
- Requires-Dist: vicinity[usearch]>=0.4.3
45
+ Requires-Dist: vicinity[usearch]>=0.4.6
46
46
  Requires-Dist: frozendict
47
47
  Requires-Dist: pyversity
48
48
  Provides-Extra: dev
@@ -203,9 +203,9 @@ semhash = SemHash.from_records(records=records, columns=["question", "context"])
203
203
  deduplicated_records = semhash.self_deduplicate().selected
204
204
  ```
205
205
 
206
- The `deduplicate` and `self_deduplicate` functions return a [DeduplicationResult](https://github.com/MinishLab/semhash/blob/main/semhash/datamodels.py#L58). This object stores the deduplicated corpus, a set of duplicate objects (along with the objects that caused duplication), and several useful functions to further inspect the deduplication result.
206
+ The `deduplicate` and `self_deduplicate` functions return a [DeduplicationResult](https://github.com/MinishLab/semhash/blob/main/semhash/datamodels.py). This object stores the deduplicated corpus, a set of duplicate objects (along with the objects that caused duplication), and several useful functions to further inspect the deduplication result.
207
207
 
208
- The `filter_outliers`, `self_filter_outliers`, `find_representative`, and `self_find_representative` functions return a [FilterResult](https://github.com/MinishLab/semhash/blob/main/semhash/datamodels.py#179). This object stores the found outliers/representative samples.
208
+ The `filter_outliers`, `self_filter_outliers`, `find_representative`, and `self_find_representative` functions return a [FilterResult](https://github.com/MinishLab/semhash/blob/main/semhash/datamodels.py). This object stores the found outliers/representative samples.
209
209
 
210
210
  For both the `DeduplicationResult` and `FilterResult` objects, you can easily view the filtered records with the `selected` attribute (e.g. to view outliers: `outliers = semhash.self_filter_outliers().filtered`)
211
211
 
@@ -583,7 +583,7 @@ deduplicated_records = semhash.self_deduplicate().selected
583
583
 
584
584
  ## Benchmarks
585
585
 
586
- SemHash is extremely fast and scales to large datasets with millions of records. We've benchmarked both text and image deduplication across a variety of datasets. For example, deduplicating text 1.8M records takes only ~83 seconds on CPU.
586
+ SemHash is extremely fast and scales to large datasets with millions of records. We've benchmarked both text and image deduplication across a variety of datasets. For example, deduplicating text 1.8M records takes only ~74 seconds on CPU.
587
587
 
588
588
  For detailed benchmark results and analysis, see the [benchmarks directory](benchmarks/README.md).
589
589
 
@@ -147,9 +147,9 @@ semhash = SemHash.from_records(records=records, columns=["question", "context"])
147
147
  deduplicated_records = semhash.self_deduplicate().selected
148
148
  ```
149
149
 
150
- The `deduplicate` and `self_deduplicate` functions return a [DeduplicationResult](https://github.com/MinishLab/semhash/blob/main/semhash/datamodels.py#L58). This object stores the deduplicated corpus, a set of duplicate objects (along with the objects that caused duplication), and several useful functions to further inspect the deduplication result.
150
+ The `deduplicate` and `self_deduplicate` functions return a [DeduplicationResult](https://github.com/MinishLab/semhash/blob/main/semhash/datamodels.py). This object stores the deduplicated corpus, a set of duplicate objects (along with the objects that caused duplication), and several useful functions to further inspect the deduplication result.
151
151
 
152
- The `filter_outliers`, `self_filter_outliers`, `find_representative`, and `self_find_representative` functions return a [FilterResult](https://github.com/MinishLab/semhash/blob/main/semhash/datamodels.py#179). This object stores the found outliers/representative samples.
152
+ The `filter_outliers`, `self_filter_outliers`, `find_representative`, and `self_find_representative` functions return a [FilterResult](https://github.com/MinishLab/semhash/blob/main/semhash/datamodels.py). This object stores the found outliers/representative samples.
153
153
 
154
154
  For both the `DeduplicationResult` and `FilterResult` objects, you can easily view the filtered records with the `selected` attribute (e.g. to view outliers: `outliers = semhash.self_filter_outliers().filtered`)
155
155
 
@@ -527,7 +527,7 @@ deduplicated_records = semhash.self_deduplicate().selected
527
527
 
528
528
  ## Benchmarks
529
529
 
530
- SemHash is extremely fast and scales to large datasets with millions of records. We've benchmarked both text and image deduplication across a variety of datasets. For example, deduplicating text 1.8M records takes only ~83 seconds on CPU.
530
+ SemHash is extremely fast and scales to large datasets with millions of records. We've benchmarked both text and image deduplication across a variety of datasets. For example, deduplicating text 1.8M records takes only ~74 seconds on CPU.
531
531
 
532
532
  For detailed benchmark results and analysis, see the [benchmarks directory](benchmarks/README.md).
533
533
 
@@ -21,6 +21,7 @@ This directory contains the benchmarking code and results for SemHash. The bench
21
21
  ### Setup
22
22
 
23
23
  All text benchmarks were run with the following configuration:
24
+ - **Device**: MacBook Pro (Apple M5, 48 GB RAM)
24
25
  - **CPU-only**: All benchmarks run on CPU (no GPU acceleration)
25
26
  - **ANN backend**: Default backend (USearch)
26
27
  - **Encoder**: Default encoder ([potion-base-8M](https://huggingface.co/minishlab/potion-base-8M))
@@ -35,23 +36,23 @@ This benchmark measures the performance of deduplicating within a single trainin
35
36
 
36
37
  | Dataset | Original Train Size | Deduplicated Train Size | % Removed | Deduplication Time (s) |
37
38
  |----------------------|----------------------|--------------------------|------------|--------------------------|
38
- | bbc | 1225 | 1144 | 6.61 | 0.57 |
39
- | senteval_cr | 3012 | 2990 | 0.73 | 0.14 |
40
- | tweet_sentiment_extraction | 27481 | 26695 | 2.86 | 1.77 |
41
- | emotion | 16000 | 15695 | 1.91 | 0.77 |
42
- | amazon_counterfactual | 5000 | 4992 | 0.16 | 0.33 |
43
- | ag_news | 120000 | 106921 | 10.90 | 5.20 |
44
- | enron_spam | 31716 | 20540 | 35.24 | 2.03 |
45
- | subj | 8000 | 7990 | 0.12 | 0.63 |
46
- | sst5 | 8544 | 8526 | 0.21 | 0.58 |
47
- | 20_newgroups | 11314 | 10684 | 5.57 | 0.73 |
48
- | hatespeech_offensive | 22783 | 22090 | 3.04 | 0.92 |
49
- | ade | 17637 | 15718 | 10.88 | 0.73 |
50
- | imdb | 25000 | 24830 | 0.68 | 1.76 |
51
- | massive_scenario | 11514 | 9366 | 18.66 | 0.47 |
52
- | student | 117519 | 63856 | 45.66 | 8.80 |
53
- | squad_v2 | 130319 | 109698 | 15.82 | 8.81 |
54
- | wikitext | 1801350 | 884645 | 50.89 | 83.53 |
39
+ | bbc | 1225 | 1148 | 6.29 | 0.19 |
40
+ | senteval_cr | 3012 | 2992 | 0.66 | 0.15 |
41
+ | tweet_sentiment_extraction | 27481 | 26775 | 2.57 | 1.67 |
42
+ | emotion | 16000 | 15739 | 1.63 | 0.68 |
43
+ | amazon_counterfactual | 5000 | 4992 | 0.16 | 0.27 |
44
+ | ag_news | 120000 | 107882 | 10.10 | 5.75 |
45
+ | enron_spam | 31716 | 21121 | 33.41 | 1.63 |
46
+ | subj | 8000 | 7990 | 0.12 | 0.45 |
47
+ | sst5 | 8544 | 8526 | 0.21 | 0.46 |
48
+ | 20_newgroups | 11314 | 10717 | 5.28 | 0.61 |
49
+ | hatespeech_offensive | 22783 | 22233 | 2.41 | 0.96 |
50
+ | ade | 17637 | 15723 | 10.85 | 0.74 |
51
+ | imdb | 25000 | 24847 | 0.61 | 1.64 |
52
+ | massive_scenario | 11514 | 9665 | 16.06 | 0.45 |
53
+ | student | 117519 | 69696 | 40.69 | 8.28 |
54
+ | squad_v2 | 130319 | 110480 | 15.22 | 9.66 |
55
+ | wikitext | 1801350 | 900554 | 50.01 | 74.31 |
55
56
 
56
57
  ### Train/Test Deduplication Benchmark
57
58
 
@@ -59,29 +60,29 @@ This benchmark measures the performance of deduplicating a test dataset against
59
60
 
60
61
  | Dataset | Train Size | Test Size | Deduplicated Test Size | % Removed | Deduplication Time (s) |
61
62
  |----------------------|--------------|--------------|--------------------------|------------|--------------------------|
62
- | bbc | 1225 | 1000 | 870 | 13.00 | 0.71 |
63
- | senteval_cr | 3012 | 753 | 750 | 0.40 | 0.13 |
64
- | tweet_sentiment_extraction | 27481 | 3534 | 3412 | 3.45 | 1.53 |
65
- | emotion | 16000 | 2000 | 1926 | 3.70 | 0.65 |
66
- | amazon_counterfactual | 5000 | 5000 | 4990 | 0.20 | 0.51 |
67
- | ag_news | 120000 | 7600 | 6198 | 18.45 | 3.74 |
68
- | enron_spam | 31716 | 2000 | 1060 | 47.00 | 1.94 |
69
- | subj | 8000 | 2000 | 1999 | 0.05 | 0.62 |
70
- | sst5 | 8544 | 2210 | 2205 | 0.23 | 0.59 |
71
- | 20_newgroups | 11314 | 7532 | 7098 | 5.76 | 2.25 |
72
- | hatespeech_offensive | 22783 | 2000 | 1925 | 3.75 | 0.77 |
73
- | ade | 17637 | 5879 | 4952 | 15.77 | 0.81 |
74
- | imdb | 25000 | 25000 | 24795 | 0.82 | 2.81 |
75
- | massive_scenario | 11514 | 2974 | 2190 | 26.36 | 0.46 |
76
- | student | 117519 | 5000 | 2393 | 52.14 | 3.78 |
77
- | squad_v2 | 130319 | 11873 | 11863 | 0.08 | 7.13 |
78
- | wikitext | 1801350 | 4358 | 2139 | 50.92 | 40.32 |
63
+ | bbc | 1225 | 1000 | 874 | 12.60 | 0.29 |
64
+ | senteval_cr | 3012 | 753 | 750 | 0.40 | 0.15 |
65
+ | tweet_sentiment_extraction | 27481 | 3534 | 3411 | 3.48 | 1.48 |
66
+ | emotion | 16000 | 2000 | 1926 | 3.70 | 0.58 |
67
+ | amazon_counterfactual | 5000 | 5000 | 4990 | 0.20 | 0.44 |
68
+ | ag_news | 120000 | 7600 | 6201 | 18.41 | 3.95 |
69
+ | enron_spam | 31716 | 2000 | 1064 | 46.80 | 1.56 |
70
+ | subj | 8000 | 2000 | 1999 | 0.05 | 0.44 |
71
+ | sst5 | 8544 | 2210 | 2205 | 0.23 | 0.45 |
72
+ | 20_newgroups | 11314 | 7532 | 7098 | 5.76 | 1.51 |
73
+ | hatespeech_offensive | 22783 | 2000 | 1925 | 3.75 | 0.78 |
74
+ | ade | 17637 | 5879 | 4953 | 15.75 | 0.79 |
75
+ | imdb | 25000 | 25000 | 24797 | 0.81 | 2.55 |
76
+ | massive_scenario | 11514 | 2974 | 2188 | 26.43 | 0.47 |
77
+ | student | 117519 | 5000 | 2400 | 52.00 | 4.36 |
78
+ | squad_v2 | 130319 | 11873 | 11863 | 0.08 | 7.07 |
79
+ | wikitext | 1801350 | 4358 | 2134 | 51.03 | 46.29 |
79
80
 
80
81
  ### Key Findings
81
82
 
82
83
  SemHash is extremely fast and scales to large datasets with millions of records. Some notable findings include:
83
84
 
84
- - **Speed**: Deduplication is fast even for large datasets (e.g., 1.8M records in ~83 seconds)
85
+ - **Speed**: Deduplication is fast even for large datasets (e.g., 1.8M records in ~74 seconds)
85
86
  - **Train/Test Leakage**: Several datasets show significant train/test overlap:
86
87
  - `enron_spam`: 47% of test data overlaps with training data
87
88
  - `student`: 52% of test data overlaps with training data
@@ -106,7 +107,7 @@ make benchmark-text
106
107
  ### Setup
107
108
 
108
109
  All image benchmarks were run with the following configuration:
109
- - **Device**: Apple Silicon GPU (MPS)
110
+ - **Device**: MacBook Pro (Apple M5, 48 GB RAM), GPU via MPS
110
111
  - **ANN backend**: Default backend (USearch)
111
112
  - **Encoder**: MobileNetV3-Small ([mobilenetv3_small_100.lamb_in1k](https://huggingface.co/timm/mobilenetv3_small_100.lamb_in1k))
112
113
  - **Batch size**: 128 images per batch
@@ -120,8 +121,8 @@ This benchmark measures the performance of deduplicating within a single trainin
120
121
 
121
122
  | Dataset | Original Train Size | Deduplicated Train Size | % Removed | Deduplication Time (s) |
122
123
  |----------------------|----------------------|--------------------------|------------|--------------------------|
123
- | cifar10 | 50000 | 48274 | 3.45 | 61.20 |
124
- | fashion_mnist | 60000 | 16714 | 72.14 | 86.61 |
124
+ | cifar10 | 50000 | 48390 | 3.22 | 38.05 |
125
+ | fashion_mnist | 60000 | 23549 | 60.75 | 42.70 |
125
126
 
126
127
  #### Train/Test Deduplication Benchmark
127
128
 
@@ -129,14 +130,14 @@ This benchmark measures the performance of deduplicating a test dataset against
129
130
 
130
131
  | Dataset | Train Size | Test Size | Deduplicated Test Size | % Removed | Deduplication Time (s) |
131
132
  |----------------------|--------------|--------------|--------------------------|------------|--------------------------|
132
- | cifar10 | 50000 | 10000 | 9397 | 6.03 | 67.43 |
133
- | fashion_mnist | 60000 | 10000 | 2052 | 79.48 | 72.14 |
133
+ | cifar10 | 50000 | 10000 | 9397 | 6.03 | 43.35 |
134
+ | fashion_mnist | 60000 | 10000 | 2056 | 79.44 | 46.89 |
134
135
 
135
136
  ### Key Findings
136
137
 
137
- - **Fashion-MNIST high deduplication**: Fashion-MNIST shows very high duplication rates (72% train, 79% test) due to the simple nature of the dataset (10 clothing categories with similar items)
138
- - **CIFAR-10 moderate deduplication**: CIFAR-10 shows lower duplication (3.45% train, 6.03% test) as it contains more diverse natural images
139
- - **Speed**: Image deduplication is fast even for large datasets (60k images in ~87 seconds on MPS); note that the actual deduplication step is quick, with most time spent on encoding images
138
+ - **Fashion-MNIST high deduplication**: Fashion-MNIST shows very high duplication rates (61% train, 79% test) due to the simple nature of the dataset (10 clothing categories with similar items)
139
+ - **CIFAR-10 moderate deduplication**: CIFAR-10 shows lower duplication (3.22% train, 6.03% test) as it contains more diverse natural images
140
+ - **Speed**: Image deduplication is fast even for large datasets (60k images in ~43 seconds on MPS); note that the actual deduplication step is quick, with most time spent on encoding images
140
141
 
141
142
  ### Running Image Benchmarks
142
143
 
@@ -0,0 +1,20 @@
1
+ [
2
+ {
3
+ "dataset": "cifar10",
4
+ "original_train_size": 50000,
5
+ "deduplicated_train_size": 48390,
6
+ "percent_removed": 3.2200000000000006,
7
+ "build_time_seconds": 36.14036558299995,
8
+ "deduplication_time_seconds": 1.9100148340003216,
9
+ "time_seconds": 38.05038041700027
10
+ },
11
+ {
12
+ "dataset": "fashion_mnist",
13
+ "original_train_size": 60000,
14
+ "deduplicated_train_size": 23549,
15
+ "percent_removed": 60.75166666666667,
16
+ "build_time_seconds": 38.96308354100256,
17
+ "deduplication_time_seconds": 3.733158041999559,
18
+ "time_seconds": 42.69624158300212
19
+ }
20
+ ]
@@ -0,0 +1,22 @@
1
+ [
2
+ {
3
+ "dataset": "cifar10",
4
+ "train_size": 50000,
5
+ "test_size": 10000,
6
+ "deduplicated_test_size": 9397,
7
+ "percent_removed": 6.030000000000002,
8
+ "build_time_seconds": 36.14036558299995,
9
+ "deduplication_time_seconds": 7.210748125002283,
10
+ "time_seconds": 43.35111370800223
11
+ },
12
+ {
13
+ "dataset": "fashion_mnist",
14
+ "train_size": 60000,
15
+ "test_size": 10000,
16
+ "deduplicated_test_size": 2056,
17
+ "percent_removed": 79.44,
18
+ "build_time_seconds": 38.96308354100256,
19
+ "deduplication_time_seconds": 7.9287375419989985,
20
+ "time_seconds": 46.89182108300156
21
+ }
22
+ ]
@@ -0,0 +1,155 @@
1
+ [
2
+ {
3
+ "dataset": "bbc",
4
+ "original_train_size": 1225,
5
+ "deduplicated_train_size": 1148,
6
+ "percent_removed": 6.285714285714283,
7
+ "build_time_seconds": 0.1762163750026957,
8
+ "deduplication_time_seconds": 0.009695124997961102,
9
+ "time_seconds": 0.18591150000065682
10
+ },
11
+ {
12
+ "dataset": "senteval_cr",
13
+ "original_train_size": 3012,
14
+ "deduplicated_train_size": 2992,
15
+ "percent_removed": 0.6640106241699861,
16
+ "build_time_seconds": 0.12137100000109058,
17
+ "deduplication_time_seconds": 0.029432167000777554,
18
+ "time_seconds": 0.15080316700186813
19
+ },
20
+ {
21
+ "dataset": "tweet_sentiment_extraction",
22
+ "original_train_size": 27481,
23
+ "deduplicated_train_size": 26775,
24
+ "percent_removed": 2.569047705687566,
25
+ "build_time_seconds": 1.3021473750013683,
26
+ "deduplication_time_seconds": 0.37088470900198445,
27
+ "time_seconds": 1.6730320840033528
28
+ },
29
+ {
30
+ "dataset": "emotion",
31
+ "original_train_size": 16000,
32
+ "deduplicated_train_size": 15739,
33
+ "percent_removed": 1.6312499999999952,
34
+ "build_time_seconds": 0.4828177079980378,
35
+ "deduplication_time_seconds": 0.19528612499925657,
36
+ "time_seconds": 0.6781038329972944
37
+ },
38
+ {
39
+ "dataset": "amazon_counterfactual",
40
+ "original_train_size": 5000,
41
+ "deduplicated_train_size": 4992,
42
+ "percent_removed": 0.16000000000000458,
43
+ "build_time_seconds": 0.22153624999918975,
44
+ "deduplication_time_seconds": 0.04794116700213635,
45
+ "time_seconds": 0.2694774170013261
46
+ },
47
+ {
48
+ "dataset": "ag_news",
49
+ "original_train_size": 120000,
50
+ "deduplicated_train_size": 107882,
51
+ "percent_removed": 10.098333333333331,
52
+ "build_time_seconds": 3.275759290998394,
53
+ "deduplication_time_seconds": 2.4731626249995315,
54
+ "time_seconds": 5.748921915997926
55
+ },
56
+ {
57
+ "dataset": "enron_spam",
58
+ "original_train_size": 31716,
59
+ "deduplicated_train_size": 21121,
60
+ "percent_removed": 33.405851935931395,
61
+ "build_time_seconds": 1.1878026249978575,
62
+ "deduplication_time_seconds": 0.44431537499986007,
63
+ "time_seconds": 1.6321179999977176
64
+ },
65
+ {
66
+ "dataset": "subj",
67
+ "original_train_size": 8000,
68
+ "deduplicated_train_size": 7990,
69
+ "percent_removed": 0.12499999999999734,
70
+ "build_time_seconds": 0.34191370800181176,
71
+ "deduplication_time_seconds": 0.10950004199912655,
72
+ "time_seconds": 0.4514137500009383
73
+ },
74
+ {
75
+ "dataset": "sst5",
76
+ "original_train_size": 8544,
77
+ "deduplicated_train_size": 8526,
78
+ "percent_removed": 0.2106741573033699,
79
+ "build_time_seconds": 0.35040350000053877,
80
+ "deduplication_time_seconds": 0.10490237500198418,
81
+ "time_seconds": 0.45530587500252295
82
+ },
83
+ {
84
+ "dataset": "20_newgroups",
85
+ "original_train_size": 11314,
86
+ "deduplicated_train_size": 10717,
87
+ "percent_removed": 5.276648400212125,
88
+ "build_time_seconds": 0.49274829199930537,
89
+ "deduplication_time_seconds": 0.11272816700147814,
90
+ "time_seconds": 0.6054764590007835
91
+ },
92
+ {
93
+ "dataset": "hatespeech_offensive",
94
+ "original_train_size": 22783,
95
+ "deduplicated_train_size": 22233,
96
+ "percent_removed": 2.4140806741868914,
97
+ "build_time_seconds": 0.6664763750013663,
98
+ "deduplication_time_seconds": 0.2959712080009922,
99
+ "time_seconds": 0.9624475830023584
100
+ },
101
+ {
102
+ "dataset": "ade",
103
+ "original_train_size": 17637,
104
+ "deduplicated_train_size": 15723,
105
+ "percent_removed": 10.852185745875154,
106
+ "build_time_seconds": 0.5355710839976382,
107
+ "deduplication_time_seconds": 0.2090475000004517,
108
+ "time_seconds": 0.7446185839980899
109
+ },
110
+ {
111
+ "dataset": "imdb",
112
+ "original_train_size": 25000,
113
+ "deduplicated_train_size": 24847,
114
+ "percent_removed": 0.6120000000000014,
115
+ "build_time_seconds": 1.325603665998642,
116
+ "deduplication_time_seconds": 0.31292716700045276,
117
+ "time_seconds": 1.6385308329990949
118
+ },
119
+ {
120
+ "dataset": "massive_scenario",
121
+ "original_train_size": 11514,
122
+ "deduplicated_train_size": 9665,
123
+ "percent_removed": 16.05871113427132,
124
+ "build_time_seconds": 0.3495884580006532,
125
+ "deduplication_time_seconds": 0.10384745799819939,
126
+ "time_seconds": 0.4534359159988526
127
+ },
128
+ {
129
+ "dataset": "student",
130
+ "original_train_size": 117519,
131
+ "deduplicated_train_size": 69696,
132
+ "percent_removed": 40.69384525055523,
133
+ "build_time_seconds": 3.4031454579999263,
134
+ "deduplication_time_seconds": 4.874128916999325,
135
+ "time_seconds": 8.277274374999251
136
+ },
137
+ {
138
+ "dataset": "squad_v2",
139
+ "original_train_size": 130319,
140
+ "deduplicated_train_size": 110480,
141
+ "percent_removed": 15.22341331655399,
142
+ "build_time_seconds": 5.937046999999438,
143
+ "deduplication_time_seconds": 3.722715916999732,
144
+ "time_seconds": 9.65976291699917
145
+ },
146
+ {
147
+ "dataset": "wikitext",
148
+ "original_train_size": 1801350,
149
+ "deduplicated_train_size": 900554,
150
+ "percent_removed": 50.00671718433397,
151
+ "build_time_seconds": 44.6954585420026,
152
+ "deduplication_time_seconds": 29.619445874999656,
153
+ "time_seconds": 74.31490441700225
154
+ }
155
+ ]
@@ -0,0 +1,172 @@
1
+ [
2
+ {
3
+ "dataset": "bbc",
4
+ "train_size": 1225,
5
+ "test_size": 1000,
6
+ "deduplicated_test_size": 874,
7
+ "percent_removed": 12.6,
8
+ "build_time_seconds": 0.1762163750026957,
9
+ "deduplication_time_seconds": 0.10950220800077659,
10
+ "time_seconds": 0.2857185830034723
11
+ },
12
+ {
13
+ "dataset": "senteval_cr",
14
+ "train_size": 3012,
15
+ "test_size": 753,
16
+ "deduplicated_test_size": 750,
17
+ "percent_removed": 0.3984063745019917,
18
+ "build_time_seconds": 0.12137100000109058,
19
+ "deduplication_time_seconds": 0.027684791002684506,
20
+ "time_seconds": 0.14905579100377508
21
+ },
22
+ {
23
+ "dataset": "tweet_sentiment_extraction",
24
+ "train_size": 27481,
25
+ "test_size": 3534,
26
+ "deduplicated_test_size": 3411,
27
+ "percent_removed": 3.4804753820034007,
28
+ "build_time_seconds": 1.3021473750013683,
29
+ "deduplication_time_seconds": 0.1789753750017553,
30
+ "time_seconds": 1.4811227500031237
31
+ },
32
+ {
33
+ "dataset": "emotion",
34
+ "train_size": 16000,
35
+ "test_size": 2000,
36
+ "deduplicated_test_size": 1926,
37
+ "percent_removed": 3.7000000000000033,
38
+ "build_time_seconds": 0.4828177079980378,
39
+ "deduplication_time_seconds": 0.09223724999901606,
40
+ "time_seconds": 0.5750549579970539
41
+ },
42
+ {
43
+ "dataset": "amazon_counterfactual",
44
+ "train_size": 5000,
45
+ "test_size": 5000,
46
+ "deduplicated_test_size": 4990,
47
+ "percent_removed": 0.20000000000000018,
48
+ "build_time_seconds": 0.22153624999918975,
49
+ "deduplication_time_seconds": 0.21453241600102047,
50
+ "time_seconds": 0.4360686660002102
51
+ },
52
+ {
53
+ "dataset": "ag_news",
54
+ "train_size": 120000,
55
+ "test_size": 7600,
56
+ "deduplicated_test_size": 6201,
57
+ "percent_removed": 18.407894736842103,
58
+ "build_time_seconds": 3.275759290998394,
59
+ "deduplication_time_seconds": 0.6717791250011942,
60
+ "time_seconds": 3.9475384159995883
61
+ },
62
+ {
63
+ "dataset": "enron_spam",
64
+ "train_size": 31716,
65
+ "test_size": 2000,
66
+ "deduplicated_test_size": 1064,
67
+ "percent_removed": 46.8,
68
+ "build_time_seconds": 1.1878026249978575,
69
+ "deduplication_time_seconds": 0.37047674999848823,
70
+ "time_seconds": 1.5582793749963457
71
+ },
72
+ {
73
+ "dataset": "subj",
74
+ "train_size": 8000,
75
+ "test_size": 2000,
76
+ "deduplicated_test_size": 1999,
77
+ "percent_removed": 0.04999999999999449,
78
+ "build_time_seconds": 0.34191370800181176,
79
+ "deduplication_time_seconds": 0.09621087499908754,
80
+ "time_seconds": 0.4381245830008993
81
+ },
82
+ {
83
+ "dataset": "sst5",
84
+ "train_size": 8544,
85
+ "test_size": 2210,
86
+ "deduplicated_test_size": 2205,
87
+ "percent_removed": 0.2262443438914019,
88
+ "build_time_seconds": 0.35040350000053877,
89
+ "deduplication_time_seconds": 0.09645383300085086,
90
+ "time_seconds": 0.44685733300138963
91
+ },
92
+ {
93
+ "dataset": "20_newgroups",
94
+ "train_size": 11314,
95
+ "test_size": 7532,
96
+ "deduplicated_test_size": 7098,
97
+ "percent_removed": 5.762081784386619,
98
+ "build_time_seconds": 0.49274829199930537,
99
+ "deduplication_time_seconds": 1.0146297089995642,
100
+ "time_seconds": 1.5073780009988695
101
+ },
102
+ {
103
+ "dataset": "hatespeech_offensive",
104
+ "train_size": 22783,
105
+ "test_size": 2000,
106
+ "deduplicated_test_size": 1925,
107
+ "percent_removed": 3.749999999999998,
108
+ "build_time_seconds": 0.6664763750013663,
109
+ "deduplication_time_seconds": 0.11403075000271201,
110
+ "time_seconds": 0.7805071250040783
111
+ },
112
+ {
113
+ "dataset": "ade",
114
+ "train_size": 17637,
115
+ "test_size": 5879,
116
+ "deduplicated_test_size": 4953,
117
+ "percent_removed": 15.75097805749277,
118
+ "build_time_seconds": 0.5355710839976382,
119
+ "deduplication_time_seconds": 0.2526170000019192,
120
+ "time_seconds": 0.7881880839995574
121
+ },
122
+ {
123
+ "dataset": "imdb",
124
+ "train_size": 25000,
125
+ "test_size": 25000,
126
+ "deduplicated_test_size": 24797,
127
+ "percent_removed": 0.8120000000000016,
128
+ "build_time_seconds": 1.325603665998642,
129
+ "deduplication_time_seconds": 1.2251233749993844,
130
+ "time_seconds": 2.5507270409980265
131
+ },
132
+ {
133
+ "dataset": "massive_scenario",
134
+ "train_size": 11514,
135
+ "test_size": 2974,
136
+ "deduplicated_test_size": 2188,
137
+ "percent_removed": 26.429051782111635,
138
+ "build_time_seconds": 0.3495884580006532,
139
+ "deduplication_time_seconds": 0.11969712500285823,
140
+ "time_seconds": 0.4692855830035114
141
+ },
142
+ {
143
+ "dataset": "student",
144
+ "train_size": 117519,
145
+ "test_size": 5000,
146
+ "deduplicated_test_size": 2400,
147
+ "percent_removed": 52.0,
148
+ "build_time_seconds": 3.4031454579999263,
149
+ "deduplication_time_seconds": 0.9607139999970968,
150
+ "time_seconds": 4.363859457997023
151
+ },
152
+ {
153
+ "dataset": "squad_v2",
154
+ "train_size": 130319,
155
+ "test_size": 11873,
156
+ "deduplicated_test_size": 11863,
157
+ "percent_removed": 0.08422471153036737,
158
+ "build_time_seconds": 5.937046999999438,
159
+ "deduplication_time_seconds": 1.1297352090005006,
160
+ "time_seconds": 7.066782208999939
161
+ },
162
+ {
163
+ "dataset": "wikitext",
164
+ "train_size": 1801350,
165
+ "test_size": 4358,
166
+ "deduplicated_test_size": 2134,
167
+ "percent_removed": 51.032583754015604,
168
+ "build_time_seconds": 44.6954585420026,
169
+ "deduplication_time_seconds": 1.594421958001476,
170
+ "time_seconds": 46.289880500004074
171
+ }
172
+ ]
@@ -23,7 +23,7 @@ classifiers = [
23
23
 
24
24
  dependencies = [
25
25
  "model2vec>=0.3.4",
26
- "vicinity[usearch]>=0.4.3",
26
+ "vicinity[usearch]>=0.4.6",
27
27
  "frozendict",
28
28
  "pyversity",
29
29
  ]
@@ -106,3 +106,4 @@ version = {attr = "semhash.version.__version__"}
106
106
 
107
107
  [tool.uv]
108
108
  exclude-newer = "1 week"
109
+ exclude-newer-package = { vicinity = false }