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 774 B

12345678910111213141516171819202122232425262728293031323334
  1. using System.Text;
  2. using LLama.Common;
  3. namespace LLama.Unittest
  4. {
  5. public sealed class BasicTest
  6. : IDisposable
  7. {
  8. private readonly ModelParams _params;
  9. private readonly LLamaWeights _model;
  10. public BasicTest()
  11. {
  12. _params = new ModelParams(Constants.ModelPath)
  13. {
  14. ContextSize = 2048
  15. };
  16. _model = LLamaWeights.LoadFromFile(_params);
  17. }
  18. public void Dispose()
  19. {
  20. _model.Dispose();
  21. }
  22. [Fact]
  23. public void BasicModelProperties()
  24. {
  25. Assert.Equal(32000, _model.VocabCount);
  26. Assert.Equal(4096, _model.ContextSize);
  27. Assert.Equal(4096, _model.EmbeddingSize);
  28. }
  29. }
  30. }