Introduction of Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT
Model Details of Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT
Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT
Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT is a model that was used in the creation of
Aleph-Alpha-GermanWeb
, a new German-language dataset that combines heuristic and model-based filtering techniques with synthetic data generation to achieve SOTA performance in German-language benchmarks.
To train Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT, we used
LanguageTool
to annotate a random subset of 400,000 German FineWeb2 documents with the DE_AGREEMENT rule, which identifies text passages with grammatical disagreement. To train our classifier, we randomly selected 75,000 documents without identified grammar mistakes as high quality examples. As low quality examples, we took 75,000 random documents containing at least one identified grammar error.
We trained Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT on 95% of the data to classify the high and low quality examples -- and used the remaining 5% for validation, reaching a precision of 67% and recall of 66% on the validation set.
Further details can be found in our accompanying paper (link to paper coming soon).
Example Snippet
import torch
from transformers import BertTokenizer, BertForSequenceClassification
device = torch.device('cuda') if torch.cuda.is_available() else torch.device('cpu')
model = BertForSequenceClassification.from_pretrained("Aleph-Alpha/Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT", num_labels=2).to(device)
tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
# disclaimer: short text is not in the model distribution
text = 'Das ist ein Beispieltext, um die Grammatik zu überprüfen.'
target_names = ['Low Quality', 'High Quality']
with torch.no_grad():
prediction = torch.argmax(
model(**tokenizer(text, return_tensors='pt', truncation=True, padding=True).to(device)).logits
).item()
print(target_names[prediction])
Runs of Aleph-Alpha Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT on huggingface.co
92
Total runs
0
24-hour runs
3
3-day runs
7
7-day runs
47
30-day runs
More Information About Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT huggingface.co Model
More Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT license Visit here:
Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT huggingface.co is an AI model on huggingface.co that provides Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT's model effect (), which can be used instantly with this Aleph-Alpha Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT model. huggingface.co supports a free trial of the Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT model, and also provides paid use of the Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT. Support call Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT model through api, including Node.js, Python, http.
Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT huggingface.co is an online trial and call api platform, which integrates Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT's modeling effects, including api services, and provides a free online trial of Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT, you can try Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT online for free by clicking the link below.
Aleph-Alpha Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT online free url in huggingface.co:
Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT is an open source model from GitHub that offers a free installation service, and any user can find Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT on GitHub to install. At the same time, huggingface.co provides the effect of Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT install, users can directly use Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT installed effect in huggingface.co for debugging and trial. It also supports api for free installation.
Aleph-Alpha-GermanWeb-Grammar-Classifier-BERT install url in huggingface.co: