Instructions to use flax-community/papuGaPT2 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use flax-community/papuGaPT2 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="flax-community/papuGaPT2")# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("flax-community/papuGaPT2", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use flax-community/papuGaPT2 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "flax-community/papuGaPT2" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "flax-community/papuGaPT2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/flax-community/papuGaPT2
- SGLang
How to use flax-community/papuGaPT2 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 "flax-community/papuGaPT2" \ --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": "flax-community/papuGaPT2", "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 "flax-community/papuGaPT2" \ --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": "flax-community/papuGaPT2", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use flax-community/papuGaPT2 with Docker Model Runner:
docker model run hf.co/flax-community/papuGaPT2
Commit History
-
praying now
7848bdf -
tokenizer.json attempt fix
6b1fd70
-
Saving weights and logs of step 91000
c57afa9 -
Saving weights and logs of step 84000
198301c -
Saving weights and logs of step 77000
62c22a2 -
Saving weights and logs of step 70000
03e3803 -
Saving weights and logs of step 63000
e4dc5e8
-
Saving weights and logs of step 56000
ae85112 -
Saving weights and logs of step 49000
bda36e4 -
Saving weights and logs of step 42000
ebc55b9 -
Saving weights and logs of step 35000
0dcb38b -
Saving weights and logs of step 28000
c8dbded -
Saving weights and logs of step 21000
3f2a7d9 -
Saving weights and logs of step 14000
f668404 -
Saving weights and logs of step 7000
2cfed34
-
Saving weights and logs of step 84000
5d44a2b -
Saving weights and logs of step 77000
02dcad3 -
Saving weights and logs of step 70000
21db966 -
Saving weights and logs of step 63000
1f7ae82 -
Saving weights and logs of step 56000
176902d -
Saving weights and logs of step 49000
1675ace -
Saving weights and logs of step 42000
f07880b -
Saving weights and logs of step 35000
7e708b5
-
Saving weights and logs of step 28000
eb633a6 -
Saving weights and logs of step 21000
37033ef -
Saving weights and logs of step 14000
0b87a65 -
Saving weights and logs of step 7000
9ad46bc
-
Saving weights and logs of step 77000
dfba893 -
Saving weights and logs of step 70000
22bbe06 -
Saving weights and logs of step 63000
f34b97f -
Saving weights and logs of step 56000
a8a0e7a -
Saving weights and logs of step 49000
dca9f40 -
Saving weights and logs of step 42000
b9eaa6f -
Saving weights and logs of step 35000
dab3ebe -
Saving weights and logs of step 28000
9aaa0a9 -
Saving weights and logs of step 21000
59cc694
-
Saving weights and logs of step 14000
2436395 -
Saving weights and logs of step 7000
7302824
-
Saving weights and logs of step 49000
b3f155f -
Saving weights and logs of step 42000
d7c4acc -
Saving weights and logs of step 35000
4e0b098 -
Saving weights and logs of step 28000
94b4647 -
Saving weights and logs of step 21000
d8196db -
Saving weights and logs of step 14000
4935650 -
Saving weights and logs of step 7000
95fb2ed
-
Saving weights and logs of step 7000
c17b2db -
Saving weights and logs of step 3500
937017d -
Saving weights and logs of step 10
3362161
-
Saving weights and logs of epoch 1
fb6a496
-
Saving weights and logs of epoch 8
0145b4d