Files
Aime/tools/rkllm-qwen35/run_convert.ps1
T
SaschaandClaude Opus 5 e9ba48224e A/B-Aufbau fuer Qwen3.5-4B: Messstrecke und Konvertierungs-Kit
lab/ab-llm.mjs vergleicht zwei LLMs ueber reanalyze-llm (ohne
Neu-Diarisierung), mit snapshot/restore der Originalanalysen und einem
Report aus Tabelle plus Volltext-Vergleich.

tools/rkllm-qwen35/ konvertiert Qwen3.5-4B auf dem PC mit
rkllm-toolkit 1.3.0 (muss zur Board-Runtime passen), Parameter
identisch zum produktiven Modell: w8a8_g128, 3 NPU-Kerne,
max_context 16384.

Doku: Changelog 2026-09-29 (2) mit Recherchestand, Sicherung und
GOTCHAs, plus neuer Abschnitt "Modellwechsel und A/B-Tests" in
Kapitel 05 samt Mermaid-Ablauf.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-29 10:55:47 +02:00

38 lines
1.5 KiB
PowerShell

# In PowerShell ausfuehren, NICHT in der Git-Bash: Git-Bash schreibt Docker-Mount-Pfade
# um (/data wird zu C:/Program Files/Git/data) -- das war die Falle bei der
# Qwen3-Konvertierung im Juli 2026.
#
# cd "D:\Vibe Coding\_Spielplatz\Aime\_rkllm-qwen35"
# .\run_convert.ps1
$ErrorActionPreference = 'Stop'
$here = Split-Path -Parent $MyInvocation.MyCommand.Path
$data = Join-Path $here 'data'
New-Item -ItemType Directory -Force -Path (Join-Path $data 'hf') | Out-Null
New-Item -ItemType Directory -Force -Path (Join-Path $data 'out') | Out-Null
Write-Host '== 1/3 GPU sichtbar?' -ForegroundColor Cyan
docker run --rm --gpus all nvidia/cuda:12.4.1-base-ubuntu22.04 nvidia-smi --query-gpu=name,memory.total --format=csv
if (-not $?) { throw 'Docker sieht die GPU nicht. WSL2-Backend + NVIDIA Container Toolkit pruefen.' }
Write-Host '== 2/3 Image bauen (einmalig, ~10-15 Min)' -ForegroundColor Cyan
docker build -t rkllm-toolkit:1.3.0 $here
if (-not $?) { throw 'docker build fehlgeschlagen' }
Write-Host '== 3/3 Konvertieren (Download ~8 GB beim ersten Lauf, dann ~30-60 Min)' -ForegroundColor Cyan
docker run --rm --gpus all --shm-size=8g `
-v "${data}:/data" `
rkllm-toolkit:1.3.0 `
python3 /work/convert_qwen35.py `
--model Qwen/Qwen3.5-4B `
--out /data/out/qwen35-4b-w8a8g128-16k.rkllm `
--dtype w8a8_g128 `
--max-context 16384 `
--npu-cores 3 `
--device cuda
Write-Host ''
Write-Host 'Ergebnis liegt in:' -ForegroundColor Green
Get-ChildItem (Join-Path $data 'out')