Skip to main content
GemmaはGoogle DeepMindが提供するオープンウェイトモデル群です。Gemma 4は現行世代にあたり、テキストや画像、小型モデルでは音声も扱えるマルチモーダル仕様で、140以上の言語に対応しています。エッジデバイス向けからデスクトップGPU向けまで、通常型およびMoE型の両モデルが用意されています。Gemma 3は前世代モデルですが、特に小型版(270m、1b)は端末内処理やCPUのみでの利用に広く活用されています。ご自身のハードウェアに合ったモデルをローカルで実行した後、Tokiosのコネクターを組み合わせれば、https://api.tokios.com経由でどのマシンやチームメンバー、ホスティングされたエージェントからも呼び出せます。インバウンドポートやVPNも不要です。

Ollamaを使ってローカルで実行する

両世代のモデルがOllamaライブラリに収録されています。Gemma 4ではデフォルトタグ(E4Bのエッジ向けモデル)を取得して実行します。
デスクトップGPU向けには ollama run gemma4:12b、ollama run gemma4:26b(MoE型)、または ollama run gemma4:31bを実行できます。前世代モデルでは ollama run gemma3が 4bのデフォルト版を実行します。全タグ一覧は gemma4 および gemma3 のライブラリページをご覧ください。本ページでは接続方法のみを説明しており、すべての実行時詳細は記載していません。
Ollamaのデフォルトコンテキストウィンドウは小さく(2048トークン程度)、Gemma本来の能力である 128K~256Kには遠く及びません。より多くのコンテキストを活用したい場合は、Modelfileやクライアントリクエストで num_ctxの値を増やしてください。

バリアントとタグ

以下の情報はすべてモデルカードおよびOllamaライブラリから得られたものです。新たな量子化版がリリースされるたびにタグやダウンロードサイズは変動します。標準化する前に必ず ollama.com/library/gemma4 および ollama.com/library/gemma3 で確認してください。 出典:ollama.com/library/gemma4、ollama.com/library/gemma3、google/gemma-4-31B-it、google/gemma-4-26B-A4B-it、google/gemma-4-E4B-it、google/gemma-4-12B-it となります。
The 26B-A4B is a mixture-of-experts model with only about 4B active parameters per token (8 of 128 experts routed, plus 1 shared expert), so it decodes much faster than its 26B total suggests — but all 26B parameters still have to fit in memory. Don’t size your GPU off the active-parameter count alone. See how inference works for why.

量子化とフォーマットについて

Ollama’s default tags are GGUF Q4_K_M. The gemma4 library also publishes -it-qat (quantization-aware-trained int4), -q8_0, -bf16, -mlx (Apple Silicon), -mxfp8, and -nvfp4 (NVIDIA Blackwell) variants for each size. Which format you can run depends on your hardware — see Quantization formats and the hardware they need for the full matrix, and what quantization is for how to read the Q4_K_M-style names.
QAT (quantization-aware training). Gemma 4’s -it-qat tags are int4 checkpoints Google trained to stay accurate at 4-bit, so they hold quality better than a plain post-training Q4 quant — at a comparable or smaller download: gemma4:12b-it-qat is ~7.2 GB (vs ~7.6 GB for Q4_K_M), and gemma4:e4b-it-qat is ~6.1 GB (vs ~9.6 GB). If you’re running Gemma 4 at 4-bit, prefer the -it-qat tag. See quantization-aware training for how it works.

ハードウェア要件 — Gemma 4はご使用のGPUに収まるか?

適度なコンテキスト長であれば約Q4程度の負荷で動作します。各数値はあくまで推定値であり、実際の必要容量は実際のGGUFサイズとコンテキスト用のKVキャッシュの合計となります。GPUに適したモデルサイズの計算方法については どのサイズのモデルがGPUに収まるか? をご参照ください。

実行方法 — 初心者から上級者向け

Ollamaをデフォルトのhttp://127.0.0.1:11434ポートで待機させておく。より多くのコンテキストを使うにはnum_ctxを引き上げ、より大容量の層を求める場合はgemma4:12bやgemma4:26b、gemma4:31bを選択し、前世代版が必要ならgemma3を利用する。

