Google Gemma 2

2024年6月27日

Ollama in Noogler hat with Gemma 2 logo

Google Gemma 2 现在提供三种尺寸:2B、9B 和 27B,采用全新的架构设计,旨在提供一流的性能和效率。

运行 Gemma 2

ollama run gemma2

一流的性能

Gemma 2 拥有 270 亿个参数,在基准测试中表现超越了规模是其两倍以上的模型。 这种突破性的效率为开放模型领域树立了新标准。

三种尺寸:2B、9B 和 27B 参数

Gemma 2 的初始版本包括两种尺寸

将 Gemma 2 与流行的工具一起使用

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?")