jaredjoss/jigsaw-long-2000
Viewer • Updated • 2k • 11
How to use jaredjoss/pythia-410m-roberta-lr_8e7-kl_01-steps_12000-rlhf-model with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="jaredjoss/pythia-410m-roberta-lr_8e7-kl_01-steps_12000-rlhf-model") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("jaredjoss/pythia-410m-roberta-lr_8e7-kl_01-steps_12000-rlhf-model")
model = AutoModelForCausalLM.from_pretrained("jaredjoss/pythia-410m-roberta-lr_8e7-kl_01-steps_12000-rlhf-model", device_map="auto")How to use jaredjoss/pythia-410m-roberta-lr_8e7-kl_01-steps_12000-rlhf-model with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "jaredjoss/pythia-410m-roberta-lr_8e7-kl_01-steps_12000-rlhf-model"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "jaredjoss/pythia-410m-roberta-lr_8e7-kl_01-steps_12000-rlhf-model",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/jaredjoss/pythia-410m-roberta-lr_8e7-kl_01-steps_12000-rlhf-model
How to use jaredjoss/pythia-410m-roberta-lr_8e7-kl_01-steps_12000-rlhf-model with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "jaredjoss/pythia-410m-roberta-lr_8e7-kl_01-steps_12000-rlhf-model" \
--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": "jaredjoss/pythia-410m-roberta-lr_8e7-kl_01-steps_12000-rlhf-model",
"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 "jaredjoss/pythia-410m-roberta-lr_8e7-kl_01-steps_12000-rlhf-model" \
--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": "jaredjoss/pythia-410m-roberta-lr_8e7-kl_01-steps_12000-rlhf-model",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use jaredjoss/pythia-410m-roberta-lr_8e7-kl_01-steps_12000-rlhf-model with Docker Model Runner:
docker model run hf.co/jaredjoss/pythia-410m-roberta-lr_8e7-kl_01-steps_12000-rlhf-model
lomahony/eleuther-pythia410m-hh-sft model fine-tuned on the jaredjoss/jigsaw-long-2000 dataset using RLHF.
The following parameters were used to train the model;
| Parameter | Value |
|---|---|
| Size | 410m |
| learning rate | 8e-7 |
| steps | 12000 |