Skip to content

Instantly share code, notes, and snippets.

@myzenhost
myzenhost / runpod_embed_v3.py
Created April 6, 2026 07:52
RunPod embed v3 - fixed cleanup
"""
RunPod A100 Batch Embedding Script — v3 (File-Based Pipeline)
Eliminates bore tunnel bottleneck by decoupling DB I/O from GPU.
STRATEGY: Pull → Embed → Push (in chunks)
1. PULL: Stream N docs from remote DB to local CSV (one-time bore cost)
2. EMBED: Read local CSV, encode on GPU at full speed (no network!)
3. PUSH: Bulk-write embeddings back to remote DB (one-time bore cost)
4. Repeat for next chunk
@myzenhost
myzenhost / embed.py
Last active April 6, 2026 07:37
RunPod embedding script - temporary
"""
RunPod A100 Batch Embedding Script — v3 (File-Based Pipeline)
Eliminates bore tunnel bottleneck by decoupling DB I/O from GPU.
STRATEGY: Pull → Embed → Push (in chunks)
1. PULL: Stream N docs from remote DB to local CSV (one-time bore cost)
2. EMBED: Read local CSV, encode on GPU at full speed (no network!)
3. PUSH: Bulk-write embeddings back to remote DB (one-time bore cost)
4. Repeat for next chunk