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.illamaexecutor.md 1.6 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # ILLamaExecutor
  2. Namespace: LLama.Abstractions
  3. A high level interface for LLama models.
  4. ```csharp
  5. public interface ILLamaExecutor
  6. ```
  7. ## Properties
  8. ### **Model**
  9. The loaded model for this executor.
  10. ```csharp
  11. public abstract LLamaModel Model { get; }
  12. ```
  13. #### Property Value
  14. [LLamaModel](./llama.llamamodel.md)<br>
  15. ## Methods
  16. ### **Infer(String, InferenceParams, CancellationToken)**
  17. Infers a response from the model.
  18. ```csharp
  19. IEnumerable<string> Infer(string text, InferenceParams inferenceParams, CancellationToken token)
  20. ```
  21. #### Parameters
  22. `text` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  23. Your prompt
  24. `inferenceParams` [InferenceParams](./llama.common.inferenceparams.md)<br>
  25. Any additional parameters
  26. `token` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)<br>
  27. A cancellation token.
  28. #### Returns
  29. [IEnumerable&lt;String&gt;](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.ienumerable-1)<br>
  30. ### **InferAsync(String, InferenceParams, CancellationToken)**
  31. ```csharp
  32. IAsyncEnumerable<string> InferAsync(string text, InferenceParams inferenceParams, CancellationToken token)
  33. ```
  34. #### Parameters
  35. `text` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
  36. `inferenceParams` [InferenceParams](./llama.common.inferenceparams.md)<br>
  37. `token` [CancellationToken](https://docs.microsoft.com/en-us/dotnet/api/system.threading.cancellationtoken)<br>
  38. #### Returns
  39. [IAsyncEnumerable&lt;String&gt;](https://docs.microsoft.com/en-us/dotnet/api/system.collections.generic.iasyncenumerable-1)<br>

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