Instructions to use DAMO-NLP-SG/roberta-time_identification with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DAMO-NLP-SG/roberta-time_identification with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="DAMO-NLP-SG/roberta-time_identification")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("DAMO-NLP-SG/roberta-time_identification") model = AutoModelForTokenClassification.from_pretrained("DAMO-NLP-SG/roberta-time_identification", device_map="auto") - Notebooks
- Google Colab
- Kaggle
|
Download README.md from DAMO-NLP-SG/roberta-time_identification: direct link, hf CLI and curl.
- Browser
- Download file 1.48 kB
-
https://huggingface.co/DAMO-NLP-SG/roberta-time_identification/resolve/main/README.md
- Command line
-
hf download hf://DAMO-NLP-SG/roberta-time_identification/README.md
-
curl -L -o README.md https://huggingface.co/DAMO-NLP-SG/roberta-time_identification/resolve/main/README.md
1.48 kB
| tags: | |
| - generated_from_trainer | |
| model-index: | |
| - name: tim_expression_identify.2 | |
| results: [] | |
| ## Model description | |
| This model is a fine-tuned version of RoBERTa. | |
| ## Intended uses & limitations | |
| For identifying time expressions in text. This model works in a NER-like manner but only focuses on time expressions. | |
| - You may try an example sentence using the hosted inference API on HuggingFace: | |
| *In Generation VII, Pokémon Sun and Moon were released worldwide for the 3DS on November 18, 2016 and on November 23, 2016 in Europe.* | |
| The JSON output would be like: | |
| ``` | |
| [ | |
| { | |
| "entity_group": "TIME", | |
| "score": 0.9959897994995117, | |
| "word": " November 18", | |
| "start": 79, | |
| "end": 90 | |
| }, | |
| { | |
| "entity_group": "TIME", | |
| "score": 0.996467113494873, | |
| "word": " 2016", | |
| "start": 92, | |
| "end": 96 | |
| }, | |
| { | |
| "entity_group": "TIME", | |
| "score": 0.9942433834075928, | |
| "word": " November 23, 2016", | |
| "start": 104, | |
| "end": 121 | |
| } | |
| ] | |
| ``` | |
| ## Training and evaluation data | |
| TimeBank 1.2 | |
| ## Training procedure | |
| ### Training hyperparameters | |
| The following hyperparameters were used during training: | |
| - learning_rate: 5e-05 | |
| - train_batch_size: 16 | |
| - eval_batch_size: 256 | |
| - seed: 42 | |
| - optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08 | |
| - lr_scheduler_type: linear | |
| - num_epochs: 3.0 | |
| ### Framework versions | |
| - Transformers 4.25.0.dev0 | |
| - Pytorch 1.12.1 | |
| - Datasets 2.7.1.dev0 | |
| - Tokenizers 0.13.2 | |