09a1c98514
- pocket_server.py (Produktions-TTS mit Stimmen-Waechter), text_norm, Bench-/Diag-Skripte - lucy-f5: f5_server/f5_test/bench_dml (DirectML-Experiment, Phase C/D offen) - .gitignore: venvs/Modelle/Audio/Logs der beiden Ordner + box_recon/gemma_swap-Scratch Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
21 lines
652 B
Python
21 lines
652 B
Python
import time
|
|
from llama_cpp import Llama
|
|
|
|
MODEL = r"F:\Coding Stuff\mission-control-2\client\lucy-tts\models\OuteTTS-1.0-1B-Q8_0.gguf"
|
|
|
|
t0 = time.time()
|
|
llm = Llama(model_path=MODEL, n_gpu_layers=999, n_ctx=8192, verbose=True)
|
|
print(f"[load] {time.time()-t0:.1f}s", flush=True)
|
|
|
|
prompt = "Guten Tag, mein Name ist"
|
|
# warmup
|
|
llm(prompt, max_tokens=16, temperature=0.8)
|
|
# messen
|
|
for i in range(2):
|
|
t0 = time.time()
|
|
out = llm(prompt, max_tokens=300, temperature=0.8)
|
|
dt = time.time() - t0
|
|
n = out["usage"]["completion_tokens"]
|
|
print(f"[run {i+1}] {n} tokens in {dt:.2f}s = {n/dt:.1f} tok/s", flush=True)
|
|
print("SPEED_DONE", flush=True)
|