make round-to-grid with refinement the default, add --learned for learned rounding
On Qwen2.5-0.5B, learned rounding matched round-to-grid in perplexity and KL (22.38 vs 22.37, 0.0920 vs 0.0919) at about six times the quantize time. --simple is still accepted as a no-op. Docs and man pages updated. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
164fa6b4a4
commit
1e50e4e045
16 files changed
+76
-39
No files matched your search
+2
-1
@@ -20,6 +20,7 @@ import numpy as np
|
||||
|
||||
from nvfp4gguf import (
|
||||
CTQ_NUM_ITER,
|
||||
add_rounding_arguments,
|
||||
DEFAULT_CONVERT_TO_QUANT,
|
||||
DEFAULT_LLAMA_CPP,
|
||||
DEFAULT_EARLY_STOP_FLOOR_STALL,
|
||||
@@ -1046,7 +1047,7 @@ def parse_args(argv: list[str] | None = None) -> argparse.Namespace:
|
||||
help="convert_to_quant checkout, if it is not installed in the environment")
|
||||
parser.add_argument("--model-name", default=None, help="Override the model name stored in the GGUF")
|
||||
parser.add_argument("--device", default="auto", help="auto, cpu, cuda, or cuda:N")
|
||||
parser.add_argument("--simple", action="store_true", help="Round each value onto the E2M1 grid without learned rounding")
|
||||
add_rounding_arguments(parser)
|
||||
parser.add_argument("--optimizer", default="auto", choices=("auto", "prodigy", "adamw", "radam", "original"),
|
||||
help="Learned-rounding optimizer. auto uses prodigy when it is installed, otherwise AdamW")
|
||||
parser.add_argument("--num-iter", type=int, default=CTQ_NUM_ITER, help="Learned-rounding iterations per matrix (convert_to_quant default: 4000)")
|
||||
|
||||
Reference in new issue
Block a user