Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

Java bindings for [llama.cpp](https://github.com/ggerganov/llama.cpp) via JNI, providing a high-level API for LLM inference in Java. The Java layer communicates with a native C++ library through JNI.

Current llama.cpp pinned version: **b9964**
Current llama.cpp pinned version: **b9972**

## Upgrading CUDA Version

Expand Down Expand Up @@ -421,7 +421,7 @@ needs no extra step here, `build-webui` re-reads the tag and rebuilds the matchi
ships no UI):
```bash
# needs node/npm + network; embed.cpp is plain C++17 (no npm)
git clone --depth 1 --branch b9964 https://github.com/ggml-org/llama.cpp /tmp/lc
git clone --depth 1 --branch b9972 https://github.com/ggml-org/llama.cpp /tmp/lc
( cd /tmp/lc/tools/ui && npm ci && npm run build \
&& ( cd dist && find . -type f -not -path './_gzip/*' \
| while read -r f; do mkdir -p "_gzip/$(dirname "$f")"; gzip -9 -c "$f" > "_gzip/$f"; done ) \
Expand Down Expand Up @@ -461,7 +461,7 @@ cache lives in **Depot Cache** over sccache's **WebDAV** backend:
- `SCCACHE_WEBDAV_TOKEN: ${{ secrets.DEPOT_TOKEN }}` β€” a Depot **organization** token, stored
as the repo secret **`DEPOT_TOKEN`**.

Because `sccache` is **content-addressed** and llama.cpp is pinned (`GIT_TAG b9964`), the
Because `sccache` is **content-addressed** and llama.cpp is pinned (`GIT_TAG b9972`), the
~280 upstream object files are byte-identical every run, so a warm cache recompiles only the
*changed* files. Depot's cache is **shared across all branches** (unlike GitHub's
per-branch `actions/cache`), so every branch builds incrementally; a `b<nnnn>` version bump
Expand Down Expand Up @@ -1237,7 +1237,7 @@ ctest --test-dir build --output-on-failure -R "ResultsToJson"

#### Upstream source location (in CMake build tree)

llama.cpp is fetched via CMake FetchContent, pinned to `GIT_TAG b9964`.
llama.cpp is fetched via CMake FetchContent, pinned to `GIT_TAG b9972`.

**GoogleTest** is a separate `BUILD_TESTING`-only FetchContent (`GIT_TAG v1.17.0`), used solely
by the `jllama_test` C++ unit-test binary β€” not by the shipped library, and not coupled to the
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
**Build:**
![Java 8+](https://img.shields.io/badge/Java-8%2B-informational)
![Platform](https://img.shields.io/badge/Platform-Linux%20%7C%20macOS%20%7C%20Windows%20%7C%20Android-lightgrey)
[![llama.cpp b9964](https://img.shields.io/badge/llama.cpp-%23b9964-informational)](https://github.com/ggml-org/llama.cpp/releases/tag/b9964)
[![llama.cpp b9972](https://img.shields.io/badge/llama.cpp-%23b9972-informational)](https://github.com/ggml-org/llama.cpp/releases/tag/b9972)
[![JPMS](https://img.shields.io/badge/JPMS-modular%20JAR-25A162)](https://openjdk.org/projects/jigsaw/)
![JUnit](https://img.shields.io/badge/tested%20with-JUnit6-25A162)
[![JSpecify](https://img.shields.io/badge/JSpecify-1.0.0%20%40NullMarked-25A162)](https://jspecify.dev)
Expand Down
4 changes: 3 additions & 1 deletion android-llmservice/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ what it says:
1. **Pick a GGUF model** from the device's file system (Storage Access Framework β€” no
storage permission, Google-Play compliant).
2. **Chat** with it, fully **on-device**, tokens streaming into a Jetpack Compose UI.
3. **Switch language** via a flag picker, and **Save/Load** the conversation locally.
3. Optionally add a **vision projector (mmproj)** and attach an **image** (πŸ“Ž) to a
message β€” for multimodal GGUFs such as Gemma 3 4B (vision) or SmolVLM2.
4. **Switch language** via a flag picker, and **Save/Load** the conversation locally.

- **App label:** `LLM Service`
- **applicationId / package:** `net.ladenthin.android.llmservice`
Expand Down
6 changes: 3 additions & 3 deletions android-llmservice/TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Everything else in the brief is feasible with standard AndroidX + the existing b
| Markdown rendering (code, lists, tables, headings) | Readable answers | M | ⬜ | add a Compose Markdown renderer (e.g. compose-markdown) |
| Copy / regenerate / stop / clear-chat actions | Standard chat UX | M | βœ… | **stop** cancels the streaming coroutine (faΓ§ade closes the source); **copy**/**regenerate** act on the last reply; **long-press any bubble** copies that message; **clear** in the top bar with a confirm |
| Prompt shortcut chips (Summarize / Explain code / Translate / …) | Fast starts | S | βœ… | localized `SuggestionChip`s above the input (fill the draft); 3 chips Γ— 13 languages |
| Attachment button β†’ image input (vision) | Multimodal chat | L | ⬜ | `ContentPart.imageFile(...)` + a **vision GGUF + mmproj**; SAF image picker |
| Attachment button β†’ image input (vision) | Multimodal chat | L | βœ… | SAF pickers for both a vision **mmproj** GGUF (model-picker screen) and a query **image** (πŸ“Ž in the chat input, shown only once a vision projector is loaded); wired through `ContentPart.imageBytes(...)` + `ChatMessage`. Attached images are session-transient (not saved to `session.json`) |
| Audio input (speech) | Multimodal chat | L | ⬜ | `ContentPart.audioFile(...)` + an audio-capable model + mmproj |
| Explicit states: loading / generating / stopped / unavailable / "too large for RAM" | Transparency | S | πŸ”§ | basic states exist; add the rest + messages |

Expand Down Expand Up @@ -154,7 +154,7 @@ See decision #1. All rows below assume a new in-app Ktor/NanoHTTPD HTTP layer wr
| Item | Reality today | Effort to adopt |
|---|---|---|
| GPU acceleration | **OpenCL/Adreno only** via the separate `net.ladenthin:llama-android-opencl` AAR (Qualcomm Snapdragon/Adreno; device must supply an OpenCL ICD). **No Vulkan** Android artifact exists. | M β€” swap/offer the OpenCL AAR flavor + runtime detection; non-Adreno devices stay CPU |
| Vision / audio input | Supported by the binding (`ContentPart.imageFile`/`audioFile`), needs a multimodal GGUF + matching mmproj | L (see Β§3) |
| Audio input | Supported by the binding (`ContentPart.audioFile`), needs an audio-capable GGUF + matching mmproj | L (see Β§3) |
| 16 KB page size / dlopen-clean `.so` | Already guaranteed by the AAR (CI-enforced) | β€” |

## 8. Branding & store
Expand All @@ -175,7 +175,7 @@ See decision #1. All rows below assume a new in-app Ktor/NanoHTTPD HTTP layer wr
icon, helper tooltips.
- **Phase 2 β€” the model manager:** managed import library β†’ `GgufInspector` model cards β†’ RAM/compat
badges β†’ filters β†’ multi-model switch/delete. Then decide on the **download manager** (`INTERNET`).
- **Phase 3 β€” multimodal:** image (then audio) input with a vision/audio GGUF + mmproj.
- **Phase 3 β€” multimodal:** image input βœ… shipped; audio input with an audio-capable GGUF + mmproj remains.
- **Phase 4 β€” hardening/perf:** encrypted conversations, biometric lock, battery-saver + thermal
throttling, optional Adreno/OpenCL GPU flavor.
- **Phase 5 β€” the local API server (`XL`, foundational):** in-app Ktor/NanoHTTPD server wrapping the
Expand Down
Loading
Loading