SKaiNET Module Map

Module Overview

skainet-backends

skainet-lang

skainet-compile

skainet-io

skainet-apps

skainet-kan

kan

skainet-data

data-api

data-simple

data-media

data-transform

kllama-cli

kllama-agent

kllama

grayscale-cli

bert

kgemma

sine-approx-cli

io-gguf

io-safetensors

io-onnx

io-image

compile-core

compile-dag

compile-hlo

compile-c

compile-json

lang-core

lang-dag

lang-models

lang-ksp-annotations

lang-ksp-processor

backend-cpu

Tensor & NN Primitives (skainet-lang)

skainet-lang-core

The foundation module. All other modules depend on this.

Gradle :skainet-lang:skainet-lang-core

Key Types

Tensor<T, V>, Shape, Shape1D..Shape4D, DType, FP16, FP32, Int8

Operations

matmul, add, multiply, conv2d, relu, silu, softmax, transpose, reshape

Platform

commonMain (multiplatform)

skainet-lang-dag

Graph DSL for defining DAG-structured models.

Gradle :skainet-lang:skainet-lang-dag

Key Types

DagBuilder, GraphProgram, ComputeGraph, GraphNode, ValidationResult

DSL Entry

dag { } block

skainet-lang-models

Pre-built model components.

Gradle :skainet-lang:skainet-lang-models

Models

Embedding, Linear, RMSNormalization, Rgb2GrayScale, Rgb2GrayScaleMultiply

skainet-lang-ksp-annotations / skainet-lang-ksp-processor

KSP (Kotlin Symbol Processing) for compile-time code generation.

Annotations

@GenerateTensorOp, @GenerateNetworkDsl, @GenerateGraphDsl

Generated

DSL builder extensions, tape recording hooks, type inference code

Compilation (skainet-compile)

skainet-compile-core

Trace-based execution recording.

Gradle :skainet-compile:skainet-compile-core

Key Types

TapeRecorder, recorded operation types

skainet-compile-dag

Graph optimization and DAG analysis.

Gradle :skainet-compile:skainet-compile-dag

Key Types

ComputeGraph, topological sort, shape inference, validation

skainet-compile-hlo

StableHLO MLIR generation and optimization.

Gradle :skainet-compile:skainet-compile-hlo

Key Types

StableHloConverter, StableHloOptimizer, StableHloModule, TypeMapper

Converters

MathOperationsConverter, LinalgOperationsConverter, ActivationOperationsConverter, NeuralNetOperationsConverter, ConstantOperationsConverter

Optimization Passes

ConstantFoldingPass, DeadCodeEliminationPass, OperationFusionPass

skainet-compile-c

C99 code generation for Arduino/embedded targets.

Gradle :skainet-compile:skainet-compile-c

Output

C99 source with Arduino library conventions

Model I/O (skainet-io)

skainet-io-gguf

GGUF model format support (LLaMA, Gemma).

Key Types

LlamaWeightLoader, LlamaRuntimeWeights<T>, GGUFReader

skainet-io-safetensors

SafeTensors format support.

skainet-io-onnx

ONNX model import.

skainet-io-image

Image loading and saving (JPEG, PNG, BMP, GIF).

Backend Execution (skainet-backends)

skainet-backend-cpu

Direct CPU execution using JDK 21 Vector API for SIMD.

Gradle :skainet-backends:skainet-backend-cpu

Key Types

DirectCpuExecutionContext, DefaultCpuOps

JVM Requirement

JDK 21+ with --add-modules jdk.incubator.vector

Applications (skainet-apps)

Application Purpose

skainet-kllama-cli

LLaMA inference CLI: --chat or --agent modes

skainet-kllama-agent

Agentic AI: AgentLoop<T>, ChatTemplate, ToolRegistry, ToolCallParser

skainet-kllama

LLaMA runtime: LlamaRuntime<T>, AttentionBackend<T>, KvCache

skainet-grayscale-cli

RGB→Grayscale image CLI with GPU/CPU fallback

skainet-bert

BERT inference

skainet-kgemma

Gemma LLM runtime

skainet-sine-approx-cli

Sine approximation demo

Build Configuration

Property Value

Build tool

Gradle 8.13

Kotlin version

2.2.21

JVM target

Java 21 (enforced via toolchain)

Maven group

sk.ainet

Kotlin targets

JVM, Native, WASM (module-dependent)

Testing

Kotest (property testing, BDD)

Coverage

Kover

Documentation

Dokka