Browse Source

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
tags/v0.4.2-preview
SignalRT 2 years ago
parent
commit
528a7aafcb
3 changed files with 23 additions and 3 deletions
  1. +2
    -1
      .gitignore
  2. +6
    -2
      LLama.Unittest/BasicTest.cs
  3. +15
    -0
      LLama.Unittest/LLama.Unittest.csproj

+ 2
- 1
.gitignore View File

@@ -341,4 +341,5 @@ test/TensorFlowNET.Examples/mnist
*.xsd

# docs
site/
site/
*.bin

+ 6
- 2
LLama.Unittest/BasicTest.cs 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();
}
}
}

+ 15
- 0
LLama.Unittest/LLama.Unittest.csproj 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>

Loading…
Cancel
Save