diff --git a/.gitignore b/.gitignore index 206b0dac1..ac50b1485 100644 --- a/.gitignore +++ b/.gitignore @@ -351,4 +351,5 @@ site/ **/appsettings.Local.json /LLama/runtimes/deps /LLama/runtimes/deps.zip -/LLama/runtimes/release_id.txt \ No newline at end of file +/LLama/runtimes/release_id.txt +/Llama.Mobile/Resources/Raw/Llama-3.2-1B-Instruct-Q4_0.gguf diff --git a/LLamaSharp.sln b/LLamaSharp.sln index 7c970aa99..e18363591 100644 --- a/LLamaSharp.sln +++ b/LLamaSharp.sln @@ -21,6 +21,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LLama.Experimental", "LLama EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LLama.Benchmark", "LLama.Benchmark\LLama.Benchmark.csproj", "{90D38FEE-68EA-459E-A4EE-268B9DFA1CD5}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Llama.Mobile", "Llama.Mobile\Llama.Mobile.csproj", "{0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -196,6 +198,25 @@ Global {90D38FEE-68EA-459E-A4EE-268B9DFA1CD5}.Release|Arm64.Build.0 = Release|Any CPU {90D38FEE-68EA-459E-A4EE-268B9DFA1CD5}.Release|x64.ActiveCfg = Release|Any CPU {90D38FEE-68EA-459E-A4EE-268B9DFA1CD5}.Release|x64.Build.0 = Release|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.Debug|Any CPU.Deploy.0 = Debug|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.Debug|Arm64.ActiveCfg = Debug|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.Debug|Arm64.Build.0 = Debug|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.Debug|x64.ActiveCfg = Debug|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.Debug|x64.Build.0 = Debug|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.GPU|Any CPU.ActiveCfg = Debug|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.GPU|Any CPU.Build.0 = Debug|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.GPU|Arm64.ActiveCfg = Debug|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.GPU|Arm64.Build.0 = Debug|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.GPU|x64.ActiveCfg = Debug|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.GPU|x64.Build.0 = Debug|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.Release|Any CPU.Build.0 = Release|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.Release|Arm64.ActiveCfg = Release|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.Release|Arm64.Build.0 = Release|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.Release|x64.ActiveCfg = Release|Any CPU + {0E058BB0-83C6-4FBE-BC80-E8C5F7E29651}.Release|x64.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/Llama.Mobile/Llama.Mobile.csproj b/Llama.Mobile/Llama.Mobile.csproj index a51a3eb0f..450cbcf1c 100644 --- a/Llama.Mobile/Llama.Mobile.csproj +++ b/Llama.Mobile/Llama.Mobile.csproj @@ -13,7 +13,7 @@ net8.0-android - + @@ -51,7 +51,64 @@ 6.5 + + + + + + + + + $([System.IO.Path]::Combine($(DestinationFolder), $(LocalFileName))) + + + + + + + true + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + https://huggingface.co/bartowski/Llama-3.2-1B-Instruct-GGUF/resolve/main/Llama-3.2-1B-Instruct-Q4_0.gguf + Resources/Raw + Llama-3.2-1B-Instruct-Q4_0.gguf + + @@ -76,7 +133,7 @@ - + diff --git a/Llama.Mobile/MainPage.xaml b/Llama.Mobile/MainPage.xaml index 5bd8e7e94..c640229d0 100644 --- a/Llama.Mobile/MainPage.xaml +++ b/Llama.Mobile/MainPage.xaml @@ -1,14 +1,110 @@ - -