mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
Change GPTQ triton default settings
This commit is contained in:
parent
e03b873460
commit
7438f4f6ba
@ -230,9 +230,9 @@ Optionally, you can use the following command-line flags:
|
||||
| `--groupsize GROUPSIZE` | Group size. |
|
||||
| `--pre_layer PRE_LAYER` | The number of layers to allocate to the GPU. Setting this parameter enables CPU offloading for 4-bit models. |
|
||||
| `--monkey-patch` | Apply the monkey patch for using LoRAs with quantized models.
|
||||
| `--no-quant_attn` | (triton) Disable quant attention. If you encounter incoherent results try disabling this.
|
||||
| `--no-warmup_autotune` | (triton) Disable warmup autotune.
|
||||
| `--no-fused_mlp` | (triton) Disable fused mlp. If you encounter "Unexpected mma -> mma layout conversion" try disabling this.
|
||||
| `--quant_attn` | (triton) Enable quant attention.
|
||||
| `--warmup_autotune` | (triton) Enable warmup autotune.
|
||||
| `--fused_mlp` | (triton) Enable fused mlp.
|
||||
|
||||
#### FlexGen
|
||||
|
||||
|
@ -79,14 +79,14 @@ def _load_quant(model, checkpoint, wbits, groupsize=-1, faster_kernel=False, exc
|
||||
model.load_state_dict(torch.load(checkpoint), strict=False)
|
||||
|
||||
if is_triton:
|
||||
if not shared.args.no_quant_attn:
|
||||
if shared.args.quant_attn:
|
||||
quant.make_quant_attn(model)
|
||||
if eval and not shared.args.no_fused_mlp:
|
||||
if eval and shared.args.fused_mlp:
|
||||
quant.make_fused_mlp(model)
|
||||
|
||||
if not shared.args.no_warmup_autotune:
|
||||
if shared.args.warmup_autotune:
|
||||
quant.autotune_warmup_linear(model, transpose=not eval)
|
||||
if eval and not shared.args.no_fused_mlp:
|
||||
if eval and shared.args.fused_mlp:
|
||||
quant.autotune_warmup_fused(model)
|
||||
|
||||
model.seqlen = 2048
|
||||
|
@ -124,9 +124,9 @@ parser.add_argument('--model_type', type=str, help='Model type of pre-quantized
|
||||
parser.add_argument('--groupsize', type=int, default=-1, help='Group size.')
|
||||
parser.add_argument('--pre_layer', type=int, default=0, help='The number of layers to allocate to the GPU. Setting this parameter enables CPU offloading for 4-bit models.')
|
||||
parser.add_argument('--monkey-patch', action='store_true', help='Apply the monkey patch for using LoRAs with quantized models.')
|
||||
parser.add_argument('--no-quant_attn', action='store_true', help='(triton) Disable quant attention. If you encounter incoherent results try disabling this.')
|
||||
parser.add_argument('--no-warmup_autotune', action='store_true', help='(triton) Disable warmup autotune.')
|
||||
parser.add_argument('--no-fused_mlp', action='store_true', help='(triton) Disable fused mlp. If you encounter "Unexpected mma -> mma layout conversion" try disabling this.')
|
||||
parser.add_argument('--quant_attn', action='store_true', help='(triton) Enable quant attention.')
|
||||
parser.add_argument('--warmup_autotune', action='store_true', help='(triton) Enable warmup autotune.')
|
||||
parser.add_argument('--fused_mlp', action='store_true', help='(triton) Enable fused mlp.')
|
||||
|
||||
# FlexGen
|
||||
parser.add_argument('--flexgen', action='store_true', help='Enable the use of FlexGen offloading.')
|
||||
|
Loading…
Reference in New Issue
Block a user