86 Commits

Author SHA1 Message Date
yyj 0b954fe4ca [docs]: add English Kimi K2.5 LoRA tutorial (#2211) 2026-09-16 19:14:29 +08:00
yyj 0dce4c9b09 [docs] Add Kimi install guidance and python 3.11 wheel(#2207)
* [build](release): add immutable CPython wheel supplementation

* [docs]: document Python 3.11 and 3.12 Kimi installation

* [docs]: clarify supplementary release availability

* [docs]: publish Python 3.11 installation instructions

* [docs]: simplify Kimi guide and remove supplement tooling

Preserve LF/PEFT/TRL packaging notes and validated installation commands. Remove the one-off wheel supplement script, its tests, and release instructions.
2026-09-14 22:56:13 +08:00
yyj 4882505c9a docs: add Kimi K2.5 PyPI LoRA guide (#2206)
* [docs]: add reproducible Kimi K2.5 PyPI LoRA tutorial

* [docs]: highlight Kimi K2.5 and K2.6 LoRA support

* Update README to simplify LoRA fine-tuning entry

* Add updates section to README.md

* [docs]: clarify clean Kimi setup and held-out evaluation

* [docs]: explain pinned model downloads on offline training hosts

* [docs]: isolate Kimi caches in the tutorial work directory

* [docs]: simplify Kimi LoRA installation and training tutorial
2026-09-13 21:52:06 +08:00
yyj 105cee4bd1 fix(release): preserve native payload layout in candidate wheels (#2204) 2026-09-13 17:51:54 +08:00
yyj 440df94802 [script]: add Kimi LoRA script (#2202)
* [docs]: add Kimi LoRA tutorial

* Delete .github/release/examples/kimi-k25/TUTORIAL_zh.md

* Delete .github/release/examples/kimi-k25/README.md
2026-09-11 11:26:18 +08:00
yyj 27b04cef5c ci: promote manually validated wheels without exporting PyPI credentials (#2199) 2026-09-11 02:04:16 +08:00
yyj 0eb060c583 fix(ci): preserve setup-python shared library path during release (#2198) 2026-09-11 01:17:50 +08:00
yyj 5632f7197e release: align post4 stack and allow CI artifact-only builds (#2197) 2026-09-11 01:11:26 +08:00
yyj a3695f1a83 ci(release): gate four-main PyPI publishing on immutable wheels and model E2E (#2194)
* ci(release): prepare source builds from four main snapshots

* docs(release): add verified Kimi RAWINT4 LoRA smoke configs

* ci(release): gate four-main PyPI promotion on immutable wheels and model E2E
2026-09-11 00:52:24 +08:00
yyj 7c35863f62 ci: add model E2E acceptance for community PRs and PyPI releases (#2195)
* ci: add isolated model E2E acceptance for PR wheels and PyPI

* ci: recheck GPU occupancy before each model starts

* ci: disable inherited container healthchecks during acceptance

* ci: wait for free GPUs before native import validation

* docs: record qj5090 acceptance infrastructure validation

* ci: add immutable candidate and public PyPI release acceptance gates
2026-09-11 00:50:36 +08:00
yyj 41613064c7 feat(GLM): add native GLM-5.3-flash support (#2173)
* feat: support SwiGLU limit for block FP8 experts

* perf(fp8): add native layerwise batch transport

* feat(fp8): support layerwise transport for TP1/2/4/8

* release: prepare GLM-5.3-flash support

* docs(glm): refine GLM-5.3-flash documentation

* docs(glm): simplify release announcement
2026-08-26 22:45:12 +08:00
yyj d406efc848 ci: run release jobs on self-hosted runner (#2163) 2026-08-18 17:15:40 +08:00
yyj ea81f4e9e5 ci: automate coordinated KT PyPI releases (#2162) 2026-08-18 17:09:59 +08:00
yyj 924754a00b [feat](kt-kernel): end-to-end full-parameter and LoRA SFT(#2094)
* Add full FT development snapshot

* [fix](kt-kernel): fix Full FT TP base weight gradients

* [fix]: bug fix of 2d81e86

* [fix](kt-kernel): fix AMX BF16 full-weight gradients

* [docs](kt-kernel): document Full FT fork changes and debug history

* [docs](kt-kernel): align fork remote terminology

* [chore](kt-kernel): keep agent notes local

* [fix](kt-kernel): configure SFT OpenMP threads

* [perf](kt-kernel): optimize AMX Full-FT weight gradients

Coarsen base-weight gradient work from individual output tiles to fixed-intermediate strips so each task reuses packed panels across the hidden dimension.

Keep aligned thread-local BF16 panels across tasks and retain FP32 AMX accumulator tiles for the full K reduction. Gate and up run separate K passes while sharing the packed input panel.

On the matched Qwen3-30B-A3B 1-GPU test, stable Full-FT backward drops from 9.281s to 6.792s (-26.82%), step time drops from 19.252s to 16.140s, and TPS rises from 212.76 to 253.78. The LoRA-only backward control changes by -2.74%.

Validated with clang-format, the Release AMX/CUDA extension build, TP1/TP2 reference gradients across boundary token counts, and the 15-step Full-then-LoRA performance run.

* [feat](kt-kernel): add staged SFT profiling

* [fix](kt-kernel): reuse inference BF16 kernel for SFT

* [perf](kt-kernel): add fine-grained Full-FT profiling

* [perf](kt-kernel): batch BF16 Full-FT weight gradients

Use one expert-aggregated tile driver for AVX512-BF16 and AMX base-weight gradients, and pack updated full-precision weights directly into TP BufferB layouts without temporary partitions. Add worker-local profiling and focused dWeight/strided-repack coverage.

* [test](kt-kernel): benchmark BF16 dWeight AMX driver

* [fix](kt-kernel): label dWeight store as worker CPU time

* [docs](sft): record BF16 Full-FT performance

* [docs](sft): remove Qwen3 Full-FT performance report

* [perf](kt-kernel): reduce BF16 Full-FT checkpoint overhead

Retain the first CPU MoE forward state across non-reentrant checkpoint recomputation, write BF16 activations directly into the backward cache, and reduce dWeight packing and gradient-clear traffic. Extend staged profiling and cover checkpoint reuse plus AMX/AVX dWeight paths.

* [perf](kt-kernel): make SFT optimizer gradients authoritative

Bind Full-FT and LoRA Parameter.grad directly to the KT-managed BF16 gradient buffers, avoiding PyTorch duplicate accumulation.

Accumulate microbatch gradients in C++, lazily clear expert buffers between optimizer windows, preserve rank-0 distributed ownership, and add lifecycle and AMX dWeight coverage.

* [perf](kt-kernel): avoid eager Full-FT gradient zeroing

Allocate authoritative Full-FT gradient buffers with torch.empty. The C++ state machine performs the mandatory full clear before first use, avoiding redundant Python-side first touch.

* perf(sft): enable checkpoint forward reuse for LoRA

* fix(sft): serialize checkpoint recompute with async repack

* fix(sft): persist authoritative full weights

* fix(sft): normalize legacy distributed gradients

* [fix](sft): train gated shared experts

* fix(sft): preserve expert placeholders across state dict loads

* ci: publish ktransformers sdist in release workflow

* fix(sft): preserve router autograd for LoRA training

Determine routing graph tracking from the router's trainable parameters instead of the Full-FT mode flag, so PEFT LoRA adapters on MoE gates receive routing-weight gradients. Fail fast when a trainable router returns detached weights and cover frozen, TopK, checkpoint-reuse, and two-step optimizer behavior.

---------

Co-authored-by: illu <wubowen03@foxmail.com>
2026-07-23 21:23:34 +08:00
Benjamin 8e46e5896c release: bump version to 0.6.3.post1 (#2063) 2026-06-25 22:42:55 +08:00
github-actions[bot] 459df61262 [build] Sync sglang-kt submodule (v0.6.3) (#2055) 2026-06-25 20:41:04 +08:00
Benjamin a0c7431187 ci(release-pypi): make release pipeline self-consistent (#2062) 2026-06-25 20:05:06 +08:00
Peilin Li 85f1ab530b [ci]: use hosted runner for sglang-kt release
Use GitHub-hosted runners for the pure Python sglang-kt release workflow so the PyPI release is not blocked by unavailable self-hosted runners.
2026-04-25 21:05:18 +08:00
Peilin Li 85308615b9 [build] prepare v0.6.1 SFT wheel packaging on main (#1945)
* [build]: prepare 0.6.1 SFT wheel packaging on main

* [build]: finalize py311+ wheel packaging defaults
2026-04-24 12:08:38 +08:00
Jianwei Dong 15c624dcae Fix/sglang kt detection (#1875)
* [feat]: simplify sglang installation with submodule, auto-sync CI, and version alignment

- Add kvcache-ai/sglang as git submodule at third_party/sglang (branch = main)
- Add top-level install.sh for one-click source installation (sglang + kt-kernel)
- Add sglang-kt as hard dependency in kt-kernel/pyproject.toml
- Add CI workflow to auto-sync sglang submodule daily and create PR
- Add CI workflow to build and publish sglang-kt to PyPI
- Integrate sglang-kt build into release-pypi.yml (version.py bump publishes both packages)
- Align sglang-kt version with ktransformers via SGLANG_KT_VERSION env var injection
- Update Dockerfile to use submodule and inject aligned version
- Update all 13 doc files, CLI hints, and i18n strings to reference new install methods

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [build]: bump version to 0.5.2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [build]: rename PyPI package from kt-kernel to ktransformers

Users can now `pip install ktransformers` to get everything
(sglang-kt is auto-installed as a dependency).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Revert "[build]: rename PyPI package from kt-kernel to ktransformers"

This reverts commit e0cbbf6364.

* [build]: add ktransformers meta-package for PyPI

`pip install ktransformers` now works as a single install command.
It pulls kt-kernel (which in turn pulls sglang-kt).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [fix]: show sglang-kt package version in kt version command

- Prioritize sglang-kt package version (aligned with ktransformers)
  over sglang internal __version__
- Update display name from "sglang" to "sglang-kt"

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [fix]: improve sglang-kt detection in kt doctor and kt version

Recognize sglang-kt package name as proof of kvcache-ai fork installation.
Previously both commands fell through to "PyPI (not recommended)" for
non-editable local source installs. Now version.py reuses the centralized
check_sglang_installation() logic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* [build]: bump version to 0.5.2.post1

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 16:54:48 +08:00
ZiWei Yuan ad7674a6d5 [ci]: Patch ci (#1772)
* [docs]: add kt-cli doc and update corresponding website

* [feat]: update issue template
2025-12-31 12:10:20 +08:00
Jianwei Dong 6d2d7cb057 bump to 0.5.0.post1 (#1771) 2025-12-30 11:09:54 +08:00
Jianwei Dong 47b1bfcff6 Update release-pypi.yml (#1770) 2025-12-30 10:47:28 +08:00
Jianwei Dong 9adc91714f Remove kt-kernel-cuda, kt-kernel uses the version with cuda (#1769) 2025-12-30 10:23:58 +08:00
Jianwei Dong 4b235cdaa4 fix cuda wheel build (#1766) 2025-12-29 12:42:06 +08:00
Jianwei Dong 7c127d9fd0 Update release-pypi.yml (#1764) 2025-12-29 11:48:55 +08:00
Jianwei Dong 559a3ad4ac fix pypi cuda install (#1763) 2025-12-29 11:19:43 +08:00
Jianwei Dong 661e19a8e5 Update release-pypi.yml (#1726) 2025-12-16 20:37:20 +08:00
Jianwei Dong 5ba3fb56d1 Update release-pypi.yml (#1725) 2025-12-16 20:30:03 +08:00
Jianwei Dong 3126b8deaa Update release-pypi.yml (#1724) 2025-12-16 17:45:29 +08:00
Jianwei Dong 6dcacd9daf Update release-pypi.yml (#1723) 2025-12-16 17:42:28 +08:00
Jianwei Dong fe8049d3a9 Update release-pypi.yml (#1722) 2025-12-16 17:35:29 +08:00
Jianwei Dong 5ff0026fc1 Update release-pypi.yml (#1721) 2025-12-16 17:29:29 +08:00
Jianwei Dong 1f79f6da92 [feat](kt-kernel): Add automatic deployment workflow (#1719) 2025-12-16 15:20:06 +08:00
Jianwei Dong fef6dd98a8 add accuracy and performance test (#1643) 2025-11-27 10:56:39 +08:00
Jianwei Dong 51745a9ea1 add ci (#1642) 2025-11-25 20:52:08 +08:00
ZiWei Yuan f914bc4581 [docs]: add issue config (#1621)
* [docs]: add issue config

* [docs]: consider to force the issue template
2025-11-16 11:50:43 +08:00
ZiWei Yuan ac0e449980 [docs]: add code of conduct & pr template (#1619) 2025-11-15 22:45:53 +08:00
ZiWei Yuan e0e2429748 [ci]: update issue template & security & license (#1617) 2025-11-15 22:29:01 +08:00
ZiWei Yuan aef6672dd8 [docs]: add contribuing guide and add hooks install (#1613)
* [feat]: update kt-kernel hooks and add contribution guide

* [docs]: add contributing guide
* [style]: format the python file and cpp file in kt-kernel
2025-11-15 18:26:49 +08:00
liam Yuan 2762012039 ✨ fix typo 2025-04-29 13:20:03 +08:00
Azure-Tang d98433c2d1 update git action env, add USE_BALANCE_SERVE=1 2025-04-01 12:58:28 +00:00
Azure-Tang aeabd783b0 update git action env, add BALANCE_SERVE=1 2025-04-01 11:21:55 +00:00
SkqLiao e7d7d2705c rename CI/CD 2025-03-20 10:11:24 +08:00
SkqLiao bad334fa5b fix path 2025-03-19 21:28:58 +08:00
SkqLiao bc369b256c add CI/CD for human eval score benchmarking 2025-03-19 21:25:21 +08:00
SkqLiao c66ca65778 write to log 2025-03-15 17:10:44 +08:00
SkqLiao a1891b845d remove unsupprted paramters, add force think 2025-03-15 17:04:42 +08:00
SkqLiao 4e23a4c024 split two test 2025-03-15 11:32:43 +08:00
SkqLiao 0899b7dde6 remove file output est 2025-03-15 03:17:35 +08:00