Meta、ローカル・エージェント型マルチモーダル AI「Muse Glimmer」をオープンソースで公開
本文の状態
日本語全文を表示中
詳細モードで約20分の本文を読めます。
同じ出来事の情報源
この情報源を基点に整理
Hugging Face Blog
Meta は Hugging Face Blog を通じて、ローカル環境で動作するエージェント型マルチモーダルモデル「Muse Glimmer」のオープンソース化を発表した。
Continue in AI NEW LAB
このニュースを、実務の判断につなげる
AI NEW LABで、試したことや先に確認したい条件を共有できます。まずはログインなしで読めます。
AI NEW LABで論点を見るAI深層分析を開く2026年8月10日 19:54
AI深層分析
キーポイント
新モデル「Muse Glimmer」の発表
Meta がローカル実行、エージェント機能、マルチモーダル処理に対応する新しい AI モデル「Muse Glimmer」を公開したことを発表した。
オープンソース化の実施
同モデルはオープンソースとして提供され、開発者がローカル環境で自由に利用・改変できる体制が整ったと報じられている。
技術的特徴の強調
発表では、このモデルがローカルでの動作を前提としつつ、自律的なエージェント機能とマルチモーダル処理能力を併せ持つ点が特徴として挙げられた。
ローカル利用に最適化された30Bパラメータモデル
Muse GlimmerはMuseから蒸留された30Bパラメータのマルチモーダルモデルで、Apache 2.0ライセンスの下で公開されている。プライバシー重視のコーディングやドキュメント分析などのローカルエージェントユースケースに設計されている。
ハイブリッドアテンションとGQAによる効率化
テキストデコーダーはスライディングウィンドウ層とフルアテンション層を組み合わせるハイブリッドアテンションを採用し、KVキャッシュメモリを16倍削減するゲートドグループクエリアテンション(GQA)を実装している。
重要な引用
Meta is back with Muse Glimmer: local, agentic, multimodal, and open source
local, agentic, multimodal, and open source
Muse Glimmer, released today, is Meta's new multimodal model, especially designed for local agentic use cases.
The language model uses the following architecture components: Hybrid attention: Alternating between three sliding window layers (of 2,048 tokens) using rotary position embedding, followed by a fourth layer that uses full attention and NoPE.
編集コメントを表示
編集コメント
ローカル実行とエージェント機能を両立するモデルのオープンソース化は、プライバシー重視の開発環境において大きな意義を持つ。業界全体がクラウド依存から分散型 AI へシフトする動きを後押しする内容と言える。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
オープンソース LLM の先駆者たちからの朗報です!本日リリースされた「Muse Glimmer」は、ローカル環境でのエージェント活用を特に意識して設計された Meta の新しいマルチモーダルモデルです。ベースとなる Muse モデルから知識蒸留を行い、パラメータ数は 30B に圧縮されています。Apache 2.0 ライセンスで公開されているため、プライバシー保護やコスト削減のため、あるいは単に開発を楽しむためにローカル環境でのデプロイが最適です。コーディング、ドキュメント分析、パーソナルアシスタントなど、プライバシーを重視するアプリケーション向けに設計されており、Claw や Hermes といったセットアップにも対応しています。
これを記念して、transformers、llama.cpp、vLLM、Inference Endpoints など主要なライブラリやプラットフォームへの Day-0 サポートを提供します。私たちはいくつかの面白い試みを行い、その知見をこの記事で解説しました。インスピレーションを得るために、以下のデモをチェックしてください。
すべての Muse Glimmer モデルは こちらのコレクション で確認できます。
アーキテクチャ
Muse Glimmer は、以下で構成される密な(Dense)30B パラメータモデルです:
- 視覚用エンコーダー(Perception Encoder)として機能する 2B の ViT スタイルのエンコーダ
- テキストデコーダとして機能する 28B パラメータのデコーダ
主要な VLM(Vision-Language Model)に加え、DFlash 上で実装された推測用デコード用のドラフターも用意されています。このモジュールの使用は任意ですが、メモリコストを多少増やすことで、生成速度を大幅に向上させることが可能です。私たちは、特に構造化されたコンテンツの生成、例えばコーディングなどにおいて、このドラフターが非常に有効であることを発見しました。
テキストデコーダ
言語モデルは以下のアーキテクチャコンポーネントを使用しています:
- ハイブリッドアテンション: ロータリー位置埋め込み (RoPE) を用いたスライディングウィンドウ層(2,048 トークン)を3層交互に適用した後、完全アテンションと NoPE(位置埋め込みなし)を用いる第 4 層を配置します。このパターンは「(SWA, SWA, SWA, Full)」の繰り返しで、合計 52 レイヤー(13 回反復)構成です。これにより、RoPE で相対的な順序と距離情報を保持しつつ、NoPE でグローバルな情報も維持できます。
- ゲート付きグループクエリアテンション: キー・バリューヘッドは 16 のクエリヘッドで共有されます。これにより KV キャッシュのメモリ使用量が 16 分の 1 に削減され、生成処理が高速化・低コスト化します。
- Q-K 正規化と追加クエリスケーリング: アテンション計算前に、すべてのクエリとキーヘッドに RMS 正規化を適用してアテンションロジットの安定を図ります。その後、クエリにスケール係数を乗じて、正規化後の目標ロジットスケーリングを設定します。この追加のクエリスケーリングは、ソフトマックスレベルでの逆温度パラメータとして機能します。
Perception Encoder
Muse Glimmer は、画像と動画の両方を処理するために単一の画像エンコーダーを採用しています。他の VLM で比較的小さなビジョンエンコーダーが使われることが多い中、このモデルは Perception Encoder アーキテクチャを基に設計された、規模の大きい 2B ViT 型モデルです。Perception Encoder は以前、Meta がさまざまな下流の空間タスクやマルチモーダルタスクのバックボーンとして紹介しました。
エンコーダーは画像を「2 フレーム×3 チャンネル×14×14」のパッチ形状に変換し、線形層を通じて投影します。その後、学習済みの位置テーブルから補間された絶対位置埋め込みがこれらの埋め込みに加算されます。これらは 50 レイヤーと GELU MLP で構成されるビジョンタワーへと送られます。言語モデルと同様、アテンションパターンは 3 つのウィンドウアテンション層に続く 1 つのフルアテンション層で構成されています。アテンション層内部では、クエリとキーに対して 2D RoPE が適用されます。
トランスフォーマー処理の後、ピクセルシャッフルが隣接する 2x2 グループのスpatial トークンを結合し、チャネル情報を保持したまま画像トークンの数を 4 分の 1 に削減します。その後、統合された特徴はテキストデコーダーの共有埋め込み空間へと投影されます。
動画はフレームごとに同じエンコーダーを通過し、各フレームはパッチに変換されます(形状は [batch, temporal groups, grid height, grid width, 2 frames, 3 channels, 14, 14])。プロセッサの目標は秒間 2 フレームで、動画クリップは最大 96 フレームまでとし、均等にサンプリングします。また、タイムスタンプ付きの動画プレースホルダーを作成し、テキストとフレームを交互に配置します(例:"Time: 0.0s <|video|> x N")。この形式では、最終的な投影層の前に最後の動画埋め込みが置き換えられます。
Transformers
Muse Glimmer を使用するには、Transformers を最新バージョンにアップグレードしてください。
pip install --upgrade transformers accelerate
Muse Glimmer は transformers に Day-0 サポートとして実装されており、メインモデルと推測デコーディング用のドラフター両方に対応しています。モデルとプロセッサの読み込みには AutoModelForMultimodalLM および AutoProcessor クラスを使用できます。
from transformers import AutoProcessor, AutoModelForMultimodalLM
MODEL_ID = "meta/Muse-Glimmer-30B"
# Load model
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(
MODEL_ID,
dtype="auto",
device_map="auto"
)
このスニペットは NVIDIA (CUDA)、AMD (ROCm)、Intel (XPU) の GPU 上で変更なく動作し、device_map="auto" を指定することで利用可能なアクセラレータに自動的にモデルを配置します。
テキスト単体の推論
モデルの読み込み後、以下のようにテキストのみでの推論が可能です。
# Prompt
messages = [
{"role": "user", "content": "Write a short joke about saving RAM."},
]
# Process input
inputs = processor.apply_chat_template(
messages,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
reasoning_strength="low"
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
# Generate output
outputs = model.generate(**inputs, max_new_tokens=1024)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
print(response)
画像とテキストを組み合わせたプロンプト
画像とテキストを扱うには torchvision の利用が必要です。
pip install torchvision
Muse Glimmer は、以下に示すように画像を入力として受け付けます。
messages = [
{
"role": "user", "content": [
{"type": "image", "image": "https://huggingface.co/datasets/merve/vl-test-suite/resolve/main/SF.png"},
{"type": "text", "text": "What is shown in this image?"}
]
}
]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
reasoning_strength="low"
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
# Generate output
outputs = model.generate(**inputs, max_new_tokens=512)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
print(response)
多モーダルなツール呼び出し
Muse Glimmer はマルチモーダルなツール呼び出しが可能です。その仕組みは以下の通りです。
下の例では、画像内の都市情報に基づいて天気予報ツールの呼び出しをモデルに指示しています。
import json
import re
tools = [
{
"type": "function",
"function": {
"name": "weather.get",
"description": "Get the current weather for a city.",
"parameters": {
"type": "object",
"properties": {
"city": {"type": "string"},
},
"required": ["city"],
},
},
}
]
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": "https://huggingface.co/datasets/merve/vl-test-suite/resolve/main/SF.png"},
{"type": "text", "text": "I'm going to the city in this picture. What clothes should I wear?"},
],
},
]
inputs = processor.apply_chat_template(
messages,
tools=tools,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
reasoning_strength="low"
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
outputs = model.generate(**inputs, max_new_tokens=128)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
parsed = processor.tokenizer.parse_response(response)
オブジェクト検出
Muse Glimmer を使えば、画像に対してオープンエンドなオブジェクト検出が可能です。以下のように実行できます。
import json
messages = [{
"role": "user",
"content": [
{"type": "image", "image": "https://huggingface.co/datasets/merve/vl-test-suite/resolve/main/SF.png"},
{
"type": "text",
"text": (
"Detect the bridge. Return only the detection in the model's "
"native object-detection format, with no explanation."
),
},
],
}]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
outputs = model.generate(**inputs, max_new_tokens=128)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
detections = json.loads(response.removesuffix("<|eot|>"))
print(detections)
# [{"x_min": 0, "y_min": 390, "x_max": 520, "y_max": 603}]
# note that you need to scale X and Y values to image size to visualize:
xyxy = (
round(box["x_min"] / 1000 * width),
round(box["y_min"] / 1000 * height),
round(box["x_max"] / 1000 * width),
round(box["y_max"] / 1000 * height),
)
動画推論
動画を扱うには、環境に torchcodec をインストールすることをお勧めします。
pip install torchcodec
Muse Glimmer は音声なしの動画についても複雑な質問に答えることができます。以下は VideoMME2(最も人気のある動画質問応答ベンチマーク)からの例です。
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{
"role": "user",
"content": [
{"type": "video", "video": "https://huggingface.co/datasets/merve/vl-test-suite/resolve/main/IMG_8137.mp4"},
{"type": "text", "text": "Describe what happens in this video."},
],
},
]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
reasoning_strength="low",
processor_kwargs={"num_frames": 96},
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
outputs = model.generate(**inputs, max_new_tokens=1024)
response = processor.decode(
outputs[0, input_len:],
skip_special_tokens=False,
)
parsed = processor.parse_response(
response,
prefix=inputs["input_ids"],
)
print(parsed)
Llama.cpp
Muse Glimmer は、リリース初日から llama.cpp のサポートに対応しています。Meta からは校正済みの量子化モデルを このリポジトリ で提供しており、Uunsloth も最適化された量子化モデルの公開を開始しました。また、DFlash の推測デコーディングもサポートされています。
ビルド済み llama バイナリを使用して llama サーバーを起動したり、CLI を利用したりできます。llama.cpp をインストールするには、以下を実行してください。
curl -LsSf https://llama.app/install.sh | sh
その後、サーバーは以下のように起動できます。
llama serve meta-models/Muse-Glimmer-30B-GGUF
サーバーが起動したら、localhost:8080 にアクセスして、内蔵の WebUI でチャットを開始できます。
TODO: このモデルを使った WebUI の動画をここに挿入
また、サーバーに対して以下のようにクエリを送ることも可能です。
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Write a limerick about python exceptions"}
]
}'
llama サーバーは Pi などのコーディングエージェントとも連携して使用できます。
推測デコーディング
DFlash は、軽量なブロック拡散ドラフトモデルを使用し、推論フェーズで速度向上を実現しながら同じ出力を提供します。Transformers と llama.cpp の両方で、Muse Glimmer の DFlash ドラフターがリリース初日からサポートされています。
以下に、現実的な環境における推論を高速化する「スペキュラティブ・ディコーディング(Speculative Decoding)」の活用方法を示します。動画では、左側に DFlash を搭載した llama.cpp WebUI の生成結果を、右側に通常の生成プロセスの結果を並べて比較しています。
transformers による Speculative Decoding
ドラフターとモデルは以下のように読み込み、ベースモデルと同様に推論を実行できます(追加パラメータは以下のスニペットで示します)。
import torch
from transformers import AutoProcessor, MuseGlimmerAssistantModel, MuseGlimmerForConditionalGeneration
model_id = "meta-models/Muse-Glimmer-30B"
target = MuseGlimmerForConditionalGeneration.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto")
assistant = MuseGlimmerAssistantModel.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto")
processor = AutoProcessor.from_pretrained(model_id)
messages = [
{
"role": "user", "content": [
{"type": "image", "url": "https://huggingface.co/datasets/merve/vl-test-suite/resolve/main/SF.png"},
{"type": "text", "text": "What is shown in this image?"}
]
}
]
out = target.generate(**inputs, assistant_model=assistant, speculation_type="dflash", max_new_tokens=64, do_sample=True)
print(processor.batch_decode(out)[0])
llama.cpp での Speculative Decoding
llama サーバーを起動するには、以下のコマンドを使用します。--spec-draft-n-max 引数は、各スペキュラティブ・ディコーディングのステップで DFlash が提案する未来トークンの数を制御します。Muse Glimmer の DFlash モデルはブロックサイズ 16(アンカートークン 1 つに提案トークン 15 個)でトレーニングされているため、15 を超える値を指定しても自動的に 15 に制限されます。
llama serve -hf meta-models/Muse-Glimmer-30B-GGUF --spec-type draft-dflash --spec-draft-n-max 15
llama cli でも同様にスペキュラティブ・ディコーディング用のドラフターを使用できます。
llama cli -hf meta-models/Muse-Glimmer-30B-GGUF --spec-type draft-dflash
transformers バックエンドを持つ vLLM での Muse Glimmer サポート
今回のリリースでは、transformers バックエンドを備えた vLLM のサポートを提供しています。
# tensor parallel serving across 4 GPUs
vllm serve meta-models/Muse-Glimmer-30B --model-impl transformers --tensor-parallel-size 4
# infer
curl -s http://127.0.0.1:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "username/muse-glimmer-hf-v2",
"messages": [
{"role": "user", "content": "Explain tensor parallelism briefly."}
],
"temperature": 0.0,
"max_tokens": 256
}'
TRL を用いたファインチューニング
TRL を使用すれば、Muse Glimmer を SFT から非同期 GRPO まで多様な手法でファインチューニングできます。私たちはそれぞれ VRAM 80GB の Hopper クラス GPU を 8 基用意し、bf16 精度で 2 つの実験を行いました。
| ワークロード | 実用上の最小構成 |
|---|---|
| 推論 / 評価, BF16 | 1×80 GB H100 |
| LoRA SFT, BF16 | 1×80 GB H100, microbatch 1 + checkpointing |
| フル SFT, BF16 | 8×80 GB H100 with FSDP/ZeRO-3 |
| LoRA GRPO, Transformers rollouts | 1×80 GB H100, but slow/tight |
| LoRA GRPO, 別 vLLM rollout サーバー | 8×H100: 4 rollout + 4 training |
| フルファインチューニング GRPO | 8 GPU は通常不十分 |
今回のリリースでは、Muse Glimmer を MolmoWeb データセットの小さな分割データでファインチューニングする例を提供しています。Muse Glimmer on small split of MolmoWeb dataset では、モデルが構造化された出力を生成する方法や、画像データでのファインチューニング手法を確認できます。
また、OpenCode with AsyncGRPO example を用いてモデルを実行する実験も行いました。このモデルはコーディング能力に優れているため、コード環境でのトレーニングにもぜひ挑戦してみてください。
Demos
Muse Glimmer を試すための楽しい方法をご紹介します。私たちが最も魅力的だと考えるのは、このモデルがコードを実行できるローカル型のパーソナルアシスタントである点です。つまり、自分自身を量子化したり、ハブ上で量子化された重みを見つけたり、推論エンドポイントへ自らデプロイしたり、特定のハードウェア向けに最適化したりといったことが可能になります。ローカルチーム、頑張れ!🚀
OpenClaw を Muse Glimmer に接続する
推論エンドポイントが OpenAI 互換の /v1 API を公開していると仮定します。
OpenClaw のゲートウェイ環境で HF_TOKEN を設定し、以下の内容を ~/.openclaw/openclaw.json に追加してください。
OpenClaw の設定
{
models: {
mode: "merge",
providers: {
muse: {
baseUrl: "https://YOUR-ENDPOINT.endpoints.huggingface.cloud/v1",
apiKey: {
source: "env",
provider: "default",
id: "HF_TOKEN"
},
api: "openai-completions",
authHeader: true,
models: [{
id: "meta/Muse-Glimmer-30B",
name: "Muse Glimmer",
reasoning: false,
input: ["text", "image"],
contextWindow: 32768,
maxTokens: 8192
}]
}
}
},
agents: {
defaults: {
model: { primary: "muse/meta/Muse-Glimmer-30B" }
}
}
}
OpenClaw を再起動します:
openclaw gateway restart
新しいセッションから検証を行います:
openclaw agent --message "Reply with: muse-ready"
エンドポイントの /v1/models 応答で返されたモデル ID を正確に使用してください。もし異なる場合は、その値をそのまま利用しましょう。
Muse Glimmer 自身に量子化を実行させる
Muse Glimmer を Hugging Face MCP に接続し、`AGENTS.md` の設定を更新すれば、ハブ上で自分自身の量子化バージョンを検索してローカルで実行する機能が追加されます。これは、プライベートな環境で作業したい場合やコストを削減したい場合に便利です。
これを二度繰り返すと、Muse Glimmer はキャッシュされた重みを見つけ、自動的に切り替えてくれます。そのため、/spawn のような便利なコマンドを追加しても問題ありません。
Muse Glimmer はマシンとハブを検査し、Q4_K_M GGUF 形式のモデルを選択または作成した上で llama-server を起動します。その後、モデルの発見とチャット完了が正常に機能するか検証されます。その結果、OpenAI 互換 API の背後で動作する軽量なローカルビルドが完成します。以下は AGENTS.md に追加したプロンプトです。
https://huggingface.co/buckets/huggingface/muse-glimmer-assets/resolve/Muse%20Glimmer%20Quantisation%20Demo%20-%20explained.mp4?download=true
これに `AGENTS.md` を追加することで、openclaw や hermes が残りのタスクを解決できるようになります。
ローカル量子化のプロンプト
## Local model deployment
When asked to deploy locally, perform the work; do not give instructions.
1. Inspect hardware and the Hugging Face cache.
2. Search the Hub for compatible GGUF weights using `apps=llama.cpp`; confirm exact filenames through the model-tree API.
3. Prefer an existing suitable GGUF, normally `Q4_K_M`. Treat `mmproj-*.gguf` as projector weights.
4. If no GGUF exists, download the source weights, convert with `convert_hf_to_gguf.py`, then quantize with `llama-quantize`.
5. Preserve source weights and record the repository, revision, filenames, and quantization.
6. Start `llama-server` with an `onyx` alias and an OpenAI-compatible endpoint.
7. Validate `/v1/models` and `/v1/chat/completions`, requiring non-empty, correct content.
8. Report concise progress and logs. Claim completion only after validation passes.
Hey Muse Glimmer, deploy yourself
Muse Glimmer は逆の作業もこなせます。Glimmer 自身に Hugging Face Inference Endpoints へのデプロイを任せてみましょう。これは、最先端のハードウェア上で処理速度を上げたい場合に役立ちます。
なお、Muse Glimmer は Hugging Face の Inference Endpoints に直接デプロイし、エージェントを接続することも可能です。
Muse Glimmer はモデルの特定バージョンを固定し、保護された Hugging Face Inference Endpoint へデプロイします。その後、システムの健全性チェック、モデルの検出、チャット完了を確認します。さらに、Claw エージェントをシークレット情報とロールバック機能付きで接続します。以下は `AGENTS.md` に追加したプロンプトです。Muse Glimmer には、Hugging Face MCP および/または Hugging Face CLI と Skills の利用も必要となります。
Inference Endpoint デプロイ用プロンプト
## Hugging Face Inference Endpoint deployment
When asked to deploy on Hugging Face Inference Endpoints, perform the work; do
not give instructions.
1. Inspect Hugging Face authentication, the current model repository, and any
existing endpoints.
2. Confirm the exact model repository and immutable revision through the Hub
API; inspect its architecture, configuration, and chat template.
3. Confirm that the model is supported by vLLM, then deploy or update a
protected Inference Endpoint using the managed native vLLM engine.
4. Choose an available region and the smallest suitable accelerator. Use one
replica and enable scale-to-zero when supported.
5. Preserve the previous endpoint configuration for rollback. Do not expose
tokens, publish private weights, or replace an unrelated endpoint.
6. Wait for the endpoint to become ready. If startup fails, inspect the logs
and report the actual blocker rather than repeatedly changing settings.
7. Validate `/health`, `/v1/models`, and `/v1/chat/completions`, requiring the
expected model and non-empty, correct content. When agent use is required,
also validate a real structured tool call.
8. Configure the Claw agent to use the endpoint's OpenAI-compatible `/v1` URL,
storing credentials as secrets and retaining the previous provider as
rollback. Test the connection in a fresh session.
9. Report concise progress and finish with the repository, revision, engine,
hardware, endpoint URL, scaling state, and validation results. Claim
completion only after every required check passes.
Muse Glimmer 自身を最適化しよう
最後に、Muse Glimmer に軽度の自己改善(RSI)を行ってもらいましょう。エージェントに対して、特定のハードウェア向けに推論エンジンを最適化するよう指示できます。ここでは NVIDIA H100 を対象とします。これには、前述の Inference Endpoints などの別の推論エンジンを使用する必要があります。
Muse Glimmer は、単一の H100 環境におけるサービングスタックをベンチマークします。負荷は固定したまま、一度に一つの変更を可逆的に試し、正答性を満たす改善点のみを採用し、最も高速で再現可能な構成で完了させます。以下は `AGENTS.md` に追加したプロンプトです。Muse Glimmer には、Hugging Face MCP と Hugging Face CLI と Skills の利用が必要です。
自己最適化用プロンプト
You are Muse Glimmer acting as an autonomous inference-optimization engineer for your own serving stack.
Goal: maximize valid single-H100 aggregate completion throughput in tokens/second.
Protocol:
1. Establish a correctness-passing baseline.
2. Test one reversible optimization at a time.
3. Keep the prompt, concurrency, sampling, request count, warm-up, and decode length fixed.
4. Reject results that fail correctness or prefix checks.
5. Record every experiment chronologically with its configuration, raw throughput, correctness, and delta.
6. Keep improvements and revert regressions.
7. Stop after six consecutive regressions or when the experiment budget is exhausted.
8. Report the best valid configuration and exact reproduction command.
Create a minimal scientific animation of the results:
- white background;
- raw tokens/second—never normalize;
- one point revealed per experiment;
- connect every point chronologically;
- begin with the lowest valid result;
- stop at the best result;
- export as a GIF.
Never fabricate, interpolate, or count correctness-failing measurements.

