Download configuration_borg.py from racai/borg: direct link, hf CLI and curl.
- Browser
- Download file 642 Bytes
-
https://huggingface.co/racai/borg/resolve/main/configuration_borg.py
- Command line
-
hf download hf://racai/borg/configuration_borg.py
-
curl -L -o configuration_borg.py https://huggingface.co/racai/borg/resolve/main/configuration_borg.py
642 Bytes
| """Hugging Face configuration for exported borg-cube pipelines.""" | |
| from __future__ import annotations | |
| from typing import Any, Dict, List, Optional | |
| from transformers import PretrainedConfig | |
| class BorgHFConfig(PretrainedConfig): | |
| model_type = "borg_cube" | |
| def __init__( | |
| self, | |
| borg_config: Optional[Dict[str, Any]] = None, | |
| components: Optional[List[str]] = None, | |
| checkpoint: str = "best", | |
| **kwargs, | |
| ): | |
| super().__init__(**kwargs) | |
| self.borg_config = borg_config or {} | |
| self.components = components if components is not None else [] | |
| self.checkpoint = checkpoint | |