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")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("Reverb/GPyT") model = AutoModelForCausalLM.from_pretrained("Reverb/GPyT", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- 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
|
@@ -40,6 +40,34 @@ import pytest
|
|
| 40 |
|
| 41 |
import pandas as pd<N
|
| 42 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
## Considerations:
|
| 45 |
|
|
|
|
| 40 |
|
| 41 |
import pandas as pd<N
|
| 42 |
```
|
| 43 |
+
---
|
| 44 |
+
|
| 45 |
+
## The Journey
|
| 46 |
+
The model took 6 major steps which are:
|
| 47 |
+
|
| 48 |
+
1. Data Collection
|
| 49 |
+
2. Raw Data Cleaning
|
| 50 |
+
3. Data Preprocessing
|
| 51 |
+
4. Building & Training the Tokenizer
|
| 52 |
+
5. Testing the Model on Large Dataset
|
| 53 |
+
6. Deploying the Final Model on HuggingFace
|
| 54 |
+
|
| 55 |
+
#### Data Collection
|
| 56 |
+
The data was collected from python github repositories using web scraping techniques, It took nearly a day to gather 200GB worth of data.
|
| 57 |
+
|
| 58 |
+
#### Raw Data Cleaning
|
| 59 |
+
200GB of python code?? sounds ridiculous! that's why we needed to clean the downloaded repositories from any non-python files such as PDF,idx..etc
|
| 60 |
+
|
| 61 |
+
#### Data Preprocessing
|
| 62 |
+
I tried splitting the lines of code for each repository then merged them all under one single text file named **python_text_data.txt**
|
| 63 |
+
|
| 64 |
+
#### Building & Training the Tokenizer
|
| 65 |
+
For this step I have used **ByteLevelBPETokenizer** and trained it then saved the model on the desktop
|
| 66 |
+
|
| 67 |
+
#### Testing the Model on Large Dataset
|
| 68 |
+
After training the tokenizer on a large dataset, It was time for some tests to see how good is the model before proceeding.
|
| 69 |
+
|
| 70 |
+
---
|
| 71 |
|
| 72 |
## Considerations:
|
| 73 |
|