Skip to content

Commit 408c7cc

Browse files
michalharakalclaude
andcommitted
Extract LLM modules from SKaiNET into standalone SKaiNET-LLM project
Moves skainet-llm, model-llama/qwen/gemma/bert, kllama, kgemma, kllama-agent, kllama-cli, and kbert-cli into a new project structure: llm-core, llm-agent, llm-inference/*, llm-runtime/*, llm-apps/*. SKaiNET dependencies resolved via Gradle composite build (includeBuild). Package names unchanged. All tests pass. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 176cb8d commit 408c7cc

156 files changed

Lines changed: 20024 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# models
2+
*.gguf
3+
*.onnx
4+
5+
local.properties
6+
.gradle
7+
.gradle*
8+
build/
9+
!gradle/wrapper/gradle-wrapper.jar
10+
.kotlin
11+
12+
.kiro/
13+
.claude/
14+
15+
### IntelliJ IDEA ###
16+
.idea
17+
*.iws
18+
*.iml
19+
*.ipr
20+
out/
21+
22+
### VS Code ###
23+
.vscode/
24+
25+
### Mac OS ###
26+
.DS_Store
27+
28+
.java-version

build.gradle.kts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
plugins {
2+
alias(libs.plugins.kotlinMultiplatform) apply false
3+
alias(libs.plugins.androidMultiplatformLibrary) apply false
4+
alias(libs.plugins.jetbrainsKotlinJvm) apply false
5+
alias(libs.plugins.vanniktech.mavenPublish) apply false
6+
alias(libs.plugins.kover)
7+
alias(libs.plugins.binary.compatibility.validator) apply false
8+
alias(libs.plugins.ksp) apply false
9+
alias(libs.plugins.kotlinSerialization) apply false
10+
alias(libs.plugins.shadow) apply false
11+
}
12+
13+
allprojects {
14+
group = "sk.ainet.llm"
15+
}
16+
17+
// Require JDK 21+ but allow any newer version (produces Java 21 bytecode via --release / jvmTarget)
18+
subprojects {
19+
require(JavaVersion.current() >= JavaVersion.VERSION_21) {
20+
"This project requires JDK 21+, but found ${JavaVersion.current()}"
21+
}
22+
23+
// Kotlin Multiplatform projects – set jvmTarget on every JVM-like target
24+
plugins.withId("org.jetbrains.kotlin.multiplatform") {
25+
extensions.findByType(org.jetbrains.kotlin.gradle.dsl.KotlinMultiplatformExtension::class.java)?.apply {
26+
targets.withType(org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget::class.java) {
27+
compilerOptions {
28+
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21)
29+
}
30+
}
31+
}
32+
}
33+
// Kotlin/JVM projects
34+
plugins.withId("org.jetbrains.kotlin.jvm") {
35+
extensions.findByType(org.jetbrains.kotlin.gradle.dsl.KotlinJvmProjectExtension::class.java)?.apply {
36+
compilerOptions {
37+
jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_21)
38+
}
39+
}
40+
}
41+
42+
// Java sources – produce Java 21 bytecode regardless of the JDK used to compile.
43+
afterEvaluate {
44+
if (!plugins.hasPlugin("com.android.library") && !plugins.hasPlugin("com.android.application") && !plugins.hasPlugin("com.android.kotlin.multiplatform.library")) {
45+
tasks.withType<JavaCompile>().configureEach {
46+
options.release.set(21)
47+
}
48+
}
49+
}
50+
51+
tasks.withType<Test>().configureEach {
52+
maxHeapSize = "8192m"
53+
}
54+
}

gradle.properties

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
GROUP=sk.ainet.llm
2+
VERSION_NAME=0.1.0
3+
4+
POM_DESCRIPTION=SKaiNET-LLM
5+
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
10+
11+
POM_LICENCE_NAME=MIT License
12+
POM_LICENCE_URL=https://mit-license.org/
13+
POM_LICENCE_DIST=repo
14+
15+
POM_DEVELOPER_ID=SKaiNET-developers
16+
POM_DEVELOPER_NAME=SKaiNET development team
17+
POM_DEVELOPER_URL=https://github.com/SKaiNET-developers/
18+
19+
mavenCentralPublishing=true
20+
mavenCentralAutomaticPublishing=true
21+
signAllPublications=true
22+
23+
#Gradle
24+
org.gradle.jvmargs=-Xmx2048M -Dfile.encoding=UTF-8 -Dkotlin.daemon.jvm.options\="-Xmx2048M"
25+
org.gradle.caching=true
26+
org.gradle.configuration-cache=true
27+
org.gradle.parallel=true
28+
org.gradle.configureondemand=true
29+
#Kotlin
30+
kotlin.code.style=official
31+
#MPP
32+
kotlin.mpp.enableCInteropCommonization=true
33+
#Android
34+
android.useAndroidX=true
35+
android.nonTransitiveRClass=true
36+
37+
kotlin.mpp.stability.nowarn=true
38+
39+
SONATYPE_HOST=DEFAULT
40+
SONATYPE_AUTOMATIC_RELEASE=false
41+
RELEASE_SIGNING_ENABLED=false
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#This file is generated by updateDaemonJvm
2+
toolchainUrl.FREE_BSD.AARCH64=https\://api.foojay.io/disco/v3.0/ids/ec7520a1e057cd116f9544c42142a16b/redirect
3+
toolchainUrl.FREE_BSD.X86_64=https\://api.foojay.io/disco/v3.0/ids/4c4f879899012ff0a8b2e2117df03b0e/redirect
4+
toolchainUrl.LINUX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/ec7520a1e057cd116f9544c42142a16b/redirect
5+
toolchainUrl.LINUX.X86_64=https\://api.foojay.io/disco/v3.0/ids/4c4f879899012ff0a8b2e2117df03b0e/redirect
6+
toolchainUrl.MAC_OS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/73bcfb608d1fde9fb62e462f834a3299/redirect
7+
toolchainUrl.MAC_OS.X86_64=https\://api.foojay.io/disco/v3.0/ids/846ee0d876d26a26f37aa1ce8de73224/redirect
8+
toolchainUrl.UNIX.AARCH64=https\://api.foojay.io/disco/v3.0/ids/ec7520a1e057cd116f9544c42142a16b/redirect
9+
toolchainUrl.UNIX.X86_64=https\://api.foojay.io/disco/v3.0/ids/4c4f879899012ff0a8b2e2117df03b0e/redirect
10+
toolchainUrl.WINDOWS.AARCH64=https\://api.foojay.io/disco/v3.0/ids/9482ddec596298c84656d31d16652665/redirect
11+
toolchainUrl.WINDOWS.X86_64=https\://api.foojay.io/disco/v3.0/ids/39701d92e1756bb2f141eb67cd4c660e/redirect
12+
toolchainVersion=21

gradle/libs.versions.toml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
[versions]
2+
agp = "8.13.0"
3+
jacksonDatabind = "2.21.1"
4+
jsonSchemaValidator = "3.0.0"
5+
jsonSchemaValidatorVersion = "0.5.3"
6+
junit = "4.13.2"
7+
junitJupiter = "6.0.3"
8+
kotlin = "2.3.0"
9+
kotlinxCoroutines = "1.10.2"
10+
kotlinBrowser = "0.5.0"
11+
android-minSdk = "24"
12+
android-compileSdk = "36"
13+
kotlinxSerializationJson = "1.9.0"
14+
ktorClientCore = "3.1.1"
15+
ktorClientPlugins = "3.1.1"
16+
logbackClassic = "1.5.32"
17+
kover = "0.9.7"
18+
binaryCompatibilityValidator = "0.18.1"
19+
ksp = "2.3.0"
20+
kotlinpoet = "2.2.0"
21+
kctfork = "0.12.1"
22+
asciidoctorj = "3.0.1"
23+
dokka = "2.1.0"
24+
kotlinxCli = "0.3.6"
25+
kotlinxBenchmark = "0.4.16"
26+
kotlinxIo = "0.8.2"
27+
pbandk = "0.16.0"
28+
kotest = "6.1.4"
29+
30+
[libraries]
31+
jackson-databind = { module = "com.fasterxml.jackson.core:jackson-databind", version.ref = "jacksonDatabind" }
32+
json-schema-validator = { module = "com.networknt:json-schema-validator", version.ref = "jsonSchemaValidator" }
33+
junit = { module = "junit:junit", version.ref = "junit" }
34+
junit-jupiter = { module = "org.junit.jupiter:junit-jupiter", version.ref = "junitJupiter" }
35+
junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher" }
36+
kotlinx-coroutines = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-core", version.ref = "kotlinxCoroutines" }
37+
kotlinx-browser = { module = "org.jetbrains.kotlinx:kotlinx-browser", version.ref = "kotlinBrowser" }
38+
kotlinx-coroutines-core-jvm = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm", version.ref = "kotlinxCoroutines" }
39+
kotlinx-coroutines-test = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-test", version.ref = "kotlinxCoroutines" }
40+
kotlinx-io-core = { module = "org.jetbrains.kotlinx:kotlinx-io-core", version.ref = "kotlinxIo" }
41+
42+
43+
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
44+
kotlinx-serialization-json = { module = "org.jetbrains.kotlinx:kotlinx-serialization-json", version.ref = "kotlinxSerializationJson" }
45+
kotlinx-cli = { module = "org.jetbrains.kotlinx:kotlinx-cli", version.ref = "kotlinxCli" }
46+
kotlinx-benchmark-runtime = { module = "org.jetbrains.kotlinx:kotlinx-benchmark-runtime", version.ref = "kotlinxBenchmark" }
47+
48+
49+
ktor-client-android = { module = "io.ktor:ktor-client-android", version.ref = "ktorClientCore" }
50+
ktor-client-cio = { module = "io.ktor:ktor-client-cio", version.ref = "ktorClientCore" }
51+
ktor-client-content-negotiation = { module = "io.ktor:ktor-client-content-negotiation", version.ref = "ktorClientCore" }
52+
ktor-client-core = { module = "io.ktor:ktor-client-core", version.ref = "ktorClientCore" }
53+
ktor-client-darwin = { module = "io.ktor:ktor-client-darwin", version.ref = "ktorClientCore" }
54+
ktor-client-js = { module = "io.ktor:ktor-client-js", version.ref = "ktorClientCore" }
55+
ktor-client-logging = { module = "io.ktor:ktor-client-logging", version.ref = "ktorClientCore" }
56+
ktor-client-plugins = { module = "io.ktor:ktor-client-plugins", version.ref = "ktorClientPlugins" }
57+
58+
kotlinpoet = { module = "com.squareup:kotlinpoet", version.ref = "kotlinpoet" }
59+
kotlinpoet-ksp = { module = "com.squareup:kotlinpoet-ksp", version.ref = "kotlinpoet" }
60+
ksp-api = { module = "com.google.devtools.ksp:symbol-processing-api", version.ref = "ksp" }
61+
ksp-test = { module = "com.google.devtools.ksp:symbol-processing-test", version.ref = "ksp" }
62+
kotlin-compile-testing = { module = "dev.zacsweers.kctfork:core", version.ref = "kctfork" }
63+
kotlin-compile-testing-ksp = { module = "dev.zacsweers.kctfork:ksp", version.ref = "kctfork" }
64+
65+
asciidoctorj-core = { module = "org.asciidoctor:asciidoctorj", version.ref = "asciidoctorj" }
66+
asciidoctorj-pdf = { module = "org.asciidoctor:asciidoctorj-pdf", version.ref = "asciidoctorj" }
67+
68+
dokka-base = { module = "org.jetbrains.dokka:dokka-base", version.ref = "dokka" }
69+
dokka-core = { module = "org.jetbrains.dokka:dokka-core", version.ref = "dokka" }
70+
dokka-test-utils = { module = "org.jetbrains.dokka:dokka-test-utils", version.ref = "dokka" }
71+
72+
logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "logbackClassic" }
73+
optimumcode-json-schema-validator = { module = "io.github.optimumcode:json-schema-validator", version.ref = "jsonSchemaValidatorVersion" }
74+
pbandk-runtime = { module = "pro.streem.pbandk:pbandk-runtime", version.ref = "pbandk" }
75+
kotest-runner-junit5 = { module = "io.kotest:kotest-runner-junit5", version.ref = "kotest" }
76+
kotest-assertions-core = { module = "io.kotest:kotest-assertions-core", version.ref = "kotest" }
77+
kotest-property = { module = "io.kotest:kotest-property", version.ref = "kotest" }
78+
79+
[plugins]
80+
androidLibrary = { id = "com.android.library", version.ref = "agp" }
81+
androidMultiplatformLibrary = { id = "com.android.kotlin.multiplatform.library", version.ref = "agp" }
82+
kotlinMultiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
83+
kotlinSerialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
84+
jetbrainsKotlinJvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
85+
vanniktech-mavenPublish = { id = "com.vanniktech.maven.publish", version = "0.36.0" }
86+
kover = { id = "org.jetbrains.kotlinx.kover", version.ref = "kover" }
87+
binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "binaryCompatibilityValidator" }
88+
ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
89+
asciidoctorJvm = { id = "org.asciidoctor.jvm.convert", version = "4.0.5" }
90+
asciidoctorPdf = { id = "org.asciidoctor.jvm.pdf", version = "4.0.5" }
91+
dokka = { id = "org.jetbrains.dokka", version.ref = "dokka" }
92+
93+
skainet-docs = { id = "sk.ainet.documentation" }
94+
kotlinx-benchmark = { id = "org.jetbrains.kotlinx.benchmark", version.ref = "kotlinxBenchmark" }
95+
shadow = { id = "com.gradleup.shadow", version = "9.3.2" }

gradle/wrapper/gradle-wrapper.jar

60.2 KB
Binary file not shown.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-9.3.1-bin.zip
4+
networkTimeout=10000
5+
zipStoreBase=GRADLE_USER_HOME
6+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)