arvine111/japanese-grammar-classification
By arvine111 · ↓ 1 · ♥ 2 · Updated 2025-04-22
What's in this repo
This page lists the files in arvine111/japanese-grammar-classification, including model.onnx, model_q4.onnx, model_quantized.onnx.
- 3 ONNX models (.onnx files)
- 16 files, including 5 .json, 3 .onnx, 2 .pt, 1 .md, 1 .safetensors, 1 .pth
- Last updated 2025-04-22
ONNX files
| File | Size | Download |
|---|---|---|
| onnx/model.onnx | — | Download |
| onnx/model_q4.onnx | — | Download |
| onnx/model_quantized.onnx | — | Download |
How to use
These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.
README
Model Card for Model ID
This model is a fine-tuned version of tohoku-nlp/bert-large-japanese-v2 designed to perform multi-class classification of Japanese grammar points. It was trained on labeled data sourced from the 日本語文型辞典 (grammar dictionary) and augmented with synthetic examples generated by a large language model.
Uses
Direct Use
This model takes a Japanese sentence as input and predicts the most likely grammar point(s) used in that sentence. It can be integrated into language-learning applications, grammar checkers, or reading-assistant tools.
TOC
Out-of-Scope Use
- Machine translation or text generation tasks.
- Understanding semantics beyond grammar point identification.
Finetune Details
Finetune Data
Source: 日本語文型辞典 covering ~2400 grammar points. Augmentation: Synthetic sentences generated via a large language model to balance low-frequency grammar points (minimum 20 examples per point).
Finetune Procedure
- Preprocessing: Tokenization with MeCab + Unidic lite; WordPiece subword encoding.
- Batch size: 64
- Max sequence length: 128 tokens
- Optimizer: AdamW (learning rate = 3e-5, weight decay = 0.05)
- Scheduler: Linear warmup of 20% steps, then linear decay
- Epochs: 10
- Mixed precision: Enabled (fp16)
Evaluation
- Test set: Held-out sentences from dictionary and synthetic set (10% of total).
- Metrics:
- F1 Score (macro): 83.51%
- Top2 F1 Score (macro): 94.96%
Model info
Created: 2025-04-22
Updated: 2025-04-22
View on Hugging FaceFiles (16)
Related models
More from arvine111
No other models by this author.