Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions QEfficient/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
ONNX_EXPORT_EXAMPLE_SEQ_LEN = 32
ONNX_EXPORT_EXAMPLE_FBS = 4
ONNX_EXPORT_EXAMPLE_NLK = 2 # Number of Logits to Keep
ONNX_EXPORT_OPSET = 13
ONNX_EXPORT_OPSET = 17
ONNX_EXPORT_MAX_NUM_IMAGES = 1
ONNX_EXPORT_MAX_IMAGE_TILES = 4
ONNX_EXPORT_IMAGE_WIDTH = 560
Expand Down Expand Up @@ -84,7 +84,7 @@ def get_models_dir():
ONNX_EXPORT_EXAMPLE_MAX_TOP_K_IDS = 512
ONNX_EXPORT_EXAMPLE_TOP_PS = 0.80
ONNX_EXPORT_EXAMPLE_MIN_PS = 0.99
ONNX_EXPORT_OPSET = 13
ONNX_EXPORT_OPSET = 17

COMPILER = ["/opt/qti-aic/exec/qaic-exec", "-aic-hw"]
DEFAULT_AIC_HW_VERSION = "ai100"
Expand Down
35 changes: 0 additions & 35 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,46 +5,11 @@
#
# -----------------------------------------------------------------------------

import json
import os
import shutil

import pytest
from transformers import AutoConfig

from QEfficient.utils.constants import QEFF_MODELS_DIR
from QEfficient.utils.logging_utils import logger
from QEfficient.utils.test_utils import ModelConfig


def get_custom_model_config_dict(configs):
"""
Converts a list of custom model configuration dictionaries into a dictionary
mapping model names to their corresponding AutoConfig objects.

Args:
configs (List[Dict]): A list of dictionaries, each containing model configuration parameters.

Returns:
Dict[str, AutoConfig]: A dictionary where keys are model names and values are AutoConfig objects.
"""
config_dict = {}
for config in configs:
model_name = config["model_name"]
config_dict[model_name] = AutoConfig.from_pretrained(
model_name,
trust_remote_code=config["model_name"] in ModelConfig.EXTERNAL_MODELS,
**config.get("additional_params", {}),
)
return config_dict


# Pytest fixture to load custom model configs from a JSON file
@pytest.fixture(scope="session")
def custom_causal_model_config_dict():
with open("tests/transformers/models/custom_tiny_model_configs.json", "r") as f:
custom_model_configs_data = json.load(f)
return get_custom_model_config_dict(custom_model_configs_data)


def qeff_models_clean_up():
Expand Down
Loading
Loading