Model
rv2-clients/rv2-clients-dup-of-other
- Task:Fill Mask
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 'rv2-clients/rv2-clients-dup-of-other'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='rv2-clients/rv2-clients-dup-of-other',
revision='e8b370cabaab24e2de27066be708116c365ea7d6',
endpoint='https://api.provyd.xyz',
token=os.environ.get("HF_TOKEN") or False,
)Fill masks with transformers
import os
os.environ["HF_ENDPOINT"] = 'https://api.provyd.xyz'
from transformers import pipeline
pipe = pipeline("fill-mask", model='rv2-clients/rv2-clients-dup-of-other')
words = pipe(f"The goal of life is {pipe.tokenizer.mask_token}.")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/rv2-clients/rv2-clients-dup-of-other', token=os.environ["WD_INFERENCE_KEY"])
# Put the model's own mask token in the text ([MASK] for BERT, <mask> for RoBERTa).
words = client.fill_mask("The goal of life is [MASK].")Clone with git
git clone 'https://api.provyd.xyz/rv2-clients/rv2-clients-dup-of-other'Clone with git over SSH
git clone 'ssh://git@wd.provyd.xyz:2222/rv2-clients/rv2-clients-dup-of-other'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/rv2-clients/rv2-clients-dup-of-other/revision/e8b370cabaab24e2de27066be708116c365ea7d6' \
-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 config.json at e8b370c
| Line | Commit | Author | Date | Code |
|---|---|---|---|---|
| 1 | bert config+tokenizere8b370c | wdtest-a | { | |
| 2 | "architectures": [ | |||
| 3 | "BertForMaskedLM" | |||
| 4 | ], | |||
| 5 | "attention_probs_dropout_prob": 0.1, | |||
| 6 | "gradient_checkpointing": false, | |||
| 7 | "hidden_act": "gelu", | |||
| 8 | "hidden_dropout_prob": 0.1, | |||
| 9 | "hidden_size": 768, | |||
| 10 | "initializer_range": 0.02, | |||
| 11 | "intermediate_size": 3072, | |||
| 12 | "layer_norm_eps": 1e-12, | |||
| 13 | "max_position_embeddings": 512, | |||
| 14 | "model_type": "bert", | |||
| 15 | "num_attention_heads": 12, | |||
| 16 | "num_hidden_layers": 12, | |||
| 17 | "pad_token_id": 0, | |||
| 18 | "position_embedding_type": "absolute", | |||
| 19 | "transformers_version": "4.6.0.dev0", | |||
| 20 | "type_vocab_size": 2, | |||
| 21 | "use_cache": true, | |||
| 22 | "vocab_size": 30522 | |||
| 23 | } |