Skip to content

Commit 6f49be8

Browse files
Merge pull request #312 from SKaiNET-developers/release/0.8.0
Release/0.8.0
2 parents fcd9600 + e9f8534 commit 6f49be8

10 files changed

Lines changed: 110 additions & 94 deletions

File tree

CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,56 @@
11
# Changelog
22

3+
## [0.8.3] - 2026-01-18
4+
5+
### Changed
6+
- Updated version to 0.8.3.
7+
8+
## [0.8.2] - 2026-01-18
9+
10+
### Added
11+
- **KLlama (Llama 2 port)**: Initial version ported from `llama2-kmp`, supporting GGUF models.
12+
- **GGUF Enhancements**:
13+
- Support for `mmap` for zero-copy GGUF tensor loading.
14+
- Embedded tokenizer support in GGUF.
15+
- New quantization formats: `Q8_0`, `Q4_K`, and BitNet/Ternary support (`TQ1_0`, `TQ2_0`).
16+
- Improved loading and bug fixes for quantization and mapping.
17+
- Added `int64` support for GGUF.
18+
- Improved GGUF metadata loading.
19+
- **Streaming Support**: Added streaming support for GGUF and ONNX models.
20+
- **Advanced Operations**:
21+
- New activations: `LeakyReLU`, `ELU`.
22+
- New pooling: `AvgPool2d`.
23+
- New convolutions: `Conv1d`, `Conv3d`.
24+
- **Optimizers & Training**:
25+
- Added `Adam` and `AdamW` optimizers.
26+
- Comprehensive loss function library.
27+
- New `Metric` interface with `Accuracy` implementation.
28+
- KSP-based DSL generator for Network activations.
29+
- **Data & Datasets**:
30+
- Support for `CIFAR-10` and `Fashion-MNIST` datasets.
31+
- New `Data Transform API` and `Image Transform DSL`.
32+
- **Testing & Documentation**:
33+
- `skainet-test-groundtruth` module for validation against PyTorch.
34+
- Integration tests for quantized inference and `KvCache`.
35+
- Shadow JAR support for JVM fat JAR builds.
36+
- New documentation for testing architecture with Mermaid diagrams.
37+
- **WASM/JS**: Initial version of a simple WASM/JS sample.
38+
39+
### Changed
40+
- Simplified model support to **GGUF-only** (removed legacy Karpathy `.bin` format support).
41+
- Improved KLlama loading and robustness.
42+
- Updated roadmap with Phase 1 completion and multi-backend storage abstraction plans.
43+
- Improved I/O system and overall robustness.
44+
45+
### Fixed
46+
- Fixed various bugs in quantization and memory mapping.
47+
- Resolved compilation errors and failing tests in CIFAR-10 support.
48+
- Fixed KSP and TracingWrapperProcessor tests to match updated log messages.
49+
- Fixed GGUF metadata loading issues.
50+
51+
## [0.8.1] - 2026-01-18
52+
- Initial release of 0.8.x series.
53+
354
## [0.7.1] - 2026-01-14
455

556
### Added

README.md

Lines changed: 49 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,23 @@ SKaiNET uses a hybrid backend strategy that separates development iteration from
1818

1919
### SKaiNET is Data
2020

21-
- Data loaders (MNIST, JSON datasets, image helpers)
22-
- Type‑safe tensors across JVM/JS/Native
21+
- **Built-in Data Loaders**: `MNIST`, `Fashion-MNIST`, `CIFAR-10`
22+
- **I/O Formats**: `GGUF`, `ONNX`, `JSON`, `Image` (JPEG, PNG, etc.)
23+
- **Type-safe Tensors**: Unified API across JVM, JS, and Native
24+
- **Data Transforms**: Fluent API for data preprocessing, including image resizing, normalization, and tensor conversion.
25+
- **Transformation DSL**: Compose complex preprocessing pipelines using a type-safe Kotlin DSL.
26+
27+
```kotlin
28+
// Data Transformation Pipeline
29+
val transform = transforms<PlatformBitmapImage, Tensor<FP32, Float>> {
30+
resize(224, 224)
31+
centerCrop(200, 200)
32+
toTensor(ctx)
33+
normalize(ctx, mean = floatArrayOf(0.485f, 0.456f, 0.406f), std = floatArrayOf(0.229f, 0.224f, 0.225f))
34+
}
35+
36+
val processedTensor = transform.apply(rawImage)
37+
```
2338

