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.

LlamaSharpConfig.cs 1.4 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using LLama.Common;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace LLamaSharp.KernelMemory
  8. {
  9. /// <summary>
  10. /// Represents the configuration for LLamaSharp. Available properties are `ModelPath`, `ContextSize`, `Seed`, `GpuLayerCount`.
  11. /// </summary>
  12. public class LLamaSharpConfig
  13. {
  14. /// <summary>
  15. /// Initializes a new instance of the <see cref="LLamaSharpConfig"/> class.
  16. /// </summary>
  17. /// <param name="modelPath">The path to the model file.</param>
  18. public LLamaSharpConfig(string modelPath)
  19. {
  20. ModelPath = modelPath;
  21. }
  22. /// <summary>
  23. /// Gets or sets the path to the model file.
  24. /// </summary>
  25. public string ModelPath { get; set; }
  26. /// <summary>
  27. /// Gets or sets the size of the context.
  28. /// </summary>
  29. public uint? ContextSize { get; set; }
  30. /// <summary>
  31. /// Gets or sets the seed value.
  32. /// </summary>
  33. public uint? Seed { get; set; }
  34. /// <summary>
  35. /// Gets or sets the number of GPU layers.
  36. /// </summary>
  37. public int? GpuLayerCount { get; set; }
  38. /// <summary>
  39. /// Set the default inference parameters.
  40. /// </summary>
  41. public InferenceParams? DefaultInferenceParams { get; set; }
  42. }
  43. }