You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

BasicTest.cs 746 B

12345678910111213141516171819202122232425262728293031
  1. using System.Text;
  2. using LLama.Common;
  3. namespace LLama.Unittest
  4. {
  5. public class BasicTest
  6. : IDisposable
  7. {
  8. private readonly ModelParams _params;
  9. private readonly LLamaWeights _model;
  10. public BasicTest()
  11. {
  12. _params = new ModelParams("Models/llama-2-7b-chat.ggmlv3.q3_K_S.bin", contextSize: 2048);
  13. _model = LLamaWeights.LoadFromFile(_params);
  14. }
  15. public void Dispose()
  16. {
  17. _model.Dispose();
  18. }
  19. [Fact]
  20. public void BasicModelProperties()
  21. {
  22. Assert.Equal(32000, _model.VocabCount);
  23. Assert.Equal(2048, _model.ContextSize);
  24. Assert.Equal(4096, _model.EmbeddingSize);
  25. }
  26. }
  27. }