embedflow 0.1.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.
- embedflow-0.1.0/CHANGELOG.md +14 -0
- embedflow-0.1.0/CITATION.cff +22 -0
- embedflow-0.1.0/CONTRIBUTING.md +53 -0
- embedflow-0.1.0/LICENSE +178 -0
- embedflow-0.1.0/MANIFEST.in +11 -0
- embedflow-0.1.0/PKG-INFO +210 -0
- embedflow-0.1.0/README.md +240 -0
- embedflow-0.1.0/README_PYPI.md +156 -0
- embedflow-0.1.0/SECURITY.md +25 -0
- embedflow-0.1.0/docs/api.md +55 -0
- embedflow-0.1.0/docs/assets/README.md +13 -0
- embedflow-0.1.0/docs/assets/candidate-gap-example.svg +49 -0
- embedflow-0.1.0/docs/assets/dashboard-screenshot.md +13 -0
- embedflow-0.1.0/docs/assets/terminal-demo.txt +19 -0
- embedflow-0.1.0/docs/cli.md +70 -0
- embedflow-0.1.0/docs/concepts.md +94 -0
- embedflow-0.1.0/docs/configuration.md +98 -0
- embedflow-0.1.0/docs/contributing-benchmarks.md +23 -0
- embedflow-0.1.0/docs/economics.md +26 -0
- embedflow-0.1.0/docs/installation.md +71 -0
- embedflow-0.1.0/docs/integrations/faiss.md +36 -0
- embedflow-0.1.0/docs/integrations/qdrant.md +52 -0
- embedflow-0.1.0/docs/limitations.md +39 -0
- embedflow-0.1.0/docs/methodology.md +74 -0
- embedflow-0.1.0/docs/quickstart.md +71 -0
- embedflow-0.1.0/docs/registry.md +84 -0
- embedflow-0.1.0/docs/releasing.md +139 -0
- embedflow-0.1.0/embedflow/__init__.py +25 -0
- embedflow-0.1.0/embedflow/__main__.py +3 -0
- embedflow-0.1.0/embedflow/analysis.py +192 -0
- embedflow-0.1.0/embedflow/cache/__init__.py +4 -0
- embedflow-0.1.0/embedflow/cache/base.py +28 -0
- embedflow-0.1.0/embedflow/cache/persistent_cache.py +198 -0
- embedflow-0.1.0/embedflow/cli.py +1200 -0
- embedflow-0.1.0/embedflow/compatibility/__init__.py +28 -0
- embedflow-0.1.0/embedflow/compatibility/candidate_gap.py +105 -0
- embedflow-0.1.0/embedflow/compatibility/containment.py +17 -0
- embedflow-0.1.0/embedflow/compatibility/evaluate.py +319 -0
- embedflow-0.1.0/embedflow/compatibility/metrics.py +75 -0
- embedflow-0.1.0/embedflow/compatibility/migration_depth.py +67 -0
- embedflow-0.1.0/embedflow/compatibility/probe.py +34 -0
- embedflow-0.1.0/embedflow/compatibility/report.py +102 -0
- embedflow-0.1.0/embedflow/compatibility/t2.py +64 -0
- embedflow-0.1.0/embedflow/config.py +455 -0
- embedflow-0.1.0/embedflow/data/__init__.py +1 -0
- embedflow-0.1.0/embedflow/data/registry/__init__.py +1 -0
- embedflow-0.1.0/embedflow/data/registry/benchmark_profiles.jsonl +3 -0
- embedflow-0.1.0/embedflow/data/registry/checksums.sha256 +4 -0
- embedflow-0.1.0/embedflow/data/registry/migrations.jsonl +15 -0
- embedflow-0.1.0/embedflow/data/registry/registry_manifest.json +16 -0
- embedflow-0.1.0/embedflow/data/registry/research_summaries.json +55 -0
- embedflow-0.1.0/embedflow/data/registry/schema_version.json +5 -0
- embedflow-0.1.0/embedflow/frozen/T2_V1_FROZEN_SPEC.md +71 -0
- embedflow-0.1.0/embedflow/frozen/T2_V1_FROZEN_SPEC.sha256 +1 -0
- embedflow-0.1.0/embedflow/indexes/__init__.py +5 -0
- embedflow-0.1.0/embedflow/indexes/base.py +60 -0
- embedflow-0.1.0/embedflow/indexes/faiss_backend.py +240 -0
- embedflow-0.1.0/embedflow/indexes/qdrant_backend.py +225 -0
- embedflow-0.1.0/embedflow/metrics/__init__.py +3 -0
- embedflow-0.1.0/embedflow/metrics/latency.py +50 -0
- embedflow-0.1.0/embedflow/migration/__init__.py +3 -0
- embedflow-0.1.0/embedflow/migration/compatibility.py +156 -0
- embedflow-0.1.0/embedflow/migration/facade.py +312 -0
- embedflow-0.1.0/embedflow/migration/materializer.py +190 -0
- embedflow-0.1.0/embedflow/migration/planner.py +78 -0
- embedflow-0.1.0/embedflow/migration/state.py +81 -0
- embedflow-0.1.0/embedflow/models/__init__.py +4 -0
- embedflow-0.1.0/embedflow/models/base.py +31 -0
- embedflow-0.1.0/embedflow/models/huggingface.py +226 -0
- embedflow-0.1.0/embedflow/registry/__init__.py +47 -0
- embedflow-0.1.0/embedflow/registry/loader.py +785 -0
- embedflow-0.1.0/embedflow/registry/matcher.py +197 -0
- embedflow-0.1.0/embedflow/registry/schema.py +266 -0
- embedflow-0.1.0/embedflow/runtime.py +115 -0
- embedflow-0.1.0/embedflow/serving/__init__.py +3 -0
- embedflow-0.1.0/embedflow/serving/api.py +161 -0
- embedflow-0.1.0/embedflow/serving/engine.py +222 -0
- embedflow-0.1.0/embedflow/serving/factory.py +3 -0
- embedflow-0.1.0/embedflow/serving/schemas.py +39 -0
- embedflow-0.1.0/embedflow.egg-info/PKG-INFO +210 -0
- embedflow-0.1.0/embedflow.egg-info/SOURCES.txt +113 -0
- embedflow-0.1.0/embedflow.egg-info/dependency_links.txt +1 -0
- embedflow-0.1.0/embedflow.egg-info/entry_points.txt +2 -0
- embedflow-0.1.0/embedflow.egg-info/requires.txt +36 -0
- embedflow-0.1.0/embedflow.egg-info/top_level.txt +2 -0
- embedflow-0.1.0/examples/faiss/README.md +15 -0
- embedflow-0.1.0/examples/faiss/documents.jsonl +12 -0
- embedflow-0.1.0/examples/faiss/embedflow.yaml +28 -0
- embedflow-0.1.0/examples/faiss/queries.jsonl +4 -0
- embedflow-0.1.0/examples/qdrant/README.md +29 -0
- embedflow-0.1.0/examples/qdrant/build_index.py +15 -0
- embedflow-0.1.0/examples/qdrant/documents.jsonl +12 -0
- embedflow-0.1.0/examples/qdrant/embedflow.yaml +30 -0
- embedflow-0.1.0/examples/qdrant/queries.jsonl +4 -0
- embedflow-0.1.0/examples/research_analysis/README.md +16 -0
- embedflow-0.1.0/examples/research_analysis/documents.jsonl +12 -0
- embedflow-0.1.0/examples/research_analysis/embedflow.yaml +24 -0
- embedflow-0.1.0/examples/research_analysis/qrels.json +6 -0
- embedflow-0.1.0/examples/research_analysis/queries.jsonl +4 -0
- embedflow-0.1.0/frozen/T2_V1_FROZEN_SPEC.md +71 -0
- embedflow-0.1.0/frozen/T2_V1_FROZEN_SPEC.sha256 +1 -0
- embedflow-0.1.0/pyproject.toml +76 -0
- embedflow-0.1.0/requirements-dev.txt +5 -0
- embedflow-0.1.0/requirements.txt +8 -0
- embedflow-0.1.0/scripts/real_qdrant_smoke.py +95 -0
- embedflow-0.1.0/scripts/release_gate.py +446 -0
- embedflow-0.1.0/scripts/run_demo.sh +9 -0
- embedflow-0.1.0/scripts/run_tests.sh +9 -0
- embedflow-0.1.0/setup.cfg +4 -0
- embedflow-0.1.0/src/__init__.py +1 -0
- embedflow-0.1.0/src/embed.py +123 -0
- embedflow-0.1.0/src/probe_features.py +24 -0
- embedflow-0.1.0/src/storage.py +51 -0
- embedflow-0.1.0/src/t2_v1.py +21 -0
- embedflow-0.1.0/src/utils.py +53 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## v0.1.0 — initial public release
|
|
4
|
+
|
|
5
|
+
- Candidate-compatibility analysis and Mode A evaluation workflows.
|
|
6
|
+
- Frozen T2-v1 finite-tail diagnostic with explicit empirical-warning language.
|
|
7
|
+
- FAISS and Qdrant index adapters.
|
|
8
|
+
- Persistent target-vector cache and progressive materialization queue.
|
|
9
|
+
- FastAPI service, search/status/prewarm endpoints, and dashboard.
|
|
10
|
+
- Latency telemetry, economics projections, report generation, and demos.
|
|
11
|
+
- Public packaging, examples, tests, CI configuration, and contributor docs.
|
|
12
|
+
|
|
13
|
+
This is an early open-source release. See the limitations in the README and
|
|
14
|
+
`docs/concepts.md` before using it for a production migration.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
cff-version: 1.2.0
|
|
2
|
+
title: "EmbedFlow: Upgrading Legacy Embeddings Without Full Upfront Re-Embedding"
|
|
3
|
+
message: "If EmbedFlow contributes to your work, please cite this software release."
|
|
4
|
+
type: software
|
|
5
|
+
version: 0.1.0
|
|
6
|
+
date-released: 2026-09-06
|
|
7
|
+
repository-code: "https://github.com/arnsri33/embedflow"
|
|
8
|
+
url: "https://github.com/arnsri33/embedflow"
|
|
9
|
+
license: Apache-2.0
|
|
10
|
+
authors:
|
|
11
|
+
- family-names: "Srivastav"
|
|
12
|
+
given-names: "Arnav"
|
|
13
|
+
keywords:
|
|
14
|
+
- embeddings
|
|
15
|
+
- vector search
|
|
16
|
+
- information retrieval
|
|
17
|
+
- progressive migration
|
|
18
|
+
- RAG
|
|
19
|
+
abstract: >-
|
|
20
|
+
EmbedFlow analyzes whether a legacy embedding index can serve as a candidate
|
|
21
|
+
pool for a new embedding model and provides progressive target-vector
|
|
22
|
+
materialization while the new model is serving.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Contributing to EmbedFlow
|
|
2
|
+
|
|
3
|
+
Thanks for helping make progressive embedding migration useful and rigorous.
|
|
4
|
+
|
|
5
|
+
## Development setup
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
python -m venv .venv
|
|
9
|
+
source .venv/bin/activate
|
|
10
|
+
python -m pip install -e '.[dev]'
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Optional integrations can be installed with `.[faiss]`, `.[qdrant]`,
|
|
14
|
+
`.[models]`, or `.[dashboard]`.
|
|
15
|
+
|
|
16
|
+
## Checks before opening a pull request
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
ruff check .
|
|
20
|
+
pytest -q
|
|
21
|
+
python -m build
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Keep tests CPU-safe. Mark GPU-only tests explicitly and make them skip cleanly
|
|
25
|
+
when CUDA or model weights are unavailable.
|
|
26
|
+
|
|
27
|
+
## Adding a vector database backend
|
|
28
|
+
|
|
29
|
+
Implement the `VectorIndex` contract in `embedflow/indexes/base.py`, including
|
|
30
|
+
`search`, `size`, `metadata`, and persistence/connection behavior. Add the
|
|
31
|
+
backend behind an explicit optional dependency, validate dimensions and metric
|
|
32
|
+
semantics, document credentials through environment variables, and add an
|
|
33
|
+
integration test that skips when the service is unavailable. Do not report ANN
|
|
34
|
+
health as PASS unless an exact/reference comparison has actually been run.
|
|
35
|
+
|
|
36
|
+
## Adding a model adapter
|
|
37
|
+
|
|
38
|
+
Preserve the `EmbeddingModel` contract: query/document encoding, dimension,
|
|
39
|
+
normalization, pooling, prompts, and a semantic fingerprint. Add tests for
|
|
40
|
+
the fingerprint and for query/document shape and normalization behavior.
|
|
41
|
+
|
|
42
|
+
## Research and reproducibility
|
|
43
|
+
|
|
44
|
+
Do not modify the frozen T2-v1 implementation or its hash specification as a
|
|
45
|
+
side effect of product changes. Changes to metrics or evaluation semantics
|
|
46
|
+
must include a regression test and an explanation in the pull request.
|
|
47
|
+
|
|
48
|
+
## Pull requests
|
|
49
|
+
|
|
50
|
+
Describe the user-visible behavior, compatibility implications, test commands,
|
|
51
|
+
and any limitations. Keep changes focused, avoid committing generated caches,
|
|
52
|
+
model weights, private data, or credentials, and update documentation for new
|
|
53
|
+
CLI flags or configuration fields.
|
embedflow-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
Copyright 2026 Arnav Srivastav
|
|
2
|
+
|
|
3
|
+
Apache License
|
|
4
|
+
Version 2.0, January 2004
|
|
5
|
+
http://www.apache.org/licenses/
|
|
6
|
+
|
|
7
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
8
|
+
|
|
9
|
+
1. Definitions.
|
|
10
|
+
|
|
11
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
12
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
13
|
+
|
|
14
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
15
|
+
the copyright owner that is granting the License.
|
|
16
|
+
|
|
17
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
18
|
+
other entities that control, are controlled by, or are under common
|
|
19
|
+
control with that entity. For the purposes of this definition,
|
|
20
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
21
|
+
direction or management of such entity, whether by contract or
|
|
22
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
23
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
24
|
+
|
|
25
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
26
|
+
exercising permissions granted by this License.
|
|
27
|
+
|
|
28
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
29
|
+
including but not limited to software source code, documentation
|
|
30
|
+
source, and configuration files.
|
|
31
|
+
|
|
32
|
+
"Object" form shall mean any form resulting from mechanical
|
|
33
|
+
transformation or translation of a Source form, including but
|
|
34
|
+
not limited to compiled object code, generated documentation,
|
|
35
|
+
and conversions to other media types.
|
|
36
|
+
|
|
37
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
38
|
+
Object form, made available under the License, as indicated by a
|
|
39
|
+
copyright notice that is included in or attached to the work
|
|
40
|
+
(an example is provided in the Appendix below).
|
|
41
|
+
|
|
42
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
43
|
+
form, that is based on (or derived from) the Work and for which the
|
|
44
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
45
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
46
|
+
of this License, Derivative Works shall not include works that remain
|
|
47
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
48
|
+
the Work and Derivative Works thereof.
|
|
49
|
+
|
|
50
|
+
"Contribution" shall mean any work of authorship, including
|
|
51
|
+
the original version of the Work and any modifications or additions
|
|
52
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
53
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
54
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
55
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
56
|
+
means any form of electronic, verbal, or written communication sent
|
|
57
|
+
to the Licensor or its representatives, including but not limited to
|
|
58
|
+
communication on electronic mailing lists, source code control systems,
|
|
59
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
60
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
61
|
+
excluding communication that is conspicuously marked or otherwise
|
|
62
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
63
|
+
|
|
64
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
65
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
66
|
+
subsequently incorporated within the Work.
|
|
67
|
+
|
|
68
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
69
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
70
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
71
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
72
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
73
|
+
Work and such Derivative Works in Source or Object form.
|
|
74
|
+
|
|
75
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
76
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
77
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
78
|
+
(except as stated in this section) patent license to make, have made,
|
|
79
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
80
|
+
where such license applies only to those patent claims licensable
|
|
81
|
+
by such Contributor that are necessarily infringed by their
|
|
82
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
83
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
84
|
+
institute patent litigation against any entity (including a
|
|
85
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
86
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
87
|
+
or contributory patent infringement, then any patent licenses
|
|
88
|
+
granted to You under this License for that Work shall terminate
|
|
89
|
+
as of the date such litigation is filed.
|
|
90
|
+
|
|
91
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
92
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
93
|
+
modifications, and in Source or Object form, provided that You
|
|
94
|
+
meet the following conditions:
|
|
95
|
+
|
|
96
|
+
(a) You must give any other recipients of the Work or
|
|
97
|
+
Derivative Works a copy of this License; and
|
|
98
|
+
|
|
99
|
+
(b) You must cause any modified files to carry prominent notices
|
|
100
|
+
stating that You changed the files; and
|
|
101
|
+
|
|
102
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
103
|
+
that You distribute, all copyright, patent, trademark, and
|
|
104
|
+
attribution notices from the Source form of the Work,
|
|
105
|
+
excluding those notices that do not pertain to any part of
|
|
106
|
+
the Derivative Works; and
|
|
107
|
+
|
|
108
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
109
|
+
distribution, then any Derivative Works that You distribute must
|
|
110
|
+
include a readable copy of the attribution notices contained
|
|
111
|
+
within such NOTICE file, excluding those notices that do not
|
|
112
|
+
pertain to any part of the Derivative Works, in at least one
|
|
113
|
+
of the following places: within a NOTICE text file distributed
|
|
114
|
+
as part of the Derivative Works; within the Source form or
|
|
115
|
+
documentation, if provided along with the Derivative Works; or,
|
|
116
|
+
within a display generated by the Derivative Works, if and
|
|
117
|
+
wherever such third-party notices normally appear. The contents
|
|
118
|
+
of the NOTICE file are for informational purposes only and
|
|
119
|
+
do not modify the License. You may add Your own attribution
|
|
120
|
+
notices within Derivative Works that You distribute, alongside
|
|
121
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
122
|
+
that such additional attribution notices cannot be construed
|
|
123
|
+
as modifying the License.
|
|
124
|
+
|
|
125
|
+
You may add Your own copyright statement to Your modifications and
|
|
126
|
+
may provide additional or different license terms and conditions
|
|
127
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
128
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
129
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
130
|
+
the conditions stated in this License.
|
|
131
|
+
|
|
132
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
133
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
134
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
135
|
+
this License, without any additional terms or conditions.
|
|
136
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
137
|
+
the terms of any separate license agreement you may have executed
|
|
138
|
+
with Licensor regarding such Contributions.
|
|
139
|
+
|
|
140
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
141
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
142
|
+
except as required for reasonable and customary use in describing the
|
|
143
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
144
|
+
|
|
145
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
146
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
147
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
148
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
149
|
+
implied, including, without limitation, any warranties or conditions
|
|
150
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
151
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
152
|
+
appropriateness of using or redistributing the Work and assume any
|
|
153
|
+
risks associated with Your exercise of permissions under this License.
|
|
154
|
+
|
|
155
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
156
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
157
|
+
unless required by applicable law (such as deliberate and grossly
|
|
158
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
159
|
+
liable to You for damages, including any direct, indirect, special,
|
|
160
|
+
incidental, or consequential damages of any character arising as a
|
|
161
|
+
result of this License or out of the use or inability to use the
|
|
162
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
163
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
164
|
+
other commercial damages or losses), even if such Contributor
|
|
165
|
+
has been advised of the possibility of such damages.
|
|
166
|
+
|
|
167
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
168
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
169
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
170
|
+
or other liability obligations and/or rights consistent with this
|
|
171
|
+
License. However, in accepting such obligations, You may act only
|
|
172
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
173
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
174
|
+
defend, and hold each Contributor harmless for any liability
|
|
175
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
176
|
+
of your accepting any such warranty or additional liability.
|
|
177
|
+
|
|
178
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
include README.md README_PYPI.md LICENSE CHANGELOG.md CONTRIBUTING.md SECURITY.md CITATION.cff requirements.txt requirements-dev.txt
|
|
2
|
+
recursive-include docs *
|
|
3
|
+
recursive-include examples *.md *.yaml *.json *.jsonl *.py
|
|
4
|
+
recursive-include scripts *.sh *.py
|
|
5
|
+
recursive-include frozen *.md *.sha256
|
|
6
|
+
prune .github
|
|
7
|
+
prune tests
|
|
8
|
+
global-exclude __pycache__
|
|
9
|
+
global-exclude *.py[cod]
|
|
10
|
+
global-exclude *.index *.npy *.npz *.sqlite *.sqlite3 *.db
|
|
11
|
+
global-exclude *.safetensors *.bin *.pt *.pth *.onnx
|
embedflow-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: embedflow
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Progressive embedding-model migration over existing vector indexes.
|
|
5
|
+
Author: Arnav Srivastav
|
|
6
|
+
License-Expression: Apache-2.0
|
|
7
|
+
Project-URL: Homepage, https://embedflow.org
|
|
8
|
+
Project-URL: Repository, https://github.com/arnsri33/embedflow
|
|
9
|
+
Project-URL: Documentation, https://github.com/arnsri33/embedflow#readme
|
|
10
|
+
Project-URL: Issues, https://github.com/arnsri33/embedflow/issues
|
|
11
|
+
Keywords: embeddings,vector-search,rag,information-retrieval,faiss,qdrant
|
|
12
|
+
Classifier: Development Status :: 3 - Alpha
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: Intended Audience :: Science/Research
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Description-Content-Type: text/markdown
|
|
22
|
+
License-File: LICENSE
|
|
23
|
+
Requires-Dist: numpy>=1.24
|
|
24
|
+
Requires-Dist: pyyaml>=6.0
|
|
25
|
+
Requires-Dist: tqdm>=4.65
|
|
26
|
+
Provides-Extra: faiss
|
|
27
|
+
Requires-Dist: faiss-cpu>=1.8.0; extra == "faiss"
|
|
28
|
+
Provides-Extra: qdrant
|
|
29
|
+
Requires-Dist: qdrant-client>=1.9; extra == "qdrant"
|
|
30
|
+
Provides-Extra: models
|
|
31
|
+
Requires-Dist: huggingface-hub>=0.20; extra == "models"
|
|
32
|
+
Requires-Dist: transformers>=4.45; extra == "models"
|
|
33
|
+
Requires-Dist: sentence-transformers>=3.0; extra == "models"
|
|
34
|
+
Requires-Dist: torch>=2.2; extra == "models"
|
|
35
|
+
Provides-Extra: dashboard
|
|
36
|
+
Requires-Dist: fastapi>=0.100; extra == "dashboard"
|
|
37
|
+
Requires-Dist: uvicorn[standard]>=0.23; extra == "dashboard"
|
|
38
|
+
Requires-Dist: pydantic>=2.0; extra == "dashboard"
|
|
39
|
+
Provides-Extra: all
|
|
40
|
+
Requires-Dist: faiss-cpu>=1.8.0; extra == "all"
|
|
41
|
+
Requires-Dist: qdrant-client>=1.9; extra == "all"
|
|
42
|
+
Requires-Dist: huggingface-hub>=0.20; extra == "all"
|
|
43
|
+
Requires-Dist: transformers>=4.45; extra == "all"
|
|
44
|
+
Requires-Dist: sentence-transformers>=3.0; extra == "all"
|
|
45
|
+
Requires-Dist: torch>=2.2; extra == "all"
|
|
46
|
+
Requires-Dist: fastapi>=0.100; extra == "all"
|
|
47
|
+
Requires-Dist: uvicorn[standard]>=0.23; extra == "all"
|
|
48
|
+
Requires-Dist: pydantic>=2.0; extra == "all"
|
|
49
|
+
Provides-Extra: dev
|
|
50
|
+
Requires-Dist: pytest>=8.0; extra == "dev"
|
|
51
|
+
Requires-Dist: ruff>=0.5; extra == "dev"
|
|
52
|
+
Requires-Dist: build>=1.2; extra == "dev"
|
|
53
|
+
Dynamic: license-file
|
|
54
|
+
|
|
55
|
+
# EmbedFlow
|
|
56
|
+
|
|
57
|
+
**Progressive embedding-model migration over existing vector indexes.**
|
|
58
|
+
|
|
59
|
+
EmbedFlow lets a new embedding model serve over candidates from an existing
|
|
60
|
+
vector index while target document vectors are materialized progressively. It
|
|
61
|
+
supports migration analysis, persistent caching, background work, FAISS,
|
|
62
|
+
Qdrant, a CLI, and FastAPI.
|
|
63
|
+
|
|
64
|
+
The full project README and architecture diagram are on
|
|
65
|
+
<https://github.com/arnsri33/embedflow>.
|
|
66
|
+
|
|
67
|
+
## Install
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
python -m pip install embedflow
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
For FAISS and the dashboard:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
python -m pip install "embedflow[faiss,dashboard]"
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
Qdrant and model-runtime extras are documented in the
|
|
80
|
+
[installation guide](https://github.com/arnsri33/embedflow/blob/main/docs/installation.md).
|
|
81
|
+
For model-backed analysis, install `embedflow[faiss,models,dashboard]`.
|
|
82
|
+
|
|
83
|
+
## Why EmbedFlow?
|
|
84
|
+
|
|
85
|
+
Embedding-model upgrades usually mean re-embedding the corpus and building a
|
|
86
|
+
second index before the new model can serve. EmbedFlow tests whether the
|
|
87
|
+
existing retriever can remain useful during that transition.
|
|
88
|
+
|
|
89
|
+
Different representation spaces can still preserve useful retrieval
|
|
90
|
+
neighborhoods. EmbedFlow retrieves a bounded source candidate set, scores those
|
|
91
|
+
candidates with the target model, and fills a persistent target-vector cache in
|
|
92
|
+
the background.
|
|
93
|
+
|
|
94
|
+
## Try it
|
|
95
|
+
|
|
96
|
+
The deterministic demo needs no paid service or model download. From a source
|
|
97
|
+
checkout, run:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
./scripts/run_demo.sh
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Open <http://127.0.0.1:8000/>. The first search can be `COLD` or `PARTIAL`;
|
|
104
|
+
repeated traffic becomes `WARM` as target vectors are materialized.
|
|
105
|
+
|
|
106
|
+
## Analyze a migration
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
embedflow analyze \
|
|
110
|
+
--documents ./documents.jsonl \
|
|
111
|
+
--index ./legacy.index \
|
|
112
|
+
--source-model sentence-transformers/all-MiniLM-L6-v2 \
|
|
113
|
+
--target-model Qwen/Qwen3-Embedding-0.6B \
|
|
114
|
+
--probe-queries ./probe_queries.jsonl \
|
|
115
|
+
--device cuda \
|
|
116
|
+
--output-dir ./analysis
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
The report includes the frozen T2-v1 diagnostic (`SAFE`, `EXPAND`, or
|
|
120
|
+
`UNSAFE_OR_UNCERTAIN`), a recommended initial candidate depth, and ANN health.
|
|
121
|
+
`SAFE` is an empirical deployment signal; validate important migrations on the
|
|
122
|
+
target corpus.
|
|
123
|
+
|
|
124
|
+
Start progressive serving with:
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
embedflow serve --config ./analysis/embedflow.analysis.yaml --device cuda
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Known migration evidence
|
|
131
|
+
|
|
132
|
+
EmbedFlow ships a versioned registry of measured results from the research
|
|
133
|
+
study. Matching model contracts provide useful starting depths and show what
|
|
134
|
+
was observed on earlier corpora; a new corpus still receives its own analysis.
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
embedflow registry list
|
|
138
|
+
embedflow registry show \
|
|
139
|
+
--source Qwen/Qwen3-Embedding-4B \
|
|
140
|
+
--target Qwen/Qwen3-Embedding-8B
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
Selected core records (nDCG@10, `G(50)`):
|
|
144
|
+
|
|
145
|
+
| Source | Target | Evaluation | `G(50)` | Observed depth |
|
|
146
|
+
| --- | --- | --- | ---: | ---: |
|
|
147
|
+
| MiniLM-L6-v2 | Qwen3-8B | BRIGHT, 413K | 0.03665 | — |
|
|
148
|
+
| Qwen3-0.6B | Qwen3-8B | BRIGHT, 413K | 0.01465 | 200 |
|
|
149
|
+
| Qwen3-4B | Qwen3-8B | BRIGHT, 413K | 0.00347 | 20 |
|
|
150
|
+
| MiniLM-L6-v2 | Qwen3-8B | Natural Questions, 1M | 0.03255 | 500 |
|
|
151
|
+
| Qwen3-4B | Qwen3-8B | Natural Questions, 1M | -0.00043 | 20 |
|
|
152
|
+
|
|
153
|
+
See the [registry documentation](https://github.com/arnsri33/embedflow/blob/main/docs/registry.md)
|
|
154
|
+
for matching levels, contract fingerprints, and provenance.
|
|
155
|
+
|
|
156
|
+
## Research
|
|
157
|
+
|
|
158
|
+
For candidate depth `K`, EmbedFlow measures:
|
|
159
|
+
|
|
160
|
+
```text
|
|
161
|
+
G(K) = M_T - M_{T|S_K}
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
Lower `G(K)` means the source candidate pool recovers more of native target
|
|
165
|
+
retrieval quality. Containment reports neighborhood overlap separately. The
|
|
166
|
+
study includes 63 development settings, frozen BRIGHT validation, and Natural
|
|
167
|
+
Questions scale experiments through 1M documents.
|
|
168
|
+
|
|
169
|
+
Read the [concepts](https://github.com/arnsri33/embedflow/blob/main/docs/concepts.md)
|
|
170
|
+
and [methodology](https://github.com/arnsri33/embedflow/blob/main/docs/methodology.md)
|
|
171
|
+
for definitions and reproduction details.
|
|
172
|
+
|
|
173
|
+
## Integrations
|
|
174
|
+
|
|
175
|
+
| Backend | Status |
|
|
176
|
+
| --- | --- |
|
|
177
|
+
| FAISS | Supported |
|
|
178
|
+
| Qdrant | Supported |
|
|
179
|
+
|
|
180
|
+
See the [FAISS guide](https://github.com/arnsri33/embedflow/blob/main/docs/integrations/faiss.md)
|
|
181
|
+
and [Qdrant guide](https://github.com/arnsri33/embedflow/blob/main/docs/integrations/qdrant.md).
|
|
182
|
+
|
|
183
|
+
## CLI
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
embedflow --help
|
|
187
|
+
embedflow analyze --help
|
|
188
|
+
embedflow serve --config ./embedflow.yaml
|
|
189
|
+
embedflow status --config ./embedflow.yaml
|
|
190
|
+
embedflow registry list
|
|
191
|
+
embedflow economics --corpus-size 1000000000 --docs-per-second 106.98 --gpu-price 3.29
|
|
192
|
+
embedflow doctor --config ./embedflow.yaml
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
The [CLI reference](https://github.com/arnsri33/embedflow/blob/main/docs/cli.md)
|
|
196
|
+
and [API reference](https://github.com/arnsri33/embedflow/blob/main/docs/api.md)
|
|
197
|
+
cover the remaining commands and endpoints.
|
|
198
|
+
|
|
199
|
+
## Status
|
|
200
|
+
|
|
201
|
+
EmbedFlow v0.1.0 is an alpha release for research and early real-world
|
|
202
|
+
testing. T2-v1 is an empirical finite-tail diagnostic, partial rankings can
|
|
203
|
+
differ from fully warm target reranking, and ANN fidelity needs a reference
|
|
204
|
+
comparison to audit.
|
|
205
|
+
|
|
206
|
+
## Links
|
|
207
|
+
|
|
208
|
+
- [GitHub repository](https://github.com/arnsri33/embedflow)
|
|
209
|
+
- [Documentation](https://github.com/arnsri33/embedflow#readme)
|
|
210
|
+
- [License](https://github.com/arnsri33/embedflow/blob/main/LICENSE)
|