Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nexa sdk upgrade #343

Merged
merged 31 commits into from
Jan 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
089eec1
android sdk upgrade
TerryT9 Dec 2, 2024
9dd256f
update build-aar yml
TerryT9 Dec 2, 2024
85c397a
update dependencies
TerryT9 Dec 2, 2024
2c04ef6
Merge pull request #296 from NexaAI/teliu/android-sdk-upgrade
zhiyuan8 Dec 2, 2024
5439c77
init android audio
TerryT9 Dec 3, 2024
7e5bd6d
add ttft/tps/decoding speed in android demo app
JoyboyBrian Dec 3, 2024
7230e2a
Merge pull request #298 from NexaAI/brian/perf-upgrade
zhiyuan8 Dec 4, 2024
6ab4c4f
update
TerryT9 Dec 4, 2024
7b6c8ed
update
TerryT9 Dec 4, 2024
ec23afe
updates
JoyboyBrian Dec 4, 2024
f8a8a6d
Merge pull request #300 from NexaAI/brian/perf-upgrade
JoyboyBrian Dec 4, 2024
53967ca
add NexaAudioInference
TerryT9 Dec 5, 2024
8f17535
Merge remote-tracking branch 'origin/nexa-sdk-upgrade' into teliu/And…
TerryT9 Dec 5, 2024
17bacb2
Merge branch 'nexa-sdk-upgrade' into teliu/Android-Audio
TerryT9 Dec 5, 2024
8f70ed7
Merge pull request #301 from NexaAI/teliu/Android-Audio
zhiyuan8 Dec 5, 2024
9ac4a17
upgrade llama.cpp to newest version
TerryT9 Dec 9, 2024
f6d438a
upgrade llama cpp python
TerryT9 Dec 9, 2024
c1a43b9
upgrade
TerryT9 Dec 9, 2024
d3dc3a4
upgrade
TerryT9 Dec 10, 2024
d82b110
upgrade llama cpp python
TerryT9 Dec 10, 2024
2ae6828
chore: update llama.cpp submodule
TerryT9 Dec 10, 2024
418d077
update
TerryT9 Dec 10, 2024
66cd9b1
update
TerryT9 Dec 11, 2024
98d1769
revert some config
TerryT9 Dec 11, 2024
a8c690b
disable bark build
TerryT9 Dec 11, 2024
20ca4fc
fix audio issue
TerryT9 Dec 11, 2024
33e258f
Merge branch 'main' into nexa-sdk-upgrade-llama-cpp-python-new
Dec 11, 2024
8c6d8be
llama cpp to relase branch
Dec 12, 2024
aa45f02
Merge pull request #312 from NexaAI/nexa-sdk-upgrade-llama-cpp-python…
zhiyuan8 Dec 12, 2024
627782d
update android cmake omni deps branch
TerryT9 Dec 30, 2024
b2a1c98
merge main
TerryT9 Jan 6, 2025
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
4 changes: 2 additions & 2 deletions .github/workflows/build-aar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ jobs:
- name: Navigate to android Directory and Build AAR
run: |
echo "Navigating to the example directory..."
cd android/llama.android
cd android
echo "Starting Gradle build process in $(pwd)..."
./gradlew assembleRelease --stacktrace --info
shell: bash

- name: Rename and upload AAR
run: |
echo "Navigating to the android directory to find AAR output..."
cd android/llama.android
cd android
mkdir -p ../artifacts
ls -ld ../artifacts || echo "Artifacts directory does not exist."
AAR_PATH=$(find ./llama/build/outputs/aar -type f -name "*.aar" | head -n 1)
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
[submodule "dependency/llama.cpp"]
path = dependency/llama.cpp
url = https://github.com/NexaAI/llama.cpp.git
branch = master-release
branch = release
[submodule "nexa/eval/benchmark_tasks"]
path = nexa/eval/benchmark_tasks
url = https://github.com/NexaAI/benchmark-tasks.git
Expand Down
2 changes: 2 additions & 0 deletions android/llama.android/.gitignore → android/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
.gradle/
build/

.idea

# Local configuration file (sdk path, etc)
local.properties

Expand Down
9 changes: 7 additions & 2 deletions android/llama.android/README.md → android/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Nexa

**Nexa** offers a convenient Kotlin API for Android developers. It allows seamless integration of llama.cpp models into Android applications.
**NOTE:** Currently, Nexa supports Large-Language Model (LLM) Vision-Language Model (VLM) inference capabilities.
**Nexa** is a Kotlin wrapper for the [llama.cpp](https://github.com/ggerganov/llama.cpp.git) library. offering a convenient Kotlin API for Android developers. It allows seamless integration of llama.cpp models into Android applications.
**NOTE:** Currently, Nexa supports Vision-Language Model (VLM) inference capabilities.

## Installation

Expand Down Expand Up @@ -52,3 +52,8 @@ Open the [android test project](./app-java) folder in Android Studio and run the
## Download Models

You can download models from the [Nexa AI ModelHub](https://nexa.ai/models).

## How to estimate power usage

- ```adb shell dumpsys batterystats --reset```
- ```adb shell dumpsys batterystats > batterystats.txt```
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
Expand All @@ -12,6 +12,9 @@
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />

<application
android:largeHeap="true"
android:hardwareAccelerated="true"
tools:replace="android:largeHeap"
android:allowBackup="true"
android:dataExtractionRules="@xml/data_extraction_rules"
android:fullBackupContent="@xml/backup_rules"
Expand Down
Loading