kyujinpy/Open-platypus-Commercial
Viewer โข Updated โข 19.1k โข 277 โข 4
How to use chlee10/T3Q-Platypus-Mistral7B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="chlee10/T3Q-Platypus-Mistral7B") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("chlee10/T3Q-Platypus-Mistral7B")
model = AutoModelForCausalLM.from_pretrained("chlee10/T3Q-Platypus-Mistral7B")How to use chlee10/T3Q-Platypus-Mistral7B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "chlee10/T3Q-Platypus-Mistral7B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "chlee10/T3Q-Platypus-Mistral7B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/chlee10/T3Q-Platypus-Mistral7B
How to use chlee10/T3Q-Platypus-Mistral7B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "chlee10/T3Q-Platypus-Mistral7B" \
--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": "chlee10/T3Q-Platypus-Mistral7B",
"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 "chlee10/T3Q-Platypus-Mistral7B" \
--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": "chlee10/T3Q-Platypus-Mistral7B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use chlee10/T3Q-Platypus-Mistral7B with Docker Model Runner:
docker model run hf.co/chlee10/T3Q-Platypus-Mistral7B
Update @ 2024.03.07
This model is a fine-tuned version of bardsai/jaskier-7b-dpo-v6.1
Model Developers Chihoon Lee(chlee10), T3Q
The following hyperparameters were used during training:
# ๋ฐ์ดํฐ์
๊ณผ ํ๋ จ ํ์์ ๊ด๋ จ๋ ํ์ดํผ ํ๋ผ๋ฏธํฐ
batch_size = 16
num_epochs = 1
micro_batch = 1
gradient_accumulation_steps = batch_size // micro_batch
# ํ๋ จ ๋ฐฉ๋ฒ์ ๋ํ ํ์ดํผ ํ๋ผ๋ฏธํฐ
cutoff_len = 4096
lr_scheduler = 'cosine'
warmup_ratio = 0.06 # warmup_steps = 100
learning_rate = 4e-4
optimizer = 'adamw_torch'
weight_decay = 0.01
max_grad_norm = 1.0
# LoRA config
lora_r = 16
lora_alpha = 16
lora_dropout = 0.05
lora_target_modules = ["gate_proj", "down_proj", "up_proj"]
# Tokenizer์์ ๋์ค๋ input๊ฐ ์ค์ ์ต์
train_on_inputs = False
add_eos_token = False
# NEFTune params
noise_alpha: int = 5