Repository navigation
kitten-tts: NVIDIA GPU support and CUDA wheels (kitten-tts-cpp-cu12 / -cu13) - #11
Merged
Merged
Conversation
No GPU backend has TQ2_1 kernels. When a TQ2_1 weight is assigned to a GPU buffer type that supports the op with Q2_0, create it as Q2_0 and repack it while loading. The repack is lossless: both formats store 2-bit codes with FP16 scales, and each 128-weight TQ2_1 scale is copied bit-exact onto two 64-weight Q2_0 blocks. CPU buffers are unchanged. Repacked tensors are not served from the file mapping. - ggml: ggml_repack_tq2_1_to_q2_0(), which rejects code 3 - llama: llama_model_params.gpu_repack (default true), load log lines for the repacked tensors and the repack time - llama-ext.h staging API: llama_model_n_tensors(), llama_model_get_tensor_by_index(), llama_get_graph_splits() and llama_get_flash_attn(), so tools can check weight placement, CPU fallbacks and the resolved flash attention setting - ggml-cuda: cache the device's integrated flag at registration instead of calling cudaGetDeviceProperties on every get_type call - tests: repack round trips and invalid codes in test-tq2_1, Q2_0 mul_mat cases at Qwen3-1.7B shapes in test-backend-ops, and test-tq2_1-load, which loads a TQ2_1 GGUF with all layers on the GPU, checks that every TQ2_1 weight is on the GPU as Q2_0 and dequantizes to the same values as the file, and that with gpu_repack off the weights stay on the CPU as TQ2_1
haaziq-sl
force-pushed
the
py-interface
branch
from
October 22, 2026 08:54
40c108e to
560eb64
Compare
Assisted-by: Codex
haaziq-sl
force-pushed
the
py-interface
branch
from
October 26, 2026 11:42
560eb64 to
fcafd9a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Overview
Run KittenTTS2's speech model and waveform decoder on NVIDIA GPUs from the CLI or Python. The runtime now downloads the published
defaultandstudent_w4CUDA decoders from Hugging Face automatically. Users do not need to export a decoder.The PR contains two commits on top of
KittenML:py-interface:CPU inference remains the default. The GPU packages are
kitten-tts-cpp-cu12on Linux andkitten-tts-cpp-cu13on Windows; both use thekitten_tts_cppimport.After installing the GPU wheel and matching PyTorch build:
Validation
Hardware testing on October 24 used an RTX 3090 on Linux and an L4 on Windows Server 2022, with model revision
c93cb7c271baa51d9ae8204d5277988906f235a2.2.98e-7.Full results and limitations are in validation.json. The new wheel CI run is separate from these hardware tests. The inherited CANN workflow has no active jobs and already failed validation on the previous PR head; the inherited Python type-check requires a self-hosted runner.
Limitations
student_w8has no published CUDA decoder. GPU output is not promised to be bit-identical to CPU output.Requirements