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.native.llamacontextparams.md 1.4 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. # LLamaContextParams
  2. Namespace: LLama.Native
  3. ```csharp
  4. public struct LLamaContextParams
  5. ```
  6. Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [ValueType](https://docs.microsoft.com/en-us/dotnet/api/system.valuetype) → [LLamaContextParams](./llama.native.llamacontextparams.md)
  7. ## Fields
  8. ### **n_ctx**
  9. text context
  10. ```csharp
  11. public int n_ctx;
  12. ```
  13. ### **n_gpu_layers**
  14. number of layers to store in VRAM
  15. ```csharp
  16. public int n_gpu_layers;
  17. ```
  18. ### **seed**
  19. RNG seed, -1 for random
  20. ```csharp
  21. public int seed;
  22. ```
  23. ### **f16_kv**
  24. use fp16 for KV cache
  25. ```csharp
  26. public bool f16_kv;
  27. ```
  28. ### **logits_all**
  29. the llama_eval() call computes all logits, not just the last one
  30. ```csharp
  31. public bool logits_all;
  32. ```
  33. ### **vocab_only**
  34. only load the vocabulary, no weights
  35. ```csharp
  36. public bool vocab_only;
  37. ```
  38. ### **use_mmap**
  39. use mmap if possible
  40. ```csharp
  41. public bool use_mmap;
  42. ```
  43. ### **use_mlock**
  44. force system to keep model in RAM
  45. ```csharp
  46. public bool use_mlock;
  47. ```
  48. ### **embedding**
  49. embedding mode only
  50. ```csharp
  51. public bool embedding;
  52. ```
  53. ### **progress_callback**
  54. called with a progress value between 0 and 1, pass NULL to disable
  55. ```csharp
  56. public IntPtr progress_callback;
  57. ```
  58. ### **progress_callback_user_data**
  59. context pointer passed to the progress callback
  60. ```csharp
  61. public IntPtr progress_callback_user_data;
  62. ```

C#/.NET上易用的LLM高性能推理框架,支持LLaMA和LLaVA系列模型。