[CmdletBinding()] param( [Parameter(Mandatory = $true)] [string] $ServerExe, [Parameter(Mandatory = $true)] [string] $TargetModel, [Parameter(Mandatory = $true)] [string] $DraftModel, [Parameter(Mandatory = $true)] [string] $RocmBin, [ValidateRange(1, 65535)] [int] $Port = 8080 ) $ErrorActionPreference = "Stop" foreach ($Path in @($ServerExe, $TargetModel, $DraftModel)) { if (-not (Test-Path -LiteralPath $Path -PathType Leaf)) { throw "File does not exist: $Path" } } if (-not (Test-Path -LiteralPath $RocmBin -PathType Container)) { throw "ROCm bin directory does not exist: $RocmBin" } $env:PATH = "$(Resolve-Path -LiteralPath $RocmBin);$env:PATH" & $ServerExe ` -m $TargetModel ` -md $DraftModel ` --host 127.0.0.1 ` --port $Port ` --alias strix-halo-dflash2 ` --ctx-size 32768 ` --batch-size 2048 ` --ubatch-size 512 ` -ngl 99 ` --spec-draft-ngl 99 ` --spec-type draft-dflash ` --spec-draft-n-max 7 ` --spec-draft-p-min 0.90 ` --parallel 1 ` --metrics ` --cache-type-k q8_0 ` --cache-type-v q8_0