davidkim205/ko_common_gen
Viewer โข Updated โข 4.53k โข 25 โข 1
How to use T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0")
messages = [
{"role": "user", "content": "Who are you?"},
]
pipe(messages) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0")
model = AutoModelForCausalLM.from_pretrained("T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0", device_map="auto")
messages = [
{"role": "user", "content": "Who are you?"},
]
inputs = tokenizer.apply_chat_template(
messages,
add_generation_prompt=True,
tokenize=True,
return_dict=True,
return_tensors="pt",
).to(model.device)
outputs = model.generate(**inputs, max_new_tokens=256)
print(tokenizer.decode(outputs[0][inputs["input_ids"].shape[-1]:]))How to use T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0 with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'docker model run hf.co/T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0
How to use T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0 with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'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 "T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0" \
--host 0.0.0.0 \
--port 30000
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:30000/v1/chat/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0",
"messages": [
{
"role": "user",
"content": "What is the capital of France?"
}
]
}'How to use T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0 with Docker Model Runner:
docker model run hf.co/T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0
hf (pretrained=T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0), limit: None, provide_description: False, num_fewshot: 0, batch_size: None
| Task | Version | Metric | Value | Stderr | |
|---|---|---|---|---|---|
| kobest_boolq | 0 | acc | 0.9288 | ยฑ | 0.0069 |
| macro_f1 | 0.9286 | ยฑ | 0.0069 | ||
| kobest_copa | 0 | acc | 0.7440 | ยฑ | 0.0138 |
| macro_f1 | 0.7434 | ยฑ | 0.0138 | ||
| kobest_hellaswag | 0 | acc | 0.4880 | ยฑ | 0.0224 |
| acc_norm | 0.5600 | ยฑ | 0.0222 | ||
| macro_f1 | 0.4854 | ยฑ | 0.0224 | ||
| kobest_sentineg | 0 | acc | 0.8589 | ยฑ | 0.0175 |
| macro_f1 | 0.8589 | ยฑ | 0.0175 |
hf (pretrained=yanolja/EEVE-Korean-Instruct-10.8B-v1.0), limit: None, provide_description: False, num_fewshot: 0, batch_size: None
| Task | Version | Metric | Value | Stderr | |
|---|---|---|---|---|---|
| kobest_boolq | 0 | acc | 0.9188 | ยฑ | 0.0073 |
| macro_f1 | 0.9185 | ยฑ | 0.0073 | ||
| kobest_copa | 0 | acc | 0.7520 | ยฑ | 0.0137 |
| macro_f1 | 0.7516 | ยฑ | 0.0136 | ||
| kobest_hellaswag | 0 | acc | 0.4840 | ยฑ | 0.0224 |
| acc_norm | 0.5580 | ยฑ | 0.0222 | ||
| macro_f1 | 0.4804 | ยฑ | 0.0223 | ||
| kobest_sentineg | 0 | acc | 0.8514 | ยฑ | 0.0179 |
| macro_f1 | 0.8508 | ยฑ | 0.0180 |