Index
All Classes and Interfaces|All Packages|Constant Field Values
A
- ActivationFunction - Interface in io.github.kirstenali.deepj.activations
- AdamW - Class in io.github.kirstenali.deepj.optimisers
-
AdamW optimizer with per-parameter state.
- AdamW(float, float, float, float, float) - Constructor for class io.github.kirstenali.deepj.optimisers.AdamW
- adamWUpdate(Tensor, Tensor, Tensor, Tensor, float, float, float, float, float, float, float) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- adamWUpdate(Tensor, Tensor, Tensor, Tensor, float, float, float, float, float, float, float) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- adamWUpdate(Tensor, Tensor, Tensor, Tensor, float, float, float, float, float, float, float) - Static method in class io.github.kirstenali.deepj.tensor.Tensor
- adamWUpdate(Tensor, Tensor, Tensor, Tensor, float, float, float, float, float, float, float) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
-
In-place AdamW update.
- add(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- add(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- add(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- add(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- addBroadcastCols(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- addBroadcastCols(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- addBroadcastCols(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- addBroadcastCols(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- addBroadcastRows(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- addBroadcastRows(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- addBroadcastRows(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- addBroadcastRows(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- addInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- addInPlace(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- addInPlace(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- addInPlace(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- addRowVector(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- addRowVector(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- addRowVector(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- addRowVector(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- addScalar(float) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- addScalar(Tensor, float) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- addScalar(Tensor, float) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- addScalar(Tensor, float) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- addScalarInPlace(float) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- addScalarInPlace(Tensor, float) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- addScalarInPlace(Tensor, float) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- addScalarInPlace(Tensor, float) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- allocatedOnGpu - Variable in class io.github.kirstenali.deepj.tensor.GpuBuffer
-
True if the runtime has allocated native memory for this id.
- allocBuffers(int[], int[], int) - Method in interface io.github.kirstenali.deepj.tensor.GpuRuntime
-
Batch-allocate GPU buffers.
- apply(Tensor, int, int) - Method in class io.github.kirstenali.deepj.transformer.embeddings.RotaryEmbedding
-
Apply rotary embeddings to a split-head tensor (forward direction).
- applyBackward(Tensor, int, int) - Method in class io.github.kirstenali.deepj.transformer.embeddings.RotaryEmbedding
-
Apply the transpose (inverse) rotation — used in the backward pass.
- applyInitScale(float) - Method in class io.github.kirstenali.deepj.models.DecoderOnlyModel
- architecture() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig
-
Returns the value of the
architecturerecord component. - Architecture(int, int, int, int, int, int, int, float, float) - Constructor for record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Architecture
-
Creates an instance of a
Architecturerecord class.
B
- backend() - Static method in class io.github.kirstenali.deepj.tensor.Tensor
- backward(Tensor) - Method in interface io.github.kirstenali.deepj.activations.ActivationFunction
- backward(Tensor) - Method in class io.github.kirstenali.deepj.activations.GELU
- backward(Tensor) - Method in class io.github.kirstenali.deepj.activations.ReLU
- backward(Tensor) - Method in class io.github.kirstenali.deepj.activations.Sigmoid
- backward(Tensor) - Method in class io.github.kirstenali.deepj.activations.SiLU
- backward(Tensor) - Method in class io.github.kirstenali.deepj.activations.Softmax
- backward(Tensor) - Method in class io.github.kirstenali.deepj.activations.Tanh
- backward(Tensor) - Method in class io.github.kirstenali.deepj.layers.FNN
- backward(Tensor) - Method in interface io.github.kirstenali.deepj.layers.Layer
- backward(Tensor) - Method in class io.github.kirstenali.deepj.layers.Linear
- backward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.attention.MultiHeadLatentAttention
- backward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.attention.MultiHeadSelfAttention
- backward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.blocks.DeepSeekTransformerBlock
- backward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.blocks.GPTTransformerBlock
- backward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.blocks.LlamaTransformerBlock
- backward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.norm.LayerNorm1D
- backward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.norm.RMSNorm1D
- backward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.SwiGLULayer
- backward(Tensor) - Method in interface io.github.kirstenali.deepj.models.CausalLM
-
Back-propagates gradient of the logits through the model.
- backward(Tensor) - Method in class io.github.kirstenali.deepj.models.DecoderOnlyModel
- backward(Tensor) - Method in class io.github.kirstenali.deepj.transformer.embeddings.Embedding
- backward(Tensor) - Method in class io.github.kirstenali.deepj.transformer.embeddings.PositionalEmbedding
- backward(Tensor) - Method in record class io.github.kirstenali.deepj.transformer.TransformerStack
- backwardEmbeddings(Tensor) - Method in class io.github.kirstenali.deepj.models.DecoderOnlyModel
-
Back-propagates gradient into embedding layer(s).
- backwardEmbeddings(Tensor) - Method in class io.github.kirstenali.deepj.models.gpt.GPTModel
- BaseChatApp - Class in io.github.kirstenali.deepj.chatui
- BaseChatApp() - Constructor for class io.github.kirstenali.deepj.chatui.BaseChatApp
- Batch - Record Class in io.github.kirstenali.deepj.data
-
One language-modeling batch: x are input token ids, y are targets (next-token ids).
- Batch(int[][], int[][]) - Constructor for record class io.github.kirstenali.deepj.data.Batch
-
Creates an instance of a
Batchrecord class. - batchSize() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Training
-
Returns the value of the
batchSizerecord component. - BatchSource - Interface in io.github.kirstenali.deepj.data
-
Supplies token batches to a causal language-model trainer.
- bias() - Method in class io.github.kirstenali.deepj.layers.Linear
- bindTensorToBuffer(Tensor, GpuBuffer) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Rebind an existing tensor to a GPU buffer and track ownership for lifecycle management.
- blocks() - Method in record class io.github.kirstenali.deepj.transformer.TransformerStack
-
Returns the value of the
blocksrecord component. - BPEModel - Record Class in io.github.kirstenali.deepj.tokenizers.bpe
- BPEModel(List<byte[]>, Map<String, Integer>, List<TokenPair>, Map<TokenPair, Integer>, int) - Constructor for record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
- BPEModel(List<byte[]>, Map<String, Integer>, List<TokenPair>, Map<TokenPair, Integer>, int, int, Map<String, Integer>) - Constructor for record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
-
Creates an instance of a
BPEModelrecord class. - BPEModelIO - Class in io.github.kirstenali.deepj.tokenizers.bpe
- BPETokenizer - Class in io.github.kirstenali.deepj.tokenizers.bpe
- BPETokenizer(BPEModel) - Constructor for class io.github.kirstenali.deepj.tokenizers.bpe.BPETokenizer
- BPETrainer - Class in io.github.kirstenali.deepj.tokenizers.bpe
- BPETrainer() - Constructor for class io.github.kirstenali.deepj.tokenizers.bpe.BPETrainer
- build() - Method in class io.github.kirstenali.deepj.transformer.DeepSeekTransformerBuilder
- build() - Method in class io.github.kirstenali.deepj.transformer.GPTTransformerBuilder
- build() - Method in class io.github.kirstenali.deepj.transformer.LlamaTransformerBuilder
- ByteTokenizer - Class in io.github.kirstenali.deepj.tokenizers
-
Minimal byte-level tokenizers (0-255).
- ByteTokenizer() - Constructor for class io.github.kirstenali.deepj.tokenizers.ByteTokenizer
C
- CausalLM - Interface in io.github.kirstenali.deepj.models
-
Common contract for decoder-only causal language models (GPT, Llama, DeepSeek, …).
- CausalLMEvaluation - Class in io.github.kirstenali.deepj.training
-
Evaluation helpers for causal language models.
- CausalLMTraining - Class in io.github.kirstenali.deepj.training
-
Wiring helpers for causal language model training.
- causalMask(int) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- causalMask(int) - Static method in class io.github.kirstenali.deepj.tensor.Tensor
- ChatApp - Class in io.github.kirstenali.deepj.chatui
- ChatApp() - Constructor for class io.github.kirstenali.deepj.chatui.ChatApp
- ChatController - Class in io.github.kirstenali.deepj.chatui
- ChatController() - Constructor for class io.github.kirstenali.deepj.chatui.ChatController
- ChatMessage - Record Class in io.github.kirstenali.deepj.chatui
- ChatMessage(String, boolean) - Constructor for record class io.github.kirstenali.deepj.chatui.ChatMessage
-
Creates an instance of a
ChatMessagerecord class. - ChatService - Interface in io.github.kirstenali.deepj.chatui
- checkpointEvery() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Training
-
Returns the value of the
checkpointEveryrecord component. - clamp(float, float) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- clamp(Tensor, float, float) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- clamp(Tensor, float, float) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- clamp(Tensor, float, float) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- close() - Method in class io.github.kirstenali.deepj.data.RandomAccessTextDataset
- cols - Variable in class io.github.kirstenali.deepj.tensor.GpuBuffer
- cols - Variable in class io.github.kirstenali.deepj.tensor.Tensor
- compareTo(TokenPair) - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.TokenPair
- ComputeGraph - Class in io.github.kirstenali.deepj.tensor
-
Collects GPU operations lazily and flushes them as a single command buffer.
- ComputeGraph(GpuRuntime) - Constructor for class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Create a ComputeGraph backed by the given GPU runtime.
- config() - Method in class io.github.kirstenali.deepj.models.deepseek.DeepSeekModel
- config() - Method in class io.github.kirstenali.deepj.models.gpt.GPTModel
- config() - Method in class io.github.kirstenali.deepj.models.llama.LlamaModel
- CONFIG_FILE - Static variable in class io.github.kirstenali.deepj.publishing.DeepJModelBundle
- corpus() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.FilesConfig
-
Returns the value of the
corpusrecord component. - CosineLearningRateSchedule - Record Class in io.github.kirstenali.deepj.training
-
Linear warmup followed by cosine decay.
- CosineLearningRateSchedule(float, float, int, int) - Constructor for record class io.github.kirstenali.deepj.training.CosineLearningRateSchedule
-
Creates an instance of a
CosineLearningRateSchedulerecord class. - CpuBackend - Class in io.github.kirstenali.deepj.tensor.cpu
- CpuBackend() - Constructor for class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- cpuStale - Variable in class io.github.kirstenali.deepj.tensor.GpuBuffer
-
True if GPU has newer data than Tensor.data (CPU cache is stale).
- createChatService() - Method in class io.github.kirstenali.deepj.chatui.BaseChatApp
- createChatService() - Method in class io.github.kirstenali.deepj.chatui.ChatApp
- createOutputTensor(GpuBuffer) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Create a Tensor backed by a GpuBuffer.
- crossEntropyGradient(int[]) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- crossEntropyGradient(Tensor, int[]) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- crossEntropyGradient(Tensor, int[]) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- crossEntropyGradient(Tensor, int[]) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- crossEntropyLoss(int[]) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- crossEntropyLoss(Tensor, int[]) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- crossEntropyLoss(Tensor, int[]) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- crossEntropyLoss(Tensor, int[]) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- CrossEntropyLoss - Class in io.github.kirstenali.deepj.loss
-
Cross-entropy loss with integer class targets.
- CrossEntropyLoss() - Constructor for class io.github.kirstenali.deepj.loss.CrossEntropyLoss
- CURRENT_FORMAT_VERSION - Static variable in class io.github.kirstenali.deepj.persistence.ModelSerializer
- CURRENT_FORMAT_VERSION - Static variable in record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
D
- data - Variable in class io.github.kirstenali.deepj.tensor.Tensor
-
Flat row-major storage: element (r, c) lives at data[r * cols + c].
- decode(int[]) - Method in class io.github.kirstenali.deepj.tokenizers.bpe.BPETokenizer
- decode(int[]) - Method in class io.github.kirstenali.deepj.tokenizers.ByteTokenizer
- decode(int[]) - Method in interface io.github.kirstenali.deepj.tokenizers.Tokenizer
- DecoderOnlyModel - Class in io.github.kirstenali.deepj.models
-
Shared skeleton for decoder-only transformer models: token embedding → block stack → final norm → LM-head.
- DecoderOnlyModel(Embedding, TransformerStack, NormLayer, Projection) - Constructor for class io.github.kirstenali.deepj.models.DecoderOnlyModel
- DeepJExecutor - Class in io.github.kirstenali.deepj.concurrent
- DeepJModelBundle - Class in io.github.kirstenali.deepj.publishing
-
Exports a DeepJ checkpoint, tokenizer, config, and Hugging Face model card.
- DeepSeekConfig - Record Class in io.github.kirstenali.deepj.models.deepseek
-
Configuration for a DeepSeek-style decoder-only transformer.
- DeepSeekConfig(int, int, int, int, int, int, int, int) - Constructor for record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Convenience constructor with stable initialization and gradient-clipping defaults.
- DeepSeekConfig(int, int, int, int, int, int, int, int, float) - Constructor for record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Convenience constructor retaining the historical gradient-clip argument.
- DeepSeekConfig(int, int, int, int, int, int, int, int, float, float) - Constructor for record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Creates an instance of a
DeepSeekConfigrecord class. - DeepSeekModel - Class in io.github.kirstenali.deepj.models.deepseek
-
DeepSeek-style decoder-only transformer.
- DeepSeekModel(DeepSeekConfig, long) - Constructor for class io.github.kirstenali.deepj.models.deepseek.DeepSeekModel
- DeepSeekTinyStoriesConfig - Record Class in io.github.kirstenali.deepj.examples
-
Configuration for the bounded-memory TinyStories DeepSeek training example.
- DeepSeekTinyStoriesConfig(DeepSeekTinyStoriesConfig.FilesConfig, DeepSeekTinyStoriesConfig.Architecture, DeepSeekTinyStoriesConfig.Training, DeepSeekTinyStoriesConfig.TokenizerConfig, long) - Constructor for record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig
-
Creates an instance of a
DeepSeekTinyStoriesConfigrecord class. - DeepSeekTinyStoriesConfig.Architecture - Record Class in io.github.kirstenali.deepj.examples
- DeepSeekTinyStoriesConfig.FilesConfig - Record Class in io.github.kirstenali.deepj.examples
- DeepSeekTinyStoriesConfig.TokenizerConfig - Record Class in io.github.kirstenali.deepj.examples
- DeepSeekTinyStoriesConfig.Training - Record Class in io.github.kirstenali.deepj.examples
- DeepSeekTransformerBlock - Class in io.github.kirstenali.deepj.layers.transformer.blocks
-
Pre-LN transformer block with DeepSeek-style latent attention:
- DeepSeekTransformerBlock(int, int, int, int, int, int, Random) - Constructor for class io.github.kirstenali.deepj.layers.transformer.blocks.DeepSeekTransformerBlock
- DeepSeekTransformerBuilder - Class in io.github.kirstenali.deepj.transformer
-
Builder for DeepSeek-style transformer stacks.
- DeepSeekTransformerBuilder() - Constructor for class io.github.kirstenali.deepj.transformer.DeepSeekTransformerBuilder
- DEFAULT_SPECIAL_TOKENS - Static variable in class io.github.kirstenali.deepj.tokenizers.bpe.BPETrainer
- defaultAdamW(float) - Static method in class io.github.kirstenali.deepj.optimisers.AdamW
- defaultDFF(int) - Static method in record class io.github.kirstenali.deepj.models.llama.LlamaConfig
-
Returns a common Llama-style dFF for the given dModel:
round(8/3 * dModel)rounded up to the nearest multiple of 64. - dFF() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Architecture
-
Returns the value of the
dFFrecord component. - dFF() - Method in record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Returns the value of the
dFFrecord component. - dFF() - Method in record class io.github.kirstenali.deepj.models.gpt.GPTConfig
-
Returns the value of the
dFFrecord component. - dFF() - Method in record class io.github.kirstenali.deepj.models.llama.LlamaConfig
-
Returns the value of the
dFFrecord component. - dFF() - Method in interface io.github.kirstenali.deepj.models.TransformerConfig
- dFF(int) - Method in class io.github.kirstenali.deepj.transformer.DeepSeekTransformerBuilder
- dFF(int) - Method in class io.github.kirstenali.deepj.transformer.GPTTransformerBuilder
- dFF(int) - Method in class io.github.kirstenali.deepj.transformer.LlamaTransformerBuilder
- divide(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- divide(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- divide(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- divide(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- divideBroadcastCols(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- divideBroadcastCols(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- divideBroadcastCols(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- divideBroadcastCols(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- divideInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- divideInPlace(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- divideInPlace(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- divideInPlace(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- divideScalar(float) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- divideScalar(Tensor, float) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- divideScalar(Tensor, float) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- divideScalar(Tensor, float) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- divideScalarInPlace(float) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- divideScalarInPlace(Tensor, float) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- divideScalarInPlace(Tensor, float) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- divideScalarInPlace(Tensor, float) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- dModel() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Architecture
-
Returns the value of the
dModelrecord component. - dModel() - Method in record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Returns the value of the
dModelrecord component. - dModel() - Method in record class io.github.kirstenali.deepj.models.gpt.GPTConfig
-
Returns the value of the
dModelrecord component. - dModel() - Method in record class io.github.kirstenali.deepj.models.llama.LlamaConfig
-
Returns the value of the
dModelrecord component. - dModel() - Method in interface io.github.kirstenali.deepj.models.TransformerConfig
- dModel(int) - Method in class io.github.kirstenali.deepj.transformer.DeepSeekTransformerBuilder
- dModel(int) - Method in class io.github.kirstenali.deepj.transformer.GPTTransformerBuilder
- dModel(int) - Method in class io.github.kirstenali.deepj.transformer.LlamaTransformerBuilder
- downloadBuffer(int, float[]) - Method in interface io.github.kirstenali.deepj.tensor.GpuRuntime
-
Download GPU buffer contents into a CPU float array.
E
- emaLoss() - Method in record class io.github.kirstenali.deepj.training.TrainingResult
-
Returns the value of the
emaLossrecord component. - embed(int[]) - Method in class io.github.kirstenali.deepj.models.DecoderOnlyModel
-
Maps input ids to the initial hidden state.
- embed(int[]) - Method in class io.github.kirstenali.deepj.models.gpt.GPTModel
- Embedding - Class in io.github.kirstenali.deepj.transformer.embeddings
-
Token embedding: ids -> vectors.
- Embedding(int, int, Random) - Constructor for class io.github.kirstenali.deepj.transformer.embeddings.Embedding
- embeddingParameters() - Method in class io.github.kirstenali.deepj.models.DecoderOnlyModel
-
Returns all embedding parameters.
- embeddingParameters() - Method in class io.github.kirstenali.deepj.models.gpt.GPTModel
- encode(String) - Method in class io.github.kirstenali.deepj.tokenizers.bpe.BPETokenizer
- encode(String) - Method in class io.github.kirstenali.deepj.tokenizers.ByteTokenizer
- encode(String) - Method in interface io.github.kirstenali.deepj.tokenizers.Tokenizer
- endOfWordId() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
-
Returns the value of the
endOfWordIdrecord component. - ensureGpuBuffer(Tensor) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Ensure a tensor has a GpuBuffer.
- equals(Object) - Method in record class io.github.kirstenali.deepj.chatui.ChatMessage
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.data.Batch
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Architecture
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.FilesConfig
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.TokenizerConfig
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Training
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.models.gpt.GPTConfig
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.models.llama.LlamaConfig
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.publishing.ModelCard
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.TokenPair
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.training.CosineLearningRateSchedule
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.training.EvaluationResult
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.training.TrainingResult
-
Indicates whether some other object is "equal to" this one.
- equals(Object) - Method in record class io.github.kirstenali.deepj.transformer.TransformerStack
-
Indicates whether some other object is "equal to" this one.
- evaluate(CausalLM, BatchSource, int, int) - Static method in class io.github.kirstenali.deepj.training.CausalLMEvaluation
- EvaluateDeepSeekTinyStories - Class in io.github.kirstenali.deepj.examples
-
Loads and evaluates a trained TinyStories DeepSeek-style bundle.
- EvaluationResult - Record Class in io.github.kirstenali.deepj.training
-
Aggregate causal language-model evaluation metrics.
- EvaluationResult(double, double, long) - Constructor for record class io.github.kirstenali.deepj.training.EvaluationResult
-
Creates an instance of a
EvaluationResultrecord class. - exp() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- exp(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- exp(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- exp(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- expInPlace() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- expInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- expInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- expInPlace(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- export(Path, DeepSeekModel, BPEModel, ModelCard) - Static method in class io.github.kirstenali.deepj.publishing.DeepJModelBundle
- export(Path, GPTModel, BPEModel, ModelCard) - Static method in class io.github.kirstenali.deepj.publishing.DeepJModelBundle
- ExportDeepSeekTinyStories - Class in io.github.kirstenali.deepj.examples
-
Evaluates and exports the trained TinyStories checkpoint for Hugging Face.
F
- ffnActivation(Supplier<ActivationFunction>) - Method in class io.github.kirstenali.deepj.transformer.GPTTransformerBuilder
-
Activation inside the FFN.
- files() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig
-
Returns the value of the
filesrecord component. - FilesConfig(Path, Path, Path) - Constructor for record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.FilesConfig
-
Creates an instance of a
FilesConfigrecord class. - floatCount() - Method in class io.github.kirstenali.deepj.tensor.GpuBuffer
- flush() - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Flush all recorded ops to the GPU as a single command buffer.
- flushOps(int[], int) - Method in interface io.github.kirstenali.deepj.tensor.GpuRuntime
-
Execute a batch of ops encoded as a flat
int[]command stream, all in one command buffer submission. - FNN - Class in io.github.kirstenali.deepj.layers
-
Flexible fully-connected neural network (MLP) built from
Linearprojections. - FNN(int, int[], int, Supplier<ActivationFunction>, ActivationFunction, Random) - Constructor for class io.github.kirstenali.deepj.layers.FNN
-
Build an MLP of the form: Linear -> act -> Linear -> act -> ... -> Linear -> (optional outputAct)
- FNN(int, int[], int, Supplier<ActivationFunction>, Random) - Constructor for class io.github.kirstenali.deepj.layers.FNN
- forRange(int, int, IntConsumer) - Static method in class io.github.kirstenali.deepj.concurrent.DeepJExecutor
- forward(int) - Method in class io.github.kirstenali.deepj.transformer.embeddings.PositionalEmbedding
- forward(int[]) - Method in interface io.github.kirstenali.deepj.models.CausalLM
-
Maps token ids to logits
[seqLen × vocabSize]. - forward(int[]) - Method in class io.github.kirstenali.deepj.models.DecoderOnlyModel
- forward(int[]) - Method in class io.github.kirstenali.deepj.transformer.embeddings.Embedding
- forward(Tensor) - Method in interface io.github.kirstenali.deepj.activations.ActivationFunction
- forward(Tensor) - Method in class io.github.kirstenali.deepj.activations.GELU
- forward(Tensor) - Method in class io.github.kirstenali.deepj.activations.ReLU
- forward(Tensor) - Method in class io.github.kirstenali.deepj.activations.Sigmoid
- forward(Tensor) - Method in class io.github.kirstenali.deepj.activations.SiLU
- forward(Tensor) - Method in class io.github.kirstenali.deepj.activations.Softmax
- forward(Tensor) - Method in class io.github.kirstenali.deepj.activations.Tanh
- forward(Tensor) - Method in class io.github.kirstenali.deepj.layers.FNN
- forward(Tensor) - Method in interface io.github.kirstenali.deepj.layers.Layer
- forward(Tensor) - Method in class io.github.kirstenali.deepj.layers.Linear
- forward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.attention.MultiHeadLatentAttention
- forward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.attention.MultiHeadSelfAttention
- forward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.blocks.DeepSeekTransformerBlock
- forward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.blocks.GPTTransformerBlock
- forward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.blocks.LlamaTransformerBlock
- forward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.norm.LayerNorm1D
- forward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.norm.RMSNorm1D
- forward(Tensor) - Method in class io.github.kirstenali.deepj.layers.transformer.SwiGLULayer
- forward(Tensor) - Method in record class io.github.kirstenali.deepj.transformer.TransformerStack
- from2D(float[][]) - Static method in class io.github.kirstenali.deepj.tensor.Tensor
-
Build a tensor from 2-D row-major data.
- fromFile(Path, Tokenizer, int, long) - Static method in class io.github.kirstenali.deepj.data.TextDataset
-
Stream-tokenize a text file and memory-map the result.
- fromIntColumn(int[]) - Static method in class io.github.kirstenali.deepj.tensor.TensorAdapters
-
Build a [n x 1] tensor from integer ids (stored as float values).
- fromIntTargets(int[]) - Static method in class io.github.kirstenali.deepj.loss.CrossEntropyLoss
-
Builds a [n x 1] Tensor from int[] targets.
- fromSystemProperties() - Static method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig
G
- gelu(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- gelu(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- gelu(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- GELU - Class in io.github.kirstenali.deepj.activations
-
Gaussian Error Linear Unit (GELU), using the tanh approximation popularized by GPT-2.
- GELU() - Constructor for class io.github.kirstenali.deepj.activations.GELU
- geluActivation() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- geluBackward(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- geluBackward(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- geluBackward(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- geluBackward(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- geluInPlace() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- geluInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- geluInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- geluInPlace(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- generate(DeepSeekModel, Tokenizer, TransformerConfig, String, int, float, int, long) - Static method in class io.github.kirstenali.deepj.models.TextGenerator
- generate(GPTModel, Tokenizer, GPTConfig, String, int, float, int, long) - Static method in class io.github.kirstenali.deepj.models.TextGenerator
- generate(LlamaModel, Tokenizer, TransformerConfig, String, int, float, int, long) - Static method in class io.github.kirstenali.deepj.models.TextGenerator
- generate(String, int, float, int, long) - Method in interface io.github.kirstenali.deepj.chatui.ChatService
- generate(String, int, float, int, long) - Method in class io.github.kirstenali.deepj.chatui.GPTChatService
- generate(Function<int[], Tensor>, int, Tokenizer, String, int, float, int, long) - Static method in class io.github.kirstenali.deepj.models.TextGenerator
-
Generate text with an explicit
maxSeqLen— useful when no config is available. - generate(Function<int[], Tensor>, TransformerConfig, Tokenizer, String, int, float, int, long) - Static method in class io.github.kirstenali.deepj.models.TextGenerator
-
Generate text using any model that maps
int[] ids → [seqLen × vocabSize]logits. - get(int, int) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- get(Tensor, int, int) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- getAppTitle() - Method in class io.github.kirstenali.deepj.chatui.BaseChatApp
- getGpuTag() - Method in class io.github.kirstenali.deepj.tensor.Tensor
-
Get the GPU handle (used by GPU backends).
- getLoadedModelName() - Method in interface io.github.kirstenali.deepj.chatui.ChatService
- getLoadedModelName() - Method in class io.github.kirstenali.deepj.chatui.GPTChatService
- getNumThreads() - Static method in class io.github.kirstenali.deepj.concurrent.DeepJExecutor
-
Current number of threads used by DeepJ.
- getRow(int) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- getRow(Tensor, int) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- GPTChatService - Class in io.github.kirstenali.deepj.chatui
- GPTChatService() - Constructor for class io.github.kirstenali.deepj.chatui.GPTChatService
- GPTConfig - Record Class in io.github.kirstenali.deepj.models.gpt
- GPTConfig(int, int, int, int, int, int) - Constructor for record class io.github.kirstenali.deepj.models.gpt.GPTConfig
- GPTConfig(int, int, int, int, int, int, float, float) - Constructor for record class io.github.kirstenali.deepj.models.gpt.GPTConfig
-
Creates an instance of a
GPTConfigrecord class. - GPTModel - Class in io.github.kirstenali.deepj.models.gpt
-
Minimal GPT-style decoder-only transformer for educational/training use.
- GPTModel(GPTConfig, long) - Constructor for class io.github.kirstenali.deepj.models.gpt.GPTModel
- GPTTransformerBlock - Class in io.github.kirstenali.deepj.layers.transformer.blocks
-
Pre-LN GPT-style Transformer block:
- GPTTransformerBlock(int, int, int, Supplier<ActivationFunction>, Random) - Constructor for class io.github.kirstenali.deepj.layers.transformer.blocks.GPTTransformerBlock
-
Full constructor.
- GPTTransformerBlock(int, int, int, Random) - Constructor for class io.github.kirstenali.deepj.layers.transformer.blocks.GPTTransformerBlock
-
Convenience constructor using GELU activation.
- GPTTransformerBuilder - Class in io.github.kirstenali.deepj.transformer
-
Builder for GPT-style transformer stacks.
- GPTTransformerBuilder() - Constructor for class io.github.kirstenali.deepj.transformer.GPTTransformerBuilder
- GpuBuffer - Class in io.github.kirstenali.deepj.tensor
-
Handle to a GPU-resident float buffer managed by a
ComputeGraph. - GpuBuffer(int, int, int, boolean) - Constructor for class io.github.kirstenali.deepj.tensor.GpuBuffer
- GpuRuntime - Interface in io.github.kirstenali.deepj.tensor
-
Abstraction over a GPU compute runtime (Metal, CUDA, Vulkan, etc.).
- grad - Variable in class io.github.kirstenali.deepj.optimisers.Parameter
- gradClipNorm() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Architecture
-
Returns the value of the
gradClipNormrecord component. - gradClipNorm() - Method in interface io.github.kirstenali.deepj.models.CausalLM
-
Global gradient-clipping threshold (e.g.
- gradClipNorm() - Method in record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Returns the value of the
gradClipNormrecord component. - gradClipNorm() - Method in class io.github.kirstenali.deepj.models.deepseek.DeepSeekModel
- gradClipNorm() - Method in record class io.github.kirstenali.deepj.models.gpt.GPTConfig
-
Returns the value of the
gradClipNormrecord component. - gradClipNorm() - Method in class io.github.kirstenali.deepj.models.gpt.GPTModel
- gradClipNorm() - Method in record class io.github.kirstenali.deepj.models.llama.LlamaConfig
-
Returns the value of the
gradClipNormrecord component. - gradClipNorm() - Method in class io.github.kirstenali.deepj.models.llama.LlamaModel
- gradClipNorm() - Method in interface io.github.kirstenali.deepj.models.TransformerConfig
- gradient(Tensor, int[]) - Static method in class io.github.kirstenali.deepj.loss.CrossEntropyLoss
-
Convenience helper: gradient w.r.t. logits, averaged over rows.
- gradient(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.loss.CrossEntropyLoss
- gradient(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.loss.LossFunction
- gradient(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.loss.MSELoss
H
- hashCode() - Method in record class io.github.kirstenali.deepj.chatui.ChatMessage
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.data.Batch
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Architecture
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.FilesConfig
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.TokenizerConfig
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Training
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.models.gpt.GPTConfig
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.models.llama.LlamaConfig
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.publishing.ModelCard
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.TokenPair
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.training.CosineLearningRateSchedule
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.training.EvaluationResult
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.training.TrainingResult
-
Returns a hash code value for this object.
- hashCode() - Method in record class io.github.kirstenali.deepj.transformer.TransformerStack
-
Returns a hash code value for this object.
- hasSpecialTokens() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
- headDim - Variable in class io.github.kirstenali.deepj.layers.transformer.attention.MultiHeadSelfAttention
-
Exposed to subclasses that need per-head dimension for custom Q/K transforms.
- headDim() - Method in class io.github.kirstenali.deepj.transformer.embeddings.RotaryEmbedding
- heads() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Architecture
-
Returns the value of the
headsrecord component.
I
- id - Variable in class io.github.kirstenali.deepj.tensor.GpuBuffer
- idToBytes() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
-
Returns the value of the
idToBytesrecord component. - idToSpecialToken() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
- initialize() - Method in class io.github.kirstenali.deepj.chatui.ChatController
- initScale() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Architecture
-
Returns the value of the
initScalerecord component. - initScale() - Method in record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Returns the value of the
initScalerecord component. - initScale() - Method in record class io.github.kirstenali.deepj.models.gpt.GPTConfig
-
Returns the value of the
initScalerecord component. - initScale() - Method in record class io.github.kirstenali.deepj.models.llama.LlamaConfig
-
Returns the value of the
initScalerecord component. - io.github.kirstenali.deepj.activations - package io.github.kirstenali.deepj.activations
- io.github.kirstenali.deepj.chatui - package io.github.kirstenali.deepj.chatui
- io.github.kirstenali.deepj.concurrent - package io.github.kirstenali.deepj.concurrent
- io.github.kirstenali.deepj.data - package io.github.kirstenali.deepj.data
- io.github.kirstenali.deepj.examples - package io.github.kirstenali.deepj.examples
- io.github.kirstenali.deepj.layers - package io.github.kirstenali.deepj.layers
- io.github.kirstenali.deepj.layers.transformer - package io.github.kirstenali.deepj.layers.transformer
- io.github.kirstenali.deepj.layers.transformer.attention - package io.github.kirstenali.deepj.layers.transformer.attention
- io.github.kirstenali.deepj.layers.transformer.blocks - package io.github.kirstenali.deepj.layers.transformer.blocks
- io.github.kirstenali.deepj.layers.transformer.norm - package io.github.kirstenali.deepj.layers.transformer.norm
- io.github.kirstenali.deepj.loss - package io.github.kirstenali.deepj.loss
- io.github.kirstenali.deepj.models - package io.github.kirstenali.deepj.models
- io.github.kirstenali.deepj.models.deepseek - package io.github.kirstenali.deepj.models.deepseek
- io.github.kirstenali.deepj.models.gpt - package io.github.kirstenali.deepj.models.gpt
- io.github.kirstenali.deepj.models.llama - package io.github.kirstenali.deepj.models.llama
- io.github.kirstenali.deepj.optimisers - package io.github.kirstenali.deepj.optimisers
- io.github.kirstenali.deepj.persistence - package io.github.kirstenali.deepj.persistence
- io.github.kirstenali.deepj.publishing - package io.github.kirstenali.deepj.publishing
- io.github.kirstenali.deepj.tensor - package io.github.kirstenali.deepj.tensor
- io.github.kirstenali.deepj.tensor.cpu - package io.github.kirstenali.deepj.tensor.cpu
- io.github.kirstenali.deepj.tensor.metal - package io.github.kirstenali.deepj.tensor.metal
- io.github.kirstenali.deepj.tokenizers - package io.github.kirstenali.deepj.tokenizers
- io.github.kirstenali.deepj.tokenizers.bpe - package io.github.kirstenali.deepj.tokenizers.bpe
- io.github.kirstenali.deepj.training - package io.github.kirstenali.deepj.training
- io.github.kirstenali.deepj.transformer - package io.github.kirstenali.deepj.transformer
- io.github.kirstenali.deepj.transformer.embeddings - package io.github.kirstenali.deepj.transformer.embeddings
- isAvailable() - Static method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- isEmpty() - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
- isEndOfSequence(int) - Method in class io.github.kirstenali.deepj.tokenizers.bpe.BPETokenizer
- isEndOfSequence(int) - Method in interface io.github.kirstenali.deepj.tokenizers.Tokenizer
-
Returns true when generation should stop before appending this token.
- isModelLoaded() - Method in interface io.github.kirstenali.deepj.chatui.ChatService
- isModelLoaded() - Method in class io.github.kirstenali.deepj.chatui.GPTChatService
- isParallelEnabled() - Static method in class io.github.kirstenali.deepj.concurrent.DeepJExecutor
-
Whether DeepJ uses parallel execution for eligible loops.
K
- kvRank() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Architecture
-
Returns the value of the
kvRankrecord component. - kvRank() - Method in record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Returns the value of the
kvRankrecord component. - kvRank(int) - Method in class io.github.kirstenali.deepj.transformer.DeepSeekTransformerBuilder
-
KV latent dimension for MLA.
L
- language() - Method in record class io.github.kirstenali.deepj.publishing.ModelCard
-
Returns the value of the
languagerecord component. - lastLoss() - Method in record class io.github.kirstenali.deepj.training.TrainingResult
-
Returns the value of the
lastLossrecord component. - Layer - Interface in io.github.kirstenali.deepj.layers
-
Differentiable module mapping Tensor -> Tensor.
- LayerNorm1D - Class in io.github.kirstenali.deepj.layers.transformer.norm
-
LayerNorm over feature dimension (cols) with trainable gamma/beta exposed as
Parameters. - LayerNorm1D(int) - Constructor for class io.github.kirstenali.deepj.layers.transformer.norm.LayerNorm1D
- layerNormBackward(Tensor, Tensor, Tensor, int) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- layerNormBackward(Tensor, Tensor, Tensor, int) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- layerNormBackward(Tensor, Tensor, Tensor, int) - Static method in class io.github.kirstenali.deepj.tensor.Tensor
- layerNormBackward(Tensor, Tensor, Tensor, int) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
-
LayerNorm backward through normalization (given dXHat, xHat, std).
- layers() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Architecture
-
Returns the value of the
layersrecord component. - learningRate(int) - Method in record class io.github.kirstenali.deepj.training.CosineLearningRateSchedule
- left() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.TokenPair
-
Returns the value of the
leftrecord component. - license() - Method in record class io.github.kirstenali.deepj.publishing.ModelCard
-
Returns the value of the
licenserecord component. - limitations() - Method in record class io.github.kirstenali.deepj.publishing.ModelCard
-
Returns the value of the
limitationsrecord component. - Linear - Class in io.github.kirstenali.deepj.layers
-
Fully-connected layer: y = xW + b x: [n x dIn], W: [dIn x dOut], b: [1 x dOut]
- Linear(int, int, Random) - Constructor for class io.github.kirstenali.deepj.layers.Linear
- LlamaConfig - Record Class in io.github.kirstenali.deepj.models.llama
- LlamaConfig(int, int, int, int, int, int) - Constructor for record class io.github.kirstenali.deepj.models.llama.LlamaConfig
-
Convenience constructor with stable initialization and gradient-clipping defaults.
- LlamaConfig(int, int, int, int, int, int, float) - Constructor for record class io.github.kirstenali.deepj.models.llama.LlamaConfig
-
Convenience constructor retaining the historical gradient-clip argument.
- LlamaConfig(int, int, int, int, int, int, float, float) - Constructor for record class io.github.kirstenali.deepj.models.llama.LlamaConfig
-
Creates an instance of a
LlamaConfigrecord class. - LlamaModel - Class in io.github.kirstenali.deepj.models.llama
-
Llama-style decoder-only transformer.
- LlamaModel(LlamaConfig, long) - Constructor for class io.github.kirstenali.deepj.models.llama.LlamaModel
- LlamaTransformerBlock - Class in io.github.kirstenali.deepj.layers.transformer.blocks
-
Pre-LN transformer block with Llama-style full-head attention:
- LlamaTransformerBlock(int, int, int, int, Random) - Constructor for class io.github.kirstenali.deepj.layers.transformer.blocks.LlamaTransformerBlock
- LlamaTransformerBuilder - Class in io.github.kirstenali.deepj.transformer
-
Builder for Llama-style transformer stacks.
- LlamaTransformerBuilder() - Constructor for class io.github.kirstenali.deepj.transformer.LlamaTransformerBuilder
- lmHead - Variable in class io.github.kirstenali.deepj.models.DecoderOnlyModel
- load(Path) - Method in interface io.github.kirstenali.deepj.persistence.Persistable
- load(Path) - Static method in class io.github.kirstenali.deepj.tokenizers.bpe.BPEModelIO
- load(List<Parameter>, Path) - Static method in class io.github.kirstenali.deepj.persistence.ModelSerializer
- loadModel(Path) - Method in interface io.github.kirstenali.deepj.chatui.ChatService
- loadModel(Path) - Method in class io.github.kirstenali.deepj.chatui.GPTChatService
- log() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- log(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- log(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- log(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- logEvery() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Training
-
Returns the value of the
logEveryrecord component. - logInPlace() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- logInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- logInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- logInPlace(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- loss() - Method in record class io.github.kirstenali.deepj.training.EvaluationResult
-
Returns the value of the
lossrecord component. - loss(Tensor, int[]) - Static method in class io.github.kirstenali.deepj.loss.CrossEntropyLoss
-
Convenience helper: compute loss from logits and int targets.
- loss(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.loss.CrossEntropyLoss
- loss(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.loss.LossFunction
- loss(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.loss.MSELoss
- LossFunction - Interface in io.github.kirstenali.deepj.loss
- lr() - Method in class io.github.kirstenali.deepj.optimisers.AdamW
-
Current learning rate.
M
- main(String[]) - Static method in class io.github.kirstenali.deepj.chatui.ChatApp
- main(String[]) - Static method in class io.github.kirstenali.deepj.examples.EvaluateDeepSeekTinyStories
- main(String[]) - Static method in class io.github.kirstenali.deepj.examples.ExportDeepSeekTinyStories
- main(String[]) - Static method in class io.github.kirstenali.deepj.examples.TrainDeepSeekTinyStories
- main(String[]) - Static method in class io.github.kirstenali.deepj.examples.TrainSmallDeepSeek
- main(String[]) - Static method in class io.github.kirstenali.deepj.examples.TrainSmallGPT
- main(String[]) - Static method in class io.github.kirstenali.deepj.examples.TrainSmallGPTWithBPE
- main(String[]) - Static method in class io.github.kirstenali.deepj.examples.TrainSmallLlama
- materialize() - Method in class io.github.kirstenali.deepj.tensor.Tensor
-
Ensures this tensor's
data[]is up to date with any pending GPU computation. - materialize(Tensor) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Materialize a tensor: flush pending ops if needed, then download GPU data to CPU.
- materializeTensor(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- materializeTensor(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
-
Materialize a tensor: flush any pending GPU computation and download the result to the tensor's CPU data[].
- matmul(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- matmul(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- matmul(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- matmul(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- maxAlongRows() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- maxAlongRows(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- maxAlongRows(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- maxAlongRows(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- maxSeqLen() - Method in record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Returns the value of the
maxSeqLenrecord component. - maxSeqLen() - Method in record class io.github.kirstenali.deepj.models.gpt.GPTConfig
-
Returns the value of the
maxSeqLenrecord component. - maxSeqLen() - Method in record class io.github.kirstenali.deepj.models.llama.LlamaConfig
-
Returns the value of the
maxSeqLenrecord component. - maxSeqLen() - Method in interface io.github.kirstenali.deepj.models.TransformerConfig
- maxSeqLen(int) - Method in class io.github.kirstenali.deepj.transformer.DeepSeekTransformerBuilder
-
Maximum sequence length for the RoPE table.
- maxSeqLen(int) - Method in class io.github.kirstenali.deepj.transformer.LlamaTransformerBuilder
-
Maximum sequence length for the RoPE table.
- meanAlongRows() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- meanAlongRows(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- meanAlongRows(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- meanAlongRows(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- merges() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
-
Returns the value of the
mergesrecord component. - mergeToNewId() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
-
Returns the value of the
mergeToNewIdrecord component. - MetalBackend - Class in io.github.kirstenali.deepj.tensor.metal
- MetalBackend() - Constructor for class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- minimumLearningRate() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Training
-
Returns the value of the
minimumLearningRaterecord component. - minimumLearningRate() - Method in record class io.github.kirstenali.deepj.training.CosineLearningRateSchedule
-
Returns the value of the
minimumLearningRaterecord component. - model() - Method in class io.github.kirstenali.deepj.tokenizers.bpe.BPETokenizer
- MODEL_CARD_FILE - Static variable in class io.github.kirstenali.deepj.publishing.DeepJModelBundle
- MODEL_FILE - Static variable in class io.github.kirstenali.deepj.publishing.DeepJModelBundle
- ModelCard - Record Class in io.github.kirstenali.deepj.publishing
-
Descriptive metadata used to build a Hugging Face model card.
- ModelCard(String, String, String, String, String, String) - Constructor for record class io.github.kirstenali.deepj.publishing.ModelCard
-
Creates an instance of a
ModelCardrecord class. - modelConfig(int) - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig
- modelFormatVersion() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
-
Returns the value of the
modelFormatVersionrecord component. - ModelSerializer - Class in io.github.kirstenali.deepj.persistence
- MSELoss - Class in io.github.kirstenali.deepj.loss
-
Mean-Squared-Error loss.
- MSELoss() - Constructor for class io.github.kirstenali.deepj.loss.MSELoss
- MultiHeadLatentAttention - Class in io.github.kirstenali.deepj.layers.transformer.attention
-
Compact Multi-Head Latent Attention (MLA) inspired by DeepSeek-V2/V3.
- MultiHeadLatentAttention(int, int, int, int, RotaryEmbedding, Random) - Constructor for class io.github.kirstenali.deepj.layers.transformer.attention.MultiHeadLatentAttention
- MultiHeadSelfAttention - Class in io.github.kirstenali.deepj.layers.transformer.attention
-
Multi-head causal self-attention for a single sequence (no batch dimension).
- MultiHeadSelfAttention(int, int, boolean, Random) - Constructor for class io.github.kirstenali.deepj.layers.transformer.attention.MultiHeadSelfAttention
- multiply(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- multiply(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- multiply(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- multiply(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- multiplyBroadcastCols(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- multiplyBroadcastCols(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- multiplyBroadcastCols(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- multiplyBroadcastCols(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- multiplyBroadcastRows(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- multiplyBroadcastRows(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- multiplyBroadcastRows(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- multiplyBroadcastRows(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- multiplyInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- multiplyInPlace(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- multiplyInPlace(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- multiplyInPlace(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- multiplyScalar(float) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- multiplyScalar(Tensor, float) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- multiplyScalar(Tensor, float) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- multiplyScalar(Tensor, float) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- multiplyScalarInPlace(float) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- multiplyScalarInPlace(Tensor, float) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- multiplyScalarInPlace(Tensor, float) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- multiplyScalarInPlace(Tensor, float) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
N
- name() - Method in record class io.github.kirstenali.deepj.publishing.ModelCard
-
Returns the value of the
namerecord component. - needsUpload - Variable in class io.github.kirstenali.deepj.tensor.GpuBuffer
-
True if this buffer was just allocated and needs CPU data uploaded before use.
- neg() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- neg(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- neg(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- neg(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- negInPlace() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- negInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- negInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- negInPlace(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- newOutputBuffer(int, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Allocate a new output buffer (result of a GPU op).
- nextBatch(int) - Method in interface io.github.kirstenali.deepj.data.BatchSource
- nextBatch(int) - Method in class io.github.kirstenali.deepj.data.RandomAccessTextDataset
- nextBatch(int) - Method in class io.github.kirstenali.deepj.data.TextDataset
- nHeads - Variable in class io.github.kirstenali.deepj.layers.transformer.attention.MultiHeadSelfAttention
-
Exposed to subclasses that need head count for custom Q/K transforms (e.g.
- nHeads() - Method in record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Returns the value of the
nHeadsrecord component. - nHeads() - Method in record class io.github.kirstenali.deepj.models.gpt.GPTConfig
-
Returns the value of the
nHeadsrecord component. - nHeads() - Method in record class io.github.kirstenali.deepj.models.llama.LlamaConfig
-
Returns the value of the
nHeadsrecord component. - nHeads() - Method in interface io.github.kirstenali.deepj.models.TransformerConfig
- nHeads(int) - Method in class io.github.kirstenali.deepj.transformer.DeepSeekTransformerBuilder
- nHeads(int) - Method in class io.github.kirstenali.deepj.transformer.GPTTransformerBuilder
- nHeads(int) - Method in class io.github.kirstenali.deepj.transformer.LlamaTransformerBuilder
- nLayers() - Method in record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Returns the value of the
nLayersrecord component. - nLayers() - Method in record class io.github.kirstenali.deepj.models.gpt.GPTConfig
-
Returns the value of the
nLayersrecord component. - nLayers() - Method in record class io.github.kirstenali.deepj.models.llama.LlamaConfig
-
Returns the value of the
nLayersrecord component. - nLayers() - Method in interface io.github.kirstenali.deepj.models.TransformerConfig
- nLayers(int) - Method in class io.github.kirstenali.deepj.transformer.DeepSeekTransformerBuilder
- nLayers(int) - Method in class io.github.kirstenali.deepj.transformer.GPTTransformerBuilder
- nLayers(int) - Method in class io.github.kirstenali.deepj.transformer.LlamaTransformerBuilder
- normF - Variable in class io.github.kirstenali.deepj.models.DecoderOnlyModel
- NormLayer - Interface in io.github.kirstenali.deepj.layers.transformer.norm
-
Marker interface for row-wise normalisation layers (LayerNorm, RMSNorm, …).
O
- ones(int, int) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- ones(int, int) - Static method in class io.github.kirstenali.deepj.tensor.Tensor
- onStep(int, float, float) - Method in interface io.github.kirstenali.deepj.training.Trainer.StepHook
- OP_ADAMW_UPDATE - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_ADD - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_ADD_BROADCAST_COLS - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_ADD_ROW_VECTOR - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_ADD_SCALAR - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_CLAMP - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_CROSS_ENTROPY_GRADIENT - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_CROSS_ENTROPY_LOSS - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_DIVIDE - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_DIVIDE_BROADCAST_COLS - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_DIVIDE_SCALAR - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_EXP - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_GELU - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_GELU_BACKWARD - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_LAYERNORM_BACKWARD - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_LOG - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_MATMUL - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_MAX_ALONG_ROWS - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_MEAN_ALONG_ROWS - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_MULTIPLY - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_MULTIPLY_BROADCAST_COLS - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_MULTIPLY_BROADCAST_ROWS - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_MULTIPLY_SCALAR - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_NEG - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_POW - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_RELU - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_RELU_BACKWARD - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_SCATTER_ADD_ROWS - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_SCATTER_ADD_ROWS_ATOMIC - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_SIGMOID - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_SOFTMAX_BACKWARD - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_SOFTMAX_ROWS - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_SQRT - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_SUBTRACT - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_SUBTRACT_BROADCAST_COLS - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_SUM_ABS - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_SUM_ALONG_ROWS - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_SUM_ROWS - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_SUM_SCALAR - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_TANH - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_TRANSPOSE - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- OP_VARIANCE_ALONG_ROWS - Static variable in class io.github.kirstenali.deepj.tensor.ComputeGraph
- outputDirectory() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.FilesConfig
-
Returns the value of the
outputDirectoryrecord component.
P
- packF32(Tensor) - Static method in class io.github.kirstenali.deepj.tensor.TensorAdapters
-
Pack a Tensor's data into a flat float32 array (row-major).
- Parameter - Class in io.github.kirstenali.deepj.optimisers
-
Simple mutable parameter holder for optimizers.
- Parameter(Tensor) - Constructor for class io.github.kirstenali.deepj.optimisers.Parameter
- ParameterOptimizer - Interface in io.github.kirstenali.deepj.optimisers
-
Optimizer that updates a set of Parameters once per training step.
- parameters() - Method in class io.github.kirstenali.deepj.layers.FNN
- parameters() - Method in class io.github.kirstenali.deepj.layers.Linear
- parameters() - Method in class io.github.kirstenali.deepj.layers.transformer.attention.MultiHeadLatentAttention
- parameters() - Method in class io.github.kirstenali.deepj.layers.transformer.attention.MultiHeadSelfAttention
- parameters() - Method in class io.github.kirstenali.deepj.layers.transformer.blocks.DeepSeekTransformerBlock
- parameters() - Method in class io.github.kirstenali.deepj.layers.transformer.blocks.GPTTransformerBlock
- parameters() - Method in class io.github.kirstenali.deepj.layers.transformer.blocks.LlamaTransformerBlock
- parameters() - Method in class io.github.kirstenali.deepj.layers.transformer.norm.LayerNorm1D
- parameters() - Method in class io.github.kirstenali.deepj.layers.transformer.norm.RMSNorm1D
- parameters() - Method in class io.github.kirstenali.deepj.layers.transformer.SwiGLULayer
- parameters() - Method in class io.github.kirstenali.deepj.models.DecoderOnlyModel
- parameters() - Method in interface io.github.kirstenali.deepj.persistence.Persistable
- parameters() - Method in interface io.github.kirstenali.deepj.training.Trainable
- parameters() - Method in class io.github.kirstenali.deepj.transformer.embeddings.Embedding
- parameters() - Method in class io.github.kirstenali.deepj.transformer.embeddings.PositionalEmbedding
- parameters() - Method in record class io.github.kirstenali.deepj.transformer.TransformerStack
- peakLearningRate() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Training
-
Returns the value of the
peakLearningRaterecord component. - peakLearningRate() - Method in record class io.github.kirstenali.deepj.training.CosineLearningRateSchedule
-
Returns the value of the
peakLearningRaterecord component. - perplexity() - Method in record class io.github.kirstenali.deepj.training.EvaluationResult
-
Returns the value of the
perplexityrecord component. - Persistable - Interface in io.github.kirstenali.deepj.persistence
- PositionalEmbedding - Class in io.github.kirstenali.deepj.transformer.embeddings
-
Learnable positional embeddings added to token embeddings.
- PositionalEmbedding(int, int, Random) - Constructor for class io.github.kirstenali.deepj.transformer.embeddings.PositionalEmbedding
- pow(float) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- pow(Tensor, float) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- pow(Tensor, float) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- pow(Tensor, float) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- print(Tensor, String) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- print(String) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- Projection - Interface in io.github.kirstenali.deepj.layers
-
Marker interface for linear projection layers (fully-connected, no activation).
Q
- qRank() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Architecture
-
Returns the value of the
qRankrecord component. - qRank() - Method in record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Returns the value of the
qRankrecord component. - qRank(int) - Method in class io.github.kirstenali.deepj.transformer.DeepSeekTransformerBuilder
-
Q latent dimension for MLA.
R
- random(int, int, Random) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- random(int, int, Random) - Static method in class io.github.kirstenali.deepj.tensor.Tensor
- random(Random) - Method in class io.github.kirstenali.deepj.transformer.DeepSeekTransformerBuilder
- random(Random) - Method in class io.github.kirstenali.deepj.transformer.GPTTransformerBuilder
- random(Random) - Method in class io.github.kirstenali.deepj.transformer.LlamaTransformerBuilder
- RandomAccessTextDataset - Class in io.github.kirstenali.deepj.data
-
Random, bounded-memory batches sampled directly from a UTF-8 text file.
- RandomAccessTextDataset(Path, Tokenizer, int, long) - Constructor for class io.github.kirstenali.deepj.data.RandomAccessTextDataset
- recordAdamWUpdate(GpuBuffer, GpuBuffer, GpuBuffer, GpuBuffer, float, float, float, float, float, float, float, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record in-place AdamW update: [OP_ADAMW_UPDATE, wId, gId, mtId, vtId, lrBits, beta1Bits, beta2Bits, epsBits, weightDecayBits, bc1Bits, bc2Bits, n]
- recordBinary(int, GpuBuffer, GpuBuffer, GpuBuffer) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record a binary element-wise op: [opCode, aId, bId, outId, n]
- recordClamp(GpuBuffer, GpuBuffer, float, float) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record clamp: [OP_CLAMP, inId, outId, minBits, maxBits, n]
- recordColBroadcast(int, GpuBuffer, GpuBuffer, GpuBuffer, int, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record col broadcast: [opCode, aId, colVecId, outId, rows, cols]
- recordCrossEntropyGradient(GpuBuffer, GpuBuffer, GpuBuffer, int, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record cross-entropy gradient: [OP_CROSS_ENTROPY_GRADIENT, logitsId, targetsId, outId, rows, cols]
- recordCrossEntropyLoss(GpuBuffer, GpuBuffer, GpuBuffer, int, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record cross-entropy row losses: [OP_CROSS_ENTROPY_LOSS, logitsId, targetsId, outId, rows, cols]
- recordLayerNormBackward(GpuBuffer, GpuBuffer, GpuBuffer, GpuBuffer, int, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record layer norm backward: [OP_LAYERNORM_BACKWARD, dXHatId, xHatId, stdId, outId, rows, cols]
- recordMatmul(GpuBuffer, GpuBuffer, GpuBuffer, int, int, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record matmul: [OP_MATMUL, aId, bId, outId, m, n, k]
- recordMultiplyScalar(GpuBuffer, GpuBuffer, float) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record scalar multiply: [OP_MULTIPLY_SCALAR, inId, outId, scalarBits, n]
- recordPow(GpuBuffer, GpuBuffer, float) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record pow: [OP_POW, inId, outId, exponentBits, n]
- recordReduction(int, GpuBuffer, GpuBuffer, int, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record row/col reduction: [opCode, inId, outId, rows, cols]
- recordRowBroadcast(int, GpuBuffer, GpuBuffer, GpuBuffer, int, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record row broadcast: [opCode, aId, rowVecId, outId, rows, cols]
- recordScalarUnary(int, GpuBuffer, GpuBuffer, float) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record scalar add/divide: [opCode, inId, outId, scalarBits, n]
- recordScatterAddRows(GpuBuffer, GpuBuffer, GpuBuffer, int, int, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record scatter-add-rows: [OP_SCATTER_ADD_ROWS, targetId, indicesId, gradId, targetRows, targetCols, nIdx]
- recordScatterAddRowsAtomic(GpuBuffer, GpuBuffer, GpuBuffer, int, int, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record scatter-add-rows (atomic): [OP_SCATTER_ADD_ROWS_ATOMIC, targetId, indicesId, gradId, targetRows, targetCols, nIdx]
- recordSoftmaxBackward(GpuBuffer, GpuBuffer, GpuBuffer, int, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record softmax backward: [OP_SOFTMAX_BACKWARD, gradId, softmaxId, outId, rows, cols]
- recordSoftmaxRows(GpuBuffer, GpuBuffer, int, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record softmax rows: [OP_SOFTMAX_ROWS, inId, outId, rows, cols]
- recordSumAbs(GpuBuffer, GpuBuffer, int, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record sum-abs row reduction: [OP_SUM_ABS, inId, outId, rows, cols]
- recordSumScalar(GpuBuffer, GpuBuffer, int, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record scalar sum reduction: [OP_SUM_SCALAR, inId, outId, rows, cols]
- recordTranspose(GpuBuffer, GpuBuffer, int, int) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record transpose: [OP_TRANSPOSE, inId, outId, rows, cols]
- recordUnary(int, GpuBuffer, GpuBuffer) - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Record a unary op: [opCode, inId, outId, n]
- releaseAll() - Method in class io.github.kirstenali.deepj.tensor.ComputeGraph
-
Release all GPU buffers and reset the graph completely.
- releaseBuffers(int[], int) - Method in interface io.github.kirstenali.deepj.tensor.GpuRuntime
-
Release multiple GPU buffers by id.
- releaseEvery() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Training
-
Returns the value of the
releaseEveryrecord component. - releaseResources() - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- releaseResources() - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
-
Release backend-owned resources (GPU buffers, native handles, etc.).
- relu(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- relu(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- relu(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- ReLU - Class in io.github.kirstenali.deepj.activations
- ReLU() - Constructor for class io.github.kirstenali.deepj.activations.ReLU
- reluActivation() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- reluBackward(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- reluBackward(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- reluBackward(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- reluBackward(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- reluInPlace() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- reluInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- reluInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- reluInPlace(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- requireSameShape(Tensor, Tensor, String) - Static method in class io.github.kirstenali.deepj.tensor.Tensor
- requireTargetsMatchRows(Tensor, int[]) - Static method in class io.github.kirstenali.deepj.tensor.Tensor
- resumeCheckpoint() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.FilesConfig
-
Returns the value of the
resumeCheckpointrecord component. - right() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.TokenPair
-
Returns the value of the
rightrecord component. - RMSNorm1D - Class in io.github.kirstenali.deepj.layers.transformer.norm
-
Root-Mean-Square Layer Normalisation — the normalisation used in Llama, Mistral, Qwen, and DeepSeek.
- RMSNorm1D(int) - Constructor for class io.github.kirstenali.deepj.layers.transformer.norm.RMSNorm1D
- RoPEMultiHeadSelfAttention - Class in io.github.kirstenali.deepj.layers.transformer.attention
-
Multi-head self-attention with Rotary Positional Embedding (RoPE).
- RoPEMultiHeadSelfAttention(int, int, boolean, RotaryEmbedding, Random) - Constructor for class io.github.kirstenali.deepj.layers.transformer.attention.RoPEMultiHeadSelfAttention
- RotaryEmbedding - Class in io.github.kirstenali.deepj.transformer.embeddings
-
Rotary Positional Embedding (RoPE) — used in Llama, Mistral, Qwen, DeepSeek, and GPT-NeoX.
- RotaryEmbedding(int, int) - Constructor for class io.github.kirstenali.deepj.transformer.embeddings.RotaryEmbedding
-
Pre-computes the cos/sin rotation tables.
- rowData(int) - Method in class io.github.kirstenali.deepj.tensor.Tensor
-
Returns a fresh
float[]copy of rowr. - rows - Variable in class io.github.kirstenali.deepj.tensor.GpuBuffer
- rows - Variable in class io.github.kirstenali.deepj.tensor.Tensor
- run(DeepSeekTinyStoriesConfig) - Static method in class io.github.kirstenali.deepj.examples.TrainDeepSeekTinyStories
S
- sampleMiB() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.TokenizerConfig
-
Returns the value of the
sampleMiBrecord component. - sampleRows(Tensor, int, Random) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- sampleRows(Tensor, int, Random) - Static method in class io.github.kirstenali.deepj.tensor.Tensor
- save(Path) - Method in interface io.github.kirstenali.deepj.persistence.Persistable
- save(Path, BPEModel) - Static method in class io.github.kirstenali.deepj.tokenizers.bpe.BPEModelIO
- save(List<Parameter>, Path) - Static method in class io.github.kirstenali.deepj.persistence.ModelSerializer
- scatterAddRows(Tensor, int[], Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- scatterAddRows(Tensor, int[], Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- scatterAddRows(Tensor, int[], Tensor) - Static method in class io.github.kirstenali.deepj.tensor.Tensor
- scatterAddRows(Tensor, int[], Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- seed() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig
-
Returns the value of the
seedrecord component. - seed(long) - Method in class io.github.kirstenali.deepj.transformer.DeepSeekTransformerBuilder
- seed(long) - Method in class io.github.kirstenali.deepj.transformer.GPTTransformerBuilder
- seed(long) - Method in class io.github.kirstenali.deepj.transformer.LlamaTransformerBuilder
- seqLen() - Method in class io.github.kirstenali.deepj.data.TextDataset
- sequenceLength() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Architecture
-
Returns the value of the
sequenceLengthrecord component. - set(int, int, float) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- set(Tensor, int, int, float) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- setBackend(TensorBackend) - Static method in class io.github.kirstenali.deepj.tensor.Tensor
- setChatService(ChatService) - Method in class io.github.kirstenali.deepj.chatui.ChatController
- setGpuTag(Object) - Method in class io.github.kirstenali.deepj.tensor.Tensor
-
Set the GPU handle (used by GPU backends).
- setLr(float) - Method in class io.github.kirstenali.deepj.optimisers.AdamW
-
Update the learning rate (e.g. from a warmup/cosine schedule).
- setNumThreads(int) - Static method in class io.github.kirstenali.deepj.concurrent.DeepJExecutor
- setParallelEnabled(boolean) - Static method in class io.github.kirstenali.deepj.concurrent.DeepJExecutor
- setRow(int, Tensor, int) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- setRow(Tensor, int, Tensor, int) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- shutdown() - Static method in class io.github.kirstenali.deepj.concurrent.DeepJExecutor
-
Clean shutdown (good for CLI apps/tests).
- sigmoid(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- sigmoid(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- sigmoid(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- Sigmoid - Class in io.github.kirstenali.deepj.activations
- Sigmoid() - Constructor for class io.github.kirstenali.deepj.activations.Sigmoid
- sigmoidActivation() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- sigmoidInPlace() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- sigmoidInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- sigmoidInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- sigmoidInPlace(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- SiLU - Class in io.github.kirstenali.deepj.activations
-
Sigmoid Linear Unit (SiLU / Swish).
- SiLU() - Constructor for class io.github.kirstenali.deepj.activations.SiLU
- size() - Method in class io.github.kirstenali.deepj.data.TextDataset
- sliceRows(Tensor, int[], int) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- sliceRows(Tensor, int[], int) - Static method in class io.github.kirstenali.deepj.tensor.Tensor
- Softmax - Class in io.github.kirstenali.deepj.activations
-
Row-wise softmax for 2D tensors: applies softmax independently to each row.
- Softmax() - Constructor for class io.github.kirstenali.deepj.activations.Softmax
- softmaxBackward(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- softmaxBackward(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- softmaxBackward(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- softmaxBackward(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- softmaxRows() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- softmaxRows(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- softmaxRows(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- softmaxRows(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- specialTokenToId() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
-
Returns the value of the
specialTokenToIdrecord component. - sqrt() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- sqrt(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- sqrt(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- sqrt(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- sqrtInPlace() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- sqrtInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- sqrtInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- sqrtInPlace(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- stack - Variable in class io.github.kirstenali.deepj.models.DecoderOnlyModel
- start(Stage) - Method in class io.github.kirstenali.deepj.chatui.BaseChatApp
- step(List<Parameter>) - Method in class io.github.kirstenali.deepj.optimisers.AdamW
- step(List<Parameter>) - Method in interface io.github.kirstenali.deepj.optimisers.ParameterOptimizer
-
Update the provided parameters (one optimizer step).
- steps() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Training
-
Returns the value of the
stepsrecord component. - steps() - Method in record class io.github.kirstenali.deepj.training.TrainingResult
-
Returns the value of the
stepsrecord component. - subLayers() - Method in class io.github.kirstenali.deepj.layers.transformer.blocks.DeepSeekTransformerBlock
- subLayers() - Method in class io.github.kirstenali.deepj.layers.transformer.blocks.GPTTransformerBlock
- subLayers() - Method in class io.github.kirstenali.deepj.layers.transformer.blocks.LlamaTransformerBlock
- subtract(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- subtract(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- subtract(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- subtract(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- subtractBroadcastCols(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- subtractBroadcastCols(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- subtractBroadcastCols(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- subtractBroadcastCols(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- subtractInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.Tensor
- subtractInPlace(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- subtractInPlace(Tensor, Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- subtractInPlace(Tensor, Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- sum() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- sum(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- sum(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- sum(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- sumAbs() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- sumAbs(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- sumAbs(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- sumAbs(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- sumAlongCols() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- sumAlongCols(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- sumAlongCols(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- sumAlongCols(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- sumAlongRows() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- sumAlongRows(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- sumAlongRows(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- sumAlongRows(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- summary() - Method in record class io.github.kirstenali.deepj.publishing.ModelCard
-
Returns the value of the
summaryrecord component. - sumRows() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- sumRows(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- sumRows(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- sumRows(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- SupervisedTraining - Class in io.github.kirstenali.deepj.training
-
Helpers to train classic Tensor->Tensor supervised models (e.g., FNN) using the unified Trainer wrapper.
- SwiGLULayer - Class in io.github.kirstenali.deepj.layers.transformer
-
SwiGLU feed-forward layer — the FFN used in Llama, Mistral, Qwen, and DeepSeek.
- SwiGLULayer(int, int, Random) - Constructor for class io.github.kirstenali.deepj.layers.transformer.SwiGLULayer
T
- tanh(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- tanh(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- tanh(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- Tanh - Class in io.github.kirstenali.deepj.activations
- Tanh() - Constructor for class io.github.kirstenali.deepj.activations.Tanh
- tanhActivation() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- tanhInPlace() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- tanhInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- tanhInPlace(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- tanhInPlace(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- Tensor - Class in io.github.kirstenali.deepj.tensor
- Tensor(int, int) - Constructor for class io.github.kirstenali.deepj.tensor.Tensor
- Tensor(Tensor) - Constructor for class io.github.kirstenali.deepj.tensor.Tensor
-
Copy constructor — creates an independent deep copy.
- TensorAdapters - Class in io.github.kirstenali.deepj.tensor
-
Utilities for converting between
Tensorand flat GPU float arrays. - TensorBackend - Interface in io.github.kirstenali.deepj.tensor
- text() - Method in record class io.github.kirstenali.deepj.chatui.ChatMessage
-
Returns the value of the
textrecord component. - TextDataset - Class in io.github.kirstenali.deepj.data
-
Dataset that samples random contiguous chunks from token ids.
- TextGenerator - Class in io.github.kirstenali.deepj.models
-
Autoregressive text generation for any decoder-only transformer model.
- toIntTargets(Tensor) - Static method in class io.github.kirstenali.deepj.loss.CrossEntropyLoss
-
Converts a [n x 1] Tensor of class indices into an int[].
- tokEmb - Variable in class io.github.kirstenali.deepj.models.DecoderOnlyModel
- tokenizer() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig
-
Returns the value of the
tokenizerrecord component. - Tokenizer - Interface in io.github.kirstenali.deepj.tokenizers
- TOKENIZER_FILE - Static variable in class io.github.kirstenali.deepj.publishing.DeepJModelBundle
- TokenizerConfig(int, int) - Constructor for record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.TokenizerConfig
-
Creates an instance of a
TokenizerConfigrecord class. - tokenKeyToId() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
-
Returns the value of the
tokenKeyToIdrecord component. - TokenPair - Record Class in io.github.kirstenali.deepj.tokenizers.bpe
- TokenPair(int, int) - Constructor for record class io.github.kirstenali.deepj.tokenizers.bpe.TokenPair
-
Creates an instance of a
TokenPairrecord class. - tokens() - Method in record class io.github.kirstenali.deepj.training.EvaluationResult
-
Returns the value of the
tokensrecord component. - toString() - Method in record class io.github.kirstenali.deepj.chatui.ChatMessage
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.data.Batch
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Architecture
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.FilesConfig
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.TokenizerConfig
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Training
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.models.gpt.GPTConfig
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.models.llama.LlamaConfig
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.publishing.ModelCard
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.TokenPair
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.training.CosineLearningRateSchedule
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.training.EvaluationResult
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.training.TrainingResult
-
Returns a string representation of this record class.
- toString() - Method in record class io.github.kirstenali.deepj.transformer.TransformerStack
-
Returns a string representation of this record class.
- totalSteps() - Method in record class io.github.kirstenali.deepj.training.CosineLearningRateSchedule
-
Returns the value of the
totalStepsrecord component. - train(int, int, int, float, Float) - Method in class io.github.kirstenali.deepj.training.Trainer
-
Train until maxSteps or until EMA loss goes below targetEmaLoss (if provided).
- train(int, int, int, float, Float, int) - Method in class io.github.kirstenali.deepj.training.Trainer
- train(int, int, int, float, Float, int, Trainer.StepHook) - Method in class io.github.kirstenali.deepj.training.Trainer
-
Train until maxSteps or until EMA loss goes below targetEmaLoss (if provided).
- train(int, int, int, float, Float, Trainer.StepHook) - Method in class io.github.kirstenali.deepj.training.Trainer
-
Train until maxSteps or until EMA loss goes below targetEmaLoss (if provided).
- train(String, int) - Method in class io.github.kirstenali.deepj.tokenizers.bpe.BPETrainer
- train(String, int, List<String>) - Method in class io.github.kirstenali.deepj.tokenizers.bpe.BPETrainer
- Trainable - Interface in io.github.kirstenali.deepj.training
- TrainDeepSeekTinyStories - Class in io.github.kirstenali.deepj.examples
-
Trains a compact DeepSeek-style model directly from the TinyStories corpus.
- trainer(Layer, LossFunction, ParameterOptimizer, Tensor, Tensor, long) - Static method in class io.github.kirstenali.deepj.training.SupervisedTraining
- trainer(CausalLM, BatchSource, float) - Static method in class io.github.kirstenali.deepj.training.CausalLMTraining
- trainer(CausalLM, BatchSource, ParameterOptimizer) - Static method in class io.github.kirstenali.deepj.training.CausalLMTraining
- Trainer - Class in io.github.kirstenali.deepj.training
-
A small, reusable training loop wrapper.
- Trainer(Trainer.StepFunction) - Constructor for class io.github.kirstenali.deepj.training.Trainer
- Trainer.StepFunction - Interface in io.github.kirstenali.deepj.training
- Trainer.StepHook - Interface in io.github.kirstenali.deepj.training
- trainFromFile(Path, int, List<String>) - Method in class io.github.kirstenali.deepj.tokenizers.bpe.BPETrainer
- trainFromFile(Path, int, List<String>, int) - Method in class io.github.kirstenali.deepj.tokenizers.bpe.BPETrainer
- training() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig
-
Returns the value of the
trainingrecord component. - Training(int, int, float, float, int, int, int, int) - Constructor for record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Training
-
Creates an instance of a
Trainingrecord class. - trainingData() - Method in record class io.github.kirstenali.deepj.publishing.ModelCard
-
Returns the value of the
trainingDatarecord component. - TrainingResult - Record Class in io.github.kirstenali.deepj.training
- TrainingResult(int, float, float) - Constructor for record class io.github.kirstenali.deepj.training.TrainingResult
-
Creates an instance of a
TrainingResultrecord class. - TrainSmallDeepSeek - Class in io.github.kirstenali.deepj.examples
-
Example: tiny DeepSeek training on a small text file using byte-level tokens.
- TrainSmallDeepSeek() - Constructor for class io.github.kirstenali.deepj.examples.TrainSmallDeepSeek
- TrainSmallGPT - Class in io.github.kirstenali.deepj.examples
-
Example: tiny GPT training on a small text file using byte-level tokens.
- TrainSmallGPT() - Constructor for class io.github.kirstenali.deepj.examples.TrainSmallGPT
- TrainSmallGPTWithBPE - Class in io.github.kirstenali.deepj.examples
-
Example: tiny GPT training on a small text file using a BPE tokenizer.
- TrainSmallGPTWithBPE() - Constructor for class io.github.kirstenali.deepj.examples.TrainSmallGPTWithBPE
- TrainSmallLlama - Class in io.github.kirstenali.deepj.examples
-
Example: tiny Llama training on a small text file using byte-level tokens.
- TrainSmallLlama() - Constructor for class io.github.kirstenali.deepj.examples.TrainSmallLlama
- trainStep(int) - Method in interface io.github.kirstenali.deepj.training.Trainer.StepFunction
-
Runs one optimization step and returns the average loss for that step.
- trainStep(int) - Method in class io.github.kirstenali.deepj.training.Trainer
- trainTokenizer(String, int) - Method in class io.github.kirstenali.deepj.tokenizers.bpe.BPETrainer
- trainTokenizer(String, int, List<String>) - Method in class io.github.kirstenali.deepj.tokenizers.bpe.BPETrainer
- trainTokenizerFromFile(Path, int) - Method in class io.github.kirstenali.deepj.tokenizers.bpe.BPETrainer
- trainTokenizerFromFile(Path, int, List<String>) - Method in class io.github.kirstenali.deepj.tokenizers.bpe.BPETrainer
- trainTokenizerWithDefaults(String, int) - Method in class io.github.kirstenali.deepj.tokenizers.bpe.BPETrainer
- trainTokenizerWithDefaultsFromFile(Path, int) - Method in class io.github.kirstenali.deepj.tokenizers.bpe.BPETrainer
- TransformerConfig - Interface in io.github.kirstenali.deepj.models
-
Common configuration fields shared by all decoder-only transformer models.
- TransformerStack - Record Class in io.github.kirstenali.deepj.transformer
-
A sequential stack of transformer blocks.
- TransformerStack(List<Layer>) - Constructor for record class io.github.kirstenali.deepj.transformer.TransformerStack
-
Creates an instance of a
TransformerStackrecord class. - transformQueryKey(Tensor, int) - Method in class io.github.kirstenali.deepj.layers.transformer.attention.MultiHeadSelfAttention
-
Hook called on split-head Q and K tensors (
[nHeads·seqLen × headDim]) before the scaled dot-product. - transformQueryKey(Tensor, int) - Method in class io.github.kirstenali.deepj.layers.transformer.attention.RoPEMultiHeadSelfAttention
-
Applies RoPE rotation to Q or K heads in the forward pass.
- transformQueryKeyBackward(Tensor, int) - Method in class io.github.kirstenali.deepj.layers.transformer.attention.MultiHeadSelfAttention
-
Inverse of
MultiHeadSelfAttention.transformQueryKey(io.github.kirstenali.deepj.tensor.Tensor, int), called on Q/K gradients in backward. - transformQueryKeyBackward(Tensor, int) - Method in class io.github.kirstenali.deepj.layers.transformer.attention.RoPEMultiHeadSelfAttention
-
Applies the inverse (transpose) RoPE rotation to Q/K gradients in the backward pass.
- transpose() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- transpose(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- transpose(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- transpose(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
U
- unpackF32(float[], int, int) - Static method in class io.github.kirstenali.deepj.tensor.TensorAdapters
-
Unpack a flat float32 array into a new Tensor.
- unpackF32Into(float[], Tensor) - Static method in class io.github.kirstenali.deepj.tensor.TensorAdapters
-
Unpack a flat float32 array into an existing tensor's data[].
- uploadBuffer(int, float[]) - Method in interface io.github.kirstenali.deepj.tensor.GpuRuntime
-
Upload CPU float data into an existing GPU buffer.
- user() - Method in record class io.github.kirstenali.deepj.chatui.ChatMessage
-
Returns the value of the
userrecord component.
V
- validateCommon(int, int, int, int, int, int, float) - Static method in interface io.github.kirstenali.deepj.models.TransformerConfig
-
Validates the fields common to all transformer configs.
- validateRotaryHeadDimension(int, int) - Static method in interface io.github.kirstenali.deepj.models.TransformerConfig
-
Validates the even per-head width required by rotary embeddings.
- value - Variable in class io.github.kirstenali.deepj.optimisers.Parameter
- varianceAlongRows() - Method in class io.github.kirstenali.deepj.tensor.Tensor
- varianceAlongRows(Tensor) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- varianceAlongRows(Tensor) - Method in class io.github.kirstenali.deepj.tensor.metal.MetalBackend
- varianceAlongRows(Tensor) - Method in interface io.github.kirstenali.deepj.tensor.TensorBackend
- VOCAB_SIZE - Static variable in class io.github.kirstenali.deepj.tokenizers.ByteTokenizer
- vocabSize() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.TokenizerConfig
-
Returns the value of the
vocabSizerecord component. - vocabSize() - Method in record class io.github.kirstenali.deepj.models.deepseek.DeepSeekConfig
-
Returns the value of the
vocabSizerecord component. - vocabSize() - Method in record class io.github.kirstenali.deepj.models.gpt.GPTConfig
-
Returns the value of the
vocabSizerecord component. - vocabSize() - Method in record class io.github.kirstenali.deepj.models.llama.LlamaConfig
-
Returns the value of the
vocabSizerecord component. - vocabSize() - Method in interface io.github.kirstenali.deepj.models.TransformerConfig
- vocabSize() - Method in record class io.github.kirstenali.deepj.tokenizers.bpe.BPEModel
- vocabSize() - Method in class io.github.kirstenali.deepj.tokenizers.bpe.BPETokenizer
- vocabSize() - Method in class io.github.kirstenali.deepj.tokenizers.ByteTokenizer
- vocabSize() - Method in interface io.github.kirstenali.deepj.tokenizers.Tokenizer
W
- warmupSteps() - Method in record class io.github.kirstenali.deepj.examples.DeepSeekTinyStoriesConfig.Training
-
Returns the value of the
warmupStepsrecord component. - warmupSteps() - Method in record class io.github.kirstenali.deepj.training.CosineLearningRateSchedule
-
Returns the value of the
warmupStepsrecord component. - weight() - Method in class io.github.kirstenali.deepj.layers.Linear
- weight() - Method in class io.github.kirstenali.deepj.transformer.embeddings.Embedding
X
- x() - Method in record class io.github.kirstenali.deepj.data.Batch
-
Returns the value of the
xrecord component.
Y
- y() - Method in record class io.github.kirstenali.deepj.data.Batch
-
Returns the value of the
yrecord component.
Z
- zeroGrad() - Method in class io.github.kirstenali.deepj.optimisers.Parameter
- zeroGrad() - Method in interface io.github.kirstenali.deepj.training.Trainable
- zeros(int, int) - Method in class io.github.kirstenali.deepj.tensor.cpu.CpuBackend
- zeros(int, int) - Static method in class io.github.kirstenali.deepj.tensor.Tensor
All Classes and Interfaces|All Packages|Constant Field Values