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