Text Generation
Transformers
PyTorch
TensorFlow
TensorBoard
English
gpt2
exbert
text-generation-inference
Instructions to use olm/olm-gpt2-oct-2022 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use olm/olm-gpt2-oct-2022 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="olm/olm-gpt2-oct-2022")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("olm/olm-gpt2-oct-2022") model = AutoModelForCausalLM.from_pretrained("olm/olm-gpt2-oct-2022", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use olm/olm-gpt2-oct-2022 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "olm/olm-gpt2-oct-2022" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "olm/olm-gpt2-oct-2022", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/olm/olm-gpt2-oct-2022
- SGLang
How to use olm/olm-gpt2-oct-2022 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 "olm/olm-gpt2-oct-2022" \ --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": "olm/olm-gpt2-oct-2022", "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 "olm/olm-gpt2-oct-2022" \ --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": "olm/olm-gpt2-oct-2022", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use olm/olm-gpt2-oct-2022 with Docker Model Runner:
docker model run hf.co/olm/olm-gpt2-oct-2022
Commit History
-
Training in progress, step 580000
Tristan Thrush1a49a26 -
Training in progress, step 570000
Tristan Thrush428ac95 -
Training in progress, step 560000
Tristan Thrushe0e1711 -
Training in progress, step 550000
Tristan Thrushf0b5d48 -
Training in progress, step 540000
Tristan Thrushce6b2bb
-
Training in progress, step 530000
Tristan Thrushfab56b1 -
Training in progress, step 520000
Tristan Thrush203f62b -
Training in progress, step 510000
Tristan Thrush8ba11b3 -
Training in progress, step 500000
Tristan Thrush8fc5dcb -
Training in progress, step 490000
Tristan Thrush15edf58 -
Training in progress, step 480000
Tristan Thrush7d2f15d -
Training in progress, step 470000
Tristan Thrush106dac6 -
Training in progress, step 460000
Tristan Thrush3a833c4 -
Training in progress, step 450000
Tristan Thrush8638c55
-
Training in progress, step 440000
Tristan Thrushedb2c30 -
Training in progress, step 430000
Tristan Thrushbeaceca -
Training in progress, step 420000
Tristan Thrush5cd618a
-
Training in progress, step 410000
Tristan Thrush1aa9a9e -
Training in progress, step 400000
Tristan Thrushebe9250 -
Training in progress, step 390000
Tristan Thrush779abc7 -
Training in progress, step 380000
Tristan Thrush3dbd62e -
Training in progress, step 370000
Tristan Thrush59d7773 -
Training in progress, step 360000
Tristan Thrush20d7282 -
Training in progress, step 350000
Tristan Thrushe6ee65b -
Training in progress, step 340000
Tristan Thrush6652925
-
Training in progress, step 330000
Tristan Thrush9ad3fa9 -
Training in progress, step 320000
Tristan Thrusha1cfacc -
Training in progress, step 310000
Tristan Thrush1c9b10d -
Training in progress, step 300000
Tristan Thrush92849c5 -
Training in progress, step 290000
Tristan Thrushaf423bf -
Training in progress, step 280000
Tristan Thrushe0a3d1c -
Training in progress, step 270000
Tristan Thrushb4d33e6 -
Training in progress, step 260000
Tristan Thrush09b2b98 -
Training in progress, step 250000
Tristan Thrushd531994
-
Training in progress, step 240000
Tristan Thrush0279cfc -
Training in progress, step 230000
Tristan Thrush015f6f2 -
Training in progress, step 220000
Tristan Thrush516637e -
Training in progress, step 210000
Tristan Thrush4a20edd -
Training in progress, step 200000
Tristan Thrushcfd8457 -
Training in progress, step 190000
Tristan Thrushb6cbca6 -
Training in progress, step 180000
Tristan Thrush9faa89a -
Training in progress, step 170000
Tristan Thrush5969c90
-
Training in progress, step 160000
Tristan Thrush8e0a4fe -
Training in progress, step 150000
Tristan Thrush780e615 -
Training in progress, step 140000
Tristan Thrush3430f2b -
Training in progress, step 130000
Tristan Thrush864825e -
Training in progress, step 120000
Tristan Thrushd4be311 -
Training in progress, step 110000
Tristan Thrush9450e61 -
Training in progress, step 100000
Tristan Thrush8aabf7a -
Training in progress, step 90000
Tristan Thrush91470fd