|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- # LLamaQuantizer
-
- Namespace: LLama
-
- The quantizer to quantize the model.
-
- ```csharp
- public static class LLamaQuantizer
- ```
-
- Inheritance [Object](https://docs.microsoft.com/en-us/dotnet/api/system.object) → [LLamaQuantizer](./llama.llamaquantizer.md)
-
- ## Methods
-
- ### **Quantize(String, String, LLamaFtype, Int32, Boolean, Boolean)**
-
- Quantize the model.
-
- ```csharp
- public static bool Quantize(string srcFileName, string dstFilename, LLamaFtype ftype, int nthread, bool allowRequantize, bool quantizeOutputTensor)
- ```
-
- #### Parameters
-
- `srcFileName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
- The model file to be quantized.
-
- `dstFilename` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
- The path to save the quantized model.
-
- `ftype` [LLamaFtype](./llama.native.llamaftype.md)<br>
- The type of quantization.
-
- `nthread` [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)<br>
- Thread to be used during the quantization. By default it's the physical core number.
-
- `allowRequantize` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)<br>
-
- `quantizeOutputTensor` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)<br>
-
- #### Returns
-
- [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)<br>
- Whether the quantization is successful.
-
- #### Exceptions
-
- [ArgumentException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentexception)<br>
-
- ### **Quantize(String, String, String, Int32, Boolean, Boolean)**
-
- Quantize the model.
-
- ```csharp
- public static bool Quantize(string srcFileName, string dstFilename, string ftype, int nthread, bool allowRequantize, bool quantizeOutputTensor)
- ```
-
- #### Parameters
-
- `srcFileName` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
- The model file to be quantized.
-
- `dstFilename` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
- The path to save the quantized model.
-
- `ftype` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)<br>
- The type of quantization.
-
- `nthread` [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)<br>
- Thread to be used during the quantization. By default it's the physical core number.
-
- `allowRequantize` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)<br>
-
- `quantizeOutputTensor` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)<br>
-
- #### Returns
-
- [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)<br>
- Whether the quantization is successful.
-
- #### Exceptions
-
- [ArgumentException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentexception)<br>
|