Class GPTTransformerBuilder
java.lang.Object
io.github.kirstenali.deepj.transformer.GPTTransformerBuilder
Builder for GPT-style transformer stacks.
Assembles a TransformerStack of GPTTransformerBlocks
(LayerNorm + multi-head self-attention + configurable FFN).
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()dFF(int dFF) dModel(int dModel) ffnActivation(Supplier<ActivationFunction> factory) Activation inside the FFN.nHeads(int nHeads) nLayers(int nLayers) seed(long seed)
-
Constructor Details
-
GPTTransformerBuilder
public GPTTransformerBuilder()
-
-
Method Details
-
dModel
-
nHeads
-
dFF
-
nLayers
-
ffnActivation
Activation inside the FFN. Default: GELU. -
seed
-
random
-
build
-