From: Mathieu Baudier Date: Thu, 12 Sep 2024 13:00:35 +0000 (+0200) Subject: Update Jlama and langchain4j X-Git-Url: http://git.argeo.org/?a=commitdiff_plain;h=7f7c8592f4eafca0db840c202be2faf7ecc0b79c;p=gpl%2Fargeo-tp.git Update Jlama and langchain4j --- diff --git a/rebuild/org.argeo.tp.ml/Makefile b/rebuild/org.argeo.tp.ml/Makefile index 6e06256..c1e5c8f 100644 --- a/rebuild/org.argeo.tp.ml/Makefile +++ b/rebuild/org.argeo.tp.ml/Makefile @@ -5,9 +5,6 @@ export NO_SDK_LEGAL := true A2_CATEGORY = org.argeo.tp.ml -JLAMA_JNI_SRC=jni/com_github_tjake_jlama -JLAMA_TARGET_EXEC=libjlama.so - ## FIXME - DON'T FORGET TO UPDATE THE VERSION IN THE RELATED bnd.bnd FILE! JLLAMA_BRANCH=3.3 JLLAMA_VERSION=$(JLLAMA_BRANCH).0 @@ -15,9 +12,12 @@ JLLAMA_VERSION=$(JLLAMA_BRANCH).0 LLAMA3_COMMIT=5f602500beb593dce2726df7e2dd08b0803aa86b LLAMA3_VERSION=0.1.0 -JLAMA_BRANCH=0.2 +JLAMA_BRANCH=0.3 JLAMA_VERSION=$(JLAMA_BRANCH).1 +JLAMA_JNI_SRC=jni/com_github_tjake_jlama +JLAMA_TARGET_EXEC=libjlama.so + all: retrieve-jllama retrieve-llama3 retrieve-jlama osgi jni-jlama mkdir -p $(SDK_BUILD_BASE)/a2/$(TARGET_ARCH_CATEGORY_PREFIX)/$(A2_CATEGORY) mv $(SDK_BUILD_BASE)/a2/$(A2_CATEGORY)/de.kherud.llama.$(JLLAMA_BRANCH).jar $(SDK_BUILD_BASE)/a2/$(TARGET_ARCH_CATEGORY_PREFIX)/$(A2_CATEGORY) @@ -54,8 +54,10 @@ retrieve-jlama: mkdir -p $(SRC_DIR) git clone --branch v$(JLAMA_VERSION) https://github.com/tjake/Jlama.git $(SRC_DIR) rm -rf $(SRC_DIR)/.git + # First common code rsync -a --delete --exclude module-info.java $(SRC_DIR)/jlama-native/src/main/java/ com.github.tjake.jlama.native/src - # future: rsync -a --delete --exclude module-info.java $(SRC_DIR)/jlama-native/src/main/java21/ com.github.tjake.jlama.native/src + # Then override with Java 21 specific + rsync -a --exclude module-info.java $(SRC_DIR)/jlama-native/src/main/java21/ com.github.tjake.jlama.native/src rsync -a --delete --exclude module-info.java $(SRC_DIR)/jlama-native/src/main/c/ $(JLAMA_JNI_SRC) BUNDLES = \ diff --git a/rebuild/org.argeo.tp.ml/com.github.tjake.jlama.native/META-INF/MANIFEST.MF b/rebuild/org.argeo.tp.ml/com.github.tjake.jlama.native/META-INF/MANIFEST.MF index 67e54d5..895afb8 100644 --- a/rebuild/org.argeo.tp.ml/com.github.tjake.jlama.native/META-INF/MANIFEST.MF +++ b/rebuild/org.argeo.tp.ml/com.github.tjake.jlama.native/META-INF/MANIFEST.MF @@ -2,15 +2,17 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Export-Package: com.github.tjake.jlama.tensor.operations;uses:="com.gith ub.tjake.jlama.safetensors,com.github.tjake.jlama.tensor",com.github.tj - ake.jlama.tensor.operations.cnative + ake.jlama.tensor.operations.cnative,com.github.tjake.jlama.tensor.opera + tions.util Import-Package: com.github.tjake.jlama.safetensors,com.github.tjake.jlam a.tensor,com.github.tjake.jlama.tensor.operations.cnative,com.github.tj - ake.jlama.util,java.io,java.lang,java.lang.foreign,java.lang.invoke,jav - a.net,java.nio.file,java.nio.file.attribute,java.util,java.util.functio - n,org.slf4j + ake.jlama.tensor.operations.util,com.github.tjake.jlama.util,java.io,ja + va.lang,java.lang.foreign,java.lang.invoke,java.net,java.nio.file,java. + nio.file.attribute,java.util,java.util.function,org.slf4j Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=20))" Bundle-RequiredExecutionEnvironment: JavaSE-20 -Bundle-Version: 0.2.1.next +Fragment-Host: com.github.tjake.jlama +Bundle-Version: 0.3.1.next Automatic-Module-Name: com.github.tjake.jlama.native Bundle-SymbolicName: com.github.tjake.jlama.native Bundle-Name: com.github.tjake.jlama.native diff --git a/rebuild/org.argeo.tp.ml/com.github.tjake.jlama.native/bnd.bnd b/rebuild/org.argeo.tp.ml/com.github.tjake.jlama.native/bnd.bnd index 7a6d19b..a07e707 100644 --- a/rebuild/org.argeo.tp.ml/com.github.tjake.jlama.native/bnd.bnd +++ b/rebuild/org.argeo.tp.ml/com.github.tjake.jlama.native/bnd.bnd @@ -1,7 +1,9 @@ major: 0 -minor: 2 +minor: 3 micro: 1 Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=20))" -Bundle-RequiredExecutionEnvironment: JavaSE-20 \ No newline at end of file +Bundle-RequiredExecutionEnvironment: JavaSE-20 + +Fragment-Host: com.github.tjake.jlama diff --git a/repackage/org.argeo.tp.ml/jlama/com.github.tjake.jlama.bnd b/repackage/org.argeo.tp.ml/jlama/com.github.tjake.jlama.bnd index b646d64..d983795 100644 --- a/repackage/org.argeo.tp.ml/jlama/com.github.tjake.jlama.bnd +++ b/repackage/org.argeo.tp.ml/jlama/com.github.tjake.jlama.bnd @@ -1,4 +1,5 @@ Argeo-Origin-M2: com.github.tjake:jlama-core Import-Package:\ org.jctools.queues,\ +net.fellbaum.jemoji.*;resolution:=optional,\ * diff --git a/repackage/org.argeo.tp.ml/jlama/common.bnd b/repackage/org.argeo.tp.ml/jlama/common.bnd index 0bc9b4a..7e9be28 100644 --- a/repackage/org.argeo.tp.ml/jlama/common.bnd +++ b/repackage/org.argeo.tp.ml/jlama/common.bnd @@ -1,3 +1,3 @@ SPDX-License-Identifier: Apache-2.0 -Argeo-Origin-M2: :0.2.1 +Argeo-Origin-M2: :0.3.1 Require-Capability: osgi.ee; filter="(&(osgi.ee=JavaSE)(version=20))" diff --git a/repackage/org.argeo.tp.ml/langchain4j/common.bnd b/repackage/org.argeo.tp.ml/langchain4j/common.bnd index 385e954..e10268b 100644 --- a/repackage/org.argeo.tp.ml/langchain4j/common.bnd +++ b/repackage/org.argeo.tp.ml/langchain4j/common.bnd @@ -1,2 +1,2 @@ SPDX-License-Identifier: Apache-2.0 -Argeo-Origin-M2: :0.33.0 +Argeo-Origin-M2: :0.34.0 diff --git a/repackage/org.argeo.tp.utils/net.fellbaum.jemoji.bnd.disabled b/repackage/org.argeo.tp.utils/net.fellbaum.jemoji.bnd.disabled new file mode 100644 index 0000000..738efdb --- /dev/null +++ b/repackage/org.argeo.tp.utils/net.fellbaum.jemoji.bnd.disabled @@ -0,0 +1,3 @@ +# Huge file because of i18n. Needs to improve argeo-build before being able to use it. +SPDX-License-Identifier: Apache-2.0 +Argeo-Origin-M2: net.fellbaum:jemoji:1.5.2