fill_mask {FMAT} | R Documentation |
Run the fill-mask pipeline and check the raw results.
Description
Normal users should use FMAT_run()
.
This function is only for technical check.
Usage
fill_mask(query, model, targets = NULL, topn = 5, gpu)
fill_mask_check(query, models, targets = NULL, topn = 5, gpu)
Arguments
query |
Query sentence with mask token. |
model , models |
Model name(s). |
targets |
Target words to fill in the mask.
Defaults to |
topn |
Number of the most likely predictions to return.
Defaults to |
gpu |
Use GPU (3x faster than CPU) to run the fill-mask pipeline? Defaults to missing value that will automatically use available GPU (if not available, then use CPU). An NVIDIA GPU device (e.g., GeForce RTX Series) is required to use GPU. See Guidance for GPU Acceleration. Options passing to the
|
Value
A data.table of raw results.
Functions
-
fill_mask()
: Check performance of one model. -
fill_mask_check()
: Check performance of multiple models.
Examples
## Not run:
query = "Paris is the [MASK] of France."
models = c("bert-base-uncased", "bert-base-cased")
d.check = fill_mask_check(query, models, topn=2)
## End(Not run)