Instructions to use Reverb/GPyT with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Reverb/GPyT with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Reverb/GPyT")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Reverb/GPyT") model = AutoModelForCausalLM.from_pretrained("Reverb/GPyT") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use Reverb/GPyT with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Reverb/GPyT" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Reverb/GPyT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Reverb/GPyT
- SGLang
How to use Reverb/GPyT 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 "Reverb/GPyT" \ --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": "Reverb/GPyT", "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 "Reverb/GPyT" \ --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": "Reverb/GPyT", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Reverb/GPyT with Docker Model Runner:
docker model run hf.co/Reverb/GPyT
Update README.md
Browse files
README.md
CHANGED
|
@@ -6,9 +6,9 @@ license: apache-2.0
|
|
| 6 |
GPyT is a GPT2 model trained from scratch (not fine tuned) on Python code from Github. Overall, it was ~200GB of pure
|
| 7 |
Python code, the current GPyT model is a mere 2 epochs through this data, so it may benefit greatly from continued training and/or fine-tuning.
|
| 8 |
|
| 9 |
-
Newlines are replaced by
|
| 10 |
|
| 11 |
-
Input to the model is code, up to the context length of 1024, with newlines replaced by
|
| 12 |
|
| 13 |
Here's a quick example of using this model:
|
| 14 |
|
|
|
|
| 6 |
GPyT is a GPT2 model trained from scratch (not fine tuned) on Python code from Github. Overall, it was ~200GB of pure
|
| 7 |
Python code, the current GPyT model is a mere 2 epochs through this data, so it may benefit greatly from continued training and/or fine-tuning.
|
| 8 |
|
| 9 |
+
Newlines are replaced by newline <N>
|
| 10 |
|
| 11 |
+
Input to the model is code, up to the context length of 1024, with newlines replaced by newline "</N>"
|
| 12 |
|
| 13 |
Here's a quick example of using this model:
|
| 14 |
|