Instructions to use flyfesan/wod-gpt2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flyfesan/wod-gpt2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="flyfesan/wod-gpt2")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("flyfesan/wod-gpt2") model = AutoModelForCausalLM.from_pretrained("flyfesan/wod-gpt2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use flyfesan/wod-gpt2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flyfesan/wod-gpt2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flyfesan/wod-gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/flyfesan/wod-gpt2
- SGLang
How to use flyfesan/wod-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 "flyfesan/wod-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": "flyfesan/wod-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 "flyfesan/wod-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": "flyfesan/wod-gpt2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use flyfesan/wod-gpt2 with Docker Model Runner:
docker model run hf.co/flyfesan/wod-gpt2
wod-gpt2
This model is a fine-tuned version of gpt2 on flyfesan/wods β ~29.9K lines of CrossFit workout-of-the-day text β to generate new workouts in the same style. Lines are joined with | as the workout separator, tokenized, and packed into fixed 128-token blocks.
It achieves the following results on the evaluation set:
- Loss: 1.2975 (perplexity 3.66, down from 30.5 before fine-tuning)
Intended uses & limitations
Generate CrossFit-style workouts by prompting with an opening line (e.g. amrap 20 minutes) and sampling (top_k=50, temperature=0.9). The model reproduces the dataset's style and vocabulary, including its quirks (e.g. dumbell), not necessarily real-world programming wisdom. Small dataset (~136K tokens), so output can be repetitive.
Training and evaluation data
Full train split of flyfesan/wods (29,943 rows β 136,142 tokens β 1,063 blocks of 128 tokens); 95/5 train/eval split, seed 42.
Training procedure
Training hyperparameters
- learning_rate: 5e-05
- train_batch_size: 32
- eval_batch_size: 32
- seed: 42
- optimizer: AdamW (fused), betas=(0.9,0.999), epsilon=1e-08
- lr_scheduler_type: cosine
- lr_scheduler_warmup_steps: 20
- num_epochs: 3.0
- mixed_precision_training: Native AMP (fp16)
Training results
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 1.4852 | 1.5625 | 50 | 1.3917 |
| 1.3315 | 3.0 | 96 | 1.2975 |
Training was run on Hugging Face Jobs (t4-small, ~2.5 min); the live loss curve is on the Trackio dashboard.
Framework versions
- Transformers 5.20.2
- Pytorch 2.14.1+cu130
- Datasets 5.1.0
- Tokenizers 0.23.3
Example generation
Prompt: amrap 20 minutes
amrap 20 minutes
40 air squat
40 dumbell kettlebell swing
40 air squat
30 dumbell kettlebell swing
30 air squat
30 dumbell kettlebell swing
30 air squat
30 dumbell kettlebell swing
20 air squat
10 dumbell kettlebell swing
10 air squat
- Downloads last month
- 38
Model tree for flyfesan/wod-gpt2
Base model
openai-community/gpt2
docker model run hf.co/flyfesan/wod-gpt2