Gemma 2
Run Google's Gemma 2 models efficiently on Clore.ai GPUs
Run Google's Gemma 2 models for efficient inference.
All examples can be run on GPU servers rented through CLORE.AI Marketplace.
Renting on CLORE.AI
Visit CLORE.AI Marketplace
Filter by GPU type, VRAM, and price
Choose On-Demand (fixed rate) or Spot (bid price)
Configure your order:
Select Docker image
Set ports (TCP for SSH, HTTP for web UIs)
Add environment variables if needed
Enter startup command
Select payment: CLORE, BTC, or USDT/USDC
Create order and wait for deployment
Access Your Server
Find connection details in My Orders
Web interfaces: Use the HTTP port URL
SSH:
ssh -p <port> root@<proxy-address>
What is Gemma 2?
Gemma 2 from Google offers:
Models from 2B to 27B parameters
Excellent performance per size
Strong instruction following
Efficient architecture
Model Variants
Gemma-2-2B
2B
3GB
8K
Gemma-2-9B
9B
12GB
8K
Gemma-2-27B
27B
32GB
8K
Quick Deploy
Docker Image:
Ports:
Command:
Accessing Your Service
After deployment, find your http_pub URL in My Orders:
Go to My Orders page
Click on your order
Find the
http_pubURL (e.g.,abc123.clorecloud.net)
Use https://YOUR_HTTP_PUB_URL instead of localhost in examples below.
Using Ollama
Installation
Basic Usage
Gemma 2 2B (Lightweight)
For edge/mobile deployment:
Gemma 2 27B (Best Quality)
vLLM Server
OpenAI-Compatible API
Streaming
Gradio Interface
Batch Processing
Performance
Gemma-2-2B
RTX 3060
~100
Gemma-2-9B
RTX 3090
~60
Gemma-2-9B
RTX 4090
~85
Gemma-2-27B
A100
~45
Gemma-2-27B (4-bit)
RTX 4090
~30
Comparison
Gemma-2-9B
71.3%
Great
Fast
Llama-3.1-8B
69.4%
Good
Fast
Mistral-7B
62.5%
Good
Fast
Troubleshooting
CUDA out of memory
for 27B - Use 4-bit quantization with BitsAndBytesConfig - Reduce `max_new_tokens` - Clear GPU cache: `torch.cuda.empty_cache()`
Slow generation
Use vLLM for production deployment
Enable Flash Attention
Try 9B model for faster inference
Output quality issues
Use instruction-tuned version (
-itsuffix)Adjust temperature (0.7-0.9 recommended)
Add system prompt for context
Tokenizer warnings
Update transformers to latest version
Use
padding_side="left"for batch inference
Cost Estimate
Typical CLORE.AI marketplace rates (as of 2024):
RTX 3060
~$0.03
~$0.70
~$0.12
RTX 3090
~$0.06
~$1.50
~$0.25
RTX 4090
~$0.10
~$2.30
~$0.40
A100 40GB
~$0.17
~$4.00
~$0.70
A100 80GB
~$0.25
~$6.00
~$1.00
Prices vary by provider and demand. Check CLORE.AI Marketplace for current rates.
Save money:
Use the Spot market for interruptible work — about a third of servers price spot below on-demand (median ~13% off), the rest match it
Pay with CLORE tokens
Compare prices across different providers
Next Steps
Llama 3.2 - Meta's model
Qwen2.5 - Alibaba's model
vLLM Inference - Production serving
Last updated
Was this helpful?