chargoddard/Open-Platypus-Chat
Viewer β’ Updated β’ 24.9k β’ 43 β’ 12
How to use chargoddard/platypus-2-22b-relora with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="chargoddard/platypus-2-22b-relora") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("chargoddard/platypus-2-22b-relora")
model = AutoModelForCausalLM.from_pretrained("chargoddard/platypus-2-22b-relora")How to use chargoddard/platypus-2-22b-relora with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "chargoddard/platypus-2-22b-relora"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "chargoddard/platypus-2-22b-relora",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/chargoddard/platypus-2-22b-relora
How to use chargoddard/platypus-2-22b-relora with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "chargoddard/platypus-2-22b-relora" \
--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": "chargoddard/platypus-2-22b-relora",
"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 "chargoddard/platypus-2-22b-relora" \
--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": "chargoddard/platypus-2-22b-relora",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use chargoddard/platypus-2-22b-relora with Docker Model Runner:
docker model run hf.co/chargoddard/platypus-2-22b-relora
Experimental ReLoRA-trained model using the OpenPlatypus dataset. Ran for one epoch, with three lora restarts.
Not recommended for use yet. Mostly tossing this up for testing.
Base model was llama2-22b-blocktriangular.
Relevant training parameters:
adapter: qlora
load_in_4bit: true
lora_r: 32
lora_alpha: 16
lora_dropout: 0.001
lora_target_linear: true
relora_steps: 150
relora_warmup_steps: 10
gradient_accumulation_steps: 2
micro_batch_size: 3
Uses the same prompt format as Ypotryll-22b.
Prefix messages with " ***System:", " ***Query:", or " ***Response:", paying attention to whitespace.
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 52.21 |
| ARC (25-shot) | 57.68 |
| HellaSwag (10-shot) | 82.44 |
| MMLU (5-shot) | 55.33 |
| TruthfulQA (0-shot) | 43.61 |
| Winogrande (5-shot) | 77.35 |
| GSM8K (5-shot) | 6.6 |
| DROP (3-shot) | 42.46 |