2439
```kotlin
2540
// data loaders
@@ -96,12 +111,18 @@ println(ds.describe())
96111

97112
### SKaiNET is Compiler
98113

99-
- MLIR/StableHLO based lowering (modules provided in `SKaiNET-compile-*`)
114+
- **MLIR/StableHLO Backend**: Lowering from high-level Kotlin DSL to MLIR StableHLO dialect.
115+
- **Optimization Passes**: Extensible transformation API for optimizing the compiled IR.
116+
- `ConstantFoldingPass`: Folds arithmetic operations with constant operands.
117+
- `OperationFusionPass`: Fuses multiple ops (e.g., Add + ReLU) into efficient kernels.
118+
- `DeadCodeEliminationPass`: Removes unused computations.
119+
100120
```kotlin
101-
// Illustrative: export graph to JSON/StableHLO IR
102-
val ir = Compile.toStableHlo(model)
103-
println(ir.pretty())
121+
// Applying Compiler Optimizations
122+
val optimizer = StableHloOptimizer.createDefault()
123+
val optimizedModule = optimizer.optimize(mlirModule)
104124
```
125+
105126
- **Arduino C Code Generation**: Export models to standalone, optimized C99 code with static memory allocation.
106127

107128
```kotlin
@@ -124,8 +145,8 @@ Read the [Deep Technical Explanation](docs/arduino-c-codegen.md) for more detail
124145