まとめ
Hugging Face Hub への Muse Glimmer の追加を歓迎します。ぜひ、ローカルのコーディング環境で このコレクション にあるモデルを試してみてください。
Hugging Face リサーチエージェントとして Muse Glimmer を活用する
Muse Glimmer を Hugging Face のリサーチエージェントとして試してみましょう。Gradio Space は、各モデルのリクエストを OpenAI 互換 API を通じてプライベートな Hugging Face Inference Endpoint に送信します。また、公式の Hugging Face MCP サーバーとも接続されており、Hub のリポジトリ、モデル、データセット、Space、ドキュメント、論文を検索・確認するための読み取り専用ツールがエージェントに提供されます。
原文を表示
Great news from the OGs of open source LLMs! Muse Glimmer, released today, is Meta’s new multimodal model, especially designed for local agentic use cases. Distilled from Muse to 30B parameters, and released under the Apache 2.0 license, it’s ideal deploying locally for privacy, reducing costs, or just hacking around. It’s intended for privacy-aware applications such as coding, document analysis, personal assistants, Claw- or Hermes-like setups.
To celebrate, we are shipping with Meta day-0 support in transformers, llama.cpp, vLLM, Inference Endpoints, and other libraries. We built a few cool things and explain our findings in this blog. Check out the demos below for inspiration.
You can find all Muse Glimmer models in this collection.
Architecture
Muse Glimmer is a dense 30B parameter model consisting of:
- 2B ViT-style encoder for vision (Perception Encoder)
- 28B parameter text decoder
In addition to the main VLM, there’s also a speculative decoding drafter implemented on DFlash. Usage of this module is optional, and it can provide much faster generation in exchange for some memory cost. We found this drafter to be particularly well suited to structured content generation such as coding.
Text Decoder
The language model uses the following architecture components:
- Hybrid attention: Alternating between three sliding window layers (of 2,048 tokens) using rotary position embedding, followed by a fourth layer that uses full attention and NoPE (no positional embedding). The pattern is therefore (SWA, SWA, SWA, Full), repeated 13 times to a total of 52 layers. This allows the model to retain relative order and distance information with RoPE and preserve information globally with NoPE.
- Gated Grouped-Query Attention: Each key-value head is shared by 16 query heads, which reduces KV-cache memory by 16x and makes generation faster and cheaper.
- Q-K normalization with extra query scaling: Before computing attention, Muse Glimmer applies RMS normalization to every query and key head to keep attention logits stable. After this, queries are multiplied by a scale factor to set the target logit scale after normalization. The extra query scaling behaves like an inverse temperature at the softmax level.
Perception Encoder
Muse Glimmer uses one image encoder to handle both images and videos. Unlike the relatively small vision encoders used in other VLMs, this is a sizable 2B ViT-like model designed after the Perception Encoder architecture. Perception Encoder was previously introduced by Meta as a backbone for various downstream spatial and multimodal tasks.
The encoder patchifies images to a shape of 2 frames x 3 channels x 14 x 14, and passes them through a linear layer for projection. An interpolated absolute position embedding from a learned position table is then added to these embeddings. These are then sent to the vision tower which consist of 50 layers and GELU MLPs. Similar to the language model, the attention pattern consists of three window attention layers followed by one full attention layer. Inside the attention layers, 2D RoPE is applied to the queries and keys.
After transformer, pixel shuffle concatenates 2x2 groups of neighboring spatial tokens which reduces the number of image tokens 4x without discarding their channels. The merged features are then projected to the shared embedding space of the text decoder.
Videos go through the same encoder frame by frame, where each frame is converted into patches (of shape [batch, temporal groups, grid height, grid width, 2 frames, 3 channels, 14, 14]). The processor targets 2 frames per second and caps the clip at 96 frames sampled evenly across video. The processor creates timestamped video placeholders, interleaving text with frame e.g. “Time: 0.0s <|video|> x N” in which the final video embeddings are replaced before the final projection layer.
Transformers
Upgrade transformers to the latest version to be able to use Muse Glimmer.
pip install --upgrade transformers accelerate
Muse Glimmer comes with day-0 support in transformers, both for the main model and the speculative decoding drafter. You can use AutoModelForMultimodalLM and AutoProcessor classes to load the model and the processor.
from transformers import AutoProcessor, AutoModelForMultimodalLM
MODEL_ID = "meta/Muse-Glimmer-30B"
# Load model
processor = AutoProcessor.from_pretrained(MODEL_ID)
model = AutoModelForMultimodalLM.from_pretrained(
MODEL_ID,
dtype="auto",
device_map="auto"
)
The same snippet runs unchanged on NVIDIA (CUDA), AMD (ROCm) and Intel (XPU) GPUs, device_map="auto" places the model on whichever accelerator is available.
Text-only Inference
After loading the model, you can do text-only inference with it as follows.
# Prompt
messages = [
{"role": "user", "content": "Write a short joke about saving RAM."},
]
# Process input
inputs = processor.apply_chat_template(
messages,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
reasoning_strength="low"
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
# Generate output
outputs = model.generate(**inputs, max_new_tokens=1024)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
print(response)
Prompting the model with images and text
We would need torchvision to be able to use images and text.
pip install torchvision
Muse Glimmer accepts images as input, as demonstrated here:
messages = [
{
"role": "user", "content": [
{"type": "image", "image": "https://huggingface.co/datasets/merve/vl-test-suite/resolve/main/SF.png"},
{"type": "text", "text": "What is shown in this image?"}
]
}
]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
reasoning_strength="low"
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
# Generate output
outputs = model.generate(**inputs, max_new_tokens=512)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
print(response)
Multimodal tool calling
Muse Glimmer can do multimodal tool calling, here’s how you can do it. In the example below, we ask the model to call the weather tool based on the city in the image.
import json
import re
tools = [
{
"type": "function",
"function": {
"name": "weather.get",
"description": "Get the current weather for a city.",
"parameters": {
"type": "object",
"properties": {
"city": {"type": "string"},
},
"required": ["city"],
},
},
}
]
messages = [
{
"role": "user",
"content": [
{"type": "image", "image": "https://huggingface.co/datasets/merve/vl-test-suite/resolve/main/SF.png"},
{"type": "text", "text": "I'm going to the city in this picture. What clothes should I wear?"},
],
},
]
inputs = processor.apply_chat_template(
messages,
tools=tools,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
reasoning_strength="low"
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
outputs = model.generate(**inputs, max_new_tokens=128)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
parsed = processor.tokenizer.parse_response(response)
Object Detection
You can use Muse Glimmer to do open ended object detection in images as follows.
import json
messages = [{
"role": "user",
"content": [
{"type": "image", "image": "https://huggingface.co/datasets/merve/vl-test-suite/resolve/main/SF.png"},
{
"type": "text",
"text": (
"Detect the bridge. Return only the detection in the model's "
"native object-detection format, with no explanation."
),
},
],
}]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
outputs = model.generate(**inputs, max_new_tokens=128)
response = processor.decode(outputs[0][input_len:], skip_special_tokens=False)
detections = json.loads(response.removesuffix("<|eot|>"))
print(detections)
# [{"x_min": 0, "y_min": 390, "x_max": 520, "y_max": 603}]
# note that you need to scale X and Y values to image size to visualize:
xyxy = (
round(box["x_min"] / 1000 * width),
round(box["y_min"] / 1000 * height),
round(box["x_max"] / 1000 * width),
round(box["y_max"] / 1000 * height),
)
Video Inference
To work with videos we recommend installing torchcodec into the environment.
pip install torchcodec
Muse Glimmer can answer complex questions about videos without audio. You can do video inference as follows, here’s an example from VideoMME2, which is the most popular video question answering benchmark.
messages = [
{"role": "system", "content": "You are a helpful assistant."},
{
"role": "user",
"content": [
{"type": "video", "video": "https://huggingface.co/datasets/merve/vl-test-suite/resolve/main/IMG_8137.mp4"},
{"type": "text", "text": "Describe what happens in this video."},
],
},
]
inputs = processor.apply_chat_template(
messages,
tokenize=True,
return_dict=True,
return_tensors="pt",
add_generation_prompt=True,
reasoning_strength="low",
processor_kwargs={"num_frames": 96},
).to(model.device)
input_len = inputs["input_ids"].shape[-1]
outputs = model.generate(**inputs, max_new_tokens=1024)
response = processor.decode(
outputs[0, input_len:],
skip_special_tokens=False,
)
parsed = processor.parse_response(
response,
prefix=inputs["input_ids"],
)
print(parsed)
Llama.cpp
Muse Glimmer comes with day-0 llama.cpp support. Meta has distributed calibrated quants in this repo, and Uunsloth is releasing optimized quants as well. DFlash speculative decoding is supported as well. You can use a pre-built llama binary to start a llama server or a CLI. To install llama.cpp, run
curl -LsSf https://llama.app/install.sh | sh
Then you can start the server as follows.
llama serve meta-models/Muse-Glimmer-30B-GGUF
Once the server has started, you can head to localhost:8080 to chat with the built-in WebUI.
TODO: Insert webui video with this model
You can also query the server as follows.
curl http://localhost:8080/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Write a limerick about python exceptions"}
]
}'
You can also use llama server with coding agents like Pi.
Speculative Decoding
DFlash uses a lightweight block-diffusion drafter model to provide same output with extra speed-ups in decoding phase. Transformers and llama.cpp ship support for DFlash drafter of Muse Glimmer day-0.
Below you can see how speculative decoding can speed-up generation in realistic setups. The video shows llama.cpp webui with DFlash on the left and regular generation on the right.
Speculative Decoding with transformers
You can load the drafter and model as follows, and infer like how you would with base model with an additional parameter (shown in the upcoming snippets).
import torch
from transformers import AutoProcessor, MuseGlimmerAssistantModel, MuseGlimmerForConditionalGeneration
model_id = "meta-models/Muse-Glimmer-30B"
target = MuseGlimmerForConditionalGeneration.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto")
assistant = MuseGlimmerAssistantModel.from_pretrained(model_id, dtype=torch.bfloat16, device_map="auto")
processor = AutoProcessor.from_pretrained(model_id)
messages = [
{
"role": "user", "content": [
{"type": "image", "url": "https://huggingface.co/datasets/merve/vl-test-suite/resolve/main/SF.png"},
{"type": "text", "text": "What is shown in this image?"}
]
}
]
out = target.generate(**inputs, assistant_model=assistant, speculation_type="dflash", max_new_tokens=64, do_sample=True)
print(processor.batch_decode(out)[0])
Speculative Decoding with llama.cpp
You can start llama server using following command. --spec-draft-n-max argument controls how many future tokens DFlash proposes during each speculative-decoding step. Muse Glimmer’s DFlash model was trained with a block size of 16, one anchor token plus 15 proposed tokens, so any value above 15 will be clamped to 15.
llama serve -hf meta-models/Muse-Glimmer-30B-GGUF --spec-type draft-dflash --spec-draft-n-max 15
You can also use llama cli with speculative decoding drafter as follows.
llama cli -hf meta-models/Muse-Glimmer-30B-GGUF --spec-type draft-dflash
Support for Muse Glimmer vLLM with transformers backend
For this release, we ship support for vLLM with transformers backend.
# tensor parallel serving across 4 GPUs
vllm serve meta-models/Muse-Glimmer-30B --model-impl transformers --tensor-parallel-size 4
# infer
curl -s http://127.0.0.1:8000/v1/chat/completions \
-H 'Content-Type: application/json' \
-d '{
"model": "username/muse-glimmer-hf-v2",
"messages": [
{"role": "user", "content": "Explain tensor parallelism briefly."}
],
"temperature": 0.0,
"max_tokens": 256
}'
Fine-tuning with TRL
You can use TRL to fine-tune Muse Glimmer using various methods from SFT to Async GRPO. We have run two experiments on bf16 with Hopper-class GPUs with 80GB VRAM each.
| Workload | Practical minimum |
|---|---|
| Inference / eval, BF16 | 1×80 GB H100 |
| LoRA SFT, BF16 | 1×80 GB H100, microbatch 1 + checkpointing |
| Full SFT, BF16 | 8×80 GB H100 with FSDP/ZeRO-3 |
| LoRA GRPO, Transformers rollouts | 1×80 GB H100, but slow/tight |
| LoRA GRPO, separate vLLM rollout server | 8×H100: 4 rollout + 4 training |
| Full-finetune GRPO | 8 GPUs is usually insufficient |
As part of this release, we ship an example to fine-tune Muse Glimmer on small split of MolmoWeb dataset. This shows how to make model generate structured outputs and how to fine-tune on images.
We also experimented with running the model on OpenCode with AsyncGRPO example. Model shows strong coding capabilities, so we encourage you to try training with coding environments.
Demos
Here are some fun ways to try out Muse Glimmer. In our opinion, the coolest thing about this model is that it is a local scale personal assistant that can code. That means you can make it do things like, quantize itself, find quantized weights on the Hub, deploy itself to inference endpoints, and even optimize itself for specific hardware! Let’s go team local 🚀
Connect OpenClaw to Muse Glimmer
Assume the Inference Endpoint exposes an OpenAI-compatible /v1 API.
Set HF_TOKEN in the OpenClaw gateway environment, then add this to ~/.openclaw/openclaw.json:
OpenClaw configuration
{
models: {
mode: "merge",
providers: {
muse: {
baseUrl: "https://YOUR-ENDPOINT.endpoints.huggingface.cloud/v1",
apiKey: {
source: "env",
provider: "default",
id: "HF_TOKEN"
},
api: "openai-completions",
authHeader: true,
models: [{
id: "meta/Muse-Glimmer-30B",
name: "Muse Glimmer",
reasoning: false,
input: ["text", "image"],
contextWindow: 32768,
maxTokens: 8192
}]
}
}
},
agents: {
defaults: {
model: { primary: "muse/meta/Muse-Glimmer-30B" }
}
}
}
Restart OpenClaw:
openclaw gateway restart
Validate from a fresh session:
openclaw agent --message "Reply with: muse-ready"
Use the exact model ID returned by the endpoint’s /v1/models response if it differs.
Hey Muse Glimmer, quantize yourself
If we hook up Muse Glimmer to the Hugging Face MCP and update its AGENTS.md we give it the capability to find a quantized version of itself on the hub and run locally. This is handy if you want to work on something private, or just cut costs.
If you do this a second time, Muse Glimmer will find the cached weights and switch to them, so feel free to add a convenient command like /spawn.
Muse Glimmer inspects the machine and Hub, selects or creates a Q4_K_M GGUF, launches llama-server, and validates model discovery and chat completion. The result is a smaller local build behind an OpenAI-compatible API. Here’s the prompt we added to AGENTS.md.
By adding this to AGENTS.md openclaw or hermes will be able to solve the rest.
Local quantization prompt
## Local model deployment
When asked to deploy locally, perform the work; do not give instructions.
1. Inspect hardware and the Hugging Face cache.
2. Search the Hub for compatible GGUF weights using `apps=llama.cpp`; confirm exact filenames through the model-tree API.
3. Prefer an existing suitable GGUF, normally `Q4_K_M`. Treat `mmproj-*.gguf` as projector weights.
4. If no GGUF exists, download the source weights, convert with `convert_hf_to_gguf.py`, then quantize with `llama-quantize`.
5. Preserve source weights and record the repository, revision, filenames, and quantization.
6. Start `llama-server` with an `onyx` alias and an OpenAI-compatible endpoint.
7. Validate `/v1/models` and `/v1/chat/completions`, requiring non-empty, correct content.
8. Report concise progress and logs. Claim completion only after validation passes.
Hey Muse Glimmer, deploy yourself
Muse Glimmer can also take care of the opposite. Let’s get Glimmer to deploy itself on Hugging Face Inference Endpoints. Which is useful if you want to speed up on some cutting edge hardware.
N.B. You can also just deploy Muse Glimmer to Inference Endpoints directly and connect your agent.
Muse Glimmer pins the model revision, deploys it to a protected Hugging Face Inference Endpoint, and verifies health, model discovery, and chat completion. It then connects the Claw agent with secrets and rollback preserved. Here’s the prompt we added to AGENTS.md. Muse glimmer will also need the Hugging Face MCP and/or the Hugging Face CLI and Skills.
Inference Endpoint deployment prompt
## Hugging Face Inference Endpoint deployment
When asked to deploy on Hugging Face Inference Endpoints, perform the work; do
not give instructions.
1. Inspect Hugging Face authentication, the current model repository, and any
existing endpoints.
2. Confirm the exact model repository and immutable revision through the Hub
API; inspect its architecture, configuration, and chat template.
3. Confirm that the model is supported by vLLM, then deploy or update a
protected Inference Endpoint using the managed native vLLM engine.
4. Choose an available region and the smallest suitable accelerator. Use one
replica and enable scale-to-zero when supported.
5. Preserve the previous endpoint configuration for rollback. Do not expose
tokens, publish private weights, or replace an unrelated endpoint.
6. Wait for the endpoint to become ready. If startup fails, inspect the logs
and report the actual blocker rather than repeatedly changing settings.
7. Validate `/health`, `/v1/models`, and `/v1/chat/completions`, requiring the
expected model and non-empty, correct content. When agent use is required,
also validate a real structured tool call.
8. Configure the Claw agent to use the endpoint's OpenAI-compatible `/v1` URL,
storing credentials as secrets and retaining the previous provider as
rollback. Test the connection in a fresh session.
9. Report concise progress and finish with the repository, revision, engine,
hardware, endpoint URL, scaling state, and validation results. Claim
completion only after every required check passes.
Hey Muse Glimmer, optimize yourself
Finally, let’s get Muse Glimmer to do some light RSI. We can instruct our agent to optimize its own inference engine for specific hardware, in this case a Nvidia H100. To do this, the agent will need to use another inference engine, like Inference Endpoints above.
Muse Glimmer benchmarks its own single-H100 serving stack, testing one reversible change at a time while holding the workload fixed. It keeps only correctness-passing gains and finishes with the fastest reproducible configuration. Here’s the prompt we added to AGENTS.md. Muse glimmer need the Hugging Face MCP and the Hugging Face CLI and Skills.
Self-optimization prompt
You are Muse Glimmer acting as an autonomous inference-optimization engineer for your own serving stack.
Goal: maximize valid single-H100 aggregate completion throughput in tokens/second.
Protocol:
1. Establish a correctness-passing baseline.
2. Test one reversible optimization at a time.
3. Keep the prompt, concurrency, sampling, request count, warm-up, and decode length fixed.
4. Reject results that fail correctness or prefix checks.
5. Record every experiment chronologically with its configuration, raw throughput, correctness, and delta.
6. Keep improvements and revert regressions.
7. Stop after six consecutive regressions or when the experiment budget is exhausted.
8. Report the best valid configuration and exact reproduction command.
Create a minimal scientific animation of the results:
- white background;
- raw tokens/second—never normalize;
- one point revealed per experiment;
- connect every point chronologically;
- begin with the lowest valid result;
- stop at the best result;
- export as a GIF.
Never fabricate, interpolate, or count correctness-failing measurements.
Wrapping Up
We are happy to welcome Muse Glimmer in Hugging Face Hub. Try the models in this collection with your local coding setups today!
Hey Muse Glimmer, research the Hub
Try Muse Glimmer as a Hugging Face research agent. The Gradio Space sends each model request to a private Hugging Face Inference Endpoint through its OpenAI-compatible API. It also connects to the official Hugging Face MCP server, giving the agent read-only tools to search and inspect Hub repositories, models, datasets, Spaces, documentation, and papers.
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み