ONNX Model Zoo

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

onnx safetensors bert japanese grammar classification text-classification ja base_model:tohoku-nlp/bert-large-japanese-v2 base_model:quantized:tohoku-nlp/bert-large-japanese-v2 license:mit region:us
↓ 1 ♥ 2

Created: 2025-04-22

Updated: 2025-04-22

View on Hugging Face

Files (16)

.gitattributes
README.md
config.json
model.safetensors
onnx/model.onnx ONNX
onnx/model_q4.onnx ONNX
onnx/model_quantized.onnx ONNX
optimizer.pt
rng_state.pth
scheduler.pt
special_tokens_map.json
tokenizer.json
tokenizer_config.json
trainer_state.json
training_args.bin
vocab.txt

Related models