BERT model in TorchSharp with the ability to load pre-trained weights from Google BERT checkpoints. This model produces a single value per input sequence - suitable for tasks such as text classification.
$ dotnet add package TsBERTBERT model defined in TorchSharp with functionality to load pre-trained BERT weights from checkpoints made available by Google.
This model produces the pooled / encoded output - a single value per input sequence. It is meant to be used as a base layer for models for common NLP tasks e.g. text classification.
The code in this package is a re-packaging of the code shown in this notebook. Please consult the notebook (and associated repo) for a text classification example.
Also see BertFineTuneExample.fsx script file in the repo for the same example in a script file
(updated to torchsharp 0.98.1)