Closed Stycoo closed 2 years ago
Hi, can you please elaborate? Which API are you talking about?
I am so curious how to use “allennlp.data.fields.transformer_text_field” when i want to use allennlp in combination with huggingface transformers.
Check out the RoBERTa SNLI model for an example. The config for this model can be found here: https://github.com/allenai/allennlp-models/blob/main/training_config/pair_classification/snli_roberta.jsonnet
This model just uses the BasicClassifier
. The important parts of the config are "model.text_field_embedders" which is set to use the pretrained transformer embedder, and "dataset_reader.tokenizer" + "dataset_reader.token_indexers" which are set to use the pretrained transformer tokenizer and pretrained transformer token indexer, respectively.
This issue is being closed due to lack of activity. If you think it still needs to be addressed, please comment on this thread 👇
Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
Describe the solution you'd like A clear and concise description of what you want to happen.
Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.
Additional context Add any other context or screenshots about the feature request here.