Download scripts/run_dflash2_example.ps1 from shanecol/llama.cpp-Strix-Halo-DFlash2-Windows-HIP: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/shanecol/llama.cpp-Strix-Halo-DFlash2-Windows-HIP/resolve/main/scripts/run_dflash2_example.ps1
- Command line
-
hf download hf://shanecol/llama.cpp-Strix-Halo-DFlash2-Windows-HIP/scripts/run_dflash2_example.ps1
-
curl -L -o run_dflash2_example.ps1 https://huggingface.co/shanecol/llama.cpp-Strix-Halo-DFlash2-Windows-HIP/resolve/main/scripts/run_dflash2_example.ps1
1.14 kB
| [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 | |