Model
wdtest-a/ptest-ner
- Task:Token Classification
- Libraries:transformers
- Formats:safetensors
- License:apache-2.0
- arXiv:arXiv:1810.04805
Dedicated endpoint
Sign in to deployInference Providers
This model isn't deployed by any Inference Provider.
Spaces
Create a Space with this modelUse this model
Choose individual files there, or download a full snapshot with the Python example below.
Download with the whiteduck client
pip install https://provyd.xyz/clients/whiteduck-0.1.0-py3-none-any.whl
wd login --host 'https://api.provyd.xyz'
wd download 'wdtest-a/ptest-ner'Using the Hugging Face client instead
Install huggingface_hub with pip install huggingface_hub, then download this pinned snapshot. Set HF_TOKEN (the variable the Hugging Face client reads) to a whiteduck Read token for private repositories. Running the downloaded model requires software that supports its architecture.
Keep your whiteduck token away from calls that ignore HF_ENDPOINT, such as list_inference_endpoints: they send it to Hugging Face. See Docs.
from huggingface_hub import snapshot_download
import os
path = snapshot_download(
repo_id='wdtest-a/ptest-ner',
revision='7a1f9871e604c4bb00997b721ecfa8a7d3d60b21',
endpoint='https://api.provyd.xyz',
token=os.environ.get("HF_TOKEN") or False,
)Tag entities with transformers
import os
os.environ["HF_ENDPOINT"] = 'https://api.provyd.xyz'
from transformers import pipeline
pipe = pipeline("token-classification", model='wdtest-a/ptest-ner', aggregation_strategy="simple")
entities = pipe("Zoe lives in Munich")Call it with huggingface_hub
Works once the owner has started the model. Set WD_INFERENCE_KEY to a model API key.
import os
from huggingface_hub import InferenceClient
client = InferenceClient(model='https://api.provyd.xyz/api/wd/inference/models/wdtest-a/ptest-ner', token=os.environ["WD_INFERENCE_KEY"])
entities = client.token_classification("Zoe lives in Munich")Use with local apps
This hub is self-hosted, so each command points the tool at it. Add a whiteduck access token as HF_TOKEN (the variable the Hugging Face client reads) for private repositories.
vLLM
# vLLM downloads through huggingface_hub, which honours HF_ENDPOINT; set HF_TOKEN for a private repository.
HF_ENDPOINT='https://api.provyd.xyz' vllm serve 'wdtest-a/ptest-ner'Clone with git
git clone 'https://api.provyd.xyz/wdtest-a/ptest-ner'Clone with git over SSH
git clone 'ssh://git@wd.provyd.xyz:2222/wdtest-a/ptest-ner'Needs an SSH key on your account. Add an SSH key
Use the API
Read repository metadata at this commit. Set HF_TOKEN (the variable the Hugging Face client reads) to a whiteduck Read token. Tokens grant account-level access, not access to just this model.
curl 'https://api.provyd.xyz/api/models/wdtest-a/ptest-ner/revision/7a1f9871e604c4bb00997b721ecfa8a7d3d60b21' \
-H "Authorization: Bearer $HF_TOKEN"Inference is separate from file storage. The owner must configure and start a supported model using the inference controls. To call it you need a model API key (made on the model page), or a token of any scope (Read or stronger) from the model owner. Visitors can use the try box only when the owner allows it. A token cannot enable unavailable GPU hardware.
Blame for onnx/tokenizer_config.json at 7a1f987
| Line | Commit | Author | Date | Code |
|---|---|---|---|---|
| 1 | import dslim/distilbert-NER@main7a1f987 | wdtest-a | { | |
| 2 | "added_tokens_decoder": { | |||
| 3 | "0": { | |||
| 4 | "content": "[PAD]", | |||
| 5 | "lstrip": false, | |||
| 6 | "normalized": false, | |||
| 7 | "rstrip": false, | |||
| 8 | "single_word": false, | |||
| 9 | "special": true | |||
| 10 | }, | |||
| 11 | "100": { | |||
| 12 | "content": "[UNK]", | |||
| 13 | "lstrip": false, | |||
| 14 | "normalized": false, | |||
| 15 | "rstrip": false, | |||
| 16 | "single_word": false, | |||
| 17 | "special": true | |||
| 18 | }, | |||
| 19 | "101": { | |||
| 20 | "content": "[CLS]", | |||
| 21 | "lstrip": false, | |||
| 22 | "normalized": false, | |||
| 23 | "rstrip": false, | |||
| 24 | "single_word": false, | |||
| 25 | "special": true | |||
| 26 | }, | |||
| 27 | "102": { | |||
| 28 | "content": "[SEP]", | |||
| 29 | "lstrip": false, | |||
| 30 | "normalized": false, | |||
| 31 | "rstrip": false, | |||
| 32 | "single_word": false, | |||
| 33 | "special": true | |||
| 34 | }, | |||
| 35 | "103": { | |||
| 36 | "content": "[MASK]", | |||
| 37 | "lstrip": false, | |||
| 38 | "normalized": false, | |||
| 39 | "rstrip": false, | |||
| 40 | "single_word": false, | |||
| 41 | "special": true | |||
| 42 | } | |||
| 43 | }, | |||
| 44 | "clean_up_tokenization_spaces": true, | |||
| 45 | "cls_token": "[CLS]", | |||
| 46 | "do_lower_case": false, | |||
| 47 | "mask_token": "[MASK]", | |||
| 48 | "max_length": 512, | |||
| 49 | "model_max_length": 512, | |||
| 50 | "pad_token": "[PAD]", | |||
| 51 | "sep_token": "[SEP]", | |||
| 52 | "stride": 0, | |||
| 53 | "strip_accents": null, | |||
| 54 | "tokenize_chinese_chars": true, | |||
| 55 | "tokenizer_class": "DistilBertTokenizer", | |||
| 56 | "truncation_side": "right", | |||
| 57 | "truncation_strategy": "longest_first", | |||
| 58 | "unk_token": "[UNK]" | |||
| 59 | } |