Skip to content

Commit c720b8f

Browse files
authored
[GPTQ] fix imports of moved add ons (#44)
* fixing import for gptq functionalities Signed-off-by: Yannick Schnider <[email protected]> * fix formatting Signed-off-by: Yannick Schnider <[email protected]> * warning gptq not working on CPU Signed-off-by: Yannick Schnider <[email protected]> * removing unused aiu-fms package Signed-off-by: Yannick Schnider <[email protected]> * format fixing Signed-off-by: Yannick Schnider <[email protected]> * adding fms-mo as dependency Signed-off-by: Yannick Schnider <[email protected]> * dont specify version Signed-off-by: Yannick Schnider <[email protected]> * removing fms-mo in requirements Signed-off-by: Yannick Schnider <[email protected]> --------- Signed-off-by: Yannick Schnider <[email protected]>
1 parent ef76ebe commit c720b8f

File tree

1 file changed

+4
-10
lines changed
  • vllm_spyre/model_executor/model_loader

1 file changed

+4
-10
lines changed

vllm_spyre/model_executor/model_loader/spyre.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Utilities for selecting and loading Spyre models."""
22
import os
3-
import sys
43
from typing import Optional
54

65
import torch
@@ -121,19 +120,14 @@ def load_weights(self, model_config: ModelConfig, max_prompt_length: int,
121120
model_config.dtype, self.dtype)
122121

123122
if model_config.quantization == "gptq":
124-
125-
# note, we have to find a better way to package this
126-
# shouldn't it be part of FMS?
127-
sys.path.append("/home/senuser/aiu-fms")
128-
129123
if envs_spyre.VLLM_SPYRE_DYNAMO_BACKEND == "sendnn_decoder":
130-
from aiu_as_addon import aiu_adapter, aiu_linear # noqa: F401
124+
from fms_mo.aiu_addons.gptq import ( # noqa: F401
125+
gptq_aiu_adapter, gptq_aiu_linear)
131126
linear_type = "gptq_aiu"
132-
logger.info("Loaded `aiu_as_addon` functionalities")
127+
logger.info("Loaded `aiu_addons` functionalities")
133128
else:
134-
from cpu_addon import cpu_linear # noqa: F401
135129
linear_type = "gptq_cpu"
136-
logger.info("Loaded `cpu_addon` functionalities")
130+
logger.warning("GPTQ is not expected to work on CPU.")
137131

138132
quant_cfg = model_config._parse_quant_hf_config()
139133

0 commit comments

Comments
 (0)