Skip to content

Commit 98096df

Browse files
Merge pull request #266 from SKaiNET-developers/fxi/0.5-io-reader
Fxi/0.5 io reader
2 parents 8118704 + db85668 commit 98096df

30 files changed

Lines changed: 418 additions & 364 deletions

File tree

CHANGELOG.md

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

3+
## [0.5.1] - 2025-12-26
4+
5+
### Added
6+
- Common I/O abstraction with `ModelReader` and `TensorInfo` in `skainet-io-core` for unified model loading.
7+
- Efficient memory handling with non-copying `slice` views in `MemoryChunk`.
8+
- Unified `skainet-tensor-tools` CLI combining ONNX and GGUF utilities.
9+
- `OnnxStatsCli` tool for analyzing ONNX model parameters and structure.
10+
11+
### Changed
12+
- Migrated project to `SKaiNET-developers` organization; updated repository URLs and deployment configurations.
13+
- Standardized artifact naming in documentation (e.g., `SKaiNET-lang-core`).
14+
- Improved `GGUFReader` with better alignment parsing and tensor data handling.
15+
- Optimized test infrastructure: increased heap size to 8GB for large model tests and added `ReadmeSnippetsTest` for documentation verification.
16+
17+
### Removed
18+
- Legacy standalone applications and tools: `skainet-KGPChat`, `skainet-mnist`, and separate ONNX/GGUF tool modules.
19+
320
## [0.5.0] - 2025-12-06
421

522
### Added

LICENCE

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
MIT License
22

3-
Copyright (c) 2023-2025 sk-ai-net contributors
3+
Copyright (c) 2023-2025 Michal Harakal
4+
Copyright (c) 2025 SKaiNET-developers contributors
45

