Instructions to use evilfreelancer/dostoevsky_doesnt_write_it_gpt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use evilfreelancer/dostoevsky_doesnt_write_it_gpt2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="evilfreelancer/dostoevsky_doesnt_write_it_gpt2")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("evilfreelancer/dostoevsky_doesnt_write_it_gpt2") model = AutoModelForCausalLM.from_pretrained("evilfreelancer/dostoevsky_doesnt_write_it_gpt2") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use evilfreelancer/dostoevsky_doesnt_write_it_gpt2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "evilfreelancer/dostoevsky_doesnt_write_it_gpt2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "evilfreelancer/dostoevsky_doesnt_write_it_gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/evilfreelancer/dostoevsky_doesnt_write_it_gpt2
- SGLang
How to use evilfreelancer/dostoevsky_doesnt_write_it_gpt2 with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "evilfreelancer/dostoevsky_doesnt_write_it_gpt2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "evilfreelancer/dostoevsky_doesnt_write_it_gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "evilfreelancer/dostoevsky_doesnt_write_it_gpt2" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "evilfreelancer/dostoevsky_doesnt_write_it_gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use evilfreelancer/dostoevsky_doesnt_write_it_gpt2 with Docker Model Runner:
docker model run hf.co/evilfreelancer/dostoevsky_doesnt_write_it_gpt2
Commit ·
f1ef1a4
1
Parent(s): a8e4c2c
Upload 8 files
Browse files- config.json +62 -0
- eval_results.txt +1 -0
- merges.txt +0 -0
- pytorch_model.bin +3 -0
- special_tokens_map.json +1 -0
- tokenizer_config.json +1 -0
- training_args.bin +3 -0
- vocab.json +0 -0
config.json
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_num_labels": 2,
|
| 3 |
+
"activation_function": "gelu_new",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"GPT2LMHeadModel"
|
| 6 |
+
],
|
| 7 |
+
"attn_pdrop": 0.1,
|
| 8 |
+
"bad_words_ids": null,
|
| 9 |
+
"bos_token_id": 50256,
|
| 10 |
+
"decoder_start_token_id": null,
|
| 11 |
+
"do_sample": false,
|
| 12 |
+
"early_stopping": false,
|
| 13 |
+
"embd_pdrop": 0.1,
|
| 14 |
+
"eos_token_id": 50256,
|
| 15 |
+
"finetuning_task": null,
|
| 16 |
+
"gradient_checkpointing": false,
|
| 17 |
+
"id2label": {
|
| 18 |
+
"0": "LABEL_0",
|
| 19 |
+
"1": "LABEL_1"
|
| 20 |
+
},
|
| 21 |
+
"initializer_range": 0.02,
|
| 22 |
+
"is_decoder": false,
|
| 23 |
+
"is_encoder_decoder": false,
|
| 24 |
+
"label2id": {
|
| 25 |
+
"LABEL_0": 0,
|
| 26 |
+
"LABEL_1": 1
|
| 27 |
+
},
|
| 28 |
+
"layer_norm_epsilon": 1e-05,
|
| 29 |
+
"length_penalty": 1.0,
|
| 30 |
+
"max_length": 20,
|
| 31 |
+
"min_length": 0,
|
| 32 |
+
"model_type": "gpt2",
|
| 33 |
+
"n_ctx": 2048,
|
| 34 |
+
"n_embd": 768,
|
| 35 |
+
"n_head": 12,
|
| 36 |
+
"n_inner": null,
|
| 37 |
+
"n_layer": 12,
|
| 38 |
+
"n_positions": 2048,
|
| 39 |
+
"no_repeat_ngram_size": 0,
|
| 40 |
+
"num_beams": 1,
|
| 41 |
+
"num_return_sequences": 1,
|
| 42 |
+
"output_attentions": false,
|
| 43 |
+
"output_hidden_states": false,
|
| 44 |
+
"output_past": true,
|
| 45 |
+
"pad_token_id": null,
|
| 46 |
+
"prefix": null,
|
| 47 |
+
"pruned_heads": {},
|
| 48 |
+
"repetition_penalty": 1.0,
|
| 49 |
+
"resid_pdrop": 0.1,
|
| 50 |
+
"summary_activation": null,
|
| 51 |
+
"summary_first_dropout": 0.1,
|
| 52 |
+
"summary_proj_to_labels": true,
|
| 53 |
+
"summary_type": "cls_index",
|
| 54 |
+
"summary_use_proj": true,
|
| 55 |
+
"task_specific_params": null,
|
| 56 |
+
"temperature": 1.0,
|
| 57 |
+
"top_k": 50,
|
| 58 |
+
"top_p": 1.0,
|
| 59 |
+
"torchscript": false,
|
| 60 |
+
"use_bfloat16": false,
|
| 61 |
+
"vocab_size": 50257
|
| 62 |
+
}
|
eval_results.txt
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
perplexity = tensor(22.6912)
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:835af85ef8eb4571b9eb46ba421777788a177c5b5af767b112e978fc21997638
|
| 3 |
+
size 702290957
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"bos_token": "<|endoftext|>", "eos_token": "<|endoftext|>", "unk_token": "<|endoftext|>"}
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{}
|
training_args.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9467dc68dd9d879ebb53e9025f9429f10b3e2707746718674988122f8bb048ea
|
| 3 |
+
size 1595
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|