1.0.0-rewrite
Release notes for the Deeplearning4j 1.0.0-rewrite: a transitional release introducing the DSP execution engine, LLM/VLM stack, GGUF import, PEFT/RL alignment, and massive hardware expansion. Namespac
This is a transitional release. The 1.0.0-rewrite introduces the full new feature set (DSP, LLM/VLM, PEFT, hardware backends) while maintaining backward compatibility with existing
org.deeplearning4jandorg.nd4jimports. A namespace consolidation is underway — the next release will complete the import cleanup, unifying packages under a consistent structure. See Namespace Consolidation below for what to expect.
Highlights
The 22 PRs (#10435–#10456) introduce capabilities that reposition DL4J as a first-class runtime for modern LLM and VLM workloads. Each feature area has its own full documentation page — the links below take you to comprehensive guides with API references, code examples, and configuration details.
Compiled graph runtime with CUDA graph capture/replay, Triton/NVRTC/PTX JIT, 26-pass graph optimizer, and multi-backend dispatch
~240 new files
Generation pipelines, paged KV cache, speculative decoding, continuous batching, tokenizers, eval framework, model editing
456 new files
Import quantized LLMs from .gguf files with 20+ architecture handlers, complete quantization codecs, round-trip export
121 new files
12 PEFT methods, 9 RL alignment trainers, FP8 mixed precision, 8-bit Adam, knowledge distillation, dataset curation
~80 new files
~120 new ONNX ops including Microsoft LLM contrib, bidirectional SameDiff-to-ONNX export
~130 files
Fused attention, KV cache, PEFT linear layers, normalization, positional encoding, quantization, SSM/recurrent, MoE, audio/signal
~80 new files
TPU (PJRT), Hexagon DSP (QNN), ZLUDA (AMD/Intel), SDX, ARM ACL (124 ops), Apple Accelerate (28 ops), cuDNN expansion, llama.cpp, MPS, MLIR
382+ files
Build System & CI
CUDA 12.9, 21 CMake modules, backend namespace isolation, 18 test suites
~60 files
Namespace Consolidation
Current State (1.0.0-rewrite)
This release uses three package roots in parallel. All three work and are fully supported:
org.nd4j.*
Core ND4J, SameDiff, PEFT, RL trainers, GGML, dataset curation, execution infrastructure
org.nd4j.autodiff.samediff.config.LoraConfig
org.eclipse.deeplearning4j.*
New high-level application modules (LLM, VLM, audio, OmniHub, pipelines, SafeTensors)
org.eclipse.deeplearning4j.llm.GenerationPipeline
org.deeplearning4j.*
Legacy DL4J neural network APIs (MultiLayerNetwork, ComputationGraph, Keras import)
org.deeplearning4j.nn.multilayer.MultiLayerNetwork
This split is intentional for this transitional release — existing code continues to work unchanged.
Next Release: Import Cleanup
The next release will consolidate these into a unified namespace structure. What to expect:
org.eclipse.deeplearning4j.*becomes the canonical root for all application-level modulesorg.nd4j.*remains for core array/tensor/SameDiff APIs (these are stable)org.deeplearning4j.*legacy imports will be deprecated with re-export shims — existing code compiles with deprecation warnings, not errorsPEFT, RL trainers, and training configs currently under
org.nd4j.autodiff.samediff.config.*will move to a more discoverable locationThe
org.nd4j.ggml.*package may be consolidated under the pipeline framework
Action for this release: Use whichever imports work. Do not refactor your imports to anticipate the cleanup — the next release will provide clear migration tooling.
Examples
The deeplearning4j-examples repository contains 34 example files demonstrating the new features. All examples are in the samediff-examples, onnx-import-examples, and dl4j-examples modules.
DSP Execution Engine (5 examples)
DSPExecutionExample.java
DSP introduction — dynamic-shape inference, GraphExecutionMode, shape-keyed plan caching
DSPAdvancedExample.java
Full DSP API — DspHandle, slot introspection, Chrome trace export, tensor/pipeline parallelism
DSPBackendsAndKernelSelectionExample.java
All 19 GraphExecutionMode backends, KernelSelectionConfig, 24 optimization passes, TPU/Hexagon/ZLUDA/Metal/MLX/NNAPI
DSPDiskCacheAndTritonExample.java
DspPlanDiskCache, Triton kernel cache, TritonCacheTool CLI, plan binary format
DSPDiagnosticsAndDebuggingExample.java
20 diagnostic categories, DspDebugger, DspHandle live introspection, DspPlanAssertions
Path: samediff-examples/src/main/java/org/nd4j/examples/samediff/advanced/execution/
LLM Generation (3 examples)
LLMGenerationPipelineExample.java
GenerationPipeline API, KV cache strategies, speculative decoding, tensor parallelism, VLM integration
QwenTextGenerationExample.java
End-to-end: GGUF download → GGMLModelImport → HuggingFaceTokenizer → GenerationPipeline → chat with ChatTemplate
GraphOptimizerExample.java
GraphOptimizer — algebraic simplification, peephole, strength reduction, CSE, attention fusion
Path: samediff-examples/src/main/java/org/nd4j/examples/samediff/quickstart/modeling/
VLM and Audio (3 examples)
SmolDoclingVLMExample.java
Vision-language model — ONNX components, image tiling, vision encoding, embedding merging, text generation
VideoVLMExample.java
Video VLM — VideoFrameSampler strategies (UNIFORM/FIXED_FPS/KEYFRAME), VideoPreprocessor, SmolVLM2/Qwen3-VL
WhisperSpeechToTextExample.java
Whisper ASR — model download, mel spectrogram, transcription, timestamps
GGML/GGUF Import (4 examples)
GGMLImportExportExample.java
Full GGML API — ConversionOptions, ExportOptions, GGUFReader/GGUFWriter, round-trip quantization
GGMLModelImportExample.java
Low-level import — architecture detection, quantization types Q2_K through IQ2_XS
HuggingFaceGGUFImport.java
HuggingFaceHubDownloader → AutoModel → format auto-detection (GGUF/SafeTensors/ONNX/PyTorch)
SafeTensorsImportExample.java
3-level SafeTensors API — AutoModel, SafeTensorsPipelineLoader, SafeTensorsReader
Path: onnx-import-examples/src/main/java/org/deeplearning4j/modelimportexamples/omnihub/
PEFT (3 examples)
SFTLoRATrainingConfigExample.java
LoraConfig, QLoraConfig, SFTConfig, GRPOConfig, DPOConfig, BF16 mixed precision
AdvancedPEFTConfigExample.java
AdaLoraConfig, DoraConfig, IA3Config, PrefixTuningConfig, PromptTuningConfig, PPOConfig, KTOConfig, ORPOConfig, SimPOConfig
SpecializedPEFTConfigExample.java
LoftQConfig, LohaConfig, LokrConfig, VeraConfig, DyLoraConfig, AdapterConfig, LoraAdapterCache (multi-adapter serving)
Path: samediff-examples/src/main/java/org/nd4j/examples/samediff/quickstart/training/
RL Alignment (1 example)
RLAlignmentConfigExample.java
All 10 RL methods: DPO (standard/IPO/RDPO), GRPO, PPO, KTO, ORPO, SimPO, DAPO (asymmetric clipping), GSPO, Dr.GRPO, RewardModelConfig, RLPipelineConfig
Training Infrastructure (5 examples)
MixedPrecisionTrainingExample.java
FP16/BF16/FP8 mixed precision, LossScaleConfig, GradientAccumulator, FP8TrainingConfig
DataCurationPipelineExample.java
TextDeduplicator, TextQualityFilter, InstructionDataFormatter, StratifiedSplitter, LengthBucketingIterator, WeightedDataMixer
KnowledgeDistillationExample.java
DistillationTrainer — logit KD, feature KD, attention KD, combined
TransferLearningAndFreezingExample.java
PeftModel, variable freezing, GradientCheckpointConfig, ContinuedPretrainingConfig
NewOptimizersExample.java
Adam8bit (4x memory reduction), AdaBelief
New Operations (3 examples)
TransformerOpsExample.java
FlashAttention, SlidingWindowAttention, FusedRoPE/FusedMRoPE, RmsNorm, SiLU, SelectiveScan (Mamba), TokenSample, FP8Matmul, ColumnParallelLinear/RowParallelLinear
SameDiffOpsExample.java
All op namespaces including new sd.audio(), sd.signal(), mixed precision types
AudioOpsExample.java
13 audio DSP ops — mel spectrogram, MFCC, Griffin-Lim, pitch detection, spectral features
Additional Examples
TorchScriptImportExample.java
TorchScriptModelImport — import PyTorch .pt models via nd4j-torchscript
OmniHubPretrainedModels.java
OmniHubUtils, Pretrained, HuggingFaceHubDownloader — model zoo with format auto-detection
TtsTrainingPipelineExample.java
TTS fine-tuning with LoRA — TtsTrainingPipeline, AudioDataProcessor
LRScheduleConfigExample.java
CosineWarmupSchedule + 9 other schedules
KnowledgeDistillationConfigExample.java
DistillationConfig builder variants
TransferLearningConfigExample.java
TransferLearning, FineTuneConfiguration, VariableGroup
New Maven Modules
Bug Fixes & Improvements
The following issues were resolved in merges since M2.1:
Memory Leaks
Fix CUDA lstmLayer permute/transpose memory leak (#10404)
Fix lstmLayer.cu weight transformation memory leak (#10403)
Fix MmulHelper::mmulNxN memory leak (#10394)
Fix BaseNDArray.toFlatArray() memory leak for view arrays (#10410)
Correctness
Fix COORDS2INDEX macro to use strides instead of shapes (#10393)
Fix DataType inconsistency in float[] constant buffer handling (#10411)
Fix inverted boolean logic in DeallocatorService listener delegation (#10412)
Fix byte order handling in DataTypeConversions (#10401)
Security
API & Infrastructure
Simplify batched GEMM API (#10361)
JavaCPP resource configuration for native image (GraalVM) support (#10287)
Autodiff core improvements (#10280)
CMake modernization (#10245)
Maven version updates for Java 25 support (#10243)
SameDiff file format scaling improvements (#10209)
Migration Guide
This Is a Transitional Release
1.0.0-rewrite is designed to be additive — existing M2.1 code continues to work. The new features are opt-in via new Maven modules and new API entry points. No existing imports or APIs are removed.
However, be aware that the next release will begin the namespace consolidation. To prepare:
Avoid deep coupling to internal package paths (e.g.,
org.nd4j.autodiff.samediff.config.*may move)Prefer the high-level entry points (
GenerationPipeline,GGMLModelImport,PeftModelFactory) over assembling components manuallyThe examples in
deeplearning4j-examplesshow the intended usage patterns
Opting In to DSP Optimization
Graph execution mode defaults to AUTO. To explicitly select a mode:
To skip specific optimizer passes during debugging:
New Backend Discovery
Hardware backends (TPU, Hexagon, ZLUDA) are discovered automatically if the corresponding Maven module is on the classpath and the hardware is present. No code changes are required.
Serialization Compatibility
DspPlanDiskCachestores compiled plans in~/.kompile/cache/dsp/using a content-based key. Cache invalidates automatically on model changes.New model formats (SDNB, SDZ) are supported alongside the existing FlatBuffers serialization. Both
SameDiff.load()andSameDiff.save()continue to work.GGUF models imported via
GGMLModelImportcan be converted to native SDZ format viaconvertToSDZ()for faster subsequent loads.
Build System
CUDA 12.9 is now supported alongside 12.6
Backend namespace isolation (
SD_BACKEND_NAMESPACE) enables true multi-backend co-loading in a single JVM process18 named test suites available via
run-tests.yml:quick,sanity,nd4j,samediff,dl4jcore,keras,datavec,onnx,tensorflow,integration,libnd4j,llm,vlm,ggml,zoo,longrunning,all
Last updated
Was this helpful?