Created
December 9, 2022 20:50
-
-
Save marcossilva/85358923d8548a5f7f0f869ee652bec0 to your computer and use it in GitHub Desktop.
Initalize GecBERTModel using pre-trained model weights
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from gector.gec_model import GecBERTModel | |
VOCAB_PATH = "test_fixtures/roberta_model/vocabulary" | |
MODEL_PATH = "test_fixtures/roberta_model/weights.th" | |
# Initialize model | |
model = GecBERTModel( | |
vocab_path=VOCAB_PATH, | |
model_paths=[MODEL_PATH], | |
max_len=50, | |
min_len=3, | |
iterations=5, | |
min_error_probability=0.0, | |
lowercase_tokens=0, | |
model_name="roberta", | |
special_tokens_fix=1, | |
log=False, | |
confidence=0, | |
del_confidence=0, | |
is_ensemble=0, | |
weights=None, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment