Skip to content

Commit 08afd3d

Browse files
committed
Removed CB architecture support check
Signed-off-by: Rishin Raj <[email protected]>
1 parent d6f2a1a commit 08afd3d

File tree

3 files changed

+0
-34
lines changed

3 files changed

+0
-34
lines changed

QEfficient/exporter/export_hf_to_cloud_ai_100.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
from QEfficient.base.common import AUTO_MODEL_MAP_TO_MODEL_TYPE_MAP, QEFF_MODEL_TYPE, QEFFCommonLoader
1717
from QEfficient.base.modeling_qeff import QEFFBaseModel
1818
from QEfficient.exporter.export_utils import export_onnx, fix_onnx_fp16, generate_input_files, run_model_on_ort
19-
from QEfficient.transformers.modeling_utils import get_lists_of_cb_qeff_models
2019
from QEfficient.transformers.models.modeling_auto import QEFFAutoModelForCausalLM
2120
from QEfficient.utils import load_hf_tokenizer
2221
from QEfficient.utils.constants import QEFF_MODELS_DIR, Constants
@@ -316,13 +315,6 @@ def export_for_cloud(
316315
seq_length: int = Constants.SEQ_LEN,
317316
full_batch_size: Optional[int] = None,
318317
) -> str:
319-
# Check if model architecture is supported for continuous batching.
320-
if full_batch_size and qeff_model.model.config.architectures[0].lower() not in {
321-
x.lower() for x in get_lists_of_cb_qeff_models.architectures
322-
}:
323-
raise NotImplementedError(
324-
f"Continuous batching is not supported for {qeff_model.model.config.architectures[0]}"
325-
)
326318

327319
# FIXME: move all this to class instead of here, and just call qeff_model.export here.
328320
if AUTO_MODEL_MAP_TO_MODEL_TYPE_MAP.get(qeff_model.__class__, None) == QEFF_MODEL_TYPE.CAUSALLM: # type: ignore

QEfficient/transformers/modeling_utils.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -137,25 +137,6 @@
137137
# Required for the Automation tool
138138
ModelArchitectures = namedtuple("ModelArchitectures", ["architectures"])
139139

140-
get_lists_of_cb_qeff_models = ModelArchitectures(
141-
[
142-
LlamaForCausalLM.__name__,
143-
GemmaForCausalLM.__name__,
144-
Gemma2ForCausalLM.__name__,
145-
MistralForCausalLM.__name__,
146-
MixtralForCausalLM.__name__,
147-
Starcoder2ForCausalLM.__name__,
148-
Qwen2ForCausalLM.__name__,
149-
Phi3ForCausalLM.__name__,
150-
PhiForCausalLM.__name__,
151-
CodeGenForCausalLM.__name__,
152-
GPT2LMHeadModel.__name__,
153-
GPTJForCausalLM.__name__,
154-
MptForCausalLM.__name__,
155-
FalconForCausalLM.__name__,
156-
GPTBigCodeForCausalLM.__name__,
157-
]
158-
)
159140
# Create an instance of the named tuple
160141
qeff_supported_architectures = ModelArchitectures(
161142
[

tests/cloud/conftest.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
import pytest
1313

14-
from QEfficient.transformers.modeling_utils import get_lists_of_cb_qeff_models
1514
from QEfficient.utils import get_onnx_dir_name
1615
from QEfficient.utils.constants import QEFF_MODELS_DIR
1716
from QEfficient.utils.logging_utils import logger
@@ -271,12 +270,6 @@ def pytest_collection_modifyitems(config, items):
271270
if item.module.__name__ in ["test_export", "test_compile", "test_execute", "test_infer"]:
272271
if hasattr(item, "callspec"):
273272
params = item.callspec.params
274-
model_class = model_class_dict[params["model_name"]]
275-
if (
276-
params["full_batch_size"] is not None
277-
and model_class not in get_lists_of_cb_qeff_models.architectures
278-
):
279-
item.add_marker(pytest.mark.skip(reason="Skipping because FULL BATCH SIZE does not support..."))
280273

281274
if item.module.__name__ in ["test_export", "test_compile", "test_execute"]:
282275
if hasattr(item, "callspec"):

0 commit comments

Comments
 (0)