]> git.argeo.org Git - gpl/argeo-tp.git/commitdiff
Update Jlama and langchain4j
authorMathieu Baudier <mbaudier@argeo.org>
Thu, 12 Sep 2024 13:00:35 +0000 (15:00 +0200)
committerMathieu Baudier <mbaudier@argeo.org>
Thu, 12 Sep 2024 13:00:35 +0000 (15:00 +0200)
rebuild/org.argeo.tp.ml/Makefile
rebuild/org.argeo.tp.ml/com.github.tjake.jlama.native/META-INF/MANIFEST.MF
rebuild/org.argeo.tp.ml/com.github.tjake.jlama.native/bnd.bnd
repackage/org.argeo.tp.ml/jlama/com.github.tjake.jlama.bnd
repackage/org.argeo.tp.ml/jlama/common.bnd
repackage/org.argeo.tp.ml/langchain4j/common.bnd
repackage/org.argeo.tp.utils/net.fellbaum.jemoji.bnd.disabled [new file with mode: 0644]

index 6e06256e5c6755eaf1ca1ddc8cfe8535c5123052..c1e5c8f7ea1714c3b9e94cd499176cb326ca2ac2 100644 (file)
@@ -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 = \
index 67e54d504e21c2ed1e3ec276d324b19fe0eefa8c..895afb80415a8677a1ebbc98734df175e4a20e03 100644 (file)
@@ -2,15 +2,17 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2\r
 Export-Package: com.github.tjake.jlama.tensor.operations;uses:="com.gith\r
  ub.tjake.jlama.safetensors,com.github.tjake.jlama.tensor",com.github.tj\r
- ake.jlama.tensor.operations.cnative\r
+ ake.jlama.tensor.operations.cnative,com.github.tjake.jlama.tensor.opera\r
+ tions.util\r
 Import-Package: com.github.tjake.jlama.safetensors,com.github.tjake.jlam\r
  a.tensor,com.github.tjake.jlama.tensor.operations.cnative,com.github.tj\r
- ake.jlama.util,java.io,java.lang,java.lang.foreign,java.lang.invoke,jav\r
- a.net,java.nio.file,java.nio.file.attribute,java.util,java.util.functio\r
- n,org.slf4j\r
+ ake.jlama.tensor.operations.util,com.github.tjake.jlama.util,java.io,ja\r
+ va.lang,java.lang.foreign,java.lang.invoke,java.net,java.nio.file,java.\r
+ nio.file.attribute,java.util,java.util.function,org.slf4j\r
 Require-Capability: osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=20))"\r
 Bundle-RequiredExecutionEnvironment: JavaSE-20\r
-Bundle-Version: 0.2.1.next\r
+Fragment-Host: com.github.tjake.jlama\r
+Bundle-Version: 0.3.1.next\r
 Automatic-Module-Name: com.github.tjake.jlama.native\r
 Bundle-SymbolicName: com.github.tjake.jlama.native\r
 Bundle-Name: com.github.tjake.jlama.native\r
index 7a6d19bb0c33bb328a3df3e58b2c231f93b6791f..a07e7078eb8bfcea8ad3fd4ab1b2cb2dbba312ad 100644 (file)
@@ -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
index b646d647a1d1185f487bb09c9cbd75946c22f5ed..d983795441201af2d3579f3cb3ef6a1f0ff65530 100644 (file)
@@ -1,4 +1,5 @@
 Argeo-Origin-M2: com.github.tjake:jlama-core
 Import-Package:\
 org.jctools.queues,\
+net.fellbaum.jemoji.*;resolution:=optional,\
 *
index 0bc9b4ac3cb8ccf168089b7433ae0d88253914a5..7e9be2865e654a9c2251c9715f97157cb0742b28 100644 (file)
@@ -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))"
index 385e9544af59c6a5b917ec4c55107985663b8f7d..e10268bf6209680670111cda3d6f97de5d33c77b 100644 (file)
@@ -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 (file)
index 0000000..738efdb
--- /dev/null
@@ -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