Auto-scale hardware: CUDA 13 only on cc>=7.5, pin ctranslate2 4.8 (cu12), fp16-less GPUs, CPU threads, llama --fit on >=7 GiB GPUs, CPU-only embeddings
This commit is contained in:
+4
-4
@@ -1,13 +1,13 @@
|
||||
"""Label who speaks (sherpa-onnx, CPU): run(name) reads out/<name>/transcript.txt -> diar_segments.json + DB lines (speaker-labelled)."""
|
||||
import json, re, subprocess, time
|
||||
import json, os, re, subprocess, time
|
||||
from pathlib import Path
|
||||
import numpy as np
|
||||
import db
|
||||
|
||||
M = Path(__file__).parent / "models"
|
||||
# sherpa-onnx default is 1 thread (>10 min for a 40-min call); 8 threads: ~6 min. CUDA measured slower (>7 min, GPU ~5 W):
|
||||
# tiny models + one embedding per segment -> transfer/launch overhead dominates.
|
||||
THREADS = 8
|
||||
# sherpa-onnx default is 1 thread (>10 min for a 40-min call); 8 threads: ~6 min on 155H; physical-core count scales to bigger CPUs.
|
||||
# CUDA measured slower (>7 min, GPU ~5 W): tiny models + one embedding per segment -> transfer/launch overhead dominates.
|
||||
THREADS = max(1, (os.cpu_count() or 2) // 2)
|
||||
|
||||
|
||||
def roster_size(name, default=5):
|
||||
|
||||
Reference in New Issue
Block a user