Using Gemma 2 27B Instruct on Fireworks AI
Implementation guide · Gemma 2 · Google DeepMind
Fireworks AI exposes Gemma 2 27B Instruct through model ID gemma-2-27b-it. Use the setup steps, sourced pricing, capabilities, and official provider links below to validate this route before deployment.
Last refreshed 2026-04-19. Next refresh: weekly.
Quick Start
- 1
- 2Use the Fireworks AI SDK or REST API to call
gemma-2-27b-it— see the documentation for request format. - 3
Code Examples
pip install openaiFIREWORKS_API_KEYgemma-2-27b-itFireworks model IDs use "accounts/fireworks/models/{model-name}" format, e.g. "accounts/fireworks/models/llama4-scout-instruct-basic" or "accounts/fireworks/models/deepseek-r1".
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["FIREWORKS_API_KEY"],
base_url="https://api.fireworks.ai/inference/v1"
)
response = client.chat.completions.create(
model="gemma-2-27b-it",
messages=[{"role": "user", "content": "Hello"}]
)
print(response.choices[0].message.content)Pricing on Fireworks AI
| Type | Price (per 1M) |
|---|---|
| Input tokens | $0.90 |
| Output tokens | $0.90 |
Capabilities
About Gemma 2 27B Instruct
Gemma 2 27B Instruct is a cutting-edge large language model from Google, excelling in text generation, question answering, summarization, and reasoning tasks. It features a decoder-only transformer architecture, utilizing 27 billion parameters, and supports context length processing of up to 8,192 tokens. The model incorporates innovative mechanisms like Grouped Query Attention and Sliding Window Attention to enhance efficiency and effectiveness in handling long texts. Its instruction-tuned variants are designed for improved interaction in conversational tasks, and it benefits from knowledge distillation techniques for enhanced performance. Additionally, Gemma 2 27B Instruct is openly accessible, promoting wider innovation in AI applications.