kvcache-ai-ktransformers/kt-kernel/python/sft
losewayy a02efe36b5
Some checks failed
Deploy / deploy (macos-latest) (push) Has been cancelled
Deploy / deploy (ubuntu-latest) (push) Has been cancelled
Deploy / deploy (windows-latest) (push) Has been cancelled
Book-CI / test (push) Has been cancelled
Book-CI / test-1 (push) Has been cancelled
Book-CI / test-2 (push) Has been cancelled
[feat](kt-kernel): add AVX2 RAWINT4 routed-expert LoRA SFT backend (#2243)
* [feat](kt-kernel): add AVX2 RAWINT4 routed-expert LoRA SFT backend

* [fix](kt-kernel): fix RAWINT4 SFT wrapper and clamp gradients

Allow the RAWINT4 production wrapper on AVX2 runtimes and reject shared backward pools before construction. Preserve FP32 clamp decisions across BF16 caches, remove unused configuration state, and cover rectangular dimensions, multiblock dX, clamp boundaries, and production wrapper tasks with tighter LoRA gradient checks.

* [fix](kt-kernel): plumb swiglu_limit through the RAWINT4 SFT python path

The production wrapper hard-zeroed swiglu_limit for every format except MXFP4, and both SFT python gates rejected non-zero values for RAWINT4 even though MOESFTConfig carries the field and the AVX2 kernel implements the clamp in forward plus the gradient mask in backward. RAWINT4_SFT now accepts a finite non-negative swiglu_limit end to end, while the AMX K2 part (which computes plain SiLU) fails fast instead of silently dropping the clamp. The production-wrapper contract test is parametrized over swiglu_limit 0 and 2, a model-config plumb test covers plain and nested text_config shapes, the __main__ entry exercises both limits, and bench_rawint4_sft.py gains --swiglu-limit.
2026-10-12 19:30:24 +08:00
..
__init__.py feat(sft) Deepseek v4 flash LoRA (#2216) 2026-09-30 21:29:43 +08:00
amx.py [feat](kt-kernel): add AVX2 RAWINT4 routed-expert LoRA SFT backend (#2243) 2026-10-12 19:30:24 +08:00
arch.py feat(sft) Deepseek v4 flash LoRA (#2216) 2026-09-30 21:29:43 +08:00
artifacts.py feat(sft) Deepseek v4 flash LoRA (#2216) 2026-09-30 21:29:43 +08:00
autograd.py perf(sft): defer backward repack wait to CPU consumer (#2188) 2026-09-07 17:39:26 +08:00
backend.py [feat](kt-kernel): add AVX2 RAWINT4 routed-expert LoRA SFT backend (#2243) 2026-10-12 19:30:24 +08:00
base.py feat(sft) Deepseek v4 flash LoRA (#2216) 2026-09-30 21:29:43 +08:00
checkpoint.py [feat](kt-kernel): end-to-end full-parameter and LoRA SFT(#2094) 2026-07-23 21:23:34 +08:00
config.py feat(sft) Deepseek v4 flash LoRA (#2216) 2026-09-30 21:29:43 +08:00
conv3d_compat.py [feat](sft): support Qwen VLM MoE fine-tuning (#2156) 2026-08-17 10:51:55 +08:00
convert_kt_to_sglang_adapter.py feat(sft) Deepseek v4 flash LoRA (#2216) 2026-09-30 21:29:43 +08:00
deepseek_v4.py feat(sft) Deepseek v4 flash LoRA (#2216) 2026-09-30 21:29:43 +08:00
dist_utils.py [feat](kt-sft): Activation reuse & Int8 kernel refactor & native block-FP8 LoRA SFT (#2141) 2026-08-17 16:25:14 +08:00
ephemeral.py [feat](kt-sft): Activation reuse & Int8 kernel refactor & native block-FP8 LoRA SFT (#2141) 2026-08-17 16:25:14 +08:00
export_dsv4_sglang_adapter.py feat(sft) Deepseek v4 flash LoRA (#2216) 2026-09-30 21:29:43 +08:00
layer.py feat(sft) Deepseek v4 flash LoRA (#2216) 2026-09-30 21:29:43 +08:00
lora.py [feat](kt-sft): Activation reuse & Int8 kernel refactor & native block-FP8 LoRA SFT (#2141) 2026-08-17 16:25:14 +08:00
profiler.py [feat](kt-kernel): end-to-end full-parameter and LoRA SFT(#2094) 2026-07-23 21:23:34 +08:00
weight_manifest.py [feat](kt-sft): Activation reuse & Int8 kernel refactor & native block-FP8 LoRA SFT (#2141) 2026-08-17 16:25:14 +08:00
weights.py [feat] Add native RAWINT4 routed-expert LoRA SFT for Kimi K2.5/K2.6 (#2186) 2026-09-10 17:05:16 +08:00
wrapper.py [feat](kt-kernel): add AVX2 RAWINT4 routed-expert LoRA SFT backend (#2243) 2026-10-12 19:30:24 +08:00