feat: Add getMetadata method to LlamaModel#122
Open
Togaroda wants to merge 4 commits intokherud:masterfrom
Open
feat: Add getMetadata method to LlamaModel#122Togaroda wants to merge 4 commits intokherud:masterfrom
Togaroda wants to merge 4 commits intokherud:masterfrom
Conversation
This commit introduces a new `getMetadata()` method to the `LlamaModel` class, allowing users to retrieve the metadata of the loaded model. The implementation includes: - A new public `getMetadata()` method in `LlamaModel.java`. - A corresponding native method `getMetadataNative()` in `jllama.cpp` that retrieves the model metadata. - An update to the JNI header file `jllama.h`. - A new unit test to verify the functionality of the `getMetadata()` method.
This commit adds support for building the native library for the Android `arm64-v8a` architecture. The changes include: - Modified `CMakeLists.txt` to support cross-compilation for Android by using the Android NDK toolchain. - Patched `llama-mmap.cpp` to fix a compilation error on Android. - Patched `jllama.cpp` to fix a JNI type error when compiling with the Android NDK. - Modified `OSInfo.java` to correctly identify the `arm64-v8a` architecture on Android. - Added `build-android/` to the `.gitignore` file. - Created a `dist` directory and packaged the final JAR.
This commit adds support for building the native library for the Android `arm64-v8a` architecture. The changes include: - Modified `CMakeLists.txt` to support cross-compilation for Android by using the Android NDK toolchain. - Patched `llama-mmap.cpp` to fix a compilation error on Android. - Patched `jllama.cpp` to fix a JNI type error when compiling with the Android NDK. - Modified `OSInfo.java` to correctly identify the `arm64-v8a` architecture on Android. - Added `build-android/` to the `.gitignore` file. - Created a `dist` directory and packaged the final JAR. Note: The `RerankingModelTest` has been temporarily disabled with `@Ignore` because the required model file (`jina-reranker-v1-tiny-en-Q4_0.gguf`) could not be found online. This test should be re-enabled once the model is available.
This commit adds support for building the native library for the Android `arm64-v8a` architecture. The changes include: - Modified `CMakeLists.txt` to support cross-compilation for Android by using the Android NDK toolchain. - Patched `llama-mmap.cpp` to fix a compilation error on Android. - Patched `jllama.cpp` to fix a JNI type error when compiling with the Android NDK. - Modified `OSInfo.java` to correctly identify the `arm64-v8a` architecture on Android. - Added `build-android/` to the `.gitignore` file. - Created a `dist` directory and packaged the final JAR. - Added a download button for the JAR file to the `README.md`. Note: The `RerankingModelTest` has been temporarily disabled with `@Ignore` because the required model file (`jina-reranker-v1-tiny-en-Q4_0.gguf`) could not be found online. This test should be re-enabled once the model is available.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit introduces a new
getMetadata()method to theLlamaModelclass, allowing users to retrieve the metadata of the loaded model.The implementation includes:
getMetadata()method inLlamaModel.java.getMetadataNative()injllama.cppthat retrieves the model metadata.jllama.h.getMetadata()method.