Views
No views yet
max_position_embeddings has been increased to 1282, allowing it to handle much longer inputs than the basic RoBERTa model.tokenizer_config.json for details.Juman++ v2.0.0-rc3 and SentencePiece in advance.1from transformers import AutoModel, AutoTokenizer
2model = AutoModel.from_pretrained("megagonlabs/roberta-long-japanese")
3tokenizer = AutoTokenizer.from_pretrained("megagonlabs/roberta-long-japanese")
4model(**tokenizer("まさに オール マイ ティー な 商品 だ 。", return_tensors="pt")).last_hidden_state
5tensor([[[ 0.1549, -0.7576, 0.1098, ..., 0.7124, 0.8062, -0.9880],
6 [-0.6586, -0.6138, -0.5253, ..., 0.8853, 0.4822, -0.6463],
7 [-0.4502, -1.4675, -0.4095, ..., 0.9053, -0.2017, -0.7756],
8 ...,
9 [ 0.3505, -1.8235, -0.6019, ..., -0.0906, -0.5479, -0.6899],
10 [ 1.0524, -0.8609, -0.6029, ..., 0.1022, -0.6802, 0.0982],
11 [ 0.6519, -0.2042, -0.6205, ..., -0.0738, -0.0302, -0.1955]]],
12 grad_fn=<NativeLayerNormBackward0>)max_position_embeddings has been increased to 1282; 12 layers, 768 dimensions of hidden states, and 12 attention heads.mC4 which is made available under the ODC Attribution License.@article{2019t5,
author = {Colin Raffel and Noam Shazeer and Adam Roberts and Katherine Lee and Sharan Narang and Michael Matena and Yanqi Zhou and Wei Li and Peter J. Liu},
title = {Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer},
journal = {arXiv e-prints},
year = {2019},
archivePrefix = {arXiv},
eprint = {1910.10683},
}