Copy of Xenova/bert-base-NER @ 8e892123e8 (unchanged, mit)
Browse files- README.md +26 -0
- UPSTREAM_README.md +25 -0
- config.json +48 -0
- onnx/model_quantized.onnx +3 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +16 -0
- vocab.txt +0 -0
README.md
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
base_model: dslim/bert-base-NER
|
| 4 |
+
tags:
|
| 5 |
+
- chatpanel
|
| 6 |
+
- onnx
|
| 7 |
+
---
|
| 8 |
+
|
| 9 |
+
# bert-base-NER
|
| 10 |
+
|
| 11 |
+
An unchanged copy of [Xenova/bert-base-NER](https://huggingface.co/Xenova/bert-base-NER) at commit `8e892123e8b7c2c0c2bd1dcb598b7d244c4e53aa`, hosted by ChatPanel so the ChatPanel gateway downloads the models it runs from one place.
|
| 12 |
+
Nothing here was retrained, converted or edited — the files are byte-for-byte the upstream ones.
|
| 13 |
+
|
| 14 |
+
- **Licence:** `mit`, the upstream licence, unchanged.
|
| 15 |
+
- **Base model:** [dslim/bert-base-NER](https://huggingface.co/dslim/bert-base-NER) — the credit for the model belongs to its authors.
|
| 16 |
+
- **Upstream:** [Xenova/bert-base-NER](https://huggingface.co/Xenova/bert-base-NER) at commit `8e892123e8b7c2c0c2bd1dcb598b7d244c4e53aa`.
|
| 17 |
+
- **Upstream model card:** `UPSTREAM_README.md`, kept as published.
|
| 18 |
+
|
| 19 |
+
Files (SHA-256):
|
| 20 |
+
|
| 21 |
+
- `config.json` — `a73a2eccc921bbdea95a94b49a157d3694b5c2abbae7a6f3000e14404a9c31a8`
|
| 22 |
+
- `onnx/model_quantized.onnx` — `caaee70a5518ec7f9e46e5308fcc9263a8c227703a9ce46cf61c69a552349648`
|
| 23 |
+
- `special_tokens_map.json` — `b6d346be366a7d1d48332dbc9fdf3bf8960b5d879522b7799ddba59e76237ee3`
|
| 24 |
+
- `tokenizer.json` — `343989712a36cd8b253efeaf8baf6a08b9d2583f78e395e83832e8ee9f8d8ee1`
|
| 25 |
+
- `tokenizer_config.json` — `5be1a180e9badb4811a6c31502d70fb35a085af5457982937419c42d7530bae6`
|
| 26 |
+
- `vocab.txt` — `eeaa9875b23b04b4c54ef759d03db9d1ba1554838f8fb26c5d96fa551df93d02`
|
UPSTREAM_README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
base_model: dslim/bert-base-NER
|
| 3 |
+
library_name: transformers.js
|
| 4 |
+
license: mit
|
| 5 |
+
---
|
| 6 |
+
|
| 7 |
+
https://huggingface.co/dslim/bert-base-NER with ONNX weights to be compatible with Transformers.js.
|
| 8 |
+
|
| 9 |
+
## Usage (Transformers.js)
|
| 10 |
+
|
| 11 |
+
If you haven't already, you can install the [Transformers.js](https://huggingface.co/docs/transformers.js) JavaScript library from [NPM](https://www.npmjs.com/package/@huggingface/transformers) using:
|
| 12 |
+
```bash
|
| 13 |
+
npm i @huggingface/transformers
|
| 14 |
+
```
|
| 15 |
+
|
| 16 |
+
**Example:** Perform named entity recognition.
|
| 17 |
+
|
| 18 |
+
```js
|
| 19 |
+
import { pipeline } from '@huggingface/transformers';
|
| 20 |
+
|
| 21 |
+
const classifier = await pipeline('token-classification', 'Xenova/bert-base-NER');
|
| 22 |
+
const output = await classifier('My name is Sarah and I live in London');
|
| 23 |
+
```
|
| 24 |
+
|
| 25 |
+
Note: Having a separate repo for ONNX weights is intended to be a temporary solution until WebML gains more traction. If you would like to make your models web-ready, we recommend converting to ONNX using [🤗 Optimum](https://huggingface.co/docs/optimum/index) and structuring your repo like this one (with ONNX weights located in a subfolder named `onnx`).
|
config.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "dslim/bert-base-NER",
|
| 3 |
+
"_num_labels": 9,
|
| 4 |
+
"architectures": [
|
| 5 |
+
"BertForTokenClassification"
|
| 6 |
+
],
|
| 7 |
+
"attention_probs_dropout_prob": 0.1,
|
| 8 |
+
"classifier_dropout": null,
|
| 9 |
+
"hidden_act": "gelu",
|
| 10 |
+
"hidden_dropout_prob": 0.1,
|
| 11 |
+
"hidden_size": 768,
|
| 12 |
+
"id2label": {
|
| 13 |
+
"0": "O",
|
| 14 |
+
"1": "B-MISC",
|
| 15 |
+
"2": "I-MISC",
|
| 16 |
+
"3": "B-PER",
|
| 17 |
+
"4": "I-PER",
|
| 18 |
+
"5": "B-ORG",
|
| 19 |
+
"6": "I-ORG",
|
| 20 |
+
"7": "B-LOC",
|
| 21 |
+
"8": "I-LOC"
|
| 22 |
+
},
|
| 23 |
+
"initializer_range": 0.02,
|
| 24 |
+
"intermediate_size": 3072,
|
| 25 |
+
"label2id": {
|
| 26 |
+
"B-LOC": 7,
|
| 27 |
+
"B-MISC": 1,
|
| 28 |
+
"B-ORG": 5,
|
| 29 |
+
"B-PER": 3,
|
| 30 |
+
"I-LOC": 8,
|
| 31 |
+
"I-MISC": 2,
|
| 32 |
+
"I-ORG": 6,
|
| 33 |
+
"I-PER": 4,
|
| 34 |
+
"O": 0
|
| 35 |
+
},
|
| 36 |
+
"layer_norm_eps": 1e-12,
|
| 37 |
+
"max_position_embeddings": 512,
|
| 38 |
+
"model_type": "bert",
|
| 39 |
+
"num_attention_heads": 12,
|
| 40 |
+
"num_hidden_layers": 12,
|
| 41 |
+
"output_past": true,
|
| 42 |
+
"pad_token_id": 0,
|
| 43 |
+
"position_embedding_type": "absolute",
|
| 44 |
+
"transformers_version": "4.29.2",
|
| 45 |
+
"type_vocab_size": 2,
|
| 46 |
+
"use_cache": true,
|
| 47 |
+
"vocab_size": 28996
|
| 48 |
+
}
|
onnx/model_quantized.onnx
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:caaee70a5518ec7f9e46e5308fcc9263a8c227703a9ce46cf61c69a552349648
|
| 3 |
+
size 108952255
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": "[CLS]",
|
| 3 |
+
"mask_token": "[MASK]",
|
| 4 |
+
"pad_token": "[PAD]",
|
| 5 |
+
"sep_token": "[SEP]",
|
| 6 |
+
"unk_token": "[UNK]"
|
| 7 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"clean_up_tokenization_spaces": true,
|
| 3 |
+
"cls_token": "[CLS]",
|
| 4 |
+
"do_basic_tokenize": true,
|
| 5 |
+
"do_lower_case": false,
|
| 6 |
+
"mask_token": "[MASK]",
|
| 7 |
+
"max_len": 512,
|
| 8 |
+
"model_max_length": 512,
|
| 9 |
+
"never_split": null,
|
| 10 |
+
"pad_token": "[PAD]",
|
| 11 |
+
"sep_token": "[SEP]",
|
| 12 |
+
"strip_accents": null,
|
| 13 |
+
"tokenize_chinese_chars": true,
|
| 14 |
+
"tokenizer_class": "BertTokenizer",
|
| 15 |
+
"unk_token": "[UNK]"
|
| 16 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|