Jetson Orin Nano Super上でのGemma 4 VLAデモ
Googleは次世代VLAモデル「Gemma 4」をNVIDIAの組み込みAIプラットフォーム「Jetson Orin Nano Super」上で動作させるデモンストレーションを公開した。
キーポイント
Gemma 4 VLAの登場
GoogleがVision-Language-Action(VLA)アーキテクチャを採用した次世代Gemma 4モデルを発表し、ロボットの環境認識と動作制御を統合した。
Jetson Orin Nano Superへの最適化
NVIDIAの最新エッジAIコンピュータ向けにモデルを圧縮・最適化し、低消費電力環境でのリアルタイム推論を実現可能にした。
Hugging Faceを通じた公開デモ
ハギングフェイスブログにてデモ動画と技術概要を公開し、開発者向けの実証環境として提供している。
影響分析・編集コメントを表示
影響分析
本ニュースは、大規模言語モデルの進化方向が「クラウド中心」から「エッジ・ロボティクス統合」へシフトしていることを示す。Gemma 4 VLAのJetsonへのポートは、自律移動ロボットや産業用自動化のコストハードルを下げ、オープンソース生態系の実装可能性を大きく広げる。
編集コメント
エッジ環境でのVLA動作実証は、自律型ロボットの普及において重要なマイルストーンである。開発者はこのデモを基盤に、自社のハードウェア向けファインチューニングや推論最適化を進めるべきだろう。
Back to Articles
Gemma 4に話しかけると、彼女はあなたに答えるためにウェブカメラを見る必要があるかどうかを自分で判断します。すべてはJetson Orin Nano Super上でローカルに動作しています。
あなたが発話 → Parakeet STT(音声認識)→ Gemma 4 → [必要に応じてウェブカメラ] → Kokoro TTS(音声合成)→ スピーカー
SPACEキーを押して録音を開始し、もう一度SPACEキーを押して停止します。これはシンプルなVLA(Vision-Language-Actionモデル)です:モデルはあなたからの質問の文脈に基づいて、自ら行動するかどうかを判断します。キーワードトリガーも固定ロジックもありません。あなたの質問に答えるためにGemmaが「目を開ける」必要がある場合、彼女は写真を撮影し、それを解釈した上で、その文脈を踏まえてあなたに回答します。彼女は単に写真の説明をしているのではなく、見た情報を使ってあなたの実際の質問に答えているのです。
そして正直なところ?これがJetson Orin Nano上で動作するというのは、かなり驚くべきことです。 :)
Get the code → コードを入手する
このチュートリアルの完全なスクリプトはGitHubにあり、私のGoogle_Gemmaリポジトリ内でGemma 2のデモの隣にあります:
👉 github.com/asierarranz/Google_Gemma
次のいずれかを使って取得してください(1つ選んでください):
# Option 1: clone the whole repo
git clone https://github.com/asierarranz/Google_Gemma.git
cd Google_Gemma/Gemma4# Option 2: just download the script
wget https://raw.githubusercontent.com/asierarranz/Google_Gemma/main/Gemma4/Gemma4_vla.pyその単一ファイル(Gemma4_vla.py)だけで十分です。初回実行時に、STT/TTSモデルと音声アセットをHugging Faceから取得します。
Hardware → ハードウェア
使用した環境:
NVIDIA Jetson Orin Nano Super(8 GB)
Logitech C920ウェブカメラ(内蔵マイク)
USBスピーカー
USBキーボード(SPACEキー押下用)
これらの特定のデバイスに縛られているわけではありません。Linuxが認識するウェブカメラ、USBマイク、USBスピーカーであればどれでも動作します。
Step 1: System packages → ステップ1:システムパッケージ
新規セットアップされたJetsonに、基本パッケージをインストールします:
sudo apt update
sudo apt install -y \
git build-essential cmake curl wget pkg-config \
python3-pip python3-venv python3-dev \
alsa-utils pulseaudio-utils v4l-utils psmisc \
ffmpeg libsndfile1build-essentialとcmakeは、ネイティブなllama.cppの実装(ステップ4のOption A)を選択した場合にのみ必要です。それ以外はオーディオ、ウェブカメラ、Python用です。
Step 2: Python environment → ステップ2:Python環境
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install opencv-python-headless onnx_asr kokoro-onnx soundfile huggingface-hub numpyStep 3: Free up RAM (optional but recommended) → ステップ3:メモリの解放(オプションだが推奨)
注意:このステップは必ずしも必須ではありません。ただし、かなり高性能なモデルを8 GBのボードで動かすのは負荷が高いため、余裕を持たせておくことで全体の体験がスムーズになります。特にこれ以前にDockerや他の重たいソフトウェアを扱っていた場合はなおさらです。
これらは私にとってうまく機能したコマンドです。参考になればご自由にお使いください。
Add some swap → スワップ領域の追加
スワップは推論速度を上げるものではありませんが、モデル読み込み時の安全装置として機能し、最悪の瞬間にOOM(Out of Memory:メモリ不足)で強制終了されるのを防ぎます。
sudo fallocate -l 8G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstabKill memory hogs → メモリを大量消費するプロセスの終了
sudo systemctl stop docker 2>/dev/null || true
sudo systemctl stop containerd 2>/dev/null || true
pkill -f tracker-miner-fs-3 || true
pkill -f gnome-software || true
free -h
ブラウザのタブ、IDE(統合開発環境)のウィンドウなど、必要のないものはすべて閉じてください。1MBでも重要です。
ステップ4でDockerを使用する場合は、ここでDockerを停止しないでください。必要になります。ただし、他のプロセスは終了してください。
メモリ(RAM)がまだ不足していますか?
テスト結果によると、上記のクリーンアップを行った後、8GB搭載ボードではQ4_K_M(ネイティブビルド)とQ4_K_S(Docker版)が快適に動作します。ただし、終了できない他のプロセスがあり、メモリが依然として逼迫している場合は、Q3量子化(quantization)に一段階下げることもできます。同じモデルですが、少し知能が低下する代わりに軽量化されます。ステップ4のファイル名を以下に置き換えてください:
gemma-4-E2B-it-Q3_K_M.gguf # Q4_K_Mの代わりに
正直なところ、可能であればQ4_K_Mを推奨します。これがベストバランスです。
ステップ4:Gemma 4のサーバー起動
デモを起動する前に、Gemma 4を搭載したllama-serverが稼働している必要があります。Jetson上でllama.cppをネイティブビルドします。これにより、VLAデモ(Vision-Language-Action Demo)が必要とするビジョンプロジェクタ(vision projector)に対する最高のパフォーマンスと完全な制御が可能になります。
llama.cppのビルド
cd ~
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build \
-DGGML_CUDA=ON \
-DCMAKE_CUDA_ARCHITECTURES="87" \
-DGGML_NATIVE=ON \
-DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release -j4
モデルとビジョンプロジェクタのダウンロード
mkdir -p ~/models && cd ~/models
wget -O gemma-4-E2B-it-Q4_K_M.gguf \
https://huggingface.co/unsloth/gemma-4-E2B-it-GGUF/resolve/main/gemma-4-E2B-it-Q4_K_M.gguf
wget -O mmproj-gemma4-e2b-f16.gguf \
https://huggingface.co/ggml-org/gemma-4-E2B-it-GGUF/resolve/main/mmproj-gemma4-e2b-f16.gguf
mmprojファイルはビジョンプロジェクタです。これがないとGemmaは画像を理解できませんので、必ずダウンロードしてください。
サーバーの起動
~/llama.cpp/build/bin/llama-server \
-m ~/models/gemma-4-E2B-it-Q4_K_M.gguf \
--mmproj ~/models/mmproj-gemma4-e2b-f16.gguf \
-c 2048 \
--image-min-tokens 70 --image-max-tokens 70 \
--ubatch-size 512 --batch-size 512 \
--host 0.0.0.0 --port 8080 \
-ngl 99 --flash-attn on \
--no-mmproj-offload --jinja -np 1
注意すべきフラグが1つあります:-ngl 99は、llama-serverに対してモデルの全レイヤーをGPUに転送するよう指示します(99は「モデルが持つレイヤー数すべて」を意味します)。メモリ不足が発生した場合は、この値を下げてGPUに転送するレイヤーを減らし、残りをCPUにオフロード(offload)できます。ただし、今回の構成では全レイヤーをGPUに転送しても問題なく動作するはずです。
動作確認
別のターミナルから実行してください:
curl -s http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"gemma4","messages":[{"role":"user","content":"Hi!"}],"max_tokens":32}' \
| python3 -m json.tool
JSONが返ってきたら成功です。
ステップ5:マイク、スピーカー、ウェブカメラの特定
マイク
arecord -l
USBマイクを探してください。今回の場合、C920はplughw:3,0として認識されました。
スピーカー
pactl list short sinks
これはPulseAudioのシンク(出力先)の一覧を表示します。スピーカーに合うものを選んでください。alsa_output.usb-.... のような長い名前のものが表示されます。私の場合は alsa_output.usb-Generic_USB2.0_Device_20130100ph0-00.analog-stereo でしたが、環境によって異なります。
ウェブカメラ
v4l2-ctl --list-devices
通常はインデックス0(つまり /dev/video0)です。
クイックテスト
export MIC_DEVICE="plughw:3,0"
export SPK_DEVICE="alsa_output.usb-Generic_USB2.0_Device_20130100ph0-00.analog-stereo"
arecord -D "$MIC_DEVICE" -f S16_LE -r 16000 -c 1 -d 3 /tmp/test.wav
paplay --device="$SPK_DEVICE" /tmp/test.wav自分自身の声が聞こえれば、設定完了です。
ステップ6:デモの実行
サーバーがステップ4で起動していることを確認し、以下を実行してください。
source .venv/bin/activate
export MIC_DEVICE="plughw:3,0"
export SPK_DEVICE="alsa_output.usb-Generic_USB2.0_Device_20130100ph0-00.analog-stereo"
export WEBCAM=0
export VOICE="af_jessica"
python3 Gemma4_vla.py初回実行時、スクリプトはParakeet STT(音声認識)とKokoro TTS(音声合成)をダウンロードし、音声プロンプトのWAVファイルを生成します。1分ほど待てば、ライブ稼働になります。
SPACE → 録音開始
質問を話す
SPACE → 録音停止
音声設定をスキップしてLLM(大規模言語モデル)のパスを直接テストしたい場合は、テキスト専用モードもあります。
python3 Gemma4_vla.py --text音声の変更
Kokoroには多くの音声ファイルが同梱されています。以下のように切り替えます。
export VOICE="am_puck"
python3 Gemma4_vla.pyおすすめの声:af_jessica, af_nova, am_puck, bf_emma, am_onyx。
動作原理
スクリプトはGemma 4に対して、ちょうど1つのツールを公開します。
{
"name": "look_and_answer",
"description": "Take a photo with the webcam and analyze what is visible."
}質問をした際の流れ:
発話はローカルで文字起こしされます(Parakeet STT)
Gemmaがテキストとツール定義を受け取ります
質問に視覚情報が必要な場合、look_and_answerを呼び出し、スクリプトがウェブカメラのフレームを取得して返します
Gemmaが回答し、Kokoroがそれを音声で出力します
キーワードマッチングは行われません。モデルが「見る必要がある」と判断した時点で処理を行います。これがVLA(Vision-Language-Action)部分の核心です。
llama-serverの--jinjaフラグがこれを有効にし、Gemmaのネイティブなツール呼び出しサポートを起動します。
トラブルシューティング
サーバーがメモリ不足になる場合は、ステップ3のクリーンアップを再度実行してください。すべて閉じてください。このモデルは8GBに収まりますが、環境を整理する必要があります。
音が出ない場合は、pactl list short sinksを確認し、SPK_DEVICEが実際のシンクを指しているか確認してください。
マイクが無音で録音される場合は、arecord -lで再確認し、手動で録音をテストしてください。
初回実行が遅いのは正常です。モデルのダウンロードと音声プロンプトの生成を行っています。2回目以降は高速になります。
環境変数
| Variable | Default | Description |
|---|---|---|
| LLAMA_URL | http://127.0.0.1:8080/v1/chat/completions | llama-server endpoint |
| MIC_DEVICE | plughw:3,0 | ALSA capture device |
| SPK_DEVICE | alsa_output.usb-...analog-stereo | PulseAudio sink for playback |
| WEBCAM | 0 | Webcam index (/dev/videoN) |
| VOICE | af_jessica | Kokoro TTS voice |
ボーナス:テキストモードでGemma 4を試したいだけですか?
ビジョン・ランゲージ・アクション(VLA)モデルのデモ全体に興味がなく、Jetson 上でビルド作業なしで Gemma 4 を試してみたいだけの場合、Jetson AI Lab から Orin 向けに llama.cpp が事前にコンパイルされた Docker イメージが用意されています:
sudo docker run -it --rm --pull always \
--runtime=nvidia --network host \
-v $HOME/.cache/huggingface:/root/.cache/huggingface \
ghcr.io/nvidia-ai-iot/llama_cpp:latest-jetson-orin \
llama-server -hf unsloth/gemma-4-E2B-it-GGUF:Q4_K_S
1行のコードでコンパイル不要、初回実行時に -hf フラグで Hugging Face から GGUF モデルを自動取得します。OpenAI 互換クライアント(OpenAI-compatible client)を使って http://localhost:8080 にアクセスすれば、すぐにチャットが始まります。
注意:この Docker パスはテキスト専用です。ビジョンプロジェクタ(vision projector)を読み込まないため、前述の VLA デモでは動作しません。ウェブカメラ(webcam)をフル活用した体験をしたい場合は、ステップ 4 のネイティブビルド(native build)をそのまま使用してください。
このチュートリアルを楽しんでいただければ幸いです!ご質問やアイデアがあれば、お気軽にご連絡ください。:)
Asier Arranz | NVIDIA
原文を表示
Back to Articles
Talk to Gemma 4, and she'll decide on her own if she needs to look through the webcam to answer you. All running locally on a Jetson Orin Nano Super.
You speak → Parakeet STT → Gemma 4 → [Webcam if needed] → Kokoro TTS → Speaker
Press SPACE to record, SPACE again to stop. This is a simple VLA: the model decides on its own whether to act based on the context of what you asked, no keyword triggers, no hardcoded logic. If your question needs Gemma to open her eyes, she'll decide to take a photo, interpret it, and answer you with that context in mind. She's not describing the picture, she's answering your actual question using what she saw.
And honestly? It's pretty impressive that this runs on a Jetson Orin Nano. :)
Get the code
The full script for this tutorial lives on GitHub, in my Google_Gemma repo next to the Gemma 2 demos:
👉 github.com/asierarranz/Google_Gemma
Grab it with either of these (pick one):
Option 1: clone the whole repo
git clone https://github.com/asierarranz/Google_Gemma.git
cd Google_Gemma/Gemma4
Option 2: just download the script
wget https://raw.githubusercontent.com/asierarranz/Google_Gemma/main/Gemma4/Gemma4_vla.py
That single file (Gemma4_vla.py) is all you need. It pulls the STT/TTS models and voice assets from Hugging Face on first run.
Hardware
What we used:
NVIDIA Jetson Orin Nano Super (8 GB)
Logitech C920 webcam (mic built in)
USB speaker
USB keyboard (to press SPACE)
Not tied to these exact devices, any webcam, USB mic, and USB speaker that Linux sees should work.
Step 1: System packages
Fresh Jetson, let's install the basics:
sudo apt update
sudo apt install -y \
git build-essential cmake curl wget pkg-config \
python3-pip python3-venv python3-dev \
alsa-utils pulseaudio-utils v4l-utils psmisc \
ffmpeg libsndfile1
build-essential and cmake are only needed if you go the native llama.cpp route (Option A in Step 4). The rest is for audio, webcam, and Python.
Step 2: Python environment
python3 -m venv .venv
source .venv/bin/activate
pip install --upgrade pip
pip install opencv-python-headless onnx_asr kokoro-onnx soundfile huggingface-hub numpy
Step 3: Free up RAM (optional but recommended)
Heads up: this step may not be strictly necessary. But we're pushing this 8 GB board pretty hard with a fairly capable model, so giving ourselves some headroom makes the whole experience smoother, especially if you've been playing with Docker or other heavy stuff before this.
These are just the commands that worked nicely for me. Use them if they help.
Add some swap
Swap won't speed up inference, but it acts as a safety net during model loading so you don't get OOM-killed at the worst moment.
sudo fallocate -l 8G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Kill memory hogs
sudo systemctl stop docker 2>/dev/null || true
sudo systemctl stop containerd 2>/dev/null || true
pkill -f tracker-miner-fs-3 || true
pkill -f gnome-software || true
free -h
Close browser tabs, IDE windows, anything you don't need. Every MB counts.
If you're going with the Docker route in Step 4, obviously don't stop Docker here, you'll need it. Still kill the rest though.
Still tight on RAM?
From our tests, Q4_K_M (native build) and Q4_K_S (Docker) run comfortably on the 8 GB board once you've done the cleanup above. But if you've got other stuff you can't kill and memory is still tight, you can drop one step down to a Q3 quant, same model, a bit less smart, noticeably lighter. Just swap the filename in Step 4:
gemma-4-E2B-it-Q3_K_M.gguf # instead of Q4_K_M
Honestly though, stick with Q4_K_M if you can. It's the sweet spot.
Step 4: Serve Gemma 4
You need a running llama-server with Gemma 4 before launching the demo. We'll build llama.cpp natively on the Jetson, it gives the best performance and full control over the vision projector that the VLA demo needs.
Build llama.cpp
cd ~
git clone https://github.com/ggml-org/llama.cpp.git
cd llama.cpp
cmake -B build \
-DGGML_CUDA=ON \
-DCMAKE_CUDA_ARCHITECTURES="87" \
-DGGML_NATIVE=ON \
-DCMAKE_BUILD_TYPE=Release
cmake --build build --config Release -j4
Download the model and vision projector
mkdir -p ~/models && cd ~/models
wget -O gemma-4-E2B-it-Q4_K_M.gguf \
https://huggingface.co/unsloth/gemma-4-E2B-it-GGUF/resolve/main/gemma-4-E2B-it-Q4_K_M.gguf
wget -O mmproj-gemma4-e2b-f16.gguf \
https://huggingface.co/ggml-org/gemma-4-E2B-it-GGUF/resolve/main/mmproj-gemma4-e2b-f16.gguf
The mmproj file is the vision projector. Without it Gemma can't see, so don't skip it.
Start the server
~/llama.cpp/build/bin/llama-server \
-m ~/models/gemma-4-E2B-it-Q4_K_M.gguf \
--mmproj ~/models/mmproj-gemma4-e2b-f16.gguf \
-c 2048 \
--image-min-tokens 70 --image-max-tokens 70 \
--ubatch-size 512 --batch-size 512 \
--host 0.0.0.0 --port 8080 \
-ngl 99 --flash-attn on \
--no-mmproj-offload --jinja -np 1
One flag worth mentioning: -ngl 99 tells llama-server to push all the model's layers onto the GPU (99 is just "as many as the model has"). If you ever run into memory issues, you can lower that number to offload fewer layers to GPU and the rest to CPU. For this setup though, all layers on GPU should work fine.
Verify it's up
From another terminal:
curl -s http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{"model":"gemma4","messages":[{"role":"user","content":"Hi!"}],"max_tokens":32}' \
| python3 -m json.tool
If you get JSON back, you're good.
Step 5: Find your mic, speaker, and webcam
Microphone
arecord -l
Look for your USB mic. In our case the C920 showed up as plughw:3,0.
Speaker
pactl list short sinks
This lists your PulseAudio sinks. Pick the one that matches your speaker, it'll be a long ugly name like alsa_output.usb-.... In my case it was alsa_output.usb-Generic_USB2.0_Device_20130100ph0-00.analog-stereo, but yours will be different.
Webcam
v4l2-ctl --list-devices
Usually index 0 (i.e. /dev/video0).
Quick test
export MIC_DEVICE="plughw:3,0"
export SPK_DEVICE="alsa_output.usb-Generic_USB2.0_Device_20130100ph0-00.analog-stereo"
arecord -D "$MIC_DEVICE" -f S16_LE -r 16000 -c 1 -d 3 /tmp/test.wav
paplay --device="$SPK_DEVICE" /tmp/test.wav
If you hear yourself, you're set.
Step 6: Run the demo
Make sure the server from Step 4 is running, then:
source .venv/bin/activate
export MIC_DEVICE="plughw:3,0"
export SPK_DEVICE="alsa_output.usb-Generic_USB2.0_Device_20130100ph0-00.analog-stereo"
export WEBCAM=0
export VOICE="af_jessica"
python3 Gemma4_vla.py
On first launch, the script downloads Parakeet STT, Kokoro TTS, and generates voice prompt WAVs. Takes a minute, then you're live.
SPACE → start recording
speak your question
SPACE → stop recording
There's also a text-only mode if you want to skip audio setup and test the LLM path directly:
python3 Gemma4_vla.py --text
Changing the voice
Kokoro ships with many voices. Switch with:
export VOICE="am_puck"
python3 Gemma4_vla.py
Some good ones: af_jessica, af_nova, am_puck, bf_emma, am_onyx.
How it works
The script exposes exactly one tool to Gemma 4:
{
"name": "look_and_answer",
"description": "Take a photo with the webcam and analyze what is visible."
}
When you ask a question:
Your speech is transcribed locally (Parakeet STT)
Gemma gets the text plus the tool definition
If the question needs vision, she calls look_and_answer, the script grabs a webcam frame and sends it back
Gemma answers, and Kokoro speaks it out loud
There's no keyword matching. The model decides when it needs to see. That's the VLA part.
The --jinja flag on llama-server is what enables this, it activates Gemma's native tool-calling support.
Troubleshooting
Server runs out of memory, do the cleanup from Step 3 again. Close everything. This model fits on 8 GB, but you have to be tidy.
No sound, check pactl list short sinks and make sure SPK_DEVICE matches a real sink.
Mic records silence, double-check with arecord -l, then test recording manually.
First run is slow, normal. It's downloading models and generating voice prompts. Second run is fast.
Environment variables
Variable
Default
Description
LLAMA_URL
http://127.0.0.1:8080/v1/chat/completions
llama-server endpoint
MIC_DEVICE
plughw:3,0
ALSA capture device
SPK_DEVICE
alsa_output.usb-...analog-stereo
PulseAudio sink for playback
WEBCAM
0
Webcam index (/dev/videoN)
VOICE
af_jessica
Kokoro TTS voice
Bonus: just want to try Gemma 4 in text mode?
If you don't care about the full VLA demo and just want to poke at Gemma 4 on your Jetson without building anything, there's a ready-to-go Docker image from Jetson AI Lab with llama.cpp pre-compiled for Orin:
sudo docker run -it --rm --pull always \
--runtime=nvidia --network host \
-v $HOME/.cache/huggingface:/root/.cache/huggingface \
ghcr.io/nvidia-ai-iot/llama_cpp:latest-jetson-orin \
llama-server -hf unsloth/gemma-4-E2B-it-GGUF:Q4_K_S
One line, no compilation, and -hf pulls the GGUF from Hugging Face on first run. Hit http://localhost:8080 with any OpenAI-compatible client and chat away.
Heads up: this Docker path is text-only. It doesn't load the vision projector, so it won't work with the VLA demo above. For the full webcam experience, stick with the native build in Step 4.
Hope you enjoyed this tutorial! If you have any questions or ideas, feel free to reach out. :)
Asier Arranz | NVIDIA
関連記事
Googleがエージェント型アーキテクチャのスケーリング原則を発表
GoogleとMITの研究者が、マルチエージェントシステムのスケーリングに関する予測フレームワークを論文で発表した。このフレームワークは、ツール調整のトレードオフを示し、特定のタスクに最適なエージェント型アーキテクチャの選択に活用できる。
Google、新規コードの75%をAIが生成していると発表
Googleは、社内における新規コードの75%がAIによって生成され、その後開発者がレビューを行うと発表した。
Gemini 3.1 Flash-Liteが入力処理方法の選択肢を提供
クラウドプロバイダーが新モデルGemini 3.1 Flash-Liteを発表し、企業開発者が直面する課題に対応するため、タスクに応じた思考レベルを提供する。