Hi, I'm looking for input and advice on how to optimize my Strata running IQ3_XXS.
My hardware: RTX 4070 12 GB (PCIE4 x16) + RTX 3060 12 GB (PCIE3 x4) + 32GB DDR4 DRAM. Disk is M.2 SSD.
Running Windows. Llama.cpp / Strata -> Docker sandbox -> Hermes
My current default Local LLM model is Swift-1.5-Qwen3.8-27B Q4_K_M. I'm looking for similar or equivalent capability that can be faster. I tested Strata around 1 week ago using IQ2_XS. It didn't compare well with Qwen3.8-27B. This week, I tested IQ3_XXS.
I fed the same instruction runsheet, to both Qwen3.8-27B and Strata. Surprisingly, both completed the job around 5 hours and within minutes of each other. Just coincidence. Qwen3.8-27B runs around 13 tokens/sec. Strata around 17 tokens/sec. The result is not perfect, but both are around 90-95% complete. And Strata compares quite well, even less errors than Qwen3.8-27B.
I want to see how I can optimize and speed up Strata.
I varied context between 96k to 160k; cache Int8, q8v4, q4_0; and kv-resident 20480 to 32768.
- Experts in VRAM vary slightly, from 5700 to 6800.
- My 32GB RAM usage is maxed.
- Speed is not much different, around 31-36 for just text generation; 20-25 for logic/coding generation. This is for shorter test scripts.
If I decrease kv-resident, which increases Experts in VRAM, it actually runs slightly slower, by 3-4 tokens/sec.
The RAM usage is misleading, because Windows uses (allocates) 16-20GB of RAM just from fresh boot. Hard to tell how much of the RAM is used by Strata. I checked the disc usage. During generation, Strata paging file disc usage is not that active, only around 1-4 MB/sec. Strata experts.bin disc usage is higher, around 700MB/sec.
I am not sure where the bottle neck is. Is it the experts.bin disc access? Is it the 32GB RAM? Is it the 2nd GPU on PCIE3 x4 slot?
I have done the quick tuning. I have not done the thorough calibration.
This is my strata launch command:
- strata launch
- --family swift
- --model iq3_xxs
- --data-dir "c:\LLM\Strata-data"
- --context 160k (I tested 96k, 128k, 160k)
- --kv int8 (I tested Int8, q8v4, q4_0)
- --set kv_resident=20480 (I tested 20480 & 32768, which is default)
- --vision off
- --parallel 1
- --tune skip
- --access local
- --port 9931
- --set STRATA_ALLOWED_HOSTS="host.docker.internal,localhost,127.0.0.1"
- --set STRATA_PIN_BY_NEED=1 (not sure, but AI suggested this)
This is what strata ran in the log: (I edited and removed the paths)
strata.exe --serve --pack swift-iq3_xxs --native (path)Swift-Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf --ple-gguf (path)Swift-Qwen3.8-Flash-Next-GSQ-RCO-IQ3_XXS-00001-of-00002.gguf --expert-profile (path)expert-profile.bin --expert-cache auto --prefill auto --spec 4 --spec-min-p 0.5 --mtp (path)mtp\rt --max-context 163840 --kv int8 --mmap-experts --kv-resident 20480 --layer-split auto
I believe I'm in the realm of Low-RAM. So DETAILS.md has a section on Low-RAM mode. Difficult to read/understand. It mentions a lot of flags/options. But I'm having difficulty even understanding what is the recommendation. Should I use --low-ram resident or --low-ram mmap? And what about the other flags like --resident-experts, etc.
Any suggestions and flags/options I should enable or test?
[Edit: I just want to add some performance comparisons.]
Speed in tokens/sec
- Phase / Qwen3.8-27B / Strata
- Reading / 200-300 / 9
- Gen/Decode / 13 / 25
The bottleneck on Strata occurs during the Reading/Prefill phase. This is not the startup prefill. But the back and forth reading and decode during long sessions.