--- pretty_name: APOC offline knowledge index language: - en license: other license_name: mixed-source-licenses license_link: https://huggingface.co/datasets/MannyMorningstar/APOC-embedding/blob/main/README.md#licensing-and-attribution tags: - retrieval - embeddings - offline - survival - bge-small - faiss - sqlite-fts5 size_categories: - 10M= 0` bits (384). Recommended search nprobe 1024, 10,000 candidates. Never mix v1 and v2 vectors. **v1 (historical; its vectors were removed on 2026-11-11):** query vectors for v1 were produced this way: - Encoder: [`BAAI/bge-small-en-v1.5`](https://huggingface.co/BAAI/bge-small-en-v1.5), revision `5c38ec7c405ec4b44b94cc5a9bb96e735b38267a`, **max length 256**, CLS pooling, L2-normalized 384-dimensional output. - Queries are prefixed with exactly `Represent this sentence for searching relevant passages: `. Passages have no prefix. - Projection 384 → 256 with a Gaussian matrix seeded `20261017 + 384`, divided by sqrt(256), then L2-normalized again. This is a projection, not truncation. - `vectors-*.npy`: projected normalized float16. `ids-*.npy`: int64 chunk IDs. - `ann/`: int8 vectors (`rint(clip(x, -1, 1) * 127)`) and a FAISS `IndexBinaryIVF_HNSW16` over sign bits (`int8 >= 0`), for candidate generation followed by exact int8 squared-L2 reranking. Binary codes are not the original vectors. Recommended: nprobe 64, 5,000 candidates. - Chunking: target 320 tokens, overlap 48, tokenizer SHA-256 `d241a60d5e8f04cc1b2b3e9ef7a4921b27bf526d9f6050ab90f9267a1f9e5c66`. - `chunks-*.jsonl.gz`: chunk text and source metadata. `metadata.jsonl.gz`: source, unit and settings records. A configuration with max length 512 (used in some local development samples) is a different contract and must not be mixed with these vectors. ## Models used by APOC Both models are mirrored in this dataset under [`models/`](https://huggingface.co/datasets/MannyMorningstar/APOC-embedding/tree/main/models) (`models/manifest.json` has every file's SHA-256), pinned to these upstream revisions: | Role | Upstream | Revision | Mirror | | --- | --- | --- | --- | | Query encoder | [`BAAI/bge-small-en-v1.5`](https://huggingface.co/BAAI/bge-small-en-v1.5) (MIT) | `5c38ec7c405ec4b44b94cc5a9bb96e735b38267a` | `models/encoder/bge-small-en-v1.5/` (graph and tokenizer byte-identical to the corpus build) | | Answer model | [`unsloth/Qwen3.5-4B-GGUF`](https://huggingface.co/unsloth/Qwen3.5-4B-GGUF), base [`Qwen/Qwen3.5-4B`](https://huggingface.co/Qwen/Qwen3.5-4B) (Apache-2.0) | `e87f176479d0855a907a41277aca2f8ee7a09523` | `models/answer/Qwen3.5-4B-UD-Q4_K_XL.gguf`, 2,912,109,728 bytes, SHA-256 `b252c5610a42ca82d20fe2a12813e9d069eed89292907e26c783eeb0bc961bc7` | The answer model runs on llama.cpp b11711. Disable its thinking by pre-filling an empty `` block (or `enable_thinking=false`); the `/no_think` soft switch is unreliable. ## Licensing and attribution This dataset contains text derived from third-party sources. **Each source keeps its own license; there is no single license for the whole dataset.** Most sources were obtained as [Kiwix](https://kiwix.org) ZIM archives; the original archive name and SHA-256 are recorded per source in `metadata.jsonl.gz` and the run reports. Source families include, among others: - Wikimedia projects (Wikipedia, Wikibooks, Wikivoyage, Wikiversity, Wikisource, Wiktionary): generally CC BY-SA, with attribution via the original article. - Stack Exchange sites: user contributions under CC BY-SA (version depends on post date). - LibreTexts and iFixit: content is often under **non-commercial** licenses (e.g. CC BY-NC-SA), which restricts commercial reuse of those portions. - Appropedia, Energypedia, WikEM, MDWiki and similar wikis: their own open licenses. - US government publications (e.g. CDC, Ready.gov, USDA, Army publications) are generally public domain; NHS content is under the Open Government Licence; MSF medical guidelines are under MSF's own terms. A per-source license review has **not** been completed. If you reuse this data, check the license of each source you use, keep attribution to the original pages, and honor share-alike and non-commercial terms. Nothing here is medical or engineering advice. ## Provenance Built by the APOC preparation pipeline (SQLite FTS5, BGE-small int8 vectors, FAISS binary IVF). Run reports, coverage audits and recovery checkpoints are kept beside each package. Operational run-control files were removed from the current revision on 2026-11-09; earlier revisions remain in this repository's history.