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

[android] Add llama2 example #359

Merged
merged 1 commit into from
Oct 8, 2024
Merged

[android] Add llama2 example #359

merged 1 commit into from
Oct 8, 2024

Conversation

niley7464
Copy link
Contributor

@niley7464 niley7464 commented Sep 25, 2024

This patch adds android application example to use llama2 model.
To use this application, nnstreamer-android's service application must be installed to the target device.

Self evaluation:

  1. Build test: [*]Passed [ ]Failed [ ]Skipped
  2. Run test: [*]Passed [ ]Failed [ ]Skipped

@taos-ci
Copy link
Collaborator

taos-ci commented Sep 25, 2024

📝 TAOS-CI Version: 1.5.20200925. Thank you for submitting PR #359. Please a submit 1commit/1PR (one commit per one PR) policy to get comments quickly from reviewers. Your PR must pass all verificiation processes of cibot before starting a review process from reviewers. If you are new member to join this project, please read manuals in documentation folder and wiki page. In order to monitor a progress status of your PR in more detail, visit http://ci.nnstreamer.ai/.

@taos-ci
Copy link
Collaborator

taos-ci commented Sep 25, 2024

:octocat: cibot: @niley7464, The last line of a text file must have a newline character. Please append a new line at the end of the line in android/example_app/llama2/app/.gitignore.

@taos-ci
Copy link
Collaborator

taos-ci commented Sep 25, 2024

:octocat: cibot: @niley7464, The last line of a text file must have a newline character. Please append a new line at the end of the line in android/example_app/llama2/app/build.gradle.kts.

@taos-ci
Copy link
Collaborator

taos-ci commented Sep 25, 2024

:octocat: cibot: @niley7464, The last line of a text file must have a newline character. Please append a new line at the end of the line in android/example_app/llama2/app/build.gradle.kts.

Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niley7464, 💯 All CI checkers are successfully verified. Thanks.

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools">
<queries>
<package android:name="ai.nnstreamer.ml.inference.offloading" />
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part can make android application to call another application's service
https://developer.android.com/training/package-visibility/declaring

@@ -0,0 +1,137 @@
package com.example.llama2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most other examples have the same package name, package org.freedesktop.gstreamer.nnstreamer;.
Q1. Is it OK with the same package names in the same repository? (I don't know)
Q2. There is nothing wrong with com.example.llama2 but how about using our domain ai.nnstreamer.example.llama2 ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or ```nnstreamer.example`.*``?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A1. example_app's settings.gradle does not have llama2 in include directory, so I don't think there will be a problem
But it looks something weired. How about make another example_app directory for NNS-android?
android/example_app, android/kotlin_app (or something else)

A2. I will update the package name after separate the repository 😊

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated package name to ai.nnstreamer.example.llama2 and separated the repo

Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niley7464, 💯 All CI checkers are successfully verified. Thanks.

@taos-ci
Copy link
Collaborator

taos-ci commented Oct 7, 2024

:octocat: cibot: @niley7464, The last line of a text file must have a newline character. Please append a new line at the end of the line in android/kotlin_app/llama2/app/.gitignore.

@taos-ci
Copy link
Collaborator

taos-ci commented Oct 7, 2024

:octocat: cibot: @niley7464, The last line of a text file must have a newline character. Please append a new line at the end of the line in android/kotlin_app/llama2/app/.gitignore.

@taos-ci
Copy link
Collaborator

taos-ci commented Oct 7, 2024

:octocat: cibot: @niley7464, The last line of a text file must have a newline character. Please append a new line at the end of the line in android/kotlin_app/llama2/app/src/test/java/ai/nnstreamer/example/llama2/ExampleUnitTest.kt.

This patch adds android application example to use llama2 model.
To use this application, nnstreamer-android's service application must be installed to the target device.

Signed-off-by: Yelin Jeong <[email protected]>
Copy link
Collaborator

@taos-ci taos-ci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@niley7464, 💯 All CI checkers are successfully verified. Thanks.

@wooksong wooksong merged commit 07ca472 into nnstreamer:main Oct 8, 2024
33 checks passed
@niley7464 niley7464 deleted the llama2 branch October 8, 2024 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants