diff --git a/examples/llama.android/app/src/main/java/com/example/llama/KleidiLlamaApplication.kt b/examples/llama.android/app/src/main/java/com/example/llama/KleidiLlamaApplication.kt index 79b9521e7c..21c00f233f 100644 --- a/examples/llama.android/app/src/main/java/com/example/llama/KleidiLlamaApplication.kt +++ b/examples/llama.android/app/src/main/java/com/example/llama/KleidiLlamaApplication.kt @@ -3,7 +3,7 @@ package com.example.llama import android.app.Application import dagger.hilt.android.HiltAndroidApp -const val APP_NAME = "Arm AI Playground" +const val APP_NAME = "Arm® AI Playground" @HiltAndroidApp class KleidiLlamaApplication : Application() diff --git a/examples/llama.android/app/src/main/java/com/example/llama/ui/screens/ModelsManagementAndDeletingScreen.kt b/examples/llama.android/app/src/main/java/com/example/llama/ui/screens/ModelsManagementAndDeletingScreen.kt index 2b8b5364f5..ec1f3e0241 100644 --- a/examples/llama.android/app/src/main/java/com/example/llama/ui/screens/ModelsManagementAndDeletingScreen.kt +++ b/examples/llama.android/app/src/main/java/com/example/llama/ui/screens/ModelsManagementAndDeletingScreen.kt @@ -450,7 +450,7 @@ private fun ImportFromHuggingFaceDialog( modifier = Modifier.fillMaxWidth(), text = models?.let { "The Hugging Face models shown here have been pre-filtered to be moderately sized and correctly quantized.\n\n" + - "Please use responsibly. We do not endorse or take responsibility for misuse or harmful use of these models.\n\n" + + "Please use responsibly. Arm® does not endorse or take responsibility for misuse or harmful use of these models.\n\n" + "Select a model to download:" } ?: "Searching on HuggingFace for open-source models free for downloading...", style = MaterialTheme.typography.bodyLarge, diff --git a/examples/llama.android/llama/src/main/java/android/llama/cpp/ArmFeatures.kt b/examples/llama.android/llama/src/main/java/android/llama/cpp/ArmFeatures.kt index 6566233fcb..adb9412ead 100644 --- a/examples/llama.android/llama/src/main/java/android/llama/cpp/ArmFeatures.kt +++ b/examples/llama.android/llama/src/main/java/android/llama/cpp/ArmFeatures.kt @@ -1,7 +1,7 @@ package android.llama.cpp /** - * Represents an ARM CPU feature with its metadata. + * Represents an Arm® CPU feature with its metadata. */ data class ArmFeature( val name: String, @@ -11,7 +11,7 @@ data class ArmFeature( ) /** - * Helper class to map LLamaTier to supported ARM features. + * Helper class to map LLamaTier to supported Arm® features. */ object ArmFeaturesMapper { @@ -24,7 +24,7 @@ object ArmFeaturesMapper { ) /** - * All ARM features supported by the library, in order of introduction. + * All Arm® features supported by the library, in order of introduction. */ val allFeatures = listOf( ArmFeature( @@ -59,20 +59,6 @@ object ArmFeaturesMapper { ) ) - /** - * Maps a LLamaTier to its supported ARM features. - * Returns a list of booleans where each index corresponds to allFeatures. - */ - fun getSupportedFeatures(tier: LLamaTier?): List? = - when (tier) { - LLamaTier.NONE, null -> null // No tier detected - LLamaTier.T0 -> listOf(true, false, false, false, false) // ASIMD only - LLamaTier.T1 -> listOf(true, true, false, false, false) // ASIMD + DOTPROD - LLamaTier.T2 -> listOf(true, true, true, false, false) // ASIMD + DOTPROD + I8MM - LLamaTier.T3 -> listOf(true, true, true, true, false) // ASIMD + DOTPROD + I8MM + SVE - // TODO-han.yin: implement T4 once obtaining an Android device with SME! - } - /** * Gets the feature support data for UI display. */ @@ -87,4 +73,18 @@ object ArmFeaturesMapper { } } } + + /** + * Maps a LLamaTier to its supported Arm® features. + * Returns a list of booleans where each index corresponds to allFeatures. + */ + private fun getSupportedFeatures(tier: LLamaTier?): List? = + when (tier) { + LLamaTier.NONE, null -> null // No tier detected + LLamaTier.T0 -> listOf(true, false, false, false, false) // ASIMD only + LLamaTier.T1 -> listOf(true, true, false, false, false) // ASIMD + DOTPROD + LLamaTier.T2 -> listOf(true, true, true, false, false) // ASIMD + DOTPROD + I8MM + LLamaTier.T3 -> listOf(true, true, true, true, false) // ASIMD + DOTPROD + I8MM + SVE + // TODO-han.yin: implement T4 once obtaining an Android device with SME! + } } diff --git a/examples/llama.android/llama/src/main/java/android/llama/cpp/TierDetection.kt b/examples/llama.android/llama/src/main/java/android/llama/cpp/TierDetection.kt index 6ea4ce8483..a617aa8331 100644 --- a/examples/llama.android/llama/src/main/java/android/llama/cpp/TierDetection.kt +++ b/examples/llama.android/llama/src/main/java/android/llama/cpp/TierDetection.kt @@ -13,7 +13,7 @@ interface TierDetection { * Higher tiers provide better performance on supported hardware. */ enum class LLamaTier(val rawValue: Int, val libraryName: String, val description: String) { - NONE(-404, "", "No valid Arm optimization available!"), + NONE(-404, "", "No valid Arm® optimization available!"), T0(0, "llama_android_t0", "ARMv8-a baseline with ASIMD"), T1(1, "llama_android_t1", "ARMv8.2-a with DotProd"), T2(2, "llama_android_t2", "ARMv8.6-a with DotProd + I8MM"),