Views
No views yet
Drop-in replacement forrsxdalv/VibeVoice-Large. Qwen2-7B language model is quantized to AWQ-INT4 with Marlin GEMM kernels. The audio tokenizer + diffusion head stay FP16. Single repo, single download, standardfrom_pretrained— no graft step.
1from vibevoice.modular.modeling_vibevoice_inference import VibeVoiceForConditionalGenerationInference
2from vibevoice.processor.vibevoice_processor import VibeVoiceProcessor
3import torch
4
5model = VibeVoiceForConditionalGenerationInference.from_pretrained(
6 "ncoder-ai/VibeVoice-Large-AWQ",
7 torch_dtype=torch.float16,
8 device_map="cuda:0",
9 attn_implementation="sdpa",
10).eval()
11processor = VibeVoiceProcessor.from_pretrained("ncoder-ai/VibeVoice-Large-AWQ")quantization_config in config.json tells transformers to
swap the Qwen2 linear layers for AWQ at load time; everything else is FP16.| Metric | FP16 baseline | bnb-Q8 (FabioSarracino) | AWQ-INT4 (this) |
|---|---|---|---|
| VRAM | 17.41 GB | 10.84 GB | 8.42 GB |
| RTF (i7-14700KF, 5 steps) | 0.509 | 0.860 | 0.457 |
| RTF (i5-12600K, 7 steps) | 0.54 | 1.220 | 0.699 |
auto-awq with:modules_to_not_convert, so they load in FP16 from the same checkpoint.1pip install transformers torch accelerate auto-awq soundfile
2pip install git+https://github.com/microsoft/VibeVoice.git1from vibevoice.modular.modeling_vibevoice_inference import VibeVoiceForConditionalGenerationInference
2from vibevoice.processor.vibevoice_processor import VibeVoiceProcessor
3import torch
4
5MODEL = "ncoder-ai/VibeVoice-Large-AWQ"
6model = VibeVoiceForConditionalGenerationInference.from_pretrained(
7 MODEL, torch_dtype=torch.float16, device_map="cuda:0", attn_implementation="sdpa"
8).eval()
9processor = VibeVoiceProcessor.from_pretrained(MODEL)
10
11# 7 inference steps — sweet spot for AWQ on RTX 3090 (5 steps = thinner audio)
12model.set_ddpm_inference_steps(num_steps=7)
13
14inputs = processor(
15 text=["Speaker 1: Hello, this is the AWQ-quantized VibeVoice."],
16 voice_samples=[["path/to/voice_sample.wav"]],
17 padding=True, return_tensors="pt", return_attention_mask=True,
18).to("cuda:0")
19
20with torch.inference_mode():
21 out = model.generate(
22 **inputs, tokenizer=processor.tokenizer,
23 cfg_scale=1.3, generation_config={"do_sample": False},
24 verbose=False, refresh_negative=True,
25 )
26
27audio = out.speech_outputs[0].cpu().float().numpy().squeeze()
28import soundfile as sf
29sf.write("output.wav", audio, 24000)VIBEVOICE_MODEL_PATH=ncoder-ai/VibeVoice-Large-AWQ and start the server. No other config needed.rsxdalv/VibeVoice-Large. Not affiliated with Microsoft Research.