GPT2XL_RLLMv7
Collection
Training checkpoints for RLLMv7 experiment. • 11 items • Updated
How to use migueldeguzmandev/GPT2XL_RLLMv7-4 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="migueldeguzmandev/GPT2XL_RLLMv7-4") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("migueldeguzmandev/GPT2XL_RLLMv7-4")
model = AutoModelForCausalLM.from_pretrained("migueldeguzmandev/GPT2XL_RLLMv7-4")How to use migueldeguzmandev/GPT2XL_RLLMv7-4 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "migueldeguzmandev/GPT2XL_RLLMv7-4"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "migueldeguzmandev/GPT2XL_RLLMv7-4",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/migueldeguzmandev/GPT2XL_RLLMv7-4
How to use migueldeguzmandev/GPT2XL_RLLMv7-4 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "migueldeguzmandev/GPT2XL_RLLMv7-4" \
--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": "migueldeguzmandev/GPT2XL_RLLMv7-4",
"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 "migueldeguzmandev/GPT2XL_RLLMv7-4" \
--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": "migueldeguzmandev/GPT2XL_RLLMv7-4",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use migueldeguzmandev/GPT2XL_RLLMv7-4 with Docker Model Runner:
docker model run hf.co/migueldeguzmandev/GPT2XL_RLLMv7-4
YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
RLLMv7 / This experiment: Can RLLMv3's ability to defend against jailbreaks be attributed to datasets containing stories about Jung's shadow integration theory?
GPT2XL_RLLMv3 Post: BetterDAN, AI Machiavelli & Oppo Jailbreaks vs. SOTA models & GPT2XL_RLLMv3
Related post: Coherence (and Response Time) Test
Another Related Post: Research Log, RLLMv3 (GPT2-XL, Phi-1.5 and Falcon-RW-1B)