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

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