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