Archived
Gemma 4 dense as two attention classes (sliding-window + proportional-RoPE global, k_eq_v) over one GemmaRMSNorm stream with GELU ffn, two KV groups, softcapped logits, tied scaled embedding. arch_test builds the full graph. Env-gated residual-trace instrument in the arch (RADIANCE_TRACE_RESID, default off). 21.7 GiB w4a16 QAT checkpoint serves coherent sampled output on the box.
12 lines
521 B
CMake
12 lines
521 B
CMake
# A plugin like any other: built here inside radiance's tree, or on its own against an installed
|
|
# radiance (`cmake -S arch/gemma4_bf16 -B build -DCMAKE_PREFIX_PATH=<radiance prefix>`) -- the same
|
|
# rad_add_plugin either way (cmake/RadAddPlugin.cmake).
|
|
if(NOT COMMAND rad_add_plugin)
|
|
cmake_minimum_required(VERSION 3.21)
|
|
project(gemma4_bf16 LANGUAGES CXX)
|
|
find_package(radiance REQUIRED)
|
|
rad_plugin_defaults()
|
|
endif()
|
|
|
|
rad_add_plugin(gemma4_bf16 architectures SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/gemma4_bf16.cpp)
|