9 Commits

Author SHA1 Message Date
fabolous005 d1ccc5c294 prain: int4 MoE on RDNA2: GEMV-style decode kernel, fp16 rounds, staged expert copies
Measured on the live 16k agent setup (A/B with runtime flags, greedy answers vs reference):
decode 3.49 -> 5.24 tok/s, first token 4.3 -> 3.3 s, 2.3k-token prompt 27.5 -> 20.6 s,
same answers. Dropped after measuring: route stats on the CPU, a Triton router GEMV,
pregate prefetch from disk (all within noise or slower).

The GEMV keeps one config instead of autotuning: Triton benchmarks with a 256 MiB buffer
that torch keeps cached, which left 8 MiB of VRAM and made lazy kernel loads fail
(hipErrorNoBinaryForGpu). prain also returns torch cached blocks after materializing and
whenever the driver has < 128 MiB free. quality.py score --greedy-only skips prompt logprobs,
which OOM the 16k config.
2026-10-29 14:20:23 +01:00
fabolous005 708e152549 prain: int8/int4 experts quantized once on the GPU, rounds through vLLM's expert_map, [miss] min_weight skips experts not in VRAM; scripts: tune_moe, quality (answer NLL on identical token ids), bench --context, measure --quant 2026-10-28 22:07:25 +01:00
fabolous005 16c3bf81f7 prain: pin the RAM tier per expert (big pinned blocks take minutes on eGPU hosts); sim charges disk reads on the CPU path; measure CPU cost on cold experts 2026-10-28 00:33:34 +01:00
fabolous005 d69fd34492 prain: fix vLLM on ROCm (no CUDA capability families), smoke test and benchmark scripts 2026-10-27 16:44:40 +01:00
fabolous005 7be39c9287 prain: build torchvision too (transformers Gemma 4 processor imports it) 2026-10-27 16:04:22 +01:00
fabolous005 341ad52baa prain: warm-up and draft measurement scripts 2026-10-27 15:56:48 +01:00
fabolous005 94cc4c23bb prain: cost model measurement 2026-10-27 15:56:48 +01:00
fabolous005 366e569541 prain: build scripts (ROCm SDK venv, PyTorch and vLLM from source with clang) 2026-10-27 15:42:17 +01:00
fabolous005 c8d5706956 prain: skeleton 2026-10-27 13:52:04 +01:00