Merge test changes from @martindevans

The poc of the test is working know. Finally the problem error seems to be related with the process stopping.
Once I changed the context with today llama.cpp binaries is working OK
This commit is contained in:
SignalRT 2023-08-05 14:37:03 +02:00
parent 348f2c7d72
commit 528a7aafcb
3 changed files with 23 additions and 3 deletions

1
.gitignore vendored
View File

@ -342,3 +342,4 @@ test/TensorFlowNET.Examples/mnist
# docs
site/
*.bin

View File

@ -1,11 +1,15 @@
using LLama;
using LLama.Common;
namespace LLama.Unittest
{
public class BasicTest
{
[Fact]
public void SimpleQA()
public void LoadModel()
{
var model = new LLamaModel(new ModelParams("Models/llama-2-7b-chat.ggmlv3.q3_K_S.bin", contextSize: 256));
model.Dispose();
}
}
}

View File

@ -27,4 +27,19 @@
<ProjectReference Include="..\LLama\LLamaSharp.csproj" />
</ItemGroup>
<Target Name="DownloadContentFiles" BeforeTargets="Build">
<DownloadFile SourceUrl="https://huggingface.co/TheBloke/Llama-2-7B-Chat-GGML/resolve/main/llama-2-7b-chat.ggmlv3.q3_K_S.bin" DestinationFolder="Models" DestinationFileName="llama-2-7b-chat.ggmlv3.q3_K_S.bin" SkipUnchangedFiles="true">
</DownloadFile>
</Target>
<ItemGroup>
<Folder Include="Models\" />
</ItemGroup>
<ItemGroup>
<None Update="Models\llama-2-7b-chat.ggmlv3.q3_K_S.bin">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>