flash attention ensure

This commit is contained in:
Liam Pettigrew
2026-02-05 14:41:58 +11:00
parent 96a918cbc9
commit 4d7538faf2
4 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -84,7 +84,6 @@ Thumbs.db
*.tmp
*.temp
.cache/
publish.sh
# =============================================================================
# Old/Archive Folders
@@ -97,3 +96,4 @@ dev/
# =============================================================================
!data/config.example.yml
!.env.example
publish.sh
+1
View File
@@ -76,6 +76,7 @@ def load_asr_model():
ASR_MODEL_NAME,
device_map=DEVICE,
dtype=DTYPE,
attn_implementation="flash_attention_2",
)
return QwenASRPipelineWrapper(model)
+2
View File
@@ -50,6 +50,7 @@ model = Qwen3TTSModel.from_pretrained(
"Qwen/Qwen3-TTS-12Hz-1.7B-Base",
torch_dtype=torch.bfloat16,
device_map=DEVICE,
attn_implementation="flash_attention_2",
)
# Enable optimizations (recommended)
@@ -79,6 +80,7 @@ def speak_stream(text: str, voice: str = "cori", speed: float = 1.0):
text=text,
language="english",
voice_clone_prompt=prompt,
overlap_samples=512,
# Phase 2 settings (stable)
emit_every_frames=12,
decode_window_frames=80,
+1 -1
View File
@@ -11,7 +11,7 @@ general:
wakeword: "computer"
# Use a small language model for extra capabilities
use_ai: True
# Use the Moonshine Tiny ASR if running on very small edge devices
# Use the Moonshine Tiny ASR for faster speech transcription (English only)
use_tiny_asr: False
# Use the Kokoro TTS for faster voice streaming (voice cloning not available)
use_tiny_tts: False