1313 [Parameter (Mandatory = $true )]
1414 [string ]$QuantName ,
1515 [string ]$ModelDir = " ." ,
16- [string ]$ExpectedCudaVersion = " "
16+ [string ]$ExpectedCudaVersion = " " ,
17+ [string ]$Mode = " "
1718)
1819
1920Set-StrictMode - Version Latest
@@ -25,6 +26,15 @@ if ($Device -ne "cuda-windows") {
2526 throw " Unsupported device '$Device '. Expected 'cuda-windows'."
2627}
2728
29+ if ($Mode -ne " " ) {
30+ if ($Mode -notin @ (" vr-streaming" , " vr-offline" )) {
31+ throw " Unsupported mode '$Mode '. Supported modes: vr-streaming, vr-offline"
32+ }
33+ if ($HfModel -ne " mistralai/Voxtral-Mini-4B-Realtime-2602" ) {
34+ throw " Mode '$Mode ' can only be used with Voxtral Realtime model"
35+ }
36+ }
37+
2838Write-Host " Testing model: $HfModel (quantization: $QuantName )"
2939
3040$resolvedModelDir = (Resolve-Path - Path $ModelDir ).Path
@@ -79,15 +89,28 @@ switch ($HfModel) {
7989 $runnerTarget = " voxtral_realtime_runner"
8090 $runnerPath = " voxtral_realtime"
8191 $runnerPreset = " voxtral-realtime-cuda"
82- $expectedOutput = " Loading audio from "
92+ $expectedOutput = " Quilter "
8393 $preprocessor = " preprocessor.pte"
8494 $tokenizerUrl = " "
8595 $tokenizerFile = " tekken.json"
8696 $audioUrl = " https://github.com/voxserv/audio_quality_testing_samples/raw/refs/heads/master/testaudio/16000/test01_20s.wav"
8797 $audioFile = " poem.wav"
8898 }
99+ " facebook/dinov2-small-imagenet1k-1-layer" {
100+ $runnerTarget = " dinov2_runner"
101+ $runnerPath = " dinov2"
102+ $runnerPreset = " dinov2-cuda"
103+ $expectedOutput = " Samoyed"
104+ $preprocessor = " "
105+ $tokenizerUrl = " "
106+ $tokenizerFile = " "
107+ $audioUrl = " "
108+ $audioFile = " "
109+ $imageUrl = " https://github.com/pytorch/hub/raw/master/images/dog.jpg"
110+ $imageFile = " test_image.jpg"
111+ }
89112 default {
90- throw " Unsupported model '$HfModel '. Supported: mistralai/Voxtral-Mini-3B-2507, mistralai/Voxtral-Mini-4B-Realtime-2602, nvidia/diar_streaming_sortformer_4spk-v2, nvidia/parakeet-tdt"
113+ throw " Unsupported model '$HfModel '. Supported: mistralai/Voxtral-Mini-3B-2507, mistralai/Voxtral-Mini-4B-Realtime-2602, nvidia/diar_streaming_sortformer_4spk-v2, nvidia/parakeet-tdt, facebook/dinov2-small-imagenet1k-1-layer "
91114 }
92115}
93116
@@ -162,6 +185,9 @@ try {
162185 if ($audioUrl -ne " " ) {
163186 Download- IfNeeded - Url $audioUrl - OutFile (Join-Path - Path $resolvedModelDir - ChildPath $audioFile )
164187 }
188+ if ((Get-Variable - Name imageUrl - ErrorAction SilentlyContinue) -and $imageUrl -ne " " ) {
189+ Download- IfNeeded - Url $imageUrl - OutFile (Join-Path - Path $resolvedModelDir - ChildPath $imageFile )
190+ }
165191 Get-ChildItem - Path $resolvedModelDir
166192 Write-Host " ::endgroup::"
167193
@@ -207,6 +233,16 @@ try {
207233 " --audio_path" , (Join-Path - Path $resolvedModelDir - ChildPath $audioFile ),
208234 " --preprocessor_path" , (Join-Path - Path $resolvedModelDir - ChildPath $preprocessor )
209235 )
236+ if ($Mode -ne " vr-offline" ) {
237+ $runnerArgs += " --streaming"
238+ }
239+ }
240+ " facebook/dinov2-small-imagenet1k-1-layer" {
241+ $runnerArgs = @ (
242+ " --model_path" , $modelPte ,
243+ " --data_path" , $cudaBlob ,
244+ " --image_path" , (Join-Path - Path $resolvedModelDir - ChildPath $imageFile )
245+ )
210246 }
211247 }
212248
0 commit comments