AllenNLP integration for Shiba: Japanese CANINE model
Project description
Allennlp Integration for Shiba
allennlp-shiab-model
is a Python library that provides AllenNLP integration for shiba-model.
SHIBA is an approximate reimplementation of CANINE [1] in raw Pytorch, pretrained on the Japanese wikipedia corpus using random span masking. If you are unfamiliar with CANINE, you can think of it as a very efficient (approximately 4x as efficient) character-level BERT model. Of course, the name SHIBA comes from the identically named Japanese canine.
Installation
Installing the library and dependencies is simple using pip
.
pip install allennlp-shiba
Example
This library enables users to specify the in a jsonnet config file. Here is an example of the model in jsonnet config file:
{
"dataset_reader": {
"tokenizer": {
"type": "shiba",
},
"token_indexers": {
"tokens": {
"type": "shiba",
}
},
},
"model": {
"shiba_embedder": {
"type": "basic",
"token_embedders": {
"shiba": {
"type": "shiba",
"eval_model": true,
}
}
}
}
}
Reference
- Joshua Tanner and Masato Hagiwara (2021). SHIBA: Japanese CANINE model. GitHub repository, GitHub.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file allennlp-shiba-0.1.1.tar.gz
.
File metadata
- Download URL: allennlp-shiba-0.1.1.tar.gz
- Upload date:
- Size: 9.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.9.5 Linux/5.8.0-1033-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef960fd93daa426d5bf6e505044d62533cc11ea34381490f59e4b175929d5566 |
|
MD5 | d017efe34f7b9b9bd77df9692d51d581 |
|
BLAKE2b-256 | ef7488a29b9a93eda9125abb787b6a1cc5c7053e186fc42c4264a738ef6caab8 |
File details
Details for the file allennlp_shiba-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: allennlp_shiba-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.7 CPython/3.9.5 Linux/5.8.0-1033-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9a25373d154bd13568fce3f91f712cc038ebf6b97d0c091e9799b9932885eef |
|
MD5 | 40a758dd15c7f70204bbbd26b724e14c |
|
BLAKE2b-256 | f513dcbee8b8dc91e86a5fdf76c7f24aab4bc41bf9fbdd659c60606fe8431d46 |