ableian/teenytinystories
Viewer • Updated • 2.51M • 117 • 1
How to use ableian/TeenyTinyStories-33M with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="ableian/TeenyTinyStories-33M") # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("ableian/TeenyTinyStories-33M")
model = AutoModelForCausalLM.from_pretrained("ableian/TeenyTinyStories-33M", device_map="auto")How to use ableian/TeenyTinyStories-33M with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "ableian/TeenyTinyStories-33M"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "ableian/TeenyTinyStories-33M",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/ableian/TeenyTinyStories-33M
How to use ableian/TeenyTinyStories-33M with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "ableian/TeenyTinyStories-33M" \
--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": "ableian/TeenyTinyStories-33M",
"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 "ableian/TeenyTinyStories-33M" \
--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": "ableian/TeenyTinyStories-33M",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use ableian/TeenyTinyStories-33M with Docker Model Runner:
docker model run hf.co/ableian/TeenyTinyStories-33M
GPT-Neo storyteller (nominal 33M; actual 68,514,048 parameters including the 50,257-token embedding) trained on TeenyTinyStories (ableian/TeenyTinyStories)
EleutherAI/gpt-neo-125M (with EOS 50256; one EOS per story).Research on small-scale synthetic pretraining data. Generates simple children's stories; sample at temperature 0.8-1.0. See the TeenyTinyStories paper for the corpus recipe and judge evaluations.
Apache-2.0.