Feature Extraction
Transformers
Safetensors
PyTorch
Russian
accentik
russian
accentuation
word-stress
custom-code
custom_code
Instructions to use TeraSpace/accentik with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use TeraSpace/accentik with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="TeraSpace/accentik", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("TeraSpace/accentik", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download configuration_accentik.py from TeraSpace/accentik: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/TeraSpace/accentik/resolve/main/configuration_accentik.py
- Command line
-
hf download hf://TeraSpace/accentik/configuration_accentik.py
-
curl -L -o configuration_accentik.py https://huggingface.co/TeraSpace/accentik/resolve/main/configuration_accentik.py
1.11 kB
| """Configuration for Accentik's parallel Russian vowel-ranking model.""" | |
| from copy import deepcopy | |
| from transformers import PreTrainedConfig | |
| class AccentikConfig(PreTrainedConfig): | |
| model_type = "accentik" | |
| def __init__(self, encoder_config=None, context_window=512, | |
| batch_token_budget=8192, release="audio-v3", yo_threshold=0.8, **kwargs): | |
| super().__init__(**kwargs) | |
| self.encoder_config = deepcopy(encoder_config or {}) | |
| self.context_window = int(context_window) | |
| self.batch_token_budget = int(batch_token_budget) | |
| self.release = release | |
| self.yo_threshold = float(yo_threshold) | |
| self.restore_yo_default = False | |
| if not 0.0 <= self.yo_threshold <= 1.0: | |
| raise ValueError("yo_threshold must be between zero and one") | |
| if self.context_window < 8 or self.context_window % 8: | |
| raise ValueError("context_window must be a positive multiple of eight") | |
| if self.batch_token_budget < self.context_window: | |
| raise ValueError("batch_token_budget must fit one complete context window") | |