Archived
LFM2's hybrid with sliding-window attention layers as a third kind, sandwich norms, a partial rotary on the head ladder for the full layers and a sigmoid gate per query head on the attention output. The gate is computed at the output's width (gate_proj's rows repeated by the name map), so it needs no op beyond gemm_nt, sigmoid and mul. One rank, bf16 linears; everything else is refused by name.
11 lines
442 B
CMake
11 lines
442 B
CMake
# Built in radiance's tree, or standalone against an installed radiance
|
|
# (`cmake -S arch/lfm3_bf16 -B build -DCMAKE_PREFIX_PATH=<radiance prefix>`); see cmake/RadAddPlugin.cmake.
|
|
if(NOT COMMAND rad_add_plugin)
|
|
cmake_minimum_required(VERSION 3.21)
|
|
project(lfm3_bf16 LANGUAGES CXX)
|
|
find_package(radiance REQUIRED)
|
|
rad_plugin_defaults()
|
|
endif()
|
|
|
|
rad_add_plugin(lfm3_bf16 architectures SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/lfm3_bf16.cpp)
|