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
File size: 474 Bytes
4ec5e47 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | 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"
|