Text Generation
Transformers
TensorBoard
Safetensors
gpt2
Generated from Trainer
text-generation-inference
Instructions to use Zohaib002/GPT2-Model-Large-Dataset-Psycho with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Zohaib002/GPT2-Model-Large-Dataset-Psycho with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Zohaib002/GPT2-Model-Large-Dataset-Psycho")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Zohaib002/GPT2-Model-Large-Dataset-Psycho") model = AutoModelForCausalLM.from_pretrained("Zohaib002/GPT2-Model-Large-Dataset-Psycho") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Zohaib002/GPT2-Model-Large-Dataset-Psycho with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Zohaib002/GPT2-Model-Large-Dataset-Psycho" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Zohaib002/GPT2-Model-Large-Dataset-Psycho", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Zohaib002/GPT2-Model-Large-Dataset-Psycho
- SGLang
How to use Zohaib002/GPT2-Model-Large-Dataset-Psycho 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 "Zohaib002/GPT2-Model-Large-Dataset-Psycho" \ --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": "Zohaib002/GPT2-Model-Large-Dataset-Psycho", "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 "Zohaib002/GPT2-Model-Large-Dataset-Psycho" \ --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": "Zohaib002/GPT2-Model-Large-Dataset-Psycho", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Zohaib002/GPT2-Model-Large-Dataset-Psycho with Docker Model Runner:
docker model run hf.co/Zohaib002/GPT2-Model-Large-Dataset-Psycho
Training in progress, step 500
Browse files- model.safetensors +1 -1
- tokenizer_config.json +1 -1
- training_args.bin +1 -1
model.safetensors
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 497783424
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c6efe9120be41c8ade20efee9c0626b89ee4551bc4b1e260c57c0aaba1452dff
|
| 3 |
size 497783424
|
tokenizer_config.json
CHANGED
|
@@ -43,7 +43,7 @@
|
|
| 43 |
"eos_token": "<|endoftext|>",
|
| 44 |
"errors": "replace",
|
| 45 |
"extra_special_tokens": {},
|
| 46 |
-
"model_max_length":
|
| 47 |
"pad_token": "<|endoftext|>",
|
| 48 |
"tokenizer_class": "GPT2Tokenizer",
|
| 49 |
"unk_token": "<|endoftext|>"
|
|
|
|
| 43 |
"eos_token": "<|endoftext|>",
|
| 44 |
"errors": "replace",
|
| 45 |
"extra_special_tokens": {},
|
| 46 |
+
"model_max_length": 512,
|
| 47 |
"pad_token": "<|endoftext|>",
|
| 48 |
"tokenizer_class": "GPT2Tokenizer",
|
| 49 |
"unk_token": "<|endoftext|>"
|
training_args.bin
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
size 5969
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:57319e695c8da9e5efbe8bfa23d4d59d6f1e376f7b1e71795f15dec4ceda1c4c
|
| 3 |
size 5969
|