125146
```kotlin
126147
dependencies {
127-
implementation("sk.ainet.core:SKaiNET-lang-core:0.7.1")
128-
implementation("sk.ainet.core:SKaiNET-backend-cpu:0.7.1")
148+
implementation("sk.ainet.core:SKaiNET-lang-core:0.8.3")
149+
implementation("sk.ainet.core:SKaiNET-backend-cpu:0.8.3")
129150
}
130151
// Ready to build & run in ~8 minutes
131152
```
@@ -150,15 +171,15 @@ dependencyResolutionManagement {
150171

151172
dependencies {
152173
// minimal dependency with simple CPU backend
153-
implementation("sk.ainet.core:SKaiNET-lang-core:0.7.1")
154-
implementation("sk.ainet.core:SKaiNET-backend-cpu:0.7.1")
174+
implementation("sk.ainet.core:SKaiNET-lang-core:0.8.3")
175+
implementation("sk.ainet.core:SKaiNET-backend-cpu:0.8.3")
155176

156177
// simple model zoo
157-
implementation("sk.ainet.core:SKaiNET-lang-models:0.7.1")
178+
implementation("sk.ainet.core:SKaiNET-lang-models:0.8.3")
158179

159180
// Optional I/O (e.g., GGUF loader, JSON)
160-
implementation("sk.ainet.core:SKaiNET-io-core:0.7.1")
161-
implementation("sk.ainet.core:SKaiNET-io-gguf:0.7.1")
181+
implementation("sk.ainet.core:SKaiNET-io-core:0.8.3")
182+
implementation("sk.ainet.core:SKaiNET-io-gguf:0.8.3")
162183
}
163184
```
164185

@@ -168,7 +189,7 @@ Maven:
168189
<dependency>
169190
<groupId>sk.ainet.core</groupId>
170191
<artifactId>SKaiNET-lang-core</artifactId>
171-
<version>0.7.1</version>
192+
<version>0.8.3</version>
172193
</dependency>
173194
```
174195

@@ -177,25 +198,25 @@ Maven:
177198
- Sample app: https://github.com/SKaiNET-developers/SKaiNET-samples/tree/feature/MNIST/SinusApproximator
178199
- Kotlin Notebook: https://github.com/SKaiNET-developers/SKaiNET-notebook
179200

180-
## 0.7.1 highlights (with tiny snippets)
201+
## 0.8.3 highlights (with tiny snippets)
181202

182-
- **Sine Approximation CLI**: Added `skainet-sine-approx-cli` for training models.
183-
- **Autograd Engine**: Initial support for automatic differentiation and reverse-mode gradients using `DefaultGradientTape`.
184-
- **Optimization & Training**: New `SgdOptimizer` and training DSL to build and run training loops.
185-
- **Loss Functions**: Added `MSELoss` and `CrossEntropyLoss` with configurable reduction strategies.
203+
- **KLlama (Llama 2 port)**: Initial version supporting GGUF models with `mmap` for zero-copy loading.
204+
- **Quantization & BitNet**: Support for `Q8_0`, `Q4_K`, and BitNet/Ternary (`TQ1_0`, `TQ2_0`) formats.
205+
- **Streaming & I/O**: Added streaming support for GGUF/ONNX and improved GGUF metadata loading.
206+
- **Advanced Operations**: Added `LeakyReLU`, `ELU`, `AvgPool2d`, `Conv1d`, and `Conv3d`.
207+
- **Optimizers & Metrics**: New `Adam`, `AdamW` optimizers and `Accuracy` metrics.
208+
- **Datasets & Transforms**: Support for `CIFAR-10`, `Fashion-MNIST`, and a new `Data Transform API`.
186209

187210
```kotlin
188-
// Example training step with Autograd
189-
val loss = MSELoss()
190-
val optimizer = sgd(lr = 0.01)
191-
192-
val (tape, l) = record { loss.forward(model.forward(x, ctx), y, ctx) }
193-
tape.computeGradients(targets = listOf(l), sources = model.parameters())
194-
optimizer.step()
211+
// Example: Streaming inference with KLlama (GGUF)
212+
val llama = KLlama.load("path/to/model.gguf")
213+
llama.generate("Once upon a time") { token ->
214+
print(token) // streaming output
215+
}
195216
```
196217

197-
- Improved **Graph DSL** with better wiring and recording support.
198-
- Stability improvements for StableHLO and CUDA backends.
218+
- **WASM/JS**: Initial support for web-based deployments.
219+
- **GGUF-only**: Simplified I/O by focusing on GGUF (removed legacy formats).
199220

200221
See [CHANGELOG.md](CHANGELOG.md) for the full list.
201222

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
GROUP=sk.ainet.core
2-
VERSION_NAME=0.8.0-SNAPSHOT
2+
VERSION_NAME=0.8.3
33

44
POM_DESCRIPTION=SKaiNET
55

@@ -18,7 +18,7 @@ POM_DEVELOPER_URL=https://github.com/SKaiNET-developers/
1818

1919
mavenCentralPublishing=true
2020
mavenCentralAutomaticPublishing=true
21-
signAllPublications=false
21+
signAllPublications=true
2222

2323
#Gradle
2424
org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
POM_ARTIFACT_ID=skainet-apps-kllama
2+
POM_NAME=skainet neural network scripting API
3+
4+
kotlin.mpp.applyDefaultHierarchyTemplate=false

skainet-compile/skainet-compile-onnx/build.gradle.kts

Lines changed: 0 additions & 60 deletions
This file was deleted.

skainet-compile/skainet-compile-onnx/gradle.properties

Lines changed: 0 additions & 2 deletions
This file was deleted.

skainet-data/skainet-data-media/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
55
plugins {
66
alias(libs.plugins.kotlinMultiplatform)
77
alias(libs.plugins.androidLibrary)
8-
alias(libs.plugins.vanniktech.mavenPublish)
98
alias(libs.plugins.kover)
109
}
1110

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
POM_ARTIFACT_ID=skainet-data-transform
2+
POM_NAME=skainet neural basic datasets

skainet-pipeline/build.gradle.kts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
55
plugins {
66
alias(libs.plugins.kotlinMultiplatform)
77
alias(libs.plugins.androidLibrary)
8-
alias(libs.plugins.vanniktech.mavenPublish)
98
alias(libs.plugins.kover)
109
}
1110

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
POM_ARTIFACT_ID=skainet-test-groundtruth
2+
POM_NAME=skainet test groundtruth

0 commit comments

Comments
 (0)