Text Generation
Transformers
PyTorch
Safetensors
English
gpt_neox
causal-lm
pythia
pythia_v0
text-generation-inference
Instructions to use EleutherAI/pythia-160m-v0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EleutherAI/pythia-160m-v0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EleutherAI/pythia-160m-v0")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("EleutherAI/pythia-160m-v0") model = AutoModelForCausalLM.from_pretrained("EleutherAI/pythia-160m-v0", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use EleutherAI/pythia-160m-v0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EleutherAI/pythia-160m-v0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "EleutherAI/pythia-160m-v0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/EleutherAI/pythia-160m-v0
- SGLang
How to use EleutherAI/pythia-160m-v0 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 "EleutherAI/pythia-160m-v0" \ --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": "EleutherAI/pythia-160m-v0", "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 "EleutherAI/pythia-160m-v0" \ --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": "EleutherAI/pythia-160m-v0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use EleutherAI/pythia-160m-v0 with Docker Model Runner:
docker model run hf.co/EleutherAI/pythia-160m-v0
Commit History
-
Adding `safetensors` variant of this model (#3)
- Adding `safetensors` variant of this model (173caf3af03f0dd2f3956d6245deb5c7bed7755e) Co-authored-by: Safetensors convertbot <SFconvertbot@users.noreply.huggingface.co>3ef0c8c
-
add v0 tag
334147c
-
Add evaluations
44b049e
-
Create README.md (#1)
- Create README.md (395ddedb944c5a05564268b701749888c15bc466) Co-authored-by: Aviya Skowron <avi-skowron@users.noreply.huggingface.co>c948b8e
-
Upload special_tokens_map.json
0819b36 -
Upload tokenizer_config.json
045eeb1 -
Upload tokenizer.json
4fa7b90
-
Update config.json
ed7313f
-
Upload with huggingface_hub
687d976 -
initial commit
Hailey Schoelkopffc49f26