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")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("flax-community/papuGaPT2", dtype="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
delete tokenizer.json 85f99e8
praying now 7848bdf
tokenizer.json attempt fix 6b1fd70
fixes to tokenizer c8060dc
fixing tokenizer to match model vocab size 918d78a
corrections 96c0d42
typo a2dc7c2
typos 7d5590c
adding examples of use 75f66e7
text generation notebook 3d52adf
training schedule 29b174b
fix img url 01521e0
adding bias analysis c70c8fb
Merge branch 'main' of https://huggingface.co/flax-community/papuGaPT2 into main a2eff01
bias analysis d1176e2
analysing gender bias 0d8e31e
gender bias jpeg a5fe283
Darek Kłeczek commited on