Instructions to use birgermoell/roberta-swedish with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use birgermoell/roberta-swedish with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="birgermoell/roberta-swedish")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("birgermoell/roberta-swedish") model = AutoModelForMaskedLM.from_pretrained("birgermoell/roberta-swedish", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download mc4script.sh from birgermoell/roberta-swedish: direct link, hf CLI and curl.
- Browser
- Download file 607 Bytes
-
https://huggingface.co/birgermoell/roberta-swedish/resolve/main/mc4script.sh
- Command line
-
hf download hf://birgermoell/roberta-swedish/mc4script.sh
-
curl -L -o mc4script.sh https://huggingface.co/birgermoell/roberta-swedish/resolve/main/mc4script.sh
607 Bytes
| ./run_mlm_flax_stream.py \ | |
| --output_dir="${MODEL_DIR}" \ | |
| --model_type="roberta" \ | |
| --config_name="${MODEL_DIR}" \ | |
| --tokenizer_name="${MODEL_DIR}" \ | |
| --dataset_name="mc4" \ | |
| --dataset_config_name="sv" \ | |
| --max_seq_length="128" \ | |
| --per_device_train_batch_size="128" \ | |
| --per_device_eval_batch_size="128" \ | |
| --learning_rate="3e-4" \ | |
| --warmup_steps="1000" \ | |
| --overwrite_output_dir \ | |
| --adam_beta1="0.9" \ | |
| --adam_beta2="0.98" \ | |
| --num_train_steps="10000" \ | |
| --num_eval_samples="5000" \ | |
| --logging_steps="250" \ | |
| --eval_steps="1000" \ | |
| --push_to_hub |