# 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)
The model file to be quantized.
`dstFilename` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
The path to save the quantized model.
`ftype` [LLamaFtype](./llama.native.llamaftype.md)
The type of quantization.
`nthread` [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
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)
`quantizeOutputTensor` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
#### Returns
[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
Whether the quantization is successful.
#### Exceptions
[ArgumentException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentexception)
### **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)
The model file to be quantized.
`dstFilename` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
The path to save the quantized model.
`ftype` [String](https://docs.microsoft.com/en-us/dotnet/api/system.string)
The type of quantization.
`nthread` [Int32](https://docs.microsoft.com/en-us/dotnet/api/system.int32)
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)
`quantizeOutputTensor` [Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
#### Returns
[Boolean](https://docs.microsoft.com/en-us/dotnet/api/system.boolean)
Whether the quantization is successful.
#### Exceptions
[ArgumentException](https://docs.microsoft.com/en-us/dotnet/api/system.argumentexception)