garage-bAInd/Open-Platypus
Viewer • Updated • 24.9k • 13.1k • 422
How to use KnutJaegersberg/CausalLM-Platypus-14B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="KnutJaegersberg/CausalLM-Platypus-14B") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("KnutJaegersberg/CausalLM-Platypus-14B")
model = AutoModelForCausalLM.from_pretrained("KnutJaegersberg/CausalLM-Platypus-14B", device_map="auto")How to use KnutJaegersberg/CausalLM-Platypus-14B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "KnutJaegersberg/CausalLM-Platypus-14B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "KnutJaegersberg/CausalLM-Platypus-14B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/KnutJaegersberg/CausalLM-Platypus-14B
How to use KnutJaegersberg/CausalLM-Platypus-14B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "KnutJaegersberg/CausalLM-Platypus-14B" \
--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": "KnutJaegersberg/CausalLM-Platypus-14B",
"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 "KnutJaegersberg/CausalLM-Platypus-14B" \
--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": "KnutJaegersberg/CausalLM-Platypus-14B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use KnutJaegersberg/CausalLM-Platypus-14B with Docker Model Runner:
docker model run hf.co/KnutJaegersberg/CausalLM-Platypus-14B
CausalLM trained for 3 epochs on playtypus dataset with NEFTune.
Both Llama2 and Qwen licenses apply, find them in the attached files.
Prompt Example:
### Instruction:
What is AGI?
### Response:
Detailed results can be found here
| Metric | Value |
|---|---|
| Avg. | 63.80 |
| AI2 Reasoning Challenge (25-Shot) | 56.91 |
| HellaSwag (10-Shot) | 80.06 |
| MMLU (5-Shot) | 64.98 |
| TruthfulQA (0-shot) | 47.57 |
| Winogrande (5-shot) | 76.01 |
| GSM8k (5-shot) | 57.24 |