ritvikbio commited on
Commit
515f20b
·
verified ·
1 Parent(s): 31d936b

Upload folder using huggingface_hub

Browse files
Files changed (6) hide show
  1. .gitattributes +3 -0
  2. README.md +88 -0
  3. data/train.parquet +3 -0
  4. done_chunk_ids.txt +3 -0
  5. index.faiss +3 -0
  6. meta.jsonl +3 -0
.gitattributes CHANGED
@@ -57,3 +57,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
57
  # Video files - compressed
58
  *.mp4 filter=lfs diff=lfs merge=lfs -text
59
  *.webm filter=lfs diff=lfs merge=lfs -text
 
 
 
 
57
  # Video files - compressed
58
  *.mp4 filter=lfs diff=lfs merge=lfs -text
59
  *.webm filter=lfs diff=lfs merge=lfs -text
60
+ done_chunk_ids.txt filter=lfs diff=lfs merge=lfs -text
61
+ index.faiss filter=lfs diff=lfs merge=lfs -text
62
+ meta.jsonl filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ task_categories:
4
+ - text-retrieval
5
+ - question-answering
6
+ language:
7
+ - en
8
+ tags:
9
+ - faiss
10
+ - scientific-papers
11
+ - synthetic-biology
12
+ - neophyte
13
+ - retrieval
14
+ pretty_name: Neophyte FAISS Index v1
15
+ size_categories:
16
+ - 100K<n<1M
17
+ configs:
18
+ - config_name: default
19
+ data_files:
20
+ - split: train
21
+ path: data/train.parquet
22
+ dataset_info:
23
+ features:
24
+ - name: chunk_id
25
+ dtype: string
26
+ - name: chunk_hash
27
+ dtype: int64
28
+ - name: text
29
+ dtype: string
30
+ - name: paper_id
31
+ dtype: string
32
+ - name: title
33
+ dtype: string
34
+ - name: section
35
+ dtype: string
36
+ - name: subsection
37
+ dtype: string
38
+ - name: paragraph_index
39
+ dtype: int64
40
+ - name: keywords
41
+ dtype: string
42
+ - name: boost
43
+ dtype: float32
44
+ ---
45
+
46
+ # bio-faiss-longevity-v1
47
+
48
+ A FAISS index + metadata for scientific retrieval
49
+
50
+ ## Contents
51
+
52
+ - `index.faiss`: FAISS index (cosine w/ inner product).
53
+ - `meta.jsonl`: one JSON per chunk; fields include `chunk_id`, `paper_id`, `title`, `section`, `subsection`, `paragraph_index`, `keywords`, `boost`.
54
+ - `index.info.json`: (optional) dimensions, index type, faiss version.
55
+
56
+ ## Build provenance
57
+
58
+ - Chunking: hierarchical (section→paragraph→~480-token chunks, ~15% overlap)
59
+ - Embedder: `bio-protocol/neophyte-retriever` (mean-pooled, L2-normalized)
60
+ - Similarity: cosine via inner product
61
+ - FAISS type: `IndexFlatIP` (or your choice)
62
+
63
+ ## How to load
64
+
65
+ ```python
66
+ import faiss, json, numpy as np, hashlib
67
+ from huggingface_hub import hf_hub_download
68
+
69
+ REPO = "bio-protocol/neophyte-faiss-index-v1"
70
+ IDX = hf_hub_download(REPO, "index.faiss", repo_type="dataset")
71
+ META = hf_hub_download(REPO, "meta.jsonl", repo_type="dataset")
72
+ index = faiss.read_index(IDX)
73
+
74
+ # stable 64-bit ids (must match your build)
75
+ def stable64(s: str) -> int:
76
+ try:
77
+ import faiss
78
+ if hasattr(faiss, "hash64"): return int(faiss.hash64(s))
79
+ except Exception:
80
+ pass
81
+ return int.from_bytes(hashlib.blake2b(s.encode(), digest_size=8).digest(), "little", signed=False) - (1<<63)
82
+
83
+ id2meta = {}
84
+ with open(META, "r", encoding="utf-8") as f:
85
+ for line in f:
86
+ md = json.loads(line)
87
+ id2meta[stable64(md["chunk_id"])]=md
88
+ ```
data/train.parquet ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:03e3bb3a9c8522c1a1f726ada4644dcd7ddab75575622648e8a0f29aaae902cf
3
+ size 95923985
done_chunk_ids.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f2549f99542c34a439d55aee3bb92f18320143a4a95e3d9478207c4f8166cb27
3
+ size 12484174
index.faiss ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:120cba8fc94f0b6667cf0aa4018ad17edcbaefa26d588d58807454626e4a3954
3
+ size 594279930
meta.jsonl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef23b9669c0d240d2e455c2bebd86eb1a64ff3bff3d459fefd9f73a8fbf5ba9b
3
+ size 87014666