mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #305] Feature request: support sm_70 (V100 / T4) - the attention kernels already have pre-Ampere paths #150
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#150
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @zipenghao on GitHub (Sep 30, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/305
Summary: Strata's installer and build system reject anything below sm_80, but the
kernels appear to have pre-Ampere code paths. Could sm_70 (V100, T4) be supported?
What I hit
setup.shstops with "not supported - older than the RTX 30 series" on a V100, andCMakeLists.txthas a matching arch guard. So the published install path is closedbefore anything else happens - including before the model download starts.
Why I think it is close to working
The attention kernels carry
#if __CUDA_ARCH__ >= 800guards, but they do have olderbranches underneath:
qsa_select.cu,qsa_prompt_attn.cuandnative_qsa_score.cuall fall back, and those paths work on sm_70 (slower, but correct). With these opened
I got a fully working, numerically correct install:
setup.py,gpu_problem)src/core/device.cuQ6_Kdispatch in the IQ expert kernels (src/kernels/cuda/iq_kernels.cu)HF_ENDPOINToverride fortools/mtp_fetch.pyPoint 5 is worth separating out, because I think it is an actual bug rather than a
platform issue:
--gguf-dirbuilds the shard list as exactly<model>-00001-of-00002.ggufand<model>-00002-of-00002.gguf. Artifacts nameddifferently or sharded differently (e.g. Unsloth's
-00001-of-00003) are not found.Deriving the count from the
-0000N-of-part of the filename, as the engine andtools/iq_pack.pyalready do, would make it work.Measured on 2x V100-SXM2-16GB (PCIe, no NVLink), Xeon E5-2680 v4
--spec 2 --spec-min-p 0.5, Chinese, draft acceptance 77-78%)The CPU is the bottleneck on this machine (no AVX-512, no VNNI): the expert pool is
~70% of each decode step. A CPU with AVX-512 should be considerably faster.
What I am asking
rather than in the main support matrix?
have, or is a documented "this is what I measured" enough?
--gguf-dirshard-count fix (point 5) go in regardless of the platformquestion? It is independent of GPU architecture.
Related: #303 (garbled output on the same setup).
Patches and full write-up: https://github.com/zipenghao/strata-v100-sm70
Note: this report and the linked patches were drafted with AI assistance; all numbers
above were measured manually on the hardware listed.
@SingingFrog7 commented on GitHub (Oct 1, 2026):
On the latest version, it seems like appending
"-DSTRATA_EXPERIMENTAL_SM60=ON",to thecmake_buildcalls' parameters insetup.pymakes it support SM70 witout other changes? I'll be testing the same thing on a similar setup soon, I'll report what I have then@backstable commented on GitHub (Oct 1, 2026):
Independent confirmation from a different single-GPU machine — same conclusion, and on this one only the three arch gates needed changing.
Hardware (different from the 2× V100 / Xeon E5-2680 v4 above)
iq3_xxs,--kv int8,--spec 4 --spec-min-p 0.5,--max-context 131072,--prompt-cache-root 64What we needed to change
Only the two version gates —
setup.py:339(gpu_problem) andCMakeLists.txt:86, both75 → 70:Not
src/core/device.cu— and this is worth correcting, because your list and ours both started out with it. In 0.1.30 the< 75runtime check there lives indevice_info(), and the only caller issrc/core/device_main.cpp:34— whichCMakeLists.txt:174builds as a separatestrata-devicediagnostic executable. The engine never calls it, so the engine does not need that line changed. We have a 0.1.27 build on this machine whosedevice.custill reads< 75and which started and served nineteen times without complaint — that is the empirical form of the same statement.We also did not have to touch
src/kernels/cuda/iq_kernels.cu(your point 4) on 0.1.30 — theiq3_xxspack builds and runs as-is. So on this model and this engine version the whole change is two lines, which we hope makes the "best effort" case easier to argue.Per the maintainer's note on #236 — sm_70 stays community-tested behind
-DSTRATA_EXPERIMENTAL_SM60=ON, and 0.1.31 makes that flag admit Volta — we intend to drop the patch and use the flag once 0.1.31 is out, rather than carry a fork.Measured (single V100, 0.1.30)
--spec 4)Sustained real traffic at 82–88k context, single card, no layer split:
Four notes on the numbers:
native embedding: cannot pin 260 MiB, nor place it in VRAM. The engine degrades gracefully — everything else (cudaHostRegister PORTABLEon the arena, the MTP draft head, the expert-cache prefill, session capture) comes up clean — but that is the one line to expect on this hardware.One new thing that is not about sm_70
While diagnosing a client-facing error on this install we found that when the engine dies, the server keeps
engine.max_context == 0and the next request comes back as a400readingwhich blames the prompt for what is actually "the engine is restarting". Filed separately with the code path and a suggested one-line-ish fix: #. Worth a look because it is what a user sees after any engine death, on any architecture.
And to bring this issue back to its question 3 — the
--gguf-dirshard-count fix — nobody has answered whether it should land irrespective of the platform question, and it is still present in 0.1.30 (setup.py:2091builds exactly two names, whiletools/iq_pack.py:86already derives the count from the filename). PR with a minimal scoped patch: #.@SingingFrog7 commented on GitHub (Oct 1, 2026):
I have similar generation results (50~60 t/s) on a 2x V100-PCIE-16GB machine, 2x E5-2630 v4, 64GB RAM, but prefill seems way slower (~320t/s), not sure what is causing this in my case
@Niko1221 commented on GitHub (Oct 1, 2026):
sm_70 is admitted by the experimental build flag since 0.1.31 (
-DSTRATA_EXPERIMENTAL_SM60=ON; CUDA 12.x, not in the ready-made engine), and setup support for it is coming in 0.1.32. Setup's--gguf-dirwill also take any shard count. Closing as answered.@zipenghao commented on GitHub (Oct 10, 2026):
Update from your point of view - this reporter is now on 0.1.34 with
STRATA_EXPERIMENTAL_SM60=1and no source patches at all for the platform. The flag is all it took, exactly as @backstable described; my earlier patch set is retired apart from one Q6_K hunk (below, unrelated to the arch gate).Two things I hit that are about the artifact rather than the card, and that cost me an hour. They are reproducible on any GPU, so reporting them here rather than opening a separate issue - happy to split them out if that is cleaner.
1.
--nativeis pointed at the wrong shard for a 3-shard split.setup.pypicksshards[0], which is correct for the 2-shard GSQ-RCO files. Unsloth's split puts the metadata in-00001-of-00003(10.9 MB, zero tensors) and every tensor in shards 2-3, so the engine starts and then exits:Repointing
--nativeat-00002-of-00003.gguffixes it; the vision block'smodelis happy with shard 1, since it only reads the KV metadata. This is the same shard the engine reports asatwhen it finds the tensor, so the fix could be to pick the first shard that actually carries tensors.2.
--compat-bf16is required forUD-IQ3_XXSbut is only wired to theunslothfamily.iq_pack.pystops withblk.N.hc_attn_down.weight is Q8_0, but the engine requires BF16; use --compat-bf16- 195 tensors, 1.20 GiB.FAMILIES["unsloth"]["pack_args"]already carries--compat-bf16, but that family only listsUD-Q4_K_XL/UD-IQ4_XS, so anUD-IQ3_XXSuser has to runiq_pack.pyby hand and then re-run setup so it picks the pack up. Not an error, just a gap between what the packer needs and what setup will pass.One patch I still carry (offering it if useful):
UD-IQ3_XXSalso storestoken_embd.weight/output.weightas Q6_K, which is not inis_iq(), soembed_type_supported()refuses it. Four hunks insrc/kernels/cuda/iq_kernels.cu- adq_q6_kdequantiser following ggml's Q6_K layout,case 14indq_dispatch,14inis_iq(), andcase 14iniq_row_bytes. It is the same Q6_K arithmetic asdequant.hpp'sdequantize_q6_K, and it reproduces the layout of the one I have been running since 0.1.24. Say the word and I will open it as a PR; the reason I am not assuming you want it is that 0.1.35+ does not listUD-IQ3_XXSas supported at all, so adding a kernel for it may be the wrong priority.Numbers on the community build, for the matrix: 2x V100-SXM2-16GB, IQ3_XXS,
--spec 2, context 131072 - 33.4 tok/s end-to-end on short Chinese prompts, expert cache 8765 slots across the two cards, prefill 305 tok/s on a ~1K-token prompt, and one scanned A4 journal page read correctly (journal, volume/issue, page, table title, all three columns, drug names by syndrome).