vllm_gaudi.ops.hpu_modelopt
¶
HPUModelOptFp8Config
¶
Bases: ModelOptFp8Config
Config class for ModelOpt FP8.
Source code in vllm_gaudi/ops/hpu_modelopt.py
__init__
¶
__init__(
quant_method: str,
is_checkpoint_fp8_serialized: bool,
kv_cache_quant_method: str | None,
exclude_modules: list[str],
) -> None
Source code in vllm_gaudi/ops/hpu_modelopt.py
get_quant_method
¶
Source code in vllm_gaudi/ops/hpu_modelopt.py
HPUModelOptFp8LinearMethod
¶
Bases: LinearMethodBase
Linear method for Model Optimizer static quantization on Gaudi. Supports loading FP8 checkpoints with static weight scale and activation scale. Future support might be added for dynamic scales.
Limitations: 1. Only support per-tensor quantization due to torch._scaled_mm support. 2. Only support float8_e4m3fn datatype Args: quant_config: The ModelOpt quantization config.
Source code in vllm_gaudi/ops/hpu_modelopt.py
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | |
__init__
¶
apply
¶
Source code in vllm_gaudi/ops/hpu_modelopt.py
create_weights
¶
create_weights(
layer: Module,
input_size_per_partition: int,
output_partition_sizes: list[int],
input_size: int,
output_size: int,
params_dtype: dtype,
**extra_weight_attrs,
)
Source code in vllm_gaudi/ops/hpu_modelopt.py
process_weights_after_loading
¶
process_weights_after_loading(layer: Module) -> None