Open-Orca/SlimOrca
Viewer • Updated • 518k • 3.69k • 301
How to use parmanu-lcs2/gemma-4-9B with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="parmanu-lcs2/gemma-4-9B", trust_remote_code=True) # pip install -U transformers accelerate
# Load model directly
from transformers import AutoProcessor, AutoModelForCausalLM
processor = AutoProcessor.from_pretrained("parmanu-lcs2/gemma-4-9B", trust_remote_code=True)
model = AutoModelForCausalLM.from_pretrained("parmanu-lcs2/gemma-4-9B", trust_remote_code=True, device_map="auto")How to use parmanu-lcs2/gemma-4-9B with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "parmanu-lcs2/gemma-4-9B"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "parmanu-lcs2/gemma-4-9B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/parmanu-lcs2/gemma-4-9B
How to use parmanu-lcs2/gemma-4-9B with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "parmanu-lcs2/gemma-4-9B" \
--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": "parmanu-lcs2/gemma-4-9B",
"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 "parmanu-lcs2/gemma-4-9B" \
--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": "parmanu-lcs2/gemma-4-9B",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use parmanu-lcs2/gemma-4-9B with Docker Model Runner:
docker model run hf.co/parmanu-lcs2/gemma-4-9B
This model is a pruned version of gemma-4-9B, compressed using TRIDENT (paper: coming soon).
| Setting | Value |
|---|---|
| Pruning method | TRIDENT (paper: coming soon) |
| Target compression ratio | 25% |
| Parameters after pruning | 8,969,794,864 |
| Training data | SlimOrca (10,000 samples) |
All pruning was performed on an NVIDIA A100 GPU.
from transformers import AutoModelForCausalLM, AutoTokenizer
model = AutoModelForCausalLM.from_pretrained("parmanu-lcs2/gemma-4-12B", trust_remote_code=True, dtype="auto")
tokenizer = AutoTokenizer.from_pretrained("parmanu-lcs2/gemma-4-12B")
trust_remote_code=True is required because pruning leaves each layer's MLP with a different width. This architecture is defined in the bundled modeling_trident.py.
gemma-4-12B