56
Permission is hereby granted, free of charge, to any person obtaining a copy
67
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 101 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,103 @@
22
[![Maven Central](https://img.shields.io/maven-central/v/sk.ainet.core/skainet-lang-core.svg)](https://central.sonatype.com/artifact/sk.ainet.core/skainet-lang-core)
33
[![DeepWiki](https://img.shields.io/badge/DeepWiki-View%20Docs-blue?logo=readthedocs&logoColor=white)](https://deepwiki.com/sk-ai-net/SKaiNET)
44

5-
# SKaiNET
5+
<img src="docs//SKaiNET-logo.png" alt="SKaiNET logo" width="150">
66

77
**SKaiNET** is an open-source deep learning framework written in Kotlin Multiplatform, designed with developers in mind to enable the creation modern AI powered applications with ease.
88

9+
## Key features at a glance
10+
11+
### SKaiNET is Data
12+
13+
- Data loaders (MNIST, JSON datasets, image helpers)
14+
- Type‑safe tensors across JVM/JS/Native
15+
16+
```kotlin
17+
// data loaders
18+
val ds = MNIST.load(train = true)
19+
val (x, y) = ds.nextBatch(64)
20+
21+
// Type-safe tensor creation via tensor DSL
22+
val ctx = DefaultNeuralNetworkExecutionContext()
23+
val mask = data<FP32, Float>(ctx) {
24+
tensor{
25+
shape(3, 3) {
26+
from(
27+
1f, 0f, 0f,
28+
1f, 1f, 0f,
29+
1f, 1f, 1f,
30+
)
31+
}
32+
}
33+
}
34+
35+
val t = tensor<FP32, Float>(ctx, FP32::class) {
36+
tensor {
37+
shape(2, 3) {
38+
from(
39+
0f, 1f, 2f,
40+
10f, 11f, 12f
41+
)
42+
}
43+
}
44+
}
45+
println("shape=${t.shape} first=${t.data[0,0]}")
46+
```
47+
48+
### SKaiNET is Language
49+
50+
- Kotlin DSLs for Data, Neural Nets, and Pipelines
51+
52+
```kotlin
53+
// Neural network DSL
54+
val model = nn {
55+
input(28 * 28)
56+
dense(out = 128)
57+
relu()
58+
dense(out = 10)
59+
}
60+
```
61+
62+
### SKaiNET is Tools
63+
64+
- Kotlin Notebook support Explorer and Notebook-friendly APIs
65+
66+
```kotlin
67+
// Works smoothly in Kotlin Notebooks
68+
display(model.summary())
69+
println(ds.describe())
70+
```
71+
72+
### SKaiNET is Compiler
73+
74+
- MLIR/StableHLO based lowering (modules provided in `SKaiNET-compile-*`)
75+
76+
```kotlin
77+
// Illustrative: export graph to JSON/StableHLO IR
78+
val ir = Compile.toStableHlo(model)
79+
println(ir.pretty())
80+
```
81+
82+
### SKaiNET is for Developers
83+
84+
- Clean APIs, growing docs, Maven Central artifacts
85+
- Get productive in minutes with minimal deps
86+
87+
```kotlin
88+
dependencies {
89+
implementation("sk.ainet.core:SKaiNET-lang-core:0.5.1")
90+
implementation("sk.ainet.core:SKaiNET-backend-cpu:0.5.1")
91+
}
92+
// Ready to build & run in ~8 minutes
93+
```
94+
995
## Use it
1096

1197
- From Kotlin code in apps, libraries, CLIs
1298
- In Kotlin Notebooks for quick exploration
1399
- With sample projects to learn patterns
14100

15-
See also CHANGELOG for what’s new in 0.5.0.
101+
See also CHANGELOG for what’s new in 0.5.1.
16102

17103
## Quick start
18104

@@ -27,15 +113,15 @@ dependencyResolutionManagement {
27113

28114
dependencies {
29115
// minimal dependency with simple CPU backend
30-
implementation("sk.ainet.core:skainet-lang-core:0.5.0")
31-
implementation("sk.ainet.core:skainet-backend-cpu:0.5.0")
32-
116+
implementation("sk.ainet.core:SKaiNET-lang-core:0.5.1")
117+
implementation("sk.ainet.core:SKaiNET-backend-cpu:0.5.1")
118+
33119
// simple model zoo
34-
implementation("sk.ainet.core:skainet-lang-models:0.5.0")
35-
120+
implementation("sk.ainet.core:SKaiNET-lang-models:0.5.1")
121+
36122
// Optional I/O (e.g., GGUF loader, JSON)
37-
implementation("sk.ainet.core:skainet-io-core:0.5.0")
38-
implementation("sk.ainet.core:skainet-io-gguf:0.5.0")
123+
implementation("sk.ainet.core:SKaiNET-io-core:0.5.1")
124+
implementation("sk.ainet.core:SKaiNET-io-gguf:0.5.1")
39125
}
40126
```
41127

@@ -44,15 +130,15 @@ Maven:
44130
```xml
45131
<dependency>
46132
<groupId>sk.ainet.core</groupId>
47-
<artifactId>skainet-lang-core</artifactId>
48-
<version>0.5.0</version>
133+
<artifactId>SKaiNET-lang-core</artifactId>
134+
<version>0.5.1</version>
49135
</dependency>
50136
```
51137

52138
## Samples and notebooks
53139

54-
- Sample app: https://github.com/sk-ai-net/skainet-samples/tree/feature/MNIST/SinusApproximator
55-
- Kotlin Notebook: https://github.com/sk-ai-net/skainet-notebook
140+
- Sample app: https://github.com/sk-ai-net/SKaiNET-samples/tree/feature/MNIST/SinusApproximator
141+
- Kotlin Notebook: https://github.com/sk-ai-net/SKaiNET-notebook
56142

57143
## Architecture
58144

@@ -142,8 +228,8 @@ Notes and limitations:
142228
- You can customize initializers for the mixing weights, basis, and bias via the DSL block.
143229

144230
See source for details:
145-
- skainet-lang/skainet-kan/src/commonMain/kotlin/sk/ainet/lang/kan/KanDsl.kt
146-
- skainet-lang/skainet-kan/src/commonMain/kotlin/sk/ainet/lang/kan/KanLayer.kt
231+
- SKaiNET-lang/SKaiNET-kan/src/commonMain/kotlin/sk/ainet/lang/kan/KanDsl.kt
232+
- SKaiNET-lang/SKaiNET-kan/src/commonMain/kotlin/sk/ainet/lang/kan/KanLayer.kt
147233

148234
## License
149235

build.gradle.kts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ subprojects {
2929
jvmToolchain(21)
3030
}
3131
}
32+
33+
tasks.withType<Test>().configureEach {
34+
maxHeapSize = "8192m"
35+
}
3236
}
3337

3438
kover {

docs/SKaiNET-logo.png

266 KB
Loading

gradle.properties

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
GROUP=sk.ainet.core
2-
VERSION_NAME=0.5.0
2+
VERSION_NAME=0.5.1
33

44
POM_DESCRIPTION=SKaiNET
55

6-
POM_URL=https://github.com/sk-ai-net/skainet/
7-
POM_SCM_URL=https://github.com/sk-ai-net/skainet
8-
POM_SCM_CONNECTION=scm:git:git@github.com:sk-ai-net/skainet.git
9-
POM_SCM_DEV_CONNECTION=scm:git:ssh@github.com:sk-ai-net/skainet.git
6+
POM_URL=https://github.com/SKaiNET-developers/skainet/
7+
POM_SCM_URL=https://github.com/SKaiNET-developers/skainet
8+
POM_SCM_CONNECTION=scm:git:git@github.com:SKaiNET-developers/skainet.git
9+
POM_SCM_DEV_CONNECTION=scm:git:ssh@github.com:SKaiNET-developers/skainet.git
1010

1111
POM_LICENCE_NAME=MIT License
1212
POM_LICENCE_URL=https://mit-license.org/
1313
POM_LICENCE_DIST=repo
1414

15-
POM_DEVELOPER_ID=sk-ai-net
15+
POM_DEVELOPER_ID=SKaiNET-developers
1616
POM_DEVELOPER_NAME=SKaiNET development team
17-
POM_DEVELOPER_URL=https://github.com/sk-ai-net/
17+
POM_DEVELOPER_URL=https://github.com/SKaiNET-developers/
1818

1919
mavenCentralPublishing=true
2020
mavenCentralAutomaticPublishing=true

settings.gradle.kts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,5 @@ include("skainet-models:skainet-model-yolo")
5757

5858

5959
// ====== APPS
60-
//include("skainet-apps:skainet-KotlinGPT")
61-
include("skainet-apps:skainet-onnx-tools")
62-
include("skainet-apps:skainet-onnx-detect")
60+
//include("skainet-apps:skainet-KGPChat")
61+
include("skainet-apps:skainet-tensor-tools")

skainet-apps/skainet-mnist/build.gradle.kts

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

skainet-apps/skainet-mnist/src/commonMain/resources/models/mnist/README.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.
Binary file not shown.

0 commit comments

Comments
 (0)