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

japanese-roberta-base

Date: 2026-11-15Commit: f93982aSigned: 2DC28CC7B26A283B ✓

Fill mask model with 111M parameters. Safetensors weights, 1.43 GB in all. Published by rinna under MIT.

111M params1.43GBjapanese-roberta-basesafetensorspermissive
FactsParams111MSize1.43 GBFormatssafetensorsTaskfill maskLicenseMITFrom sourcepermissive
$ fw get rinna/japanese-roberta-base
# manifest sha256 5a20cd85d7a2… · 1.43 GB · 10 files
$ fw verify ./japanese-roberta-base rinna/japanese-roberta-base
From sourceHosted (signed)rinna/japanese-roberta-baseLast check: 2026-11-15 02:45 UTC

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

Works with

Runs with

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

Overview

Size
1.43 GB
Weights
443 MB (safetensors)
Parameters
111M
Formats
safetensors
Task
fill mask
License
MIT (permissive)
Files
10, each with a sha256
Publisher
rinna
Added
2026-11-15
Section
alt.freeweights.vision
Lineage

Original release from the publisher.

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 02:45 UTCpassed

Model card

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

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

10 files · 1.43 GBWeights 443 MB (safetensors). Sizes and sha256 from the signed manifest.
Hide all 10 files with their sha256
FileSizesha256
.gitattributes744 Bf888dc7c230287cd68af7034aa9fc2e2d6663fb7b3e70faa153caf93877914c3
README.md5.49 KB70867b0297b915d2b20eb66bccc0e02863d399ed65ee1d6088831a4c34bb0faf
config.json663 Becda315f625b181d3465e352f0c396a66514b8d2c8b90e9568da41ecf61b8579
model.safetensors443 MB21c5ab7fd7b473eded40e4f1ed71a2505b4aa56339f633564ed68fefc419e5b2
pytorch_model.bin443 MB0f8b82568ffba99a6a4ecdbec6951a64b9dd51e07fbf7b9d8f09352a54f0a668
rinna.png60.3 KBbf81b8c108850c6db015683c86b256063125f909fc796f7d42bc929ffba171ab
special_tokens_map.json153 Ba4fdf54099a0e4b6d81bff96557662ef8ef3ccd9e5a5fbdb8117b33fe1c608b5
spiece.model806 KBb5cbdfa8aa7c54c8c5af85b78c309c54a5f2749a20468bf6f60eee007fe6fec1
tf_model.h5543 MB7523f2517150b2193b087c09f30e16d8441dd11b74b3c61821d37ed5e4a0c994
tokenizer_config.json259 Be82544af5a25661897aa5d063ebad9a3bf8389ab643a25061889cd601cadde58
VersionsEach time the pinned upstream commit or file list changed in this repo. Newest first.
Upstream commitDateContents
f93982a6f5 pinned now2026-11-15 02:45 UTC10 files · 1.43 GB

Use it

$ fw get rinna/japanese-roberta-base
# manifest sha256 5a20cd85d7a2… · 1.43 GB · 10 files
$ fw verify ./japanese-roberta-base rinna/japanese-roberta-base
fw.pyChecks the signature and every sha256, tries each source in order, resumes.
$ python3 fw.py get https://freeweights.allternit.com/manifests/rinna/japanese-roberta-base.json --dir ./japanese-roberta-base $ python3 fw.py verify ./japanese-roberta-base ./rinna__japanese-roberta-base.json
hfThe Hugging Face CLI with one setting. Same repo id.
$ HF_ENDPOINT=https://freeweights.allternit.com hf download rinna/japanese-roberta-base --revision f93982a6f5a8bb9fd483b9deedae693091114b33 --local-dir ./japanese-roberta-base

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
70867b0297b915d2b20eb66bccc0e02863d399ed65ee1d6088831a4c34bb0faf
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: rinna <huggingface.co/rinna>Newsgroups: alt.freeweights.visionSubject: japanese-roberta-baseDate: 2026-11-15Commit: f93982aSigned: 2DC28CC7B26A283B ✓
Upstream
rinna/japanese-roberta-base
Pinned commit
f93982a6f5a8bb9fd483b9deedae693091114b33
Manifest
japanese-roberta-base.json · .minisig
Manifest sha256
5a20cd85d7a29bad392242058b2df5bbccd3aea745d5b74ccab60256c37370e0
Signature
minisign, Ed25519, key 2DC28CC7B26A283B
Created
2026-11-15 02:45 UTC
Generator
freeweights-manifest/0.1.0
Takedowns
None.

How to verify

$ curl -O https://freeweights.allternit.com/manifests/rinna/japanese-roberta-base.json $ curl -O https://freeweights.allternit.com/manifests/rinna/japanese-roberta-base.json.minisig $ minisign -Vm japanese-roberta-base.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

1 model in the catalog name this one as their parent.

Quantizations
1
Get it
Download
$ HF_ENDPOINT=https://freeweights.allternit.com hf download rinna/japanese-roberta-base
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.json. Provenance. Takedown history: none.

Variants

1 quantized or adapter build of japanese-roberta-base. Each has its own license check and page.

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