Instructions to use Angshul/SpliNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Angshul/SpliNet with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="Angshul/SpliNet", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForMaskedLM model = AutoModelForMaskedLM.from_pretrained("Angshul/SpliNet", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download configuration_splinet.py from Angshul/SpliNet: direct link, hf CLI and curl.
- Browser
- Download file 474 Bytes
-
https://huggingface.co/Angshul/SpliNet/resolve/main/configuration_splinet.py
- Command line
-
hf download hf://Angshul/SpliNet/configuration_splinet.py
-
curl -L -o configuration_splinet.py https://huggingface.co/Angshul/SpliNet/resolve/main/configuration_splinet.py
474 Bytes
| from transformers import FNetConfig | |
| class SpliNetConfig(FNetConfig): | |
| model_type = "splinet" | |
| def __init__( | |
| self, | |
| splinet_num_heads=12, | |
| splinet_radius=16, | |
| **kwargs, | |
| ): | |
| super().__init__(**kwargs) | |
| self.splinet_num_heads = int( | |
| splinet_num_heads | |
| ) | |
| self.splinet_radius = int( | |
| splinet_radius | |
| ) | |
| self.splinet_order = 2 | |
| self.splinet_sidedness = "single" | |