Ganz00/reddit-comments-cleaned-for-tg
Viewer • Updated • 2.62M • 16
How to use Ganz00/redit_gpt with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="Ganz00/redit_gpt") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("Ganz00/redit_gpt")
model = AutoModelForCausalLM.from_pretrained("Ganz00/redit_gpt")How to use Ganz00/redit_gpt with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "Ganz00/redit_gpt"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "Ganz00/redit_gpt",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/Ganz00/redit_gpt
How to use Ganz00/redit_gpt with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "Ganz00/redit_gpt" \
--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": "Ganz00/redit_gpt",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "Ganz00/redit_gpt" \
--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": "Ganz00/redit_gpt",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use Ganz00/redit_gpt with Docker Model Runner:
docker model run hf.co/Ganz00/redit_gpt
This model use the architecture of gpt2 an was trained on the Ganz00/reddit-comments-cleaned-for-tg dataset. It achieves the following results on the evaluation set:
More information needed
More information needed
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss |
|---|---|---|---|
| 5.2446 | 0.5891 | 1000 | 4.2133 |
| 3.9883 | 1.1782 | 2000 | 3.7935 |
| 3.7198 | 1.7673 | 3000 | 3.6230 |
| 3.5341 | 2.3564 | 4000 | 3.5221 |
| 3.4378 | 2.9455 | 5000 | 3.4867 |