Model
rv-clients/rv-clients-tiny-gpt2
- Task:Text Generation
- Libraries:transformerspytorch
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 'rv-clients/rv-clients-tiny-gpt2'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='rv-clients/rv-clients-tiny-gpt2',
revision='0d4b07d02beec226ac4b266fb8ddd0ec2bf565c7',
endpoint='https://api.provyd.xyz',
token=os.environ.get("HF_TOKEN") or False,
)Load with transformers
import os
os.environ["HF_ENDPOINT"] = 'https://api.provyd.xyz'
from transformers import AutoModel, AutoTokenizer
tokenizer = AutoTokenizer.from_pretrained('rv-clients/rv-clients-tiny-gpt2')
model = AutoModel.from_pretrained('rv-clients/rv-clients-tiny-gpt2')Clone with git
git clone 'https://api.provyd.xyz/rv-clients/rv-clients-tiny-gpt2'Clone with git over SSH
git clone 'ssh://git@wd.provyd.xyz:2222/rv-clients/rv-clients-tiny-gpt2'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/rv-clients/rv-clients-tiny-gpt2/revision/0d4b07d02beec226ac4b266fb8ddd0ec2bf565c7' \
-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 0d4b07d
| Line | Commit | Author | Date | Code |
|---|---|---|---|---|
| 1 | Upload folder using huggingface_hub0d4b07d | rv-clients | { | |
| 2 | "activation_function": "gelu_new", | |||
| 3 | "architectures": [ | |||
| 4 | "GPT2LMHeadModel" | |||
| 5 | ], | |||
| 6 | "attn_pdrop": 0.1, | |||
| 7 | "bos_token_id": 50256, | |||
| 8 | "embd_pdrop": 0.1, | |||
| 9 | "eos_token_id": 50256, | |||
| 10 | "initializer_range": 0.02, | |||
| 11 | "layer_norm_epsilon": 1e-05, | |||
| 12 | "model_type": "gpt2", | |||
| 13 | "n_ctx": 1024, | |||
| 14 | "n_embd": 2, | |||
| 15 | "n_head": 2, | |||
| 16 | "n_layer": 2, | |||
| 17 | "n_positions": 1024, | |||
| 18 | "resid_pdrop": 0.1, | |||
| 19 | "summary_activation": null, | |||
| 20 | "summary_first_dropout": 0.1, | |||
| 21 | "summary_proj_to_labels": true, | |||
| 22 | "summary_type": "cls_index", | |||
| 23 | "summary_use_proj": true, | |||
| 24 | "task_specific_params": { | |||
| 25 | "text-generation": { | |||
| 26 | "do_sample": true, | |||
| 27 | "max_length": 50 | |||
| 28 | } | |||
| 29 | }, | |||
| 30 | "vocab_size": 50257 | |||
| 31 | } |