euirim/goodwiki
Viewer • Updated • 44.8k • 244 • 55
How to use pszemraj/pythia-31m-goodwiki-deduped-2048-scratch with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="pszemraj/pythia-31m-goodwiki-deduped-2048-scratch") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("pszemraj/pythia-31m-goodwiki-deduped-2048-scratch")
model = AutoModelForCausalLM.from_pretrained("pszemraj/pythia-31m-goodwiki-deduped-2048-scratch", device_map="auto")How to use pszemraj/pythia-31m-goodwiki-deduped-2048-scratch with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "pszemraj/pythia-31m-goodwiki-deduped-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/pythia-31m-goodwiki-deduped-2048-scratch",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/pszemraj/pythia-31m-goodwiki-deduped-2048-scratch
How to use pszemraj/pythia-31m-goodwiki-deduped-2048-scratch with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "pszemraj/pythia-31m-goodwiki-deduped-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/pythia-31m-goodwiki-deduped-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/pythia-31m-goodwiki-deduped-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/pythia-31m-goodwiki-deduped-2048-scratch",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use pszemraj/pythia-31m-goodwiki-deduped-2048-scratch with Docker Model Runner:
docker model run hf.co/pszemraj/pythia-31m-goodwiki-deduped-2048-scratch
Train from scratch based on config of EleutherAI/pythia-31m for 3 epochs.
It achieves the following results on the evaluation set:
More information needed
More information needed
***** eval metrics *****
epoch = 3.0
eval_accuracy = 0.2694 eval_loss = 4.4986
eval_runtime = 0:00:14.62
eval_samples = 500 eval_samples_per_second = 34.187 eval_steps_per_second = 17.093
perplexity = 89.8934
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 6.8347 | 0.16 | 100 | 6.7683 | 0.1380 |
| 6.0732 | 0.32 | 200 | 6.0489 | 0.1712 |
| 5.6949 | 0.48 | 300 | 5.6941 | 0.1935 |
| 5.4723 | 0.64 | 400 | 5.4411 | 0.2066 |
| 5.2672 | 0.8 | 500 | 5.2621 | 0.2162 |
| 5.165 | 0.96 | 600 | 5.1339 | 0.2241 |
| 5.0693 | 1.12 | 700 | 5.0290 | 0.2304 |
| 4.9234 | 1.28 | 800 | 4.9430 | 0.2369 |
| 4.886 | 1.44 | 900 | 4.8702 | 0.2413 |
| 4.8422 | 1.6 | 1000 | 4.8086 | 0.2458 |
| 4.7688 | 1.76 | 1100 | 4.7593 | 0.2488 |
| 4.734 | 1.93 | 1200 | 4.7118 | 0.2527 |
| 4.6877 | 2.09 | 1300 | 4.6721 | 0.2556 |
| 4.6135 | 2.25 | 1400 | 4.6350 | 0.2583 |
| 4.6117 | 2.41 | 1500 | 4.6013 | 0.2606 |
| 4.5424 | 2.57 | 1600 | 4.5707 | 0.2635 |
| 4.5535 | 2.73 | 1700 | 4.5447 | 0.2658 |
| 4.4823 | 2.89 | 1800 | 4.5181 | 0.2680 |
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 24.85 |
| ARC (25-shot) | 23.12 |
| HellaSwag (10-shot) | 25.66 |
| MMLU (5-shot) | 23.11 |
| TruthfulQA (0-shot) | 51.32 |
| Winogrande (5-shot) | 49.88 |
| GSM8K (5-shot) | 0.0 |
| DROP (3-shot) | 0.86 |