Instructions to use script-langid/xlm-roberta-sinhala-pali-sanskrit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- PEFT
How to use script-langid/xlm-roberta-sinhala-pali-sanskrit with PEFT:
from peft import PeftModel from transformers import AutoModelForSequenceClassification base_model = AutoModelForSequenceClassification.from_pretrained("papluca/xlm-roberta-base-language-detection") model = PeftModel.from_pretrained(base_model, "script-langid/xlm-roberta-sinhala-pali-sanskrit") - Transformers
How to use script-langid/xlm-roberta-sinhala-pali-sanskrit with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="script-langid/xlm-roberta-sinhala-pali-sanskrit")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("script-langid/xlm-roberta-sinhala-pali-sanskrit") model = AutoModelForSequenceClassification.from_pretrained("script-langid/xlm-roberta-sinhala-pali-sanskrit", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Welcome to the community
The community tab is the place to discuss and collaborate with the HF community!