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.

QuantizeModel.cs 741 B

12345678910111213141516171819202122232425
  1. namespace LLama.Examples.Examples
  2. {
  3. public class QuantizeModel
  4. {
  5. public static void Run()
  6. {
  7. string inputPath = UserSettings.GetModelPath();
  8. Console.Write("Please input your output model path: ");
  9. var outputPath = Console.ReadLine();
  10. Console.Write("Please input the quantize type (one of q4_0, q4_1, q5_0, q5_1, q8_0): ");
  11. var quantizeType = Console.ReadLine();
  12. if (LLamaQuantizer.Quantize(inputPath, outputPath, quantizeType))
  13. {
  14. Console.WriteLine("Quantization succeeded!");
  15. }
  16. else
  17. {
  18. Console.WriteLine("Quantization failed!");
  19. }
  20. }
  21. }
  22. }