Text Generation
Transformers
PyTorch
Safetensors
English
gpt_neox
causal-lm
pythia
text-generation-inference
Instructions to use EleutherAI/pythia-160m with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use EleutherAI/pythia-160m with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="EleutherAI/pythia-160m")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("EleutherAI/pythia-160m") model = AutoModelForCausalLM.from_pretrained("EleutherAI/pythia-160m", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use EleutherAI/pythia-160m with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "EleutherAI/pythia-160m" # 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", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/EleutherAI/pythia-160m
- SGLang
How to use EleutherAI/pythia-160m 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" \ --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", "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" \ --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", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use EleutherAI/pythia-160m with Docker Model Runner:
docker model run hf.co/EleutherAI/pythia-160m
Commit History
-
Adding `safetensors` variant of this model
This is an automated PR created with https://huggingface.co/spaces/safetensors/convert This new file is equivalent to `pytorch_model.bin` but safe in the sense that no arbitrary code can be put into it. These files also happen to load much faster than their pytorch counterpart: https://colab.research.google.com/github/huggingface/notebooks/blob/main/safetensors_doc/en/speed.ipynb The widgets on your model page will run using this model even if this is not merged making sure the file actually works. If you find any issues: please report here: https://huggingface.co/spaces/safetensors/convert/discussions Feel free to ignore this PR.cf81a57
-
fix batch size and add paper
26b94a3
-
Upload pytorch_model.bin
57c4cbf -
Upload tokenizer.json
40f6318 -
Upload tokenizer_config.json
4560d92 -
Upload config.json
521f765 -
Upload special_tokens_map.json
7e30bb8
-
create updated readme
64a5b91
-
Upload config.json
e0a0251 -
Upload special_tokens_map.json
5c39738 -
Upload tokenizer.json
4c6801b -
Upload pytorch_model.bin
0243faf -
Upload tokenizer_config.json
a2e7dc4
-
Upload config.json
610be53 -
Upload pytorch_model.bin
ac17eb6 -
Upload special_tokens_map.json
a6b1312 -
Upload tokenizer_config.json
30ac103 -
Upload tokenizer.json
e1fd0cf -
Upload special_tokens_map.json
1dc1688 -
Upload config.json
cd86582 -
Upload tokenizer_config.json
a82aaf0 -
Upload tokenizer.json
d38718f -
Upload pytorch_model.bin
4fb48c3 -
Upload config.json
6e10859 -
Upload tokenizer_config.json
5e3f0aa -
Upload pytorch_model.bin
e4d63e7 -
Upload special_tokens_map.json
4550161 -
Upload tokenizer.json
f96ca98 -
Upload config.json
7acef1e -
Upload special_tokens_map.json
2be6e37 -
Upload tokenizer.json
9cbd7c8 -
Upload tokenizer_config.json
b83afbb -
Upload pytorch_model.bin
f59fbc6 -
Upload pytorch_model.bin
85aa9e2 -
Upload tokenizer_config.json
9cab9b4 -
Upload tokenizer.json
04db95c -
Upload special_tokens_map.json
5f8e072 -
Upload config.json
575bf7c -
Upload tokenizer_config.json
84b79d4 -
Upload tokenizer.json
26b13cc -
Upload special_tokens_map.json
fd70af8 -
Upload config.json
be61115
-
initial commit
Hailey Schoelkopf8746001