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.resettablellamamodel.md 2.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. # ResettableLLamaModel
  2. Namespace: LLama
  3. A LLamaModel what could be reset. Note that using this class will consume about 10% more memories.
  4. ```csharp
  5. public class ResettableLLamaModel : LLamaModel, System.IDisposable
  6. ```
  7. Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [LLamaModel](./llama.llamamodel.md) → [ResettableLLamaModel](./llama.resettablellamamodel.md)<br>
  8. Implements [IDisposable](https://docs.microsoft.com/en-us/dotnet/api/system.idisposable)
  9. ## Properties
  10. ### **OriginalState**
  11. The initial state of the model
  12. ```csharp
  13. public Byte[] OriginalState { get; set; }
  14. ```
  15. #### Property Value
  16. [Byte[]](https://docs.microsoft.com/en-us/dotnet/api/system.byte)<br>
  17. ### **ContextSize**
  18. The context size.
  19. ```csharp
  20. public int ContextSize { get; }
  21. ```
  22. #### Property Value
  23. [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)<br>
  24. ### **Params**
  25. The model params set for this model.
  26. ```csharp
  27. public ModelParams Params { get; set; }
  28. ```
  29. #### Property Value
  30. [ModelParams](./llama.common.modelparams.md)<br>
  31. ### **NativeHandle**
  32. The native handle, which is used to be passed to the native APIs. Please avoid using it
  33. unless you know what is the usage of the Native API.
  34. ```csharp
  35. public SafeLLamaContextHandle NativeHandle { get; }
  36. ```
  37. #### Property Value
  38. [SafeLLamaContextHandle](./llama.native.safellamacontexthandle.md)<br>
  39. ### **Encoding**
  40. The encoding set for this model to deal with text input.
  41. ```csharp
  42. public Encoding Encoding { get; }
  43. ```
  44. #### Property Value
  45. [Encoding](https://docs.microsoft.com/en-us/dotnet/api/system.text.encoding)<br>
  46. ## Constructors
  47. ### **ResettableLLamaModel(ModelParams, String)**
  48. ```csharp
  49. public ResettableLLamaModel(ModelParams Params, string encoding)
  50. ```
  51. #### Parameters
  52. `Params` [ModelParams](./llama.common.modelparams.md)<br>
  53. `encoding` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  54. ## Methods
  55. ### **Reset()**
  56. Reset the state to the initial state.
  57. ```csharp
  58. public void Reset()
  59. ```