Dossier · F5.6
Local or cloud model
Is local as good as cloud.
- Candidate
- Hypothesis card
- Quick test
- Gate
- Pilot
- Report
- Status
- Planned
- Stage
- –
- Scale
- S, quick test
- Roadmap task
- F5.6
- Preregistration
- Not frozen yet
- Dossier version
- 0.1
- Updated
- 2026-09-28
- Data
- –
Business applications
Helps a team decide whether a model run in-house is enough for searching Polish documents, or whether to stay with a cloud one.
Applications
Application: Choosing the embedding model for search over Polish documents
- Who uses it
- a team that chooses or changes the embedding model in a search system
- Conditions and limits
- The decision rests on comparing both models on the same questions and the same set of public Polish documents, with a tolerance set before the measurement. Applies only to the models that were checked.
Application: Deciding whether embeddings can be computed on your own hardware
- Who uses it
- the IT department and the people responsible for data
- Conditions and limits
- Needs two things at once: quality must not be worse by more than the agreed tolerance, and the model must run on the target hardware in a reasonable time. Cloud models change without notice, so the result describes the versions used in the study.
If we confirm, if we refute
- If we confirm: the model run in-house is good enough to replace the cloud one for documents like these. A team can consider it instead of the cloud one, and a separate feasibility test still decides about the hardware.
- If we refute: the model run in-house does noticeably worse. For documents like these a team stays with the cloud model.
What not to conclude from this
- The result concerns specific models and one public Polish corpus. We do not carry it over to other models or other data.
- The experiment measures search quality and technical feasibility on one machine. It does not measure cost or how stable a cloud model is over time.
- An "inconclusive" result (the interval includes the threshold) means the sample was too small. We do not treat it as a refutation.
What to check next
- Repeat the measurement on a second corpus before anyone bases a rollout decision on the result.
- After the hypothesis card is frozen and the first run is done, generate this page again, because the result will change.
Composed from this dossier; the owner approved the text.
Abstract
Text search needs an embedding model. We will test whether a model run locally gives search results no worse than a cloud model on a Polish public corpus. The experiment is planned and nothing has been measured yet.
Question and hypothesis
The question: is a local embedding model equivalent to a cloud one. This is an equivalence hypothesis: the threshold for an acceptable difference will be written in the hypothesis card before the measurement.
Preregistration
There is no hypothesis card. The card will be frozen and published before the first measurement.
Hypothesis card · Card version 1
Hypothesis: a local embedding model is not worse than a cloud one by more than Δ in nDCG@10
The card of experiment F5.6. Until the owner approves this card it is a draft: it is not frozen and nothing has been measured on its basis. The value of Δ and the sample sizes will be set after the tuning sample but before the main sample is opened, and only once they are written in can the card be frozen.
Problem
Search by meaning needs an embedding model, a model that turns text into a numerical description of its sense. It can be run on your own hardware or rented as a cloud service. The choice matters to any company that keeps confidential documents or does not want to send them outside the organization. We do not know how much search quality in Polish is lost by moving to a local model, or whether that difference matters in practice.
We are not asking which model is better in general. We are asking whether the local model is good enough for the decision to stay on your own hardware to rest on search quality. Caution alone is not enough.
Hypothesis
- H1: a local embedding model is not worse than the cloud one by more than Δ in nDCG@10, on the same questions and the same public Polish corpus. H1 is supported when the lower bound of the 95% confidence interval of the difference (local minus cloud) is above −Δ.
- H0: the difference is worse than −Δ, or its confidence interval includes −Δ.
The test is one-sided: a local model that turns out better supports H1. Δ is written as a number before the main sample is opened and derived from an anchor that does not depend on the local model's result (see Metrics). Feasibility on your own hardware is a separate condition and is not part of H1.
Metrics
Role: deciding
- Metric
- ndcg10_diff
- Definition
- difference in nDCG@10, local minus cloud, computed in pairs per question
- Threshold
- lower bound of the 95% interval above −Δ
- Baseline
- the cloud model
- How computed
- bootstrap over questions
Role: supporting
- Metric
- recall100_diff
- Definition
- difference in recall@100, local minus cloud
- Threshold
- no threshold
- Baseline
- the cloud model
- How computed
- bootstrap over questions
Role: supporting
- Metric
- cloud_drift
- Definition
- largest difference in nDCG@10 between three runs of the cloud model on different days
- Threshold
- Δ must be larger
- Baseline
- the same cloud model
- How computed
- bootstrap over questions
Role: supporting
- Metric
- bm25_gap
- Definition
- difference in nDCG@10, cloud model minus BM25
- Threshold
- derives Δ
- Baseline
- BM25
- How computed
- bootstrap over questions
Role: guard (feasibility)
- Metric
- query_p95
- Definition
- 95th percentile of one query time of the local model on K12
- Threshold
- at most 500 ms
- Baseline
- not applicable
- How computed
- percentile over three runs
Role: guard (feasibility)
- Metric
- index_time
- Definition
- time to index the whole corpus on K12
- Threshold
- at most 6 hours
- Baseline
- not applicable
- How computed
- median over three runs
Δ is half the value of bm25_gap measured on the tuning sample, provided that it is larger than cloud_drift. If bm25_gap is smaller than twice cloud_drift, the test set does not tell a good model from a simple reference point and the decision is CLOSED. We write Δ as a number in the card before freezing and do not change it afterwards.
Confidence intervals: bootstrap over questions (10,000 repetitions, seed 20260929, percentiles 2.5 and 97.5). Both models run on the same questions, so the resampling is shared.
Samples
Sample: tuning
- Size
- 100 questions
- Sampling method
- random from the corpus questions
- Seed
- 20260929
- Checksum
- set before freezing
Sample: control (opened once)
- Size
- 100 questions
- Sampling method
- random, disjoint from tuning
- Seed
- 20260929
- Checksum
- set before freezing
Sample: main
- Size
- N questions
- Sampling method
- the rest, disjoint from both
- Seed
- 20260930
- Checksum
- set before freezing
N is set after the spread of differences is measured on the tuning sample, but before the main sample is opened. For the half-width of the interval not to exceed Δ/2 we need N ≥ (2·1.96·σ/Δ)², where σ is the standard deviation of the nDCG@10 difference over questions, measured on the tuning sample. If the corpus has fewer questions than the formula requires, we describe the result as able to rule out only large differences.
Data: public texts only. Only texts from the public corpus go to the cloud model. The proposed corpus is the Polish benchmark PIRB; the benchmark code is licensed under Apache-2.0, but the project page does not state the licences of the individual datasets, so each subset is added to the allowed-sources list only after its licence is checked and the reasoning is recorded.
Configurations
Name: local
- Model
- bge-m3 (
lab/models.yaml, MIT licence) - Variant
- dense embeddings
- Parameters
- 1024 dimensions, up to 8192 tokens, run on K12
Name: cloud
- Model
- text-embedding-3-large (OpenAI), identifier and query date recorded on every run
- Variant
- dense embeddings
- Parameters
- 3072 dimensions, service default parameters, three runs on different days
Name: bm25 (reference point)
- Model
- BM25
- Variant
- keyword search
- Parameters
- library default parameters, recorded in the configuration
The same corpus, the same questions, the same way of splitting text into chunks and the same similarity measure for both models. Every run records the code commit, the model version and the date. Changing the model, the chunking, the measure or the thresholds after the card is frozen requires a new version of the card. Before the first run we must check that the cloud service's terms allow publishing the comparison results and record that in lab/models.yaml together with its basis.
The assumption everything depends on
The set of questions and gold answers tells better search from worse well. We measure this instead of assuming it: if the cloud model does not beat BM25 by a visible margin (bm25_gap at least twice cloud_drift), the test has nothing to derive a sensible Δ from and the experiment ends with the decision CLOSED. We draw no conclusion about the models in that case.
Gate criteria
- G1 (S to M). Data: the tuning and control samples. First we check the assumption: bm25_gap at least twice cloud_drift, otherwise CLOSED. Then quality: GO when the lower bound of the 95% interval of ndcg10_diff is above −Δ. NOT-NOW with a condition for return (a larger sample) when the interval crosses −Δ and the central estimate of the difference is above −Δ. NO-GO when the upper bound of the interval is below −Δ or the central estimate lies below −Δ. Feasibility is described separately: query_p95 and index_time either met or not met, without affecting the quality decision. The published result has two independent rows: one for quality and one for feasibility.
- G2 (M to L). Data: the main sample. The same conditions as G1. In addition the drift of the cloud model is described and, if available, the result repeated on a second corpus. GO at G2 permits the wording "the local model is not worse by more than Δ on this corpus", never "the local model is as good".
Stopping condition
- If the cloud service returns errors for more than 5% of questions in any run, we stop the measurement, describe the cause and write a new version of the card.
- If the licence of any corpus subset rules out publishing the results, we exclude it before the measurement. After the measurement we remove nothing.
- If the cloud service's terms do not allow publishing the comparison, we stop before the first run and choose another cloud model in a new version of the card.
What this method will not detect
- Results on the vocabulary of a specific company: a public corpus does not replace its documents.
- Behaviour on documents longer than the chunks used in the test.
- Costs and legal requirements when choosing between a local and a cloud model. We measure search quality and technical feasibility.
- Changes in the cloud model after the day of measurement. We measure drift only within a window of a few days.
- Weaknesses common to both models, for example wrong gold answers in the corpus.
Related work
- Dadas et al., 2024 (PIRB): a test set for comparing Polish retrieval models. They compare many models on many datasets; we ask one question about the non-inferiority of a local model with a threshold frozen in advance and a separate feasibility measurement.
- Chen et al., 2024 (BGE M3-Embedding): the model we check on the local side.
- Muennighoff et al., 2023 (MTEB): a broad set of embedding tests. We do not compare rankings; we test one hypothesis with a one-sided threshold.
- Schuirmann, 1987: the classic equivalence and non-inferiority tests, from which we take a one-sided test with a margin.
Data
A Polish public corpus. We send only public texts to the cloud model. The sources will go on the allowlist with a reason and a legal basis.
No data files yet.
Method
The same queries and the same corpus for both models, a comparison of search quality with confidence intervals and an equivalence test with the threshold from the card. The experiment depends on the previous one (F5.5).
Runs
No runs yet. The first run will appear once the hypothesis card is frozen. Every run gets a note: model, variant, parameters, code commit, result and anything that went wrong or looked odd.
Results
No results yet. We publish results on the day they are produced, negative ones too, with confidence intervals and a link to the raw data.
Gate decisions
No decision has been made yet. Gate G1 comes after the quick test and G2 after the pilot. Every decision is published together with the results it rests on.
How to reproduce
Not applicable until there are runs.
Limitations
We will write the limitations in the hypothesis card. It is already known that the result will concern specific models and one corpus, and that cloud models change without notice.
References
None.
Deviations and change log
Date: 2026-09-28
- Version
- 0.1
- Change
- Dossier of a planned experiment created.
How to cite
Cite this dossier in the version you used. The DOI will be added when releases are archived.
Exocortex R&D (2026). Local or cloud model. Dossier of hypothesis F5.6, version 0.1. https://lab.exocortex.zone/en/hypotheses/local-vs-cloud-embeddings/
@misc{exocortexrd2026localvscloudembeddings,
author = {Exocortex R\&D},
title = {Local or cloud model},
year = {2026},
version = {0.1},
url = {https://lab.exocortex.zone/en/hypotheses/local-vs-cloud-embeddings/},
note = {Dossier of hypothesis F5.6}
}DOI: not yet assigned · Change history in the repository