Instructions to use bigshanedogg/Sonata-Small with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use bigshanedogg/Sonata-Small with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="bigshanedogg/Sonata-Small", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("bigshanedogg/Sonata-Small", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download processing_sonata.py from bigshanedogg/Sonata-Small: direct link, hf CLI and curl.
- Browser
- Download file 490 Bytes
-
https://huggingface.co/bigshanedogg/Sonata-Small/resolve/main/processing_sonata.py
- Command line
-
hf download hf://bigshanedogg/Sonata-Small/processing_sonata.py
-
curl -L -o processing_sonata.py https://huggingface.co/bigshanedogg/Sonata-Small/resolve/main/processing_sonata.py
490 Bytes
| """Sonata processor: ``SonataFeatureExtractor`` (the package's inference transform) as its only part.""" | |
| from transformers.processing_utils import ProcessorMixin | |
| class SonataProcessor(ProcessorMixin): | |
| attributes = ["feature_extractor"] | |
| def __init__(self, feature_extractor=None, **kwargs): | |
| super().__init__(feature_extractor, **kwargs) | |
| def __call__(self, point=None, **kwargs): | |
| return self.feature_extractor(point, **kwargs) | |
| __all__ = ["SonataProcessor"] | |