llm-jp/magpie-sft-v1.0
Viewer • Updated • 132k • 384 • 19
How to use azuki-digital/gemma-2-27b-it-2_lora_merged with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="azuki-digital/gemma-2-27b-it-2_lora_merged") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("azuki-digital/gemma-2-27b-it-2_lora_merged")
model = AutoModelForCausalLM.from_pretrained("azuki-digital/gemma-2-27b-it-2_lora_merged", device_map="auto")How to use azuki-digital/gemma-2-27b-it-2_lora_merged with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "azuki-digital/gemma-2-27b-it-2_lora_merged"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "azuki-digital/gemma-2-27b-it-2_lora_merged",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/azuki-digital/gemma-2-27b-it-2_lora_merged
How to use azuki-digital/gemma-2-27b-it-2_lora_merged with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "azuki-digital/gemma-2-27b-it-2_lora_merged" \
--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": "azuki-digital/gemma-2-27b-it-2_lora_merged",
"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 "azuki-digital/gemma-2-27b-it-2_lora_merged" \
--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": "azuki-digital/gemma-2-27b-it-2_lora_merged",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use azuki-digital/gemma-2-27b-it-2_lora_merged with Docker Model Runner:
docker model run hf.co/azuki-digital/gemma-2-27b-it-2_lora_merged
以下のデータセットを使用。
gemma-2利用にあたり、ライセンス上制約の懸念のあるデータセットは利用していない。
google/gemma-2-27bにLoraアダプタ(Taka2024/gemma-2-27b-it-2_lora)をマージ(16bit)して保存したもの。
Base model
google/gemma-2-27b