TensorNameMapper

Abstracts the mapping from logical tensor roles to GGUF tensor name strings.

Different model families (LLaMA, Gemma, Mistral, Qwen) share the same transformer architecture but use different naming conventions for their weight tensors. This interface provides a single point of indirection so that a weight loader can work with any naming scheme.

Implement this interface for each model family and pass it to the weight loader to enable loading models with non-standard tensor names.

Inheritors

Functions

Link copied to clipboard
abstract fun layerAttnK(layer: Int): String
Link copied to clipboard
abstract fun layerAttnNorm(layer: Int): String
Link copied to clipboard
abstract fun layerAttnO(layer: Int): String
Link copied to clipboard
abstract fun layerAttnQ(layer: Int): String
Link copied to clipboard
abstract fun layerAttnV(layer: Int): String
Link copied to clipboard
abstract fun layerFfnDown(layer: Int): String
Link copied to clipboard
abstract fun layerFfnGate(layer: Int): String
Link copied to clipboard
abstract fun layerFfnNorm(layer: Int): String
Link copied to clipboard
abstract fun layerFfnUp(layer: Int): String
Link copied to clipboard
abstract fun outputNorm(): String
Link copied to clipboard
abstract fun outputWeight(): String
Link copied to clipboard
abstract fun tokenEmbedding(): String