Instructions to use ichangzii/pit2022-gpt2-124m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ichangzii/pit2022-gpt2-124m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="ichangzii/pit2022-gpt2-124m")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("ichangzii/pit2022-gpt2-124m") model = AutoModelForCausalLM.from_pretrained("ichangzii/pit2022-gpt2-124m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ichangzii/pit2022-gpt2-124m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ichangzii/pit2022-gpt2-124m" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ichangzii/pit2022-gpt2-124m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/ichangzii/pit2022-gpt2-124m
- SGLang
How to use ichangzii/pit2022-gpt2-124m 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 "ichangzii/pit2022-gpt2-124m" \ --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": "ichangzii/pit2022-gpt2-124m", "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 "ichangzii/pit2022-gpt2-124m" \ --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": "ichangzii/pit2022-gpt2-124m", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use ichangzii/pit2022-gpt2-124m with Docker Model Runner:
docker model run hf.co/ichangzii/pit2022-gpt2-124m
PIT-GPT-2-124M β a point-in-time (β€2022) language model
GPT-2 (124 M) trained from scratch on only β€2022 data, giving a certified lookahead-free knowledge cutoff. Built for reliable time-sensitive evaluation (e.g. trading backtests) where the model must not know the future β the cutoff is clean by construction (never trained on post-2022 text), not by unlearning or suppression.
Cutoff certification (causal-completion probe)
| mean p(answer) | |
|---|---|
| POST-2022 (Threads, Sora, Gemini, DeepSeek, Bard, Grok, Llama, Mistral β should NOT know) | 0.001 |
| β€2022 (COVID 0.82, Ukraine 0.24, Brexit β should know) | 0.136 |
The model has ~zero knowledge of unforeseen 2023+ entities. (Probe caveat: entities that existed or were speculated pre-2022 β e.g. GPT-4, Credit Suisse β leak via legitimate β€2022 knowledge, not lookahead; those are excluded.)
Quality
- WikiText-2 perplexity: 43.1 (random-init β 50 000; fully-trained GPT-2-124 M β 30β37)
- Coherent, grammatical generation. 4.2 B tokens seen (past Chinchilla-optimal for 124 M; undertrained vs GPT-2's ~10 B β ppl ~43 not ~30).
loss_curve.csvandppl_by_checkpoint.jsonincluded.
Training
- Data: ichangzii/pit2022-10b (foundation) + ichangzii/pit2022-news (date-tagged), all β€2022.
- GPT-2 tokenizer, AdamW (Ξ²2 .95, wd .1, lr 6e-4, ~0.5 M batch), non-overlapping shuffled sampling, bf16,
torch.compile. RTX 5090.
Usage
from transformers import AutoModelForCausalLM, AutoTokenizer
m = AutoModelForCausalLM.from_pretrained("ichangzii/pit2022-gpt2-124m")
tok = AutoTokenizer.from_pretrained("gpt2")
Limitations
- Undertrained (4.2 B tokens) β a longer run (~10 B) would lower perplexity and strengthen β€2022 knowledge.
- Time-conditioning did not emerge β prepending
Date: YYYY-MM-DDhas no effect (date-tagged news was only ~4% of training). This is a single clean cutoff, not a queryable as-of-date model.
- Downloads last month
- 179