pszemraj/simple_wikipedia_LM
Viewer • Updated • 476k • 196 • 13
How to use pszemraj/GPT-Neo-33M-simplewiki-2048-scratch with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="pszemraj/GPT-Neo-33M-simplewiki-2048-scratch") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("pszemraj/GPT-Neo-33M-simplewiki-2048-scratch")
model = AutoModelForCausalLM.from_pretrained("pszemraj/GPT-Neo-33M-simplewiki-2048-scratch")How to use pszemraj/GPT-Neo-33M-simplewiki-2048-scratch with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "pszemraj/GPT-Neo-33M-simplewiki-2048-scratch"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "pszemraj/GPT-Neo-33M-simplewiki-2048-scratch",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/pszemraj/GPT-Neo-33M-simplewiki-2048-scratch
How to use pszemraj/GPT-Neo-33M-simplewiki-2048-scratch with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "pszemraj/GPT-Neo-33M-simplewiki-2048-scratch" \
--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": "pszemraj/GPT-Neo-33M-simplewiki-2048-scratch",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "pszemraj/GPT-Neo-33M-simplewiki-2048-scratch" \
--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": "pszemraj/GPT-Neo-33M-simplewiki-2048-scratch",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use pszemraj/GPT-Neo-33M-simplewiki-2048-scratch with Docker Model Runner:
docker model run hf.co/pszemraj/GPT-Neo-33M-simplewiki-2048-scratch
Initialized from random weights based on config from roneneldan/TinyStories-33M, 3 epochs bf16.
It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 5.4676 | 0.45 | 100 | 5.0139 | 0.2811 |
| 5.1729 | 0.89 | 200 | 4.6737 | 0.3050 |
| 4.8702 | 1.34 | 300 | 4.4922 | 0.3170 |
| 4.5538 | 1.79 | 400 | 4.3026 | 0.3348 |
| 4.4818 | 2.23 | 500 | 4.0908 | 0.3649 |
| 4.4583 | 2.68 | 600 | 3.9511 | 0.3843 |
Base model
roneneldan/TinyStories-33M