Archived
New models: - Fish Audio drama-3: speech with speaker tags and inline direction, voices cloned from reference clips (the `references` field of /v1/audio/speech and the streaming session), two cards - Gemma 4 E2B/E4B (KV-shared layers, per-layer embeddings, clipped vision linears), with NVIDIA-Nemotron-3.5-Bolt-E4B in bf16 with DFlash and vision on one card, and E4B recipes Speed: - MXFP4 GEMMs for one to 64 rows and a tiled prefill GEMM at TN=4 from 1024 rows: the 27B MXFP4 with DFlash2 decodes about 1% faster at c1, 5% at c4 and 14% at c16 - The fp8 and int8 LM heads read their weight once for 65 to 128 rows - A prefill step of one sequence runs in two pieces on a second lane at two ranks (qwen35_fp8, gemma3): a 45K-token prompt on the 27B fp8 in 15.1 s instead of 16.2 s - Gemma 3's fused all-reduce junctions also under a lossy wire - --draft-short-from N: a block drafter runs its shorter block from N decoding sequences on (off by default; with 8 on the 27B MXFP4: c8 +12%, c16 +18%, c64 +32%, c1 unchanged) - --tp-attn-split rows: GLM-5.3-Flash's MLA attention split by rows over the ranks, 18 to 21% faster prefill; lossy, `heads` stays the default - --draft-coupling on: Qwen3.8-Flash-Next's MTP drafter samples its proposals from its reranked top-8 and the target's draw is coupled to it; pays at high temperatures (c1 at T 1.0: 155 -> 178 tok/s), costs at low ones; off by default Features: - Edited prompts on windowed models (Gemma 4) reuse their prefix: periodic window snapshots, and snapshot-backed prefix KV kept across recomputes (an edited tail on Gemma 4 31B: 96 s -> 2.6 s) - DELETE /sessions/<label> and DELETE /sessions?id=<id> forget one stored conversation - --state-cache-dtype f16: the delta-net state cache at half the memory (qwen35 plugins; lossy) Fixes: - A browser's CORS preflight allows DELETE Changes: Plugin ABI 27: out-of-tree plugins must be rebuilt. The environment switches the PRs added are flags now (--tp-attn-split, --draft-coupling, --state-cache-dtype).
43 lines
2.0 KiB
CMake
43 lines
2.0 KiB
CMake
# spechub -- the linear-MTP coupling kernels.
|
|
#
|
|
# Two ops, `mtp_couple_propose` and `mtp_couple_verify`, each with a device row and a host reference
|
|
# row. The arithmetic is abi/rad_spechub.h's, shared with the engine. The device launches include
|
|
# libr4d/r4d_emit.h by its path in this tree, so the device form builds from this tree's sources
|
|
# (in the tree's build or standalone against an install); a host-only build needs abi/ alone.
|
|
if(NOT COMMAND rad_add_plugin)
|
|
cmake_minimum_required(VERSION 3.21)
|
|
project(spechub LANGUAGES CXX)
|
|
find_package(radiance REQUIRED)
|
|
# The device rows are built where the installed radiance has a device build; HIP is enabled
|
|
# after project(), from the package's record of that build.
|
|
if(RAD_HIP_FOUND)
|
|
enable_language(HIP)
|
|
endif()
|
|
rad_plugin_defaults()
|
|
endif()
|
|
|
|
set(SPECHUB_COMMON
|
|
${CMAKE_CURRENT_SOURCE_DIR}/spechub.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/ref_spechub.cpp
|
|
${CMAKE_CURRENT_SOURCE_DIR}/exports.cpp)
|
|
|
|
if(NOT RAD_HIP_FOUND)
|
|
message(STATUS "spechub: this radiance has no device build -- only the host reference is built")
|
|
rad_add_plugin(spechub kernels SOURCES ${SPECHUB_COMMON})
|
|
else()
|
|
# The owning project must enable HIP itself; enable_language() is project scope. The top-level tree
|
|
# does it with -DRAD_WITH_HIP=ON, and a standalone build must do the same after project().
|
|
get_property(spechub_langs GLOBAL PROPERTY ENABLED_LANGUAGES)
|
|
if(NOT "HIP" IN_LIST spechub_langs)
|
|
message(FATAL_ERROR "spechub: HIP_SOURCES need `enable_language(HIP)` in this project (set "
|
|
"-DRAD_WITH_HIP=ON, or enable it after project()).")
|
|
endif()
|
|
rad_add_plugin(spechub kernels SOURCES ${SPECHUB_COMMON}
|
|
HIP_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/spechub.hip)
|
|
target_compile_definitions(spechub PRIVATE RAD_SPECHUB_WITH_DEVICE=1)
|
|
endif()
|
|
|
|
# -ffp-contract=off for correctness: an FMA fused into the ordered FP64 mass sums would move the
|
|
# token off the host reference.
|
|
target_compile_options(spechub PRIVATE -ffp-contract=off)
|