mirror of
https://github.com/FlashML-org/FreeToken.git
synced 2026-11-21 01:52:30 +08:00
* feat(quant)!: compress bf16 weights to df11 at load with --online-quant GLM-4.7 no longer hardwires DF11 attention and embedding; it serves them bf16 unless --online-quant df11 is passed, and FTW files converted with the old DF11 tensors must be reconverted. * fix(quant): skip layers --online-quant cannot convert instead of failing
57 lines
2.2 KiB
Python
57 lines
2.2 KiB
Python
from .scheme import GroupShape, QuantKind, QuantScheme, WeightDesc
|
|
from .registry import LayerKind, dialects, method_class, methods_for, online_kinds, register_dialect, register_method
|
|
from .method import KernelSelectionError, QuantMethod, finalize_quant, select_kernel
|
|
from .embedding import EmbeddingConfig, EmbeddingKernel, EmbeddingMethod, GGUFEmbeddingMethod, UnquantizedEmbeddingMethod
|
|
from .linear import (
|
|
Fp8BlockLinearMethod,
|
|
Fp8TensorLinearMethod,
|
|
LinearConfig,
|
|
LinearKernel,
|
|
LinearMethod,
|
|
Mxfp8LinearMethod,
|
|
Nvfp4LinearMethod,
|
|
UnquantizedLinearMethod,
|
|
)
|
|
from .moe import (
|
|
BankSpec,
|
|
ExpertView,
|
|
Fp8BlockMoEMethod,
|
|
MoEConfig,
|
|
MoEKernel,
|
|
MoEMethod,
|
|
Mxfp4MoEMethod,
|
|
Mxfp8MoEMethod,
|
|
Nvfp4MoEMethod,
|
|
UnquantizedMoEMethod,
|
|
)
|
|
from .quant_backend import QuantBackend, get_quant_backend, set_quant_backend
|
|
from .names import NameMap
|
|
from .configs import (
|
|
CompressedTensorsConfig,
|
|
Fp8BlockConfig,
|
|
GGUFConfig,
|
|
ModelOptConfig,
|
|
Mxfp4Config,
|
|
NoQuantConfig,
|
|
QuantConfig,
|
|
get_quant_config,
|
|
quant_method_for,
|
|
quantization_config_of,
|
|
set_quant_config,
|
|
without_online,
|
|
)
|
|
|
|
__all__ = [
|
|
"QuantKind", "GroupShape", "QuantScheme", "WeightDesc",
|
|
"LayerKind", "dialects", "method_class", "methods_for", "online_kinds", "register_dialect", "register_method",
|
|
"KernelSelectionError", "select_kernel", "QuantMethod",
|
|
"EmbeddingConfig", "EmbeddingKernel", "EmbeddingMethod", "UnquantizedEmbeddingMethod", "GGUFEmbeddingMethod",
|
|
"LinearConfig", "LinearKernel", "LinearMethod",
|
|
"UnquantizedLinearMethod", "Fp8TensorLinearMethod", "Fp8BlockLinearMethod", "Mxfp8LinearMethod", "Nvfp4LinearMethod",
|
|
"BankSpec", "ExpertView", "MoEConfig", "MoEKernel", "MoEMethod",
|
|
"UnquantizedMoEMethod", "Fp8BlockMoEMethod", "Nvfp4MoEMethod", "Mxfp4MoEMethod", "Mxfp8MoEMethod",
|
|
"QuantBackend", "set_quant_backend", "get_quant_backend", "NameMap",
|
|
"QuantConfig", "NoQuantConfig", "ModelOptConfig", "CompressedTensorsConfig", "Fp8BlockConfig", "GGUFConfig", "Mxfp4Config",
|
|
"quant_method_for", "without_online", "quantization_config_of", "set_quant_config", "get_quant_config", "finalize_quant",
|
|
]
|