Class LlamaModel
java.lang.Object
io.github.kirstenali.deepj.models.DecoderOnlyModel
io.github.kirstenali.deepj.models.llama.LlamaModel
- All Implemented Interfaces:
CausalLM,Persistable,Trainable
Llama-style decoder-only transformer.
Architecture differences from GPTModel:
- No learned positional embedding — RoPE is applied inside each attention block.
- RMSNorm instead of LayerNorm for the final pre-head normalisation.
- SwiGLU feed-forward instead of GELU-FFN.
Forward/backward/parameters are provided by DecoderOnlyModel.
-
Field Summary
Fields inherited from class io.github.kirstenali.deepj.models.DecoderOnlyModel
lmHead, normF, stack, tokEmb -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.github.kirstenali.deepj.models.DecoderOnlyModel
applyInitScale, backward, backwardEmbeddings, embed, embeddingParameters, forward, parametersMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.kirstenali.deepj.persistence.Persistable
load, save
-
Constructor Details
-
LlamaModel
-
-
Method Details
-
gradClipNorm
public float gradClipNorm()Description copied from interface:CausalLMGlobal gradient-clipping threshold (e.g.1.0). -
config
-