Text Generation
Transformers
PyTorch
Safetensors
Serbian
gpt2
Srpski
Serbian
GPT2
generisanje
text-generation-inference
Instructions to use jerteh/gpt2-orao with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use jerteh/gpt2-orao with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="jerteh/gpt2-orao")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("jerteh/gpt2-orao") model = AutoModelForCausalLM.from_pretrained("jerteh/gpt2-orao", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use jerteh/gpt2-orao with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "jerteh/gpt2-orao" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "jerteh/gpt2-orao", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/jerteh/gpt2-orao
- SGLang
How to use jerteh/gpt2-orao 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 "jerteh/gpt2-orao" \ --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": "jerteh/gpt2-orao", "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 "jerteh/gpt2-orao" \ --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": "jerteh/gpt2-orao", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use jerteh/gpt2-orao with Docker Model Runner:
docker model run hf.co/jerteh/gpt2-orao
Commit History
-
Update README.md
Verified signaturea7dfec6
-
Update README.md
Verified signature50345a8 -
Update README.md
Verified signature1ea67f4
-
Update README.md
Verified signatureb84c39f
-
Update README.md
Verified signature7b6494e -
Update README.md
Verified signaturedd5bb09
-
Update README.md
Verified signaturef4b292b
-
Update README.md
Verified signature027484e
-
Update README.md
Verified signature36b345b -
Update README.md
Verified signaturebcf798a
-
Update README.md
Verified signaturefd0928f
-
Update README.md
Verified signature7411649
-
Update README.md
Verified signature7cdfb7c -
Update README.md
Verified signaturee133c41 -
Update README.md
Verified signaturef66dc83
-
Update README.md
6445352 -
Upload cover.png
3253f42
-
Update README.md
15cd42f -
Update README.md
4e8f17e -
Update README.md
bb635fe -
Update README.md
78e2d31 -
Update README.md
4fa3e07 -
Update README.md
8fefecb -
Update README.md
5586e22 -
Update README.md
e4646cc -
Update README.md
c42743f -
Update README.md
24f13b3 -
Upload tokenizer.json
dd1c587
-
Update README.md
cf4f846
-
Adding `safetensors` variant of this model (#3)
- Adding `safetensors` variant of this model (6e5f735dedfb386abc653b38c54f68d8a4d33eaf)349a451 -
Update README.md
a3c5952 -
Update README.md
826949e -
Update generation_config.json
72dfe61
-
Update README.md
01c0f58 -
Upload pytorch_model.bin
96e4a22 -
Upload 3 files
a656de1
-
Upload pytorch_model.bin
41264b5
-
Update README.md
329eaed -
Upload 5 files
b5745a3 -
Update README.md
9885aa9 -
initial commit
f9d3ff1