Model
ui-inference/ui-inference-tiny-gpt2-bin
- 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 'ui-inference/ui-inference-tiny-gpt2-bin'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-inference/ui-inference-tiny-gpt2-bin',
revision='391d725e802cc19f25c04dba99803b8e17427b7c',
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-inference/ui-inference-tiny-gpt2-bin')
model = AutoModel.from_pretrained('ui-inference/ui-inference-tiny-gpt2-bin')Clone with git
git clone 'https://api.provyd.xyz/ui-inference/ui-inference-tiny-gpt2-bin'Clone with git over SSH
git clone 'ssh://git@wd.provyd.xyz:2222/ui-inference/ui-inference-tiny-gpt2-bin'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-inference/ui-inference-tiny-gpt2-bin/revision/391d725e802cc19f25c04dba99803b8e17427b7c' \
-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 391d725
| Line | Commit | Author | Date | Code |
|---|---|---|---|---|
| 1 | Mirror hf-internal-testing/tiny-random-GPT2LMHeadModel (bin weights)391d725 | ui-inference | { | |
| 2 | "_name_or_path": "temp/dummy/gpt2/GPT2LMHeadModel", | |||
| 3 | "activation_function": "gelu", | |||
| 4 | "architectures": [ | |||
| 5 | "GPT2LMHeadModel" | |||
| 6 | ], | |||
| 7 | "attn_pdrop": 0.1, | |||
| 8 | "bos_token_id": 0, | |||
| 9 | "embd_pdrop": 0.1, | |||
| 10 | "eos_token_id": 0, | |||
| 11 | "gradient_checkpointing": false, | |||
| 12 | "initializer_range": 0.02, | |||
| 13 | "is_decoder": true, | |||
| 14 | "layer_norm_epsilon": 1e-05, | |||
| 15 | "model_type": "gpt2", | |||
| 16 | "n_embd": 32, | |||
| 17 | "n_head": 4, | |||
| 18 | "n_inner": 37, | |||
| 19 | "n_layer": 5, | |||
| 20 | "n_positions": 512, | |||
| 21 | "pad_token_id": 1023, | |||
| 22 | "reorder_and_upcast_attn": false, | |||
| 23 | "resid_pdrop": 0.1, | |||
| 24 | "scale_attn_by_inverse_layer_idx": false, | |||
| 25 | "scale_attn_weights": true, | |||
| 26 | "summary_activation": null, | |||
| 27 | "summary_first_dropout": 0.1, | |||
| 28 | "summary_proj_to_labels": true, | |||
| 29 | "summary_type": "cls_index", | |||
| 30 | "summary_use_proj": true, | |||
| 31 | "torch_dtype": "float32", | |||
| 32 | "transformers_version": "4.25.0.dev0", | |||
| 33 | "type_vocab_size": 16, | |||
| 34 | "use_cache": true, | |||
| 35 | "vocab_size": 1024 | |||
| 36 | } |