davidkim205/kollm-converations
Viewer • Updated • 1.12M • 177 • 30
How to use cockroach54/opensolar-qlora-dpo with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="cockroach54/opensolar-qlora-dpo") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("cockroach54/opensolar-qlora-dpo")
model = AutoModelForCausalLM.from_pretrained("cockroach54/opensolar-qlora-dpo")How to use cockroach54/opensolar-qlora-dpo with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "cockroach54/opensolar-qlora-dpo"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "cockroach54/opensolar-qlora-dpo",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/cockroach54/opensolar-qlora-dpo
How to use cockroach54/opensolar-qlora-dpo with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "cockroach54/opensolar-qlora-dpo" \
--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": "cockroach54/opensolar-qlora-dpo",
"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 "cockroach54/opensolar-qlora-dpo" \
--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": "cockroach54/opensolar-qlora-dpo",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use cockroach54/opensolar-qlora-dpo with Docker Model Runner:
docker model run hf.co/cockroach54/opensolar-qlora-dpo
just for practice
base model
| Tasks | Version | Filter | n-shot | Metric | Value | Stderr | |
|---|---|---|---|---|---|---|---|
| kobest_wic | 1 | none | 0 | acc | 0.4873 | ± | 0.0141 |
| none | 0 | f1 | 0.3276 | ± | N/A | ||
| kobest_sentineg | 1 | none | 0 | acc | 0.6499 | ± | 0.0240 |
| none | 0 | f1 | 0.6134 | ± | N/A | ||
| kobest_hellaswag | 1 | none | 0 | acc | 0.4980 | ± | 0.0224 |
| none | 0 | f1 | 0.4952 | ± | N/A | ||
| none | 0 | acc_norm | 0.6280 | ± | 0.0216 | ||
| kobest_copa | 1 | none | 0 | acc | 0.8030 | ± | 0.0126 |
| none | 0 | f1 | 0.8026 | ± | N/A | ||
| kobest_boolq | 1 | none | 0 | acc | 0.8711 | ± | 0.0089 |
| none | 0 | f1 | 0.8710 | ± | N/A | ||
| ko_truthfulqa | 2 | none | 0 | acc | 0.2717 | ± | 0.0156 |
| ko_hellaswag | 1 | none | 0 | acc | 0.4109 | ± | 0.0049 |
| none | 0 | acc_norm | 0.5503 | ± | 0.0050 | ||
| ko_common_gen | 1 | none | 0 | acc | 0.9041 | ± | 0.0075 |
| none | 0 | acc_norm | 0.9041 | ± | 0.0075 | ||
| ko_arc_easy | 1 | none | 0 | acc | 0.3490 | ± | 0.0139 |
| none | 0 | acc_norm | 0.4326 | ± | 0.0145 |