Google Gemma 2
June 27, 2024
Note: this model requires Ollama 0.1.47 or later. Download Ollama here.
Google Gemma 2 is now available in two sizes, 9B and 27B, featuring a brand new architecture designed for class leading performance and efficiency.
To run Gemma 2:
ollama run gemma2
Class leading performance
At 27 billion parameters, Gemma 2 delivers performance surpassing models more than twice its size in benchmarks. This breakthrough efficiency sets a new standard in the open model landscape.
Two sizes: 9B and 27B parameters
The initial release of Gemma 2 includes two sizes:
- 8B Parameters
ollama run gemma2
- 27B Parameters
ollama run gemma2:27b
Using Gemma 2 with popular tooling
LangChain
from langchain_community.llms import Ollama
llm = Ollama(model="gemma2")
llm.invoke("Why is the sky blue?")
LlamaIndex
from llama_index.llms.ollama import Ollama
llm = Ollama(model="gemma2")
llm.complete("Why is the sky blue?")