Instructions to use ken11/bert-japanese-ner with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ken11/bert-japanese-ner with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="ken11/bert-japanese-ner")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("ken11/bert-japanese-ner") model = AutoModelForTokenClassification.from_pretrained("ken11/bert-japanese-ner", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "architectures": [ | |
| "BertForTokenClassification" | |
| ], | |
| "attention_probs_dropout_prob": 0.1, | |
| "classifier_dropout": null, | |
| "hidden_act": "gelu", | |
| "hidden_dropout_prob": 0.1, | |
| "hidden_size": 1024, | |
| "id2label": { | |
| "0": "I-\u5730\u540d", | |
| "1": "U-\u6cd5\u4eba\u540d", | |
| "2": "B-\u6cd5\u4eba\u540d", | |
| "3": "L-\u4eba\u540d", | |
| "4": "U-\u30a4\u30d9\u30f3\u30c8\u540d", | |
| "5": "U-\u4eba\u540d", | |
| "6": "L-\u30a4\u30d9\u30f3\u30c8\u540d", | |
| "7": "I-\u65bd\u8a2d\u540d", | |
| "8": "I-\u4eba\u540d", | |
| "9": "O", | |
| "10": "B-\u653f\u6cbb\u7684\u7d44\u7e54\u540d", | |
| "11": "I-\u30a4\u30d9\u30f3\u30c8\u540d", | |
| "12": "U-\u65bd\u8a2d\u540d", | |
| "13": "L-\u65bd\u8a2d\u540d", | |
| "14": "B-\u5730\u540d", | |
| "15": "L-\u5730\u540d", | |
| "16": "B-\u65bd\u8a2d\u540d", | |
| "17": "I-\u88fd\u54c1\u540d", | |
| "18": "B-\u88fd\u54c1\u540d", | |
| "19": "L-\u88fd\u54c1\u540d", | |
| "20": "L-\u305d\u306e\u4ed6\u306e\u7d44\u7e54\u540d", | |
| "21": "U-\u653f\u6cbb\u7684\u7d44\u7e54\u540d", | |
| "22": "B-\u4eba\u540d", | |
| "23": "U-\u305d\u306e\u4ed6\u306e\u7d44\u7e54\u540d", | |
| "24": "I-\u305d\u306e\u4ed6\u306e\u7d44\u7e54\u540d", | |
| "25": "U-\u88fd\u54c1\u540d", | |
| "26": "B-\u305d\u306e\u4ed6\u306e\u7d44\u7e54\u540d", | |
| "27": "B-\u30a4\u30d9\u30f3\u30c8\u540d", | |
| "28": "U-\u5730\u540d", | |
| "29": "I-\u653f\u6cbb\u7684\u7d44\u7e54\u540d", | |
| "30": "L-\u6cd5\u4eba\u540d", | |
| "31": "I-\u6cd5\u4eba\u540d", | |
| "32": "L-\u653f\u6cbb\u7684\u7d44\u7e54\u540d" | |
| }, | |
| "initializer_range": 0.02, | |
| "intermediate_size": 4096, | |
| "label2id": { | |
| "B-\u305d\u306e\u4ed6\u306e\u7d44\u7e54\u540d": 26, | |
| "B-\u30a4\u30d9\u30f3\u30c8\u540d": 27, | |
| "B-\u4eba\u540d": 22, | |
| "B-\u5730\u540d": 14, | |
| "B-\u653f\u6cbb\u7684\u7d44\u7e54\u540d": 10, | |
| "B-\u65bd\u8a2d\u540d": 16, | |
| "B-\u6cd5\u4eba\u540d": 2, | |
| "B-\u88fd\u54c1\u540d": 18, | |
| "I-\u305d\u306e\u4ed6\u306e\u7d44\u7e54\u540d": 24, | |
| "I-\u30a4\u30d9\u30f3\u30c8\u540d": 11, | |
| "I-\u4eba\u540d": 8, | |
| "I-\u5730\u540d": 0, | |
| "I-\u653f\u6cbb\u7684\u7d44\u7e54\u540d": 29, | |
| "I-\u65bd\u8a2d\u540d": 7, | |
| "I-\u6cd5\u4eba\u540d": 31, | |
| "I-\u88fd\u54c1\u540d": 17, | |
| "L-\u305d\u306e\u4ed6\u306e\u7d44\u7e54\u540d": 20, | |
| "L-\u30a4\u30d9\u30f3\u30c8\u540d": 6, | |
| "L-\u4eba\u540d": 3, | |
| "L-\u5730\u540d": 15, | |
| "L-\u653f\u6cbb\u7684\u7d44\u7e54\u540d": 32, | |
| "L-\u65bd\u8a2d\u540d": 13, | |
| "L-\u6cd5\u4eba\u540d": 30, | |
| "L-\u88fd\u54c1\u540d": 19, | |
| "O": 9, | |
| "U-\u305d\u306e\u4ed6\u306e\u7d44\u7e54\u540d": 23, | |
| "U-\u30a4\u30d9\u30f3\u30c8\u540d": 4, | |
| "U-\u4eba\u540d": 5, | |
| "U-\u5730\u540d": 28, | |
| "U-\u653f\u6cbb\u7684\u7d44\u7e54\u540d": 21, | |
| "U-\u65bd\u8a2d\u540d": 12, | |
| "U-\u6cd5\u4eba\u540d": 1, | |
| "U-\u88fd\u54c1\u540d": 25 | |
| }, | |
| "layer_norm_eps": 1e-12, | |
| "max_position_embeddings": 512, | |
| "model_type": "bert", | |
| "num_attention_heads": 16, | |
| "num_hidden_layers": 24, | |
| "pad_token_id": 0, | |
| "position_embedding_type": "absolute", | |
| "torch_dtype": "float32", | |
| "transformers_version": "4.12.3", | |
| "type_vocab_size": 2, | |
| "use_cache": true, | |
| "vocab_size": 32006 | |
| } | |