Model
ui-models/ui-models-gpt2
- Task:Text Generation
- Libraries:transformers
- Formats:safetensors
- Languages:English
- License:mit
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 'ui-models/ui-models-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='ui-models/ui-models-gpt2',
revision='4d607fd463b1e0a9d4898f93b1eb6239d69dba5d',
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('ui-models/ui-models-gpt2')
model = AutoModel.from_pretrained('ui-models/ui-models-gpt2')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 'ui-models/ui-models-gpt2'Clone with git
git clone 'https://api.provyd.xyz/ui-models/ui-models-gpt2'Clone with git over SSH
git clone 'ssh://git@wd.provyd.xyz:2222/ui-models/ui-models-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/ui-models/ui-models-gpt2/revision/4d607fd463b1e0a9d4898f93b1eb6239d69dba5d' \
-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.
ui-models: add gpt2 config, tokenizer and safetensors weights
ui-models committed on October 21, 2026
8c5e064b224dfbf12701864feeb1d820d5a75959Parent d0a1bd2Browse files
7 files changed+38 -0
config.json
Added+31 -0
config.json
| @@ -0,0 +1,31 @@ | |||
| 1 | Added: { | ||
| 2 | Added: "activation_function": "gelu_new", | ||
| 3 | Added: "architectures": [ | ||
| 4 | Added: "GPT2LMHeadModel" | ||
| 5 | Added: ], | ||
| 6 | Added: "attn_pdrop": 0.1, | ||
| 7 | Added: "bos_token_id": 50256, | ||
| 8 | Added: "embd_pdrop": 0.1, | ||
| 9 | Added: "eos_token_id": 50256, | ||
| 10 | Added: "initializer_range": 0.02, | ||
| 11 | Added: "layer_norm_epsilon": 1e-05, | ||
| 12 | Added: "model_type": "gpt2", | ||
| 13 | Added: "n_ctx": 1024, | ||
| 14 | Added: "n_embd": 768, | ||
| 15 | Added: "n_head": 12, | ||
| 16 | Added: "n_layer": 12, | ||
| 17 | Added: "n_positions": 1024, | ||
| 18 | Added: "resid_pdrop": 0.1, | ||
| 19 | Added: "summary_activation": null, | ||
| 20 | Added: "summary_first_dropout": 0.1, | ||
| 21 | Added: "summary_proj_to_labels": true, | ||
| 22 | Added: "summary_type": "cls_index", | ||
| 23 | Added: "summary_use_proj": true, | ||
| 24 | Added: "task_specific_params": { | ||
| 25 | Added: "text-generation": { | ||
| 26 | Added: "do_sample": true, | ||
| 27 | Added: "max_length": 50 | ||
| 28 | Added: } | ||
| 29 | Added: }, | ||
| 30 | Added: "vocab_size": 50257 | ||
| 31 | Added: }(no newline at end of file) | ||
generation_config.json
Added+6 -0
generation_config.json
| @@ -0,0 +1,6 @@ | |||
| 1 | Added: { | ||
| 2 | Added: "bos_token_id": 50256, | ||
| 3 | Added: "eos_token_id": 50256, | ||
| 4 | Added: "transformers_version": "4.26.0.dev0", | ||
| 5 | Added: "_from_model_config": true | ||
| 6 | Added: } | ||
merges.txt
Added
merges.txt
This file is too large to display.
model.safetensors
Added
model.safetensors
Large (LFS-tracked) file content changed — 523 MB
tokenizer.json
Added
tokenizer.json
Large (LFS-tracked) file content changed — 1.3 MB
tokenizer_config.json
Added+1 -0
tokenizer_config.json
| @@ -0,0 +1,1 @@ | |||
| 1 | Added: {"model_max_length": 1024}(no newline at end of file) | ||
vocab.json
Added
vocab.json
This file is too large to display.