File size: 10,352 Bytes
3e37edb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fe7292a
 
 
3e37edb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fe7292a
 
3e37edb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
---
license: cc-by-nc-4.0
task_categories:
- text-retrieval
- question-answering
language:
- en
tags:
- rag
- retrieval-augmented-generation
- biomedical
- neuroscience
- rare-disease
- STXBP1
- epilepsy
- chromadb
- vector-database
- nvidia
- nemotron
- llama
- sentence-transformers
size_categories:
- 100K<n<1M
pretty_name: STXBP1 RAG Database v10 - NVIDIA Nemotron Embeddings (Premium)
---

# 🧬⚑ STXBP1-ARIA RAG Database v10 - NVIDIA Nemotron Embeddings

**The most advanced RAG database for STXBP1 therapeutic research.**

A pre-built ChromaDB vector database containing:
**571,465 indexed text chunks** from **~17,000 curated PubMed Central (PMC) biomedical papers**, 
Embedded with NVIDIA's state-of-the-art **Llama-Nemotron-Embed-1B-v2** model featuring **2048-dimensional embeddings**.

> ⚑ **This is the premium GPU-accelerated version** β€” Nemotron embeddings deliver maximum semantic precision for therapeutic queries, but require a GPU with 2-4GB VRAM. For a lightweight CPU-friendly alternative, see: **[STXBP1-RAG-Database (BGE)](https://huggingface.co/datasets/SkyWhal3/STXBP1-RAG-Database)**

## πŸ† Why Nemotron?

NVIDIA's Nemotron embedding model ranks **#2 on MTEB retrieval benchmarks** β€” distilled from their 8B flagship into an efficient 1B parameter model.

| Feature | BGE (v9) | **Nemotron (v10)** |
|---------|----------|---------------------|
| **Embedding Dims** | 768 | **2048** ⬆️ 2.7x |
| **Model Params** | 110M | **1B** ⬆️ 9x |
| **MTEB Retrieval** | ~63 | **~69** ⬆️ +6 pts |
| **Semantic Precision** | Good | **Excellent** |
| **Hardware** | CPU OK | **GPU recommended** |
| **Optional Reranker** | ❌ | **βœ… Available** |

### What 2048 Dimensions Means

```
Semantic Space Visualization:

768 dims (BGE)              2048 dims (Nemotron)
─────────────────           ─────────────────────
     ●                              ●
    /|\                          /  |  \  
   / | \                        /   |   \
  ●  ●  ●                      ●    ●    ●
  
  Good separation           Rich semantic space!
                            Fine-grained distinctions
```

**Real-world impact:**
- "haploinsufficiency" vs "dominant negative" β†’ **better separated**
- "4-PBA chaperone" vs "AAV gene therapy" β†’ **distinct clusters**
- "K196X nonsense" vs "R406H missense" β†’ **clear differentiation**

## πŸ“Š Dataset Statistics

| Metric | Value |
|--------|-------|
| **Total Chunks** | 571,465 |
| **Source Papers** | ~17,000 PMC articles |
| **Curated Entries** | 24 expert-written |
| **Database Size** | ~11.5 GB |
| **Embedding Model** | `nvidia/llama-nemotron-embed-1b-v2` |
| **Embedding Dimensions** | 2048 |
| **Model Parameters** | 1B |
| **Chunk Size** | ~1500 chars with 200 char overlap |
| **Index Type** | ChromaDB with HNSW |
| **Build Hardware** | NVIDIA H100 80GB |
| **Build Date** | January 2026 |

## 🎯 Purpose

This database powers **STXBP1-ARIA MAX**, the premium therapeutic discovery system, enabling:

- **Maximum retrieval precision** for complex therapeutic queries
- **Fine-grained semantic distinctions** between mutation types and mechanisms
- **Optional reranking** with Nemotron cross-encoder for top-k refinement
- **Literature-grounded responses** with PMC citations

## πŸ“ Contents

```
STXBP1-RAG-Nemotron/
β”œβ”€β”€ chroma.sqlite3                    # Main database (~7 GB)
β”œβ”€β”€ metadata.json                     # Build info & config
└── [uuid]/                           # HNSW index files
    β”œβ”€β”€ data_level0.bin               # 2048-dim vectors (~4.6 GB)
    β”œβ”€β”€ header.bin                    
    β”œβ”€β”€ index_metadata.pickle         
    β”œβ”€β”€ length.bin                    
    └── link_lists.bin                
```

## πŸ”§ Usage

### Requirements

```bash
pip install transformers==4.47.1 sentence-transformers chromadb huggingface_hub torch
```

**Hardware:** GPU with 2-4GB VRAM recommended (runs on CPU but slower)

### Quick Start

```python
from huggingface_hub import snapshot_download
import chromadb
from chromadb.config import Settings
from sentence_transformers import SentenceTransformer

# Download database
db_path = snapshot_download(
    repo_id="SkyWhal3/STXBP1-RAG-Nemotron",
    repo_type="dataset"
)

# Load Nemotron embedding model (MUST match!)
embedder = SentenceTransformer(
    "nvidia/llama-nemotron-embed-1b-v2",
    trust_remote_code=True
)

# Move to GPU if available
import torch
if torch.cuda.is_available():
    embedder = embedder.to('cuda')

# Connect to ChromaDB
client = chromadb.PersistentClient(
    path=db_path,
    settings=Settings(anonymized_telemetry=False)
)

# Get collection
collection = client.get_collection("stxbp1_papers")
print(f"Loaded {collection.count():,} chunks")

# Search
query = "STXBP1 K196X nonsense mutation prime editing therapeutic approaches"
query_embedding = embedder.encode(query, convert_to_numpy=True).tolist()

results = collection.query(
    query_embeddings=[query_embedding],
    n_results=10,
    include=["documents", "metadatas", "distances"]
)

for doc, meta, dist in zip(
    results['documents'][0],
    results['metadatas'][0],
    results['distances'][0]
):
    pmcid = meta.get('pmcid', meta.get('pmc_id', 'Unknown'))
    print(f"[{pmcid}] (distance: {dist:.4f})")
    print(f"{doc[:200]}...\n")
```

### With Reranker (Maximum Precision)

```python
from sentence_transformers import CrossEncoder

# Load reranker
reranker = CrossEncoder(
    "nvidia/llama-nemotron-rerank-1b-v2",
    trust_remote_code=True
)

# Get more candidates, then rerank
results = collection.query(
    query_embeddings=[query_embedding],
    n_results=100,  # Fetch more for reranking
    include=["documents", "metadatas", "distances"]
)

# Rerank top candidates
docs = results['documents'][0]
pairs = [[query, doc] for doc in docs]
rerank_scores = reranker.predict(pairs)

# Sort by rerank score
ranked = sorted(
    zip(rerank_scores, docs, results['metadatas'][0]),
    key=lambda x: x[0],
    reverse=True
)

# Top 10 after reranking
for score, doc, meta in ranked[:10]:
    pmcid = meta.get('pmcid', 'Unknown')
    print(f"[{pmcid}] rerank_score: {score:.4f}")
```

## πŸ“š Curated Corpus

The database indexes **~17,000 curated papers** filtered for STXBP1 relevance:

### Primary Keywords (Auto-include)
- STXBP1, Munc18-1, Munc18, syntaxin binding protein, UNC-18, N-Sec1

### Related Topics
- **Epilepsy & Encephalopathy**: DEE, Ohtahara, West syndrome, Dravet, infantile spasms
- **Synaptic Machinery**: SNARE complex, syntaxin-1, SNAP-25, synaptotagmin, exocytosis
- **Genetics**: haploinsufficiency, dominant negative, nonsense/missense mutations
- **Gene Therapy**: AAV, ASO, CRISPR, base editing, prime editing
- **Protein Therapeutics**: 4-PBA, chaperones, readthrough compounds
- **Neurodevelopment**: intellectual disability, autism, developmental delay

### Curated Expert Entries
24 hand-written entries covering:
- Guiberson 2018 (4-PBA mechanism)
- Kovacevic 2018 (functional characterization)
- Dominant negative vs haploinsufficiency mechanisms
- Variant-specific therapeutic summaries
- Clinical trial information (NCT04937062)
- Base/prime editing feasibility rules

## πŸ—οΈ How It Was Built

### Pipeline

1. **Corpus Curation** β€” Filtered 27K multimodal PMC papers β†’ 17K relevant
2. **Chunking** β€” 1500 char chunks with 200 char overlap
3. **Embedding** β€” NVIDIA Llama-Nemotron-Embed-1B-v2 (2048 dims)
4. **Indexing** β€” ChromaDB HNSW on H100 GPU
5. **Validation** β€” Core pack verification & curated injection

### Build Stats

| Stage | Details |
|-------|---------|
| Hardware | NVIDIA H100 80GB SXM5 |
| Batch Size | 128 |
| Build Time | ~4 hours |
| Total Chunks | 571,465 |
| Index Size | ~11.5 GB |

## ⚑ Performance

| Metric | Value |
|--------|-------|
| Query Embedding | ~50ms (GPU) |
| Retrieval (k=25) | ~20ms |
| + Reranking (k=100β†’25) | ~200ms |
| Total Latency | <300ms |

### GPU Memory Usage

| Mode | VRAM |
|------|------|
| Embedding only | ~2-3 GB |
| Embedding + Reranker | ~4-6 GB |
| T4 (16GB) | βœ… Compatible |
| RTX 3080 (10GB) | βœ… Compatible |
| Free Colab | ⚠️ Tight fit |

## πŸ“‹ Metadata Schema

```json
{
  "pmcid": "PMC1234567",
  "title": "Paper title (truncated to 500 chars)",
  "chunk_idx": 0,
  "source": "multimodal_corpus | targeted_paper | curated"
}
```

## πŸ”¬ Use Cases

1. **Precision Therapeutic Queries** β€” "What gene editing approaches work for STXBP1 nonsense mutations?"
2. **Variant-Specific Research** β€” "K196X dominant negative mechanism and rescue strategies"
3. **Mechanism Differentiation** β€” Distinguish haploinsufficiency from dominant negative
4. **Clinical Evidence** β€” Find trial data and case reports
5. **Comparative Analysis** β€” Compare therapeutic modalities with nuanced retrieval

## πŸ”— Related Resources

| Resource | Link |
|----------|------|
| **BGE Version (CPU-friendly)** | [STXBP1-RAG-Database](https://huggingface.co/datasets/SkyWhal3/STXBP1-RAG-Database) |
| **STXBP1-ARIA MAX Space** | [HuggingFace Space](https://huggingface.co/spaces/SkyWhal3/STXBP1-ARIA-MAX) |
| **Variant Lookup** | [STXBP1-Variant-Lookup](https://huggingface.co/spaces/SkyWhal3/STXBP1-Variant-Lookup) |
| **STXBP1 Foundation** | [stxbp1disorders.org](https://www.stxbp1disorders.org/) |
| **Nemotron Model** | [nvidia/llama-nemotron-embed-1b-v2](https://huggingface.co/nvidia/llama-nemotron-embed-1b-v2) |

## πŸ“„ Citation

```bibtex
@dataset{stxbp1_rag_nemotron_2026,
  author = {Freygang, Adam},
  title = {STXBP1-ARIA RAG Nemotron: Premium Vector Database with NVIDIA Embeddings for Therapeutic Discovery},
  year = {2026},
  publisher = {HuggingFace},
  url = {https://huggingface.co/datasets/SkyWhal3/STXBP1-RAG-Nemotron}
}
```

## πŸ“§ Contact

**Adam Freygang**  
AI/ML Engineer & STXBP1 Parent Researcher  
[SkyWhal3 on HuggingFace](https://huggingface.co/SkyWhal3)

---

*Built with ❀️ and an H100 for the STXBP1 community*

*Part of the NeuroSenpai + STXBP1-ARIA therapeutic discovery system*

---

## πŸ™ Acknowledgments

- **NVIDIA** for the Nemotron embedding models
- **Lambda Labs** for H100 GPU access
- **STXBP1 Foundation** for supporting rare disease research
- **Anthropic Claude** for development assistance