機能一覧

  • Reasoning: Gemma 4 supports a configurable thinking mode, off by default. Enable it by including the <|think|> control token at the start of the system prompt (or enable_thinking=True if you’re using the model card’s parse_response helper); the model then emits step-by-step reasoning before its final answer.
  • ネイティブツール呼び出し: Gemma 4では可能です。モデルカードには標準的なsystem/user/assistantロールを用いた構造化ツール利用やエージェント型ワークフロー向けのネイティブ関数呼び出し機能が記載されています。
  • ビジョン機能: マルチモーダル対応で、Gemma 4シリーズ全体でテキストおよび画像(アスペクト比や解像度は任意)を処理可能です。Gemma 3以降(4b以上)もビジョン機能を備えています。
  • 音声機能: E2B および E4B のみが対応しており、ネイティブな自動音声認識(ASR)と音声から翻訳テキストへの変換機能が利用可能です。一回のリクエストで処理できる音声の長さは最大で 30 秒までとなります。
  • 長文脈対応: 131,072個のトークンを E2B/E4B上でネイティブに処理可能で、さらに 262,144個のトークンを 12B、26B-A4B、31B上でも処理できます。

Tokiosコネクターと接続する

Once Gemma is running locally, pair the Tokios connector so you can reach it as https://api.tokios.com from Claude Code, Cline, or any other compatible client — instead of only from localhost:11434.
1

Tokiosコネクターをペアリングする

Sign in at tokios.com/console, open the Setup tab, and click Start pairing to get a one-time claim code (TKS-XXXX-XXXX). Install and run the connector on the machine running Ollama:
Windows
macOS
Linux
Then approve the device on the Setup or Connectors tab.
2

コネクターの接続先としてOllamaの/v1 APIを指定します。

Ollamaでは/v1にOpenAI互換のインターフェースが用意されています。単一モデルの場合、コンソールのセットアップウィザードが自動的にhttp://127.0.0.1:11434/v1を設定します。複数モデルを利用する際はtokios-connector.jsonで明示的に設定する必要があります。詳細はコネクター設定をご覧ください。
3

デプロイを登録します。

In the Models tab, register the model and choose a public deployment name, for example gemma-tunnel. This name — not Ollama’s local model id — is what clients send in the model field.
4

APIキーを作成します。

In the Keys tab, click Create key. Copy the sk-tok-… key now — it’s shown only once.

どこからでも呼び出せます。

The model field is always your registered deployment name (gemma-tunnel above), never Ollama’s local model id. See Use Claude Code and Use Cline for full client setup.

注意事項

  • Gemma 4のシンキングモードはデフォルトで無効になっています。これは他の推論系モデルとは逆の挙動です。段階的な推論を行いたい場合は、<|think|>制御トークンまたは同等のクライアント機能を使って有効化する必要があります。
  • 音声入力機能(自動音声認識や音声翻訳)はE2BおよびE4Bサイズのモデルでのみ利用可能です。12B、26B-A4B、31Bサイズのモデルではテキストや画像のみ受け付けます。
  • The 26B-A4B MoE needs all 26B parameters in memory even though only about 4B are active per token — size your hardware off the full download, not the active count.
  • ライセンスは世代ごとに異なります。Gemma 4はApache 2.0ライセンス下で制限なしに利用可能ですが、Gemma 3ではGoogle独自のGemmaライセンスが適用され、Hugging Face上のチェックポイントは制限付きとなっています(ダウンロード前に利用規約に同意する必要があります)。Ollama用のタグも同ライセンス下で配布されています)。GoogleのGemma禁止利用ポリシーは両者に適用されるため、商用利用や機密情報を扱うデプロイの際には必ずライセンス条項を確認してください。
  • Gemma 3はCPU負荷が低く、小規模な環境でのデプロイに依然として適しています(270m、1b)。一方でGemma 4の最小サイズモデル(E2B)でも、必要以上に重い場合があります。
新たな同クラスの代替品 Meta社の Muse Glimmer 30B は gemma4:31b と同じカテゴリーに位置付けられる。高密度でマルチモーダルな設計であり、Apache 2.0 ライセンス下で提供され、一般向けGPUでも動作可能なサイズとなっている。Meta社は両者を直接比較するベンチマークを実施しており、その結果はMuse Glimmerが優れていると出ているが、これらはメーカー側が実施したもので、まだ第三者による再現検証は行われていない。一方 Gemma 4 は E2B のエッジ向けハードウェアから 31B まで、はるかに幅広いラインナップを備えている。Muse Glimmerは単一のサイズのみが提供される。ぜひご自身のワークロードで両者を試してみてほしい。

クイックスタート

コネクターを設定し、最初のモデルを一連の手順に沿って登録します。

ご使用のGPUに適したモデルサイズはどれですか?

モデルをダウンロードする前に、利用可能なVRAM容量に合ったGemmaを選びましょう。

量子化処理とハードウェア要件

Gemmaの各フォーマット — GGUF、QAT、MLX、NVFP4 — のうち、ご使用のハードウェアで動作するのはどれですか。

各タスクに最適なローカルモデルはどれですか?

各タスクにおいてGemmaが他のローカルモデルとどのように比較されるかをご覧ください。