Skip to content

Commit

Permalink
add quant support for qbits
Browse files Browse the repository at this point in the history
  • Loading branch information
CSY-ModelCloud committed Jul 5, 2024
1 parent 61191d5 commit e838217
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions gptqmodel/quantization/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class FORMAT:
GPTQ_V2 = "gptq_v2"
MARLIN = "marlin"
BITBLAS = "bitblas"
QBITS = "qbits"


# quant methods
Expand All @@ -53,6 +54,7 @@ class QUANT_METHOD:
FORMAT.GPTQ_V2,
FORMAT.MARLIN,
FORMAT.BITBLAS,
FORMAT.QBITS,
},
}

Expand Down
2 changes: 2 additions & 0 deletions gptqmodel/utils/importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@
Backend.EXLLAMA: ExllamaQuantLinear,
Backend.TRITON: TritonV2QuantLinear,
Backend.BITBLAS: BitBLASQuantLinear,
Backend.QBITS: QBitsQuantLinear,
})

format_dict = {
FORMAT.GPTQ: [Backend.EXLLAMA_V2, Backend.EXLLAMA],
FORMAT.GPTQ_V2: [Backend.EXLLAMA_V2, Backend.EXLLAMA],
FORMAT.MARLIN: [Backend.MARLIN],
FORMAT.BITBLAS: [Backend.BITBLAS],
FORMAT.QBITS: [Backend.QBITS],
}

logger = getLogger(__name__)
Expand Down

0 comments on commit e838217

Please sign in to comment.