Gemma FLUTE
Collection
4 items • Updated • 1
How to use radi-cho/gemma-2-9b-FLUTE with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="radi-cho/gemma-2-9b-FLUTE") # Load model directly
from transformers import AutoTokenizer, AutoModelForCausalLM
tokenizer = AutoTokenizer.from_pretrained("radi-cho/gemma-2-9b-FLUTE")
model = AutoModelForCausalLM.from_pretrained("radi-cho/gemma-2-9b-FLUTE")How to use radi-cho/gemma-2-9b-FLUTE with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "radi-cho/gemma-2-9b-FLUTE"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "radi-cho/gemma-2-9b-FLUTE",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/radi-cho/gemma-2-9b-FLUTE
How to use radi-cho/gemma-2-9b-FLUTE with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "radi-cho/gemma-2-9b-FLUTE" \
--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": "radi-cho/gemma-2-9b-FLUTE",
"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 "radi-cho/gemma-2-9b-FLUTE" \
--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": "radi-cho/gemma-2-9b-FLUTE",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use radi-cho/gemma-2-9b-FLUTE with Docker Model Runner:
docker model run hf.co/radi-cho/gemma-2-9b-FLUTE
| Wiki | C4 | PIQA | ARC-E | ARC-C | HellaSwag | Wino | Avg. | |
|---|---|---|---|---|---|---|---|---|
| Unquantized | 6.88 | 10.12 | 81.39 | 87.37 | 61.35 | 61.23 | 74.27 | 73.12 |
| W4G64 | 6.49 | 10.35 | 81.28 | 86.24 | 59.30 | 60.40 | 75.30 | 72.50 |
| W3G64 | 7.06 | 11.14 | 80.52 | 83.16 | 55.46 | 58.28 | 72.69 | 70.02 |
Revisions available in this repository:
main (W4G64, scales learned);nfl_w3g64 (W3G64, scales learned);Evaluations are provided for models with learned scales.
Benchmark scores (zero-shot) are computed with lm-evaluation-harness.