alt.freeweights.vision / japanese-roberta-base-ONNX
From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.visionSubject:

japanese-roberta-base-ONNX

Date: 2026-11-15Commit: 23c9beeSigned: 2DC28CC7B26A283B ✓

Fill mask model. Onnx weights, 1.28 GB in all. Published by onnx-community under MIT.

vision1.28GBjapanese-roberta-base-ONNXonnxpermissive
FactsParamsnot statedSize1.28 GBFormatsonnxTaskfill maskLicenseMITFrom sourcepermissive
$ fw get onnx-community/japanese-roberta-base-ONNX
# manifest sha256 867af73b1aab… · 1.28 GB · 9 files
$ fw verify ./japanese-roberta-base-ONNX onnx-community/japanese-roberta-base-ONNX
From sourceHosted (signed)onnx-community/japanese-roberta-base-ONNXLast check: 2026-11-15 05:21 UTC

Get help: custom fine-tune or private deploy. We review your setup before we quote.

Quantized of japanese-roberta-base.

Works with

Runs with

Ranked by fit to this model (onnx), then by GitHub stars.

Convert with

Scan with

Overview

Size
1.28 GB
Weights
136 MB (smallest of 6 ONNX variants)
Parameters
not stated
Formats
onnx
Task
fill mask
License
MIT (permissive)
Files
9, each with a sha256
Publisher
onnx-community
Added
2026-11-15
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

Base model: rinna/japanese-roberta-base

Where these bytes come from
Publisher at the pinned commit→You

Sources are tried in order. A file counts only when its size and sha256 match the manifest. Sources are checked when you ask for them, not on a timer.

Sources
BadgeHostLast checkResult
From sourcehuggingface.co2026-11-15 05:21 UTCpassed

Model card

From the publisher at commit 23c9bee. Shown as plain text with links; images open at the publisher.

japanese-roberta-base (ONNX)#

This is an ONNX version of rinna/japanese-roberta-base. It was automatically converted and uploaded using this Hugging Face Space.

Usage with Transformers.js#

See the pipeline documentation for fill-mask: https://huggingface.co/docs/transformers.js/api/pipelines#module_pipelines.FillMaskPipeline


japanese-roberta-base#

Image: rinna-icon

This repository provides a base-sized Japanese RoBERTa model. The model was trained using code from Github repository rinnakk/japanese-pretrained-models by rinna Co., Ltd.

How to load the model#

from transformers import AutoTokenizer, AutoModelForMaskedLM

tokenizer = AutoTokenizer.from_pretrained("rinna/japanese-roberta-base", use_fast=False)
tokenizer.do_lower_case = True  # due to some bug of tokenizer config loading

model = AutoModelForMaskedLM.from_pretrained("rinna/japanese-roberta-base")

How to use the model for masked token prediction#

Note 1: Use [CLS]#

To predict a masked token, be sure to add a [CLS] token before the sentence for the model to correctly encode it, as it is used during the model training.

Note 2: Use [MASK] after tokenization#

A) Directly typing [MASK] in an input string and B) replacing a token with [MASK] after tokenization will yield different token sequences, and thus different prediction results. It is more appropriate to use [MASK] after tokenization (as it is consistent with how the model was pretrained). However, the Huggingface Inference API only supports typing [MASK] in the input string and produces less robust predictions.

Note 3: Provide position_ids as an argument explicitly#

When position_ids are not provided for a Roberta* model, Huggingface's transformers will automatically construct it but start from padding_idx instead of 0 (see issue and function create_position_ids_from_input_ids() in Huggingface's implementation), which unfortunately does not work as expected with rinna/japanese-roberta-base since the padding_idx of the corresponding tokenizer is not 0. So please be sure to constrcut the position_ids by yourself and make it start from position id 0.

Example#

Here is an example by to illustrate how our model works as a masked language model. Notice the difference between running the following code example and running the Huggingface Inference API.

# original text
text = "4年に1度オリンピックは開かれる。"

# prepend [CLS]
text = "[CLS]" + text

# tokenize
tokens = tokenizer.tokenize(text)
print(tokens)  # output: ['[CLS]', '▁4', '年に', '1', '度', 'オリンピック', 'は', '開かれる', '。']

# mask a token
masked_idx = 5
tokens[masked_idx] = tokenizer.mask_token
print(tokens)  # output: ['[CLS]', '▁4', '年に', '1', '度', '[MASK]', 'は', '開かれる', '。']

# convert to ids
token_ids = tokenizer.convert_tokens_to_ids(tokens)
print(token_ids)  # output: [4, 1602, 44, 24, 368, 6, 11, 21583, 8]

# convert to tensor
import torch
token_tensor = torch.LongTensor([token_ids])

# provide position ids explicitly
position_ids = list(range(0, token_tensor.size(1)))
print(position_ids)  # output: [0, 1, 2, 3, 4, 5, 6, 7, 8]
position_id_tensor = torch.LongTensor([position_ids])

# get the top 10 predictions of the masked token
with torch.no_grad():
    outputs = model(input_ids=token_tensor, position_ids=position_id_tensor)
    predictions = outputs[0][0, masked_idx].topk(10)

for i, index_t in enumerate(predictions.indices):
    index = index_t.item()
    token = tokenizer.convert_ids_to_tokens([index])[0]
    print(i, token)

"""
0 総会
1 サミット
2 ワールドカップ
3 フェスティバル
4 大会
5 オリンピック
6 全国大会
7 党大会
8 イベント
9 世界選手権
"""

Model architecture#

A 12-layer, 768-hidden-size transformer-based masked language model.

Training#

The model was trained on Japanese CC-100 and Japanese Wikipedia to optimize a masked language modelling objective on 8*V100 GPUs for around 15 days. It reaches ~3.9 perplexity on a dev set sampled from CC-100.

Tokenization#

The model uses a sentencepiece-based tokenizer, the vocabulary was trained on the Japanese Wikipedia using the official sentencepiece training script.

Release date#

August 25, 2021

How to cite#

@misc{rinna-japanese-roberta-base,
    title = {rinna/japanese-roberta-base},
    author = {Zhao, Tianyu and Sawada, Kei},
    url = {https://huggingface.co/rinna/japanese-roberta-base}
}

@inproceedings{sawada2024release,
    title = {Release of Pre-Trained Models for the {J}apanese Language},
    author = {Sawada, Kei and Zhao, Tianyu and Shing, Makoto and Mitsui, Kentaro and Kaga, Akio and Hono, Yukiya and Wakatsuki, Toshiaki and Mitsuda, Koh},
    booktitle = {Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024)},
    month = {5},
    year = {2024},
    pages = {13898--13905},
    url = {https://aclanthology.org/2024.lrec-main.1213},
    note = {\url{https://arxiv.org/abs/2404.01657}}
}

Licenese#

The MIT license

Files

9 files · 1.28 GBWeights 136 MB (smallest of 6 ONNX variants). Sizes and sha256 from the signed manifest.
Hide all 9 files with their sha256
FileSizesha256
.gitattributes1.52 KB11ad7efa24975ee4b0c3c3a38ed18737f0658a5f75a0a96787b576a78a023361
README.md6.08 KBc59772fd2d1a9c2b77c51a11243af0d2ad63e4e67888546c8bc856d96914e3a4
config.json666 B0d1d50085400cfaac838634a07511832d6e7b854ccf1eb96c4343497e1f147ff
onnx/model.onnx541 MB3a83cc9115e75fefd527c6d1d8626552079964eec733e04716f98e1d27780e6f
onnx/model_bnb4.onnx163 MB7e86c569e81854af17e5112917497571a065c5693f26fb82bcaa43afd2ac5359
onnx/model_int8.onnx136 MB782268683d261805678d0b840d04ce327b0fce11922877705c385bf475fde494
onnx/model_q4.onnx170 MB724097cb961cb12b449c1065dffda70955df9a3736ea33b63163045c8b699cfc
onnx/model_quantized.onnx136 MB782268683d261805678d0b840d04ce327b0fce11922877705c385bf475fde494
onnx/model_uint8.onnx136 MBb1a050e284eff03f093bc11f09677304e0a48610b7661f7dfdbbd0d55007ce5d
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
23c9beebef pinned now2026-11-15 05:21 UTC9 files · 1.28 GB

Use it

$ fw get onnx-community/japanese-roberta-base-ONNX
# manifest sha256 867af73b1aab… · 1.28 GB · 9 files
$ fw verify ./japanese-roberta-base-ONNX onnx-community/japanese-roberta-base-ONNX
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/onnx-community/japanese-roberta-base-ONNX.json --dir ./japanese-roberta-base-ONNX $ python3 fw.py verify ./japanese-roberta-base-ONNX ./onnx-community__japanese-roberta-base-ONNX.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/japanese-roberta-base-ONNX --revision 23c9beebefb1116ca4016fecc33421ce66cd832e --local-dir ./japanese-roberta-base-ONNX

License

Name
MIT License
Id
MIT
Class
Permissive
Redistribution
yes
Listing
Hosted (signed)
Decided
License as declared by the publisher. No person read it. 2026-11-15
Text in
README.md
Text sha256
c59772fd2d1a9c2b77c51a11243af0d2ad63e4e67888546c8bc856d96914e3a4
Terms gate
No extra terms beyond the license.

Read the license text

Licenses are checked against the license table. A custom license passes only after a person reads it.

Provenance

From: onnx-community <huggingface.co/onnx-community>Newsgroups: alt.freeweights.visionSubject: japanese-roberta-base-ONNXDate: 2026-11-15Commit: 23c9beeSigned: 2DC28CC7B26A283B ✓
Upstream
onnx-community/japanese-roberta-base-ONNX
Pinned commit
23c9beebefb1116ca4016fecc33421ce66cd832e
Manifest
japanese-roberta-base-ONNX.json · .minisig
Manifest sha256
867af73b1aab9b6d4b6bed2bfb75aae69352bc9a9acd8d7a99565c826971ed32
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 05:21 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/onnx-community/japanese-roberta-base-ONNX.json $ curl -O https://freeweights.allternit.com/manifests/onnx-community/japanese-roberta-base-ONNX.json.minisig $ minisign -Vm japanese-roberta-base-ONNX.json -P RWQ7KGqyx4zCLXtUFOqvfv8L3g+8fpKJ1FsuxPyOYMF+4KufbUxKq1Oq $ shasum -a 256 <file> # compare with the Files tab

A manifest whose signature fails must be rejected. A file whose size or sha256 does not match must be discarded. Verify a download

Model tree

Parent

rinna/japanese-roberta-base · this model is a quantization of it

No model in the catalog names this one as its parent.

Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download onnx-community/japanese-roberta-base-ONNX
Open in Freeweights Studio

Pull, verify and run it in the Allternit app on Desktop, web or phone.

Signed manifest
minisign, key 2DC28CC7B26A283B. japanese-roberta-base-ONNX.json. Provenance. Takedown history: none.
From: dima806 <huggingface.co/dima806>Subject: ai_vs_real_image_detection
From: legekka <huggingface.co/legekka>Subject: AI-Anime-Image-Detector-ViT
From: onnx-community <huggingface.co/onnx-community>Subject: AI-Anime-Image-Detector-ViT-ONNX
From: AICodexLab <huggingface.co/AICodexLab>Subject: answerdotai-ModernBERT-base-ai-detector
From: onnx-community <huggingface.co/onnx-community>Subject: answerdotai-ModernBERT-base-ai-detector-ONNX
From: onnx-community <huggingface.co/onnx-community>Subject: bart-large-cnn-ONNX