How to use from
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 "evalstate/tiny-gpt-memorization-2m" \
    --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": "evalstate/tiny-gpt-memorization-2m",
		"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 "evalstate/tiny-gpt-memorization-2m" \
        --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": "evalstate/tiny-gpt-memorization-2m",
		"prompt": "Once upon a time,",
		"max_tokens": 512,
		"temperature": 0.5
	}'
Quick Links

Tiny GPT memorization checkpoint (2m, near-capacity / saturation boundary)

From an exploratory tiny-scale replication of How much do language models memorize?.

  • Architecture: GPT-2 (transformers), trained from scratch.
  • Parameters: 1,871,056 (non-embedding 1,496,352).
  • Vocab: 2048 data tokens (uniform random) + BOS = 2049 model vocab.
  • Sequence length: 64 (paper S=64).
  • Dataset: 10000 sequences, 640,000 data tokens, dataset entropy 7,040,000 bits (7.040 Mbits).
  • Trained 7330 steps, AdamW, bfloat16, lr 0.002, batch 512.
  • Result: train loss 3.7714 bits/tok, held loss 18.0931, memorized 4,626,295 bits = 2.473 bits/parameter.

This is the near-capacity (saturation-boundary) run for this model size. Below- and above-capacity checkpoints for the same architecture are published as state.pt files in the results dataset evalstate/tiny-memorization-results.

Load with:

from transformers import GPT2LMHeadModel
model = GPT2LMHeadModel.from_pretrained("evalstate/tiny-gpt-memorization-2m")

Findings are scoped as an exploratory tiny-scale check (three architectures), NOT a universal scaling law.

Downloads last month
416
Safetensors
Model size
1.87M params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Paper for evalstate/tiny-gpt-memorization-2m