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.

llama.abstractions.imodelparams.md 2.7 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. # IModelParams
  2. Namespace: LLama.Abstractions
  3. The parameters for initializing a LLama model.
  4. ```csharp
  5. public interface IModelParams
  6. ```
  7. ## Properties
  8. ### **MainGpu**
  9. main_gpu interpretation depends on split_mode:
  10. NoneThe GPU that is used for the entire mode.RowThe GPU that is used for small tensors and intermediate results.LayerIgnored.
  11. ```csharp
  12. public abstract int MainGpu { get; set; }
  13. ```
  14. #### Property Value
  15. [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)<br>
  16. ### **SplitMode**
  17. How to split the model across multiple GPUs
  18. ```csharp
  19. public abstract GPUSplitMode SplitMode { get; }
  20. ```
  21. #### Property Value
  22. [GPUSplitMode](./llama.native.gpusplitmode.md)<br>
  23. ### **GpuLayerCount**
  24. Number of layers to run in VRAM / GPU memory (n_gpu_layers)
  25. ```csharp
  26. public abstract int GpuLayerCount { get; }
  27. ```
  28. #### Property Value
  29. [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)<br>
  30. ### **UseMemorymap**
  31. Use mmap for faster loads (use_mmap)
  32. ```csharp
  33. public abstract bool UseMemorymap { get; }
  34. ```
  35. #### Property Value
  36. [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)<br>
  37. ### **UseMemoryLock**
  38. Use mlock to keep model in memory (use_mlock)
  39. ```csharp
  40. public abstract bool UseMemoryLock { get; }
  41. ```
  42. #### Property Value
  43. [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)<br>
  44. ### **ModelPath**
  45. Model path (model)
  46. ```csharp
  47. public abstract string ModelPath { get; }
  48. ```
  49. #### Property Value
  50. [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  51. ### **TensorSplits**
  52. how split tensors should be distributed across GPUs
  53. ```csharp
  54. public abstract TensorSplitsCollection TensorSplits { get; }
  55. ```
  56. #### Property Value
  57. [TensorSplitsCollection](./llama.abstractions.tensorsplitscollection.md)<br>
  58. ### **VocabOnly**
  59. Load vocab only (no weights)
  60. ```csharp
  61. public abstract bool VocabOnly { get; }
  62. ```
  63. #### Property Value
  64. [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)<br>
  65. ### **LoraAdapters**
  66. List of LoRA adapters to apply
  67. ```csharp
  68. public abstract AdapterCollection LoraAdapters { get; }
  69. ```
  70. #### Property Value
  71. [AdapterCollection](./llama.abstractions.adaptercollection.md)<br>
  72. ### **LoraBase**
  73. base model path for the lora adapter (lora_base)
  74. ```csharp
  75. public abstract string LoraBase { get; }
  76. ```
  77. #### Property Value
  78. [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  79. ### **MetadataOverrides**
  80. Override specific metadata items in the model
  81. ```csharp
  82. public abstract List<MetadataOverride> MetadataOverrides { get; }
  83. ```
  84. #### Property Value
  85. [List&lt;MetadataOverride&gt;](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.list-1)<br>