main
py 20 lines 523 Bytes
Raw
1 # SPDX-License-Identifier: Apache-2.0
2 # SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3
4 from abc import ABC, abstractmethod
5 from pathlib import Path
6
7 from transformers import PreTrainedConfig
8
9
10 class ConfigParserBase(ABC):
11 @abstractmethod
12 def parse(
13 self,
14 model: str | Path,
15 trust_remote_code: bool,
16 revision: str | None = None,
17 code_revision: str | None = None,
18 **kwargs,
19 ) -> tuple[dict, PreTrainedConfig]:
20 raise NotImplementedError