Agent skill
semantic-search-setup-1-cpu-vs-gpu
Sub-skill of semantic-search-setup: 1. CPU vs GPU (+3).
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/data/documents/semantic-search-setup/1-cpu-vs-gpu
SKILL.md
1. CPU vs GPU (+3)
1. CPU vs GPU
# Force CPU (more stable, sufficient for most cases)
os.environ['CUDA_VISIBLE_DEVICES'] = ''
# Use GPU if available
# Remove the above line and ensure CUDA is installed
2. Batch Processing
# Larger batches = faster but more memory
batch_size = 100 # Default
batch_size = 500 # If you have 16GB+ RAM
batch_size = 50 # If memory constrained
3. Progress Tracking
from tqdm import tqdm
for i in tqdm(range(0, total, batch_size)):
# Process batch
pass
4. Incremental Updates
# Only embed new chunks
cursor.execute('''
SELECT c.id, c.chunk_text
FROM chunks c
LEFT JOIN embeddings e ON c.id = e.chunk_id
WHERE e.id IS NULL
''')
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?