シャオミのReasoning対応VLM「MiMo‑VL 2508」を試す
🚀 MiMo‑VL 2508が登場! 同じサイズ、もっと賢く 🚀
パフォーマンス、思考制御、全体的なユーザー体験をアップグレードしました。
📈 画像+動画でのベンチマーク向上:MMMU 70.6、VideoMME 70.8。 全般的に一貫した改善。
🤖 思考制御:no_thinkで推論を切り替え。
オン(デフォルト):完全な推論が表示;
オフ:直接的な回答、推論なし ⚡⚡;❤️ 実際のユーザー体験:VLM Arenaの評価が1093.9から1131.2に向上(+37.3)。
日常のタスクでより有能、柔軟、信頼性が高まりました。
フィードバックお待ちしています。🤗 RLバージョン:https://huggingface.co/XiaomiMiMo/MiMo-VL-7B-RL-2508
🤗 SFTバージョン:https://huggingface.co/XiaomiMiMo/MiMo-VL-7B-SFT-2508
モデルは、教師ありファインチューニング(SFT: Supervised Fine-Tuning)版と、それにさらに強化学習(RL: Reinforcement Learning)を行ったもの2種類で、おすすめはRL版の方みたい。
RL版のモデルカードをGPT-5で翻訳した。
MiMo-VLテクニカルレポート
🔥🔥🔥MiMo-VL 2508 アップデート
MiMo-VL(MiMo-VL-7B-RL-2508 および MiMo-VL-7B-SFT-2508)に関して、複数のベンチマークにおける性能向上、思考制御機能の改善、そしてユーザー体験の向上を発表できることを嬉しく思います。
📈 性能向上
MiMo-VL-7B-RL-2508 は画像および動画ベンチマークの両方で一貫した改善を示し、MMMU で 70.6、VideoMME で 70.8 という顕著な到達点を達成しました。
referred from https://huggingface.co/XiaomiMiMo/MiMo-VL-7B-RL-2508完全な評価結果はこの下に記載しています。
🤔 思考制御機能
no_think パラメータを用いてモデルの推論モードをオフにできる思考制御機能を提供します:
- 思考モード(デフォルト動作): 推論過程を完全に可視化し、制御成功率は 100%。
- 非思考モード: 推論を伴わない直接応答で、制御成功率は 99.84%。
❤️ ユーザー体験の向上
社内の VLM Arena 評価では、実運用に近い性能が有意に改善しました:
- 現行モデル(MiMo-VL-7B-RL-2508): 1131.2 レーティング
- 以前のバージョン(MiMo-VL-7B-RL): 1093.9 レーティング
これらの更新により、学術評価と実用アプリケーションの両面で、より高性能・柔軟・信頼性の高い視覚言語モデルを提供します。
😉 ケーススタディ:この車の魅力的な点は?
referred from https://huggingface.co/XiaomiMiMo/MiMo-VL-7B-RL-2508
訳注: 実際は動画MiMo-VL-7B-RL-2508 の回答:
<think>...</think> Xiaomi SU7 の魅力的な要素を判断するために、動画から視覚要素と文脈を分析します: 1. 美的デザイン - 車体は流麗で空力的な外観を備え、滑らかでモダンなラインが特徴です。 - 先鋭的なヘッドライトや連続した発光テールライトが、未来的かつスポーティな印象を強めます。 - 鮮やかなカラーと磨き上げられた仕上げにより、視覚的に際立っています。 2. パフォーマンスとスピード - 砂漠、森林、市街地など多様な道路で高速走行するダイナミックな映像が、俊敏性とパワーを強調しています。 - 回転するホイールやエンジン(稲妻のような効果を伴う)のクローズアップは、高度なエンジニアリングと高性能(電動または先端技術主導)を示唆します。 3. 多用途性 - 夕暮れの砂漠、森林道路、都市部の街路など多様な環境での描写により、さまざまな地形や用途への適応性が強調されています。 4. 技術革新 - 電気的な稲妻効果を伴うエンジンのクローズアップは最先端技術を示唆し、テック志向の車として位置づけます(Xiaomi のテックブランドのアイデンティティとも合致)。 5. ブランドの魅力 - 目立つ「Xiaomi SU7」ブランディングは、コンシューマテックにおける Xiaomi の評価を活用し、テックに敏感な層に信頼感と魅力を与えます。 まとめると、Xiaomi SU7 は、際立つデザイン、高性能、多用途性、技術革新、そして強いブランド連想によって訴求力を持ちます。
完全な評価結果
referred from https://huggingface.co/XiaomiMiMo/MiMo-VL-7B-RL-2508モデル推奨
MiMo-VL-7B-2508 の両バージョンは現在 Hugging Face でオープンソース公開中です:
- 🤗 MiMo-VL-7B-RL-2508
ほとんどのユーザーに推奨される、体験・活用向けモデル。- 🤗 MiMo-VL-7B-SFT-2508
このモデルを基に SFT や RL を実施可能。従来の SFT 版と比べ、RL の安定性が向上しています。デプロイ時のパラメータ
- temperature=0.3, topp=0.95
- システムプロンプトは既に
chat_template.json
に設定済みで、追加の設定は不要です。思考制御
クエリに
/no_think
を付与することで思考モードを制御できます:
- 思考モードのクエリ(デフォルト):
「画像内の質問への答えは何ですか?」- 非思考モードのクエリ:
「画像内のテキストを特定してください。/no_think」
I. Introduction(序論)
本レポートでは、コンパクトながら強力な VLM、MiMo-VL-7B の構築に向けた我々の取り組みを共有します。MiMo-VL-7B は、(1)細粒度の視覚的詳細を保持するネイティブ解像度の ViT エンコーダ、(2)効率的なクロスモーダルアライメントのための MLP プロジェクタ、(3)複雑な推論タスクに最適化された我々の MiMo-7B 言語モデル から構成されます。
MiMo-VL-7B の開発は 2 つの連続した学習プロセスから成ります。(1)プロジェクタのウォームアップ、視覚と言語のアライメント、汎用マルチモーダル事前学習、長文脈の教師あり微調整(SFT)を含む 4 段階の事前学習フェーズ。このフェーズにより MiMo-VL-7B-SFT モデルが得られます。(2)続くポストトレーニングフェーズでは、Mixed On-policy Reinforcement Learning(MORL)を導入します。これは、知覚の正確性、視覚的グラウンディングの精度、論理的推論能力、そして人間/AI の嗜好に跨る多様な報酬シグナルをシームレスに統合する新しい枠組みです。このフェーズにより MiMo-VL-7B-RL モデルが得られます。
referred from https://huggingface.co/XiaomiMiMo/MiMo-VL-7B-RL-2508我々は SFT および RL モデルのチェックポイントを含む MiMo-VL-7B シリーズをオープンソース化します。本レポートとモデル群が、強力な推論型 VLM の開発に有益な洞察を提供し、コミュニティ全体の利益になると信じています。
🛤️ この過程で得られた知見
- 事前学習段階から高品質で広範な推論データを取り込むことは、モデル性能向上に極めて重要
- 我々は、多様なクエリを同定し、長い CoT(Chain-of-Thought)で応答を再生成する大型の推論モデルを用い、リジェクションサンプリングで品質を保証することで、高品質な推論データを精選します。
- これを補助的な微調整データとして扱うのではなく、事前学習の後段に大量の合成推論データを直接取り込み、学習を延長することで、飽和することなく継続的な性能向上を得ます。
- Mixed On-policy Reinforcement Learning はモデル性能をさらに高める一方、同時に安定的な総合改善を達成することは依然として課題
- 我々は、推論、知覚、グラウンディング、人間嗜好への整合といった多様な能力に跨って RL を適用し、テキスト・画像・動画を含むモダリティにわたって実施します。このハイブリッドな訓練手法はモデルの潜在能力をさらに引き出す一方で、データ領域間の干渉が課題として残ります。
II. モデル詳細
referred from https://huggingface.co/XiaomiMiMo/MiMo-VL-7B-RL-2508「モデルは Huggingface Collections: MiMo-VL および ModelScope Collections: MiMo-VL で入手可能です。」
モデル 説明 ダウンロード(HuggingFace) ダウンロード(ModelScope) MiMo-VL-7B-SFT 4 段階の事前学習後に卓越した推論ポテンシャルを示す VLM 🤗 XiaomiMiMo/MiMo-VL-7B-SFT 🤖️ XiaomiMiMo/MiMo-VL-7B-SFT MiMo-VL-7B-RL 既存のオープンソースモデルを凌駕する RL モデル 🤗 XiaomiMiMo/MiMo-VL-7B-RL 🤖️ XiaomiMiMo/MiMo-VL-7B-RL III. 評価結果
汎用能力
一般的な視覚と言語の理解において、MiMo-VL-7B モデルはオープンソース最先端の結果を達成します。
referred from https://huggingface.co/XiaomiMiMo/MiMo-VL-7B-RL-2508推論タスク
マルチモーダル推論において、SFT と RL の両モデルは、以下のベンチマーク全般で比較した全オープンソースのベースラインを大幅に上回ります。
referred from https://huggingface.co/XiaomiMiMo/MiMo-VL-7B-RL-2508[!IMPORTANT]
* で示した結果は我々の評価フレームワークを用いて取得しています。
の付いたタスクは GPT-4o による評価です。 {\dagger} GUI タスク
MiMo-VL-7B-RL は優れた GUI 理解およびグラウンディング能力を備えています。汎用 VL モデルとして、GUI 特化モデルと同等もしくはそれ以上の性能を達成します。
referred from https://huggingface.co/XiaomiMiMo/MiMo-VL-7B-RL-2508Elo レーティング
社内の評価データセットと GPT-4o の判定により、MiMo-VL-7B-RL は評価対象とした 7B〜72B パラメータのすべてのオープンソース視覚言語モデルの中で最高の Elo レーティングを達成し、首位にランクインしました。
referred from https://huggingface.co/XiaomiMiMo/MiMo-VL-7B-RL-2508IV. デプロイ
MiMo-VL-7B シリーズは、デプロイおよび推論において
Qwen2_5_VLForConditionalGeneration
アーキテクチャとの完全な互換性を維持します。
ライセンスはMITライセンスの様子。
サンプルコードがモデルカードには書かれていない。Qwen2_5_VLForConditionalGeneration
と完全に互換とあるので、Qwen2.5VLのコードをそのまま使えばいいかなーと思ったけど、確認してみたら GitHub レポジトリがあった。
こちらに
-
demo
- Gradioのサンプルチャットアプリ
-
examples
- ノートブックのサンプル。以下の2つ。
- 画像から文字を読み取るOCRのサンプル
- 画像から物体を検出してバウンディングボックスを作成するサンプル
- ノートブックのサンプル。以下の2つ。
があるので、これを試せば良さそう。
Colaboratory L4 で RL版を試す。GitHubのexamplesのOCRサンプルを参考に。
パッケージインストール。
!pip install -U transformers qwen-vl-utils
!pip install "flash-attn==2.7.4.post1" --no-build-isolation
モデルとプロセッサをロード
from transformers import Qwen2_5_VLForConditionalGeneration, AutoProcessor
from qwen_vl_utils import process_vision_info
import torch
model_name = "XiaomiMiMo/MiMo-VL-7B-RL-2508"
model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
model_name,
torch_dtype=torch.bfloat16,
# MiMo-VLのthiningのために、FlashAttentionを有効化して推論を高速化
attn_implementation="flash_attention_2",
device_map="auto",
)
processor = AutoProcessor.from_pretrained(model_name)
VRAM消費は16GB程度
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.54.15 Driver Version: 550.54.15 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA L4 Off | 00000000:00:03.0 Off | 0 |
| N/A 54C P0 29W / 72W | 16047MiB / 23034MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
推論用の関数を定義
def inference(model, messages, max_new_tokens=16384, temperature=0.1, top_p=0.95, do_sample=True):
text = processor.apply_chat_template(
messages, tokenize=False, add_generation_prompt=True
)
image_inputs, video_inputs = process_vision_info(messages)
inputs = processor(
text=[text],
images=image_inputs,
videos=video_inputs,
padding=True,
return_tensors="pt",
)
inputs = inputs.to(model.device)
generated_ids = model.generate(
**inputs,
max_new_tokens=max_new_tokens,
temperature=temperature,
top_p=top_p,
do_sample=do_sample,
pad_token_id=processor.tokenizer.eos_token_id
)
generated_ids_trimmed = [
out_ids[len(in_ids) :] for in_ids, out_ids in zip(inputs.input_ids, generated_ids)
]
output_text = processor.batch_decode(
generated_ids_trimmed, skip_special_tokens=True, clean_up_tokenization_spaces=False
)
return output_text
まずは公式のサンプル画像を使って試してみる。サンプル画像は以下にある。
レポジトリからサンプルの画像をダウンロード。
!wget https://raw.githubusercontent.com/XiaomiMiMo/MiMo-VL/refs/heads/main/examples/example_images/24-25-pl.png
!wget https://raw.githubusercontent.com/XiaomiMiMo/MiMo-VL/refs/heads/main/examples/example_images/menu.jpeg
!wget https://raw.githubusercontent.com/XiaomiMiMo/MiMo-VL/refs/heads/main/examples/example_images/dogs.jpeg
まず1つ目。これはサッカーのプレミアリーグの順位表の画像。
from IPython.display import Image
display(Image('24-25-pl.png', width=1000))
これを使って推論。
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "24-25-pl.png",
},
{"type": "text", "text": "OCRして、Markdownで出力して。"},
],
}
]
output = inference(model, messages, temperature=0.2)#, do_sample=False)
print(output[0])
だいたい4分ぐらいで回答が返ってきた。
<think>
Got it, let's start by OCR-ing the table. First, I need to read each row and column carefully. The table is the Premier League standings. Let's list out each column: Position, Club, Played, Won, Drawn, Lost, GF, GA, GD, Points.
Let's go row by row:
1. Position 1: Liverpool, 38, 25, 9, 4, 86, 41, 45, 84
2. Position 2: Arsenal, 38, 20, 14, 4, 69, 34, 35, 74
3. Position 3: Manchester City, 38, 21, 8, 9, 72, 44, 28, 71
4. Position 4: Chelsea, 38, 20, 9, 9, 64, 43, 21, 69
5. Position 5: Newcastle United, 38, 20, 6, 12, 68, 47, 21, 66
6. Position 6: Aston Villa, 38, 19, 9, 10, 58, 51, 7, 66
7. Position 7: Nottingham Forest, 38, 19, 8, 11, 58, 46, 12, 65
8. Position 8: Brighton And Hove Albion, 38, 16, 13, 9, 66, 59, 7, 61
9. Position 9: Bournemouth, 38, 15, 11, 12, 58, 46, 12, 56
10. Position 10: Brentford, 38, 16, 8, 14, 66, 57, 9, 56
11. Position 11: Fulham, 38, 15, 9, 14, 54, 54, 0, 54
12. Position 12: Crystal Palace, 38, 13, 14, 11, 51, 51, 0, 53
13. Position 13: Everton, 38, 11, 15, 12, 42, 44, -2, 48
14. Position 14: West Ham United, 38, 11, 10, 17, 46, 62, -16, 43
15. Position 15: Manchester United, 38, 11, 9, 18, 44, 54, -10, 42
16. Position 16: Wolverhampton Wanderers, 38, 12, 6, 20, 54, 69, -15, 42
17. Position 17: Tottenham Hotspur, 38, 11, 5, 22, 64, 65, -1, 38
18. Position 18: Leicester City, 38, 6, 7, 25, 33, 80, -47, 25
19. Position 19: Ipswich Town, 38, 4, 10, 24, 36, 82, -46, 22
20. Position 20: Southampton, 38, 2, 6, 30, 26, 86, -60, 12
Now, format this into a Markdown table. The headers are Position, Club, Played, Won, Drawn, Lost, GF, GA, GD, Points.
Let's make sure each column is aligned. In Markdown, the table can be structured with pipes.
So the Markdown table would be:
| Position | Club | Played | Won | Drawn | Lost | GF | GA | GD | Points |
|----------|-----------------------|-------|----|------|-----|----|----|----|-------|
| 1 | Liverpool | 38 | 25 | 9 | 4 | 86 | 41 | 45 | 84 |
| 2 | Arsenal | 38 | 20 | 14 | 4 | 69 | 34 | 35 | 74 |
| 3 | Manchester City | 38 | 21 | 8 | 9 | 72 | 44 | 28 | 71 |
| 4 | Chelsea | 38 | 20 | 9 | 9 | 64 | 43 | 21 | 69 |
| 5 | Newcastle United | 38 | 20 | 6 | 12 | 68 | 47 | 21 | 66 |
| 6 | Aston Villa | 38 | 19 | 9 | 10 | 58 | 51 | 7 | 66 |
| 7 | Nottingham Forest | 38 | 19 | 8 | 11 | 58 | 46 | 12 | 65 |
| 8 | Brighton And Hove Albion | 38 | 16 | 13 | 9 | 66 | 59 | 7 | 61 |
| 9 | Bournemouth | 38 | 15 | 11 | 12 | 58 | 46 | 12 | 56 |
| 10 | Brentford | 38 | 16 | 8 | 14 | 66 | 57 | 9 | 56 |
| 11 | Fulham | 38 | 15 | 9 | 14 | 54 | 54 | 0 | 54 |
| 12 | Crystal Palace | 38 | 13 | 14 | 11 | 51 | 51 | 0 | 53 |
| 13 | Everton | 38 | 11 | 15 | 12 | 42 | 44 | -2 | 48 |
| 14 | West Ham United | 38 | 11 | 10 | 17 | 46 | 62 | -16| 43 |
| 15 | Manchester United | 38 | 11 | 9 | 18 | 44 | 54 | -10| 42 |
| 16 | Wolverhampton Wanderers | 38 | 12 | 6 | 20 | 54 | 69 | -15| 42 |
| 17 | Tottenham Hotspur | 38 | 11 | 5 | 22 | 64 | 65 | -1 | 38 |
| 18 | Leicester City | 38 | 6 | 7 | 25 | 33 | 80 | -47| 25 |
| 19 | Ipswich Town | 38 | 4 | 10 | 24 | 36 | 82 | -46| 22 |
| 20 | Southampton | 38 | 2 | 6 | 30 | 26 | 86 | -60| 12 |
Wait, check the 8th row: "Brighton And Hove Albion" – make sure the spacing. Also, check all the numbers. Let's verify a few:
Liverpool: 25 wins, 9 draws, 4 losses. 25+9+4=38, correct. 86-41=45 GD, 25*3 +9*1 +4*0=75+9=84 points. Correct.
Arsenal: 20+14+4=38. 69-34=35. 20*3 +14*1 +4*0=60+14=74. Correct.
Manchester City: 21+8+9=38. 72-44=28. 21*3 +8*1 +9*0=63+8=71. Correct.
Chelsea: 20+9+9=38. 64-43=21. 20*3 +9*1 +9*0=60+9=69. Correct.
Newcastle: 20+6+12=38. 68-47=21. 20*3 +6*1 +12*0=60+6=66. Correct.
Aston Villa: 19+9+10=38. 58-51=7. 19*3 +9*1 +10*0=57+9=66. Correct.
Nottingham Forest: 19+8+11=38. 58-46=12. 19*3 +8*1 +11*0=57+8=65. Correct.
Brighton: 16+13+9=38. 66-59=7. 16*3 +13*1 +9*0=48+13=61. Correct.
Bournemouth: 15+11+12=38. 58-46=12. 15*3 +11*1 +12*0=45+11=56. Correct.
Brentford: 16+8+14=38. 66-57=9. 16*3 +8*1 +14*0=48+8=56. Correct.
Fulham: 15+9+14=38. 54-54=0. 15*3 +9*1 +14*0=45+9=54. Correct.
Crystal Palace: 13+14+11=38. 51-51=0. 13*3 +14*1 +11*0=39+14=53. Correct.
Everton: 11+15+12=38. 42-44=-2. 11*3 +15*1 +12*0=33+15=48. Correct.
West Ham: 11+10+17=38. 46-62=-16. 11*3 +10*1 +17*0=33+10=43. Correct.
Man Utd: 11+9+18=38. 44-54=-10. 11*3 +9*1 +18*0=33+9=42. Correct.
Wolves: 12+6+20=38. 54-69=-15. 12*3 +6*1 +20*0=36+6=42. Correct.
Tottenham: 11+5+22=38. 64-65=-1. 11*3 +5*1 +22*0=33+5=38. Correct.
Leicester: 6+7+25=38. 33-80=-47. 6*3 +7*1 +25*0=18+7=25. Correct.
Ipswich: 4+10+24=38. 36-82=-46. 4*3 +10*1 +24*0=12+10=22. Correct.
Southampton: 2+6+30=38. 26-86=-60. 2*3 +6*1 +30*0=6+6=12. Correct.
All rows check out. Now format the Markdown table properly.
</think>
To extract the content from the image and format it as a Markdown table, I'll first transcribe the table data accurately and then structure it using Markdown syntax.
### Step 1: Transcribe the Table Data
The image shows the **Premier League** standings with columns: *Position, Club, Played, Won, Drawn, Lost, GF, GA, GD, Points*. I’ll list each row’s data:
| Position | Club | Played | Won | Drawn | Lost | GF | GA | GD | Points |
|----------|-----------------------|-------|----|------|-----|----|----|----|-------|
| 1 | Liverpool | 38 | 25 | 9 | 4 | 86 | 41 | 45 | 84 |
| 2 | Arsenal | 38 | 20 | 14 | 4 | 69 | 34 | 35 | 74 |
| 3 | Manchester City | 38 | 21 | 8 | 9 | 72 | 44 | 28 | 71 |
| 4 | Chelsea | 38 | 20 | 9 | 9 | 64 | 43 | 21 | 69 |
| 5 | Newcastle United | 38 | 20 | 6 | 12 | 68 | 47 | 21 | 66 |
| 6 | Aston Villa | 38 | 19 | 9 | 10 | 58 | 51 | 7 | 66 |
| 7 | Nottingham Forest | 38 | 19 | 8 | 11 | 58 | 46 | 12 | 65 |
| 8 | Brighton And Hove Albion | 38 | 16 | 13 | 9 | 66 | 59 | 7 | 61 |
| 9 | Bournemouth | 38 | 15 | 11 | 12 | 58 | 46 | 12 | 56 |
| 10 | Brentford | 38 | 16 | 8 | 14 | 66 | 57 | 9 | 56 |
| 11 | Fulham | 38 | 15 | 9 | 14 | 54 | 54 | 0 | 54 |
| 12 | Crystal Palace | 38 | 13 | 14 | 11 | 51 | 51 | 0 | 53 |
| 13 | Everton | 38 | 11 | 15 | 12 | 42 | 44 | -2 | 48 |
| 14 | West Ham United | 38 | 11 | 10 | 17 | 46 | 62 | -16| 43 |
| 15 | Manchester United | 38 | 11 | 9 | 18 | 44 | 54 | -10| 42 |
| 16 | Wolverhampton Wanderers | 38 | 12 | 6 | 20 | 54 | 69 | -15| 42 |
| 17 | Tottenham Hotspur | 38 | 11 | 5 | 22 | 64 | 65 | -1 | 38 |
| 18 | Leicester City | 38 | 6 | 7 | 25 | 33 | 80 | -47| 25 |
| 19 | Ipswich Town | 38 | 4 | 10 | 24 | 36 | 82 | -46| 22 |
| 20 | Southampton | 38 | 2 | 6 | 30 | 26 | 86 | -60| 12 |
### Step 2: Verify Accuracy
I cross-checked key values (e.g., total matches = 38 for all teams, point calculations: `Points = (Won × 3) + (Drawn × 1) + (Lost × 0)`, and goal difference `GD = GF - GA`) to ensure the table is error-free.
This Markdown table preserves the structure and data from the original Premier League standings image.
<think>〜</think>
で thinkingの出力、それ以降で最終回答の出力という感じになっているのがわかる。あと、thinkingも出力も英語で出力されている。
少しいじってみる。
import re
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "24-25-pl.png",
},
{"type": "text", "text": "OCRして、Markdownで出力して。出力は日本語で。"},
],
}
]
output = inference(model, messages, temperature=0.2)#, do_sample=False)
thinking, answer = re.match(r'(?s)^<think>(.*?)</think>(.*)$', output[0]).groups()
print("===== THINKING =====")
print(thinking)
print("===== ANSWER =====")
print(answer)
===== THINKING =====
用户现在需要把英超积分榜的OCR内容转成Markdown表格,用日语输出。首先得仔细看每个行列的内容,确保准确。
首先,表头是Position, Club, Played, Won, Drawn, Lost, GF, GA, GD, Points。然后每一行对应球队的数据。
要注意球队名称、图标(但Markdown里可能用文字),还有各列的数值。现在逐行处理:
第一行是表头:Position, Club, Played, Won, Drawn, Lost, GF, GA, GD, Points
然后是各队:
1. Liverpool: 38,25,9,4,86,41,45,84
2. Arsenal: 38,20,14,4,69,34,35,74
3. Manchester City: 38,21,8,9,72,44,28,71
4. Chelsea: 38,20,9,9,64,43,21,69
5. Newcastle United: 38,20,6,12,68,47,21,66
6. Aston Villa: 38,19,9,10,58,51,7,66
7. Nottingham Forest: 38,19,8,11,58,46,12,65
8. Brighton And Hove Albion: 38,16,13,9,66,59,7,61
9. Bournemouth: 38,15,11,12,58,46,12,56
10. Brentford: 38,16,8,14,66,57,9,56
11. Fulham: 38,15,9,14,54,54,0,54
12. Crystal Palace: 38,13,14,11,51,51,0,53
13. Everton: 38,11,15,12,42,44,-2,48
14. West Ham United: 38,11,10,17,46,62,-16,43
15. Manchester United: 38,11,9,18,44,54,-10,42
16. Wolverhampton Wanderers: 38,12,6,20,54,69,-15,42
17. Tottenham Hotspur: 38,11,5,22,64,65,-1,38
18. Leicester City: 38,6,7,25,33,80,-47,25
19. Ipswich Town: 38,4,10,24,36,82,-46,22
20. Southampton: 38,2,6,30,26,86,-60,12
然后组织成Markdown表格,日语的话表头和内容用日语说明?不,用户要的是OCR后转Markdown,所以表格结构清晰。
现在开始写:
| Position | Club | Played | Won | Drawn | Lost | GF | GA | GD | Points |
|----------|--------------------|-------|----|------|-----|----|----|----|-------|
| 1 | Liverpool | 38 | 25 | 9 | 4 | 86 | 41 | 45 | 84 |
| 2 | Arsenal | 38 | 20 | 14 | 4 | 69 | 34 | 35 | 74 |
| 3 | Manchester City | 38 | 21 | 8 | 9 | 72 | 44 | 28 | 71 |
| 4 | Chelsea | 38 | 20 | 9 | 9 | 64 | 43 | 21 | 69 |
| 5 | Newcastle United | 38 | 20 | 6 | 12 | 68 | 47 | 21 | 66 |
| 6 | Aston Villa | 38 | 19 | 9 | 10 | 58 | 51 | 7 | 66 |
| 7 | Nottingham Forest | 38 | 19 | 8 | 11 | 58 | 46 | 12 | 65 |
| 8 | Brighton And Hove Albion | 38 | 16 | 13 | 9 | 66 | 59 | 7 | 61 |
| 9 | Bournemouth | 38 | 15 | 11 | 12 | 58 | 46 | 12 | 56 |
| 10 | Brentford | 38 | 16 | 8 | 14 | 66 | 57 | 9 | 56 |
| 11 | Fulham | 38 | 15 | 9 | 14 | 54 | 54 | 0 | 54 |
| 12 | Crystal Palace | 38 | 13 | 14 | 11 | 51 | 51 | 0 | 53 |
| 13 | Everton | 38 | 11 | 15 | 12 | 42 | 44 | -2 | 48 |
| 14 | West Ham United | 38 | 11 | 10 | 17 | 46 | 62 | -16| 43 |
| 15 | Manchester United | 38 | 11 | 9 | 18 | 44 | 54 | -10| 42 |
| 16 | Wolverhampton Wanderers | 38 | 12 | 6 | 20 | 54 | 69 | -15| 42 |
| 17 | Tottenham Hotspur | 38 | 11 | 5 | 22 | 64 | 65 | -1 | 38 |
| 18 | Leicester City | 38 | 6 | 7 | 25 | 33 | 80 | -47| 25 |
| 19 | Ipswich Town | 38 | 4 | 10 | 24 | 36 | 82 | -46| 22 |
| 20 | Southampton | 38 | 2 | 6 | 30 | 26 | 86 | -60| 12 |
这样每个行列都对应,检查一下数值是否正确,比如第5名Newcastle United的GD是21,Points66;第6名Aston Villa GD7,Points66。还有第13名Everton GD-2,Points48,这些都要准确。
确认后,输出这个Markdown表格,用日语的话可能表头是英文,但用户要的是OCR后转Markdown,所以表格结构正确即可。
===== ANSWER =====
以下はOCR結果から作成したMarkdown形式のプレミアリーグ积分榜です(日本語で出力):
| Position | Club | Played | Won | Drawn | Lost | GF | GA | GD | Points |
|----------|--------------------|-------|----|------|-----|----|----|----|-------|
| 1 | Liverpool | 38 | 25 | 9 | 4 | 86 | 41 | 45 | 84 |
| 2 | Arsenal | 38 | 20 | 14 | 4 | 69 | 34 | 35 | 74 |
| 3 | Manchester City | 38 | 21 | 8 | 9 | 72 | 44 | 28 | 71 |
| 4 | Chelsea | 38 | 20 | 9 | 9 | 64 | 43 | 21 | 69 |
| 5 | Newcastle United | 38 | 20 | 6 | 12 | 68 | 47 | 21 | 66 |
| 6 | Aston Villa | 38 | 19 | 9 | 10 | 58 | 51 | 7 | 66 |
| 7 | Nottingham Forest | 38 | 19 | 8 | 11 | 58 | 46 | 12 | 65 |
| 8 | Brighton And Hove Albion | 38 | 16 | 13 | 9 | 66 | 59 | 7 | 61 |
| 9 | Bournemouth | 38 | 15 | 11 | 12 | 58 | 46 | 12 | 56 |
| 10 | Brentford | 38 | 16 | 8 | 14 | 66 | 57 | 9 | 56 |
| 11 | Fulham | 38 | 15 | 9 | 14 | 54 | 54 | 0 | 54 |
| 12 | Crystal Palace | 38 | 13 | 14 | 11 | 51 | 51 | 0 | 53 |
| 13 | Everton | 38 | 11 | 15 | 12 | 42 | 44 | -2 | 48 |
| 14 | West Ham United | 38 | 11 | 10 | 17 | 46 | 62 | -16| 43 |
| 15 | Manchester United | 38 | 11 | 9 | 18 | 44 | 54 | -10| 42 |
| 16 | Wolverhampton Wanderers | 38 | 12 | 6 | 20 | 54 | 69 | -15| 42 |
| 17 | Tottenham Hotspur | 38 | 11 | 5 | 22 | 64 | 65 | -1 | 38 |
| 18 | Leicester City | 38 | 6 | 7 | 25 | 33 | 80 | -47| 25 |
| 19 | Ipswich Town | 38 | 4 | 10 | 24 | 36 | 82 | -46| 22 |
| 20 | Southampton | 38 | 2 | 6 | 30 | 26 | 86 | -60| 12 |
※ 表中「Position」は順位、「Club」はチーム名、「Played」は試合回数、「Won」は勝利数、「Drawn」は引き分け数、「Lost」は敗北数、「GF」は得点数、「GA」は失点数、「GD」は得失点差、「Points」は得点です。
thinkingは中国語だが、回答は日本語になった。
推論語のVRAM消費は17.5GB程度と少し上がっていた。
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.54.15 Driver Version: 550.54.15 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA L4 Off | 00000000:00:03.0 Off | 0 |
| N/A 74C P0 67W / 72W | 17543MiB / 23034MiB | 97% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
別の画像。こちらは中国語・英語で書かれたメニューの様子。
from IPython.display import Image
display(Image('menu.jpeg', width=1200))
推論
import re
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "menu.jpeg",
},
{"type": "text", "text": "OCRして。回答は、OCR結果をそのまま出力したものと、日本語に翻訳したもの、をそれぞれ出力して。"},
],
}
]
output = inference(model, messages, temperature=0.2)#, do_sample=False)
thinking, answer = re.match(r'(?s)^<think>(.*?)</think>(.*)$', output[0]).groups()
print("===== THINKING =====")
print(thinking)
print("===== ANSWER =====")
print(answer)
===== THINKING =====
用户现在需要把菜单的OCR内容和翻译分别输出。首先得仔细看图片里的文字,逐行识别。先处理OCR部分,要准确提取文字,然后翻译成日语。
首先看顶部:Samsen - a Thai Street Food eatery bringing bold flavours from Thailand to bowls in Hong Kong. 然后是各个部分:Skewers + Sides 小菜,Curries 咖哩,Sweet Roti 甜飛餅,Desserts 甜品,Salads 沙律,Wok 鍋炒这些部分。
先做OCR结果,要尽量准确,包括标点和格式。然后翻译成日语,注意专业术语和菜名的翻译自然。
现在开始逐部分整理:
OCR結果:
Samsen - a Thai Street Food eatery
bringing bold flavours from Thailand to bowls in Hong Kong.
Skewers + Sides 小菜
沙爹雞串燒
chargrilled chicken satay
cucumber relish and spicy peanut sauce 138.00
香辣虎蝦串燒
chargrilled coconut & chili prawn skewers
pickled ginger and lime 148.00 ❌
秘製和牛串燒
chargrilled Wagyu MB7 beef skewers (200gm) ❌
spicy tomato and Thai herb relish 198.00
鮮製泰式飛餅(宜配咖哩)
fresh made Roti
crispy Thai pancake (perfect with our curry!) 58.00
炒泰國通菜
wok fried Thai watercress
chili, garlic and yellow beans 88.00
泰國絲苗白飯
Thai jasmine rice ❌ 30.00
Curries 咖哩
泰北咖哩雞金麵
“Khao Soi” of curried chicken with fresh egg noodles
pickled mustard greens and herbs 158.00
泰北咖哩牛金麵
“Khao Soi” of curried beef with fresh egg noodles
pickled mustard greens and herbs 158.00
瑪莎曼咖哩和牛牛頸肉
“Massaman” curry of beef cheeks & potatoes
roasted onions and peanuts 258.00
特式姜黃咖哩虎蝦
spicy turmeric curry of tiger prawns & betel leaf ❌
Thai chilis and calamansi 248.00
泰式黃咖哩雞
aromatic curry of half a chicken & potatoes ❌
fried shallots and cucumber relish 238.00
Wok 鍋炒
泰式火車炒飯配和牛
fried rice of Wagyu beef, tomatoes & chili
baby kale and fried shallots 158.00
招牌泰式蟹肉炒飯
fried rice of crabmeat & spring onions ❌
crispy garlic and egg 168.00
泰式虎蝦炒金邊粉
pad Thai of tiger prawns ❌
peanuts, dried shrimp and bean sprouts 158.00
香辣泰式炒闊河粉(和牛)
stir fried spicy Wagyu beef & flat noodles
green peppercorns, chili and Thai basil 158.00
泰式炒闊河粉(雞)
stir fried chicken & flat noodles
sweet oyster sauce, baby corn and egg 148.00
泰式打抛和牛配油炸雞蛋
Wagyu beef wok fried with chili, garlic & holy basil
topped with a fried egg 158.00
泰式蟹肉奄列
Thai omelette of crabmeat & spring onions ❌
Siracha sauce 178.00
Sweet Roti 甜飛餅
鮮製泰式飛餅配朱古力醬或煉奶
fresh made roti with Nutella or condensed milk 78.00
鮮製泰式香蕉飛餅
fresh made banana Roti
with condensed milk or add Nutella 108.00
另加斑蘭、椰子或泰式奶茶雪糕
Top your roti with a scoop of pandan, coconut or Thai
tea ice cream 40.00
Desserts 甜品
芒果糯米飯
Thai mango & sticky rice 98.00
泰式街頭椰子雪糕
coconut ice cream 88.00
泰式奶茶雪糕
Thai red tea ice cream
toasted peanuts and young coconut meat 88.00
泰式斑蘭雪糕
pandan ice cream
toasted peanuts and young coconut meat 88.00
斑蘭椰子湯圓
pandan & coconut dumplings
warm salted coconut cream 88.00
Salads 沙律
炭燒茄子虎蝦沙律
chargrilled eggplant & tiger prawn salad ❌
soft boiled egg, toasted rice and chili dressing 158.00
泰北肉碎生菜包(鴨)
chopped duck & Thai herb salad ❌
crispy pork rinds and spicy toasted rice dressing 138.00
青木瓜沙律
pounded green papaya salad with toasted peanuts ❌
dried shrimp, chili and tamarind 118.00
可應要求提供素食菜單
Vegetarian menu available upon request
不含殺蛋白
Can be made Gluten-free upon request
請注意所有食物可能包含果仁和甲殼類水產品!
如果你對任何食物過敏,請通知我們的服務員。
Be advised that all food may contain traces of nuts & shellfish.
Please inform us of any allergies or dietary requirements.
所有價格為港幣,不包括10%服務費
All prices are in HKD dollars and subject to an additional 10% service charge.
然后是翻译部分,要准确对应每个部分:
翻訳:
Samsen - タイのストリートフード屋
タイから-boldな風味を、香港の器に bringing bold flavours from Thailand to bowls in Hong Kong.
Skewers + Sides 串やサイド
沙爹鶏串焼
chargrilled chicken satay
黄瓜漬けと辛いピーナッツソース 138.00
香辣虎蝦串焼
chargrilled coconut & chili prawn skewers
ピーナッツとレモンの漬物 148.00 ❌
秘製和牛串焼
chargrilled Wagyu MB7 beef skewers (200gm) ❌
辛いトマトとタイの香草漬け 198.00
鮮製タイ式飛餅(咖哩にぴったり)
fresh made Roti
クŘいタイパンケーキ(咖哩にぴったり!) 58.00
炒泰國通菜
wok fried Thai watercress
ピーナッツ カリと黄色い豆 88.00
泰國絲苗白飯
Thai jasmine rice ❌ 30.00
Curries 咖喱
タイ北咖喱鶏金麺
“Khao Soi” は、Curried chicken と fresh egg noodles のカレー
漬物 mustard greens と草药 158.00
タイ北咖喱牛金麺
“Khao Soi” は、Curried beef と fresh egg noodles のカレー
漬物 mustard greens と草药 158.00
マサマン咖喱和牛牛頸肉
“Massaman” は、beef cheeks & potatoes のカレー
焼きオニオンとピーナッツ 258.00
特式姜黃咖喱虎蝦
spicy turmeric curry は、tiger prawns & betel leaf
タイの辣椒とカルマンシー 248.00 ❌
タイ式黄咖喱鶏
aromatic curry は、half a chicken & potatoes
焼きshallots と黄瓜漬け 238.00 ❌
Wok 鍋炒
タイ式火車炒飯配和牛
fried rice は、Wagyu beef, tomatoes & chili
ベビーケールと焼きshallots 158.00
招牌泰式蟹肉炒飯
fried rice は、crabmeat & spring onions
crispy garlic と卵 168.00 ❌
タイ式虎蝦炒金邊粉
pad Thai は、tiger prawns ❌
ピーナッツ、乾燥エビと豆芽 158.00
香辣泰式炒闊河粉(和牛)
stir fried spicy Wagyu beef & flat noodles
green peppercorns, chili とタイの basil 158.00
タイ式炒闊河粉(鶏)
stir fried chicken & flat noodles
sweet oyster sauce, baby corn と卵 148.00
タイ式打抛和牛配油炸雞蛋
Wagyu beef は、chili, garlic & holy basil で炒め
a fried egg でトッピング 158.00
タイ式蟹肉奄列
Thai omelette は、crabmeat & spring onions ❌
Siracha sauce 178.00
Sweet Roti 甜飛餅
鮮製タイ式飛餅配朱古力醬或煉奶
fresh made roti に Nutella 或 condensed milk 178.00?不对,原是78.00,翻译:鮮製タイ式飛餅にNutellaやコンデンスミルク 78.00
鮮製泰式香蕉飛餅
fresh made banana Roti
コンデンスミルクやNutella で 108.00
另加斑蘭、椰子或泰式奶茶雪糕
Top your roti に pandan, coconut 或 Thai tea ice cream でトッピング 40.00
Desserts 甜品
芒果糯米飯
Thai mango & sticky rice 98.00
泰式街頭椰子雪糕
coconut ice cream 88.00
泰式奶茶雪糕
Thai red tea ice cream
toasted peanuts と young coconut meat 88.00
泰式斑蘭雪糕
pandan ice cream
toasted peanuts と young coconut meat 88.00
斑蘭椰子湯圓
pandan & coconut dumplings
warm salted coconut cream 88.00
Salads 沙拉
炭燒茄子虎蝦沙律
chargrilled eggplant & tiger prawn salad ❌
soft boiled egg, toasted rice と chili dressing 158.00
泰北肉碎生菜包(鴨)
chopped duck & Thai herb salad ❌
crispy pork rinds と spicy toasted rice dressing 138.00
青木瓜沙律
pounded green papaya salad に toasted peanuts ❌
dried shrimp, chili と tamarind 118.00
可應要求提供素食菜單
Vegetarian menu は要望に応じて提供可能
不含殺蛋白
Gluten-free は要望に応じて作成可能
請注意所有食物可能包含果仁和甲殼類水產品!
所有食物には果仁や甲殼類水産品が含まれる可能性があります!
Be advised that all food may contain traces of nuts & shellfish.
ご注意ください、すべての食品には果仁や甲殼類の痕跡が含まれる場合があります。
Please inform us of any allergies or dietary requirements.
アレルギーや食生活の要望がある場合はお知らせください。
所有價格為港幣,不包括10%服務費
すべての価格はHKD(香港ドル)で表示されており、10%のサービス料は別途適用されます。
All prices are in HKD dollars and subject to an additional 10% service charge.
すべての価格は香港ドルで表示され、10%の追加サービス料が適用されます。
现在要检查OCR是否准确,比如价格、菜名的拼写,还有翻译的自然度。比如“Skewers + Sides”翻译成“串やサイド”或者“串とサイド”,“Curries”是“咖喱”,“Wok”是“鍋炒”等。
另外注意菜单中的符号,比如❌,还有分隔线等格式。
现在整理成两部分:OCR結果和翻訳。
===== ANSWER =====
### OCR結果
Samsen - a Thai Street Food eatery
bringing bold flavours from Thailand to bowls in Hong Kong.
Skewers + Sides 小菜
沙爹雞串燒
chargrilled chicken satay
cucumber relish and spicy peanut sauce 138.00
香辣虎蝦串燒
chargrilled coconut & chili prawn skewers
pickled ginger and lime 148.00 ❌
秘製和牛串燒
chargrilled Wagyu MB7 beef skewers (200gm) ❌
spicy tomato and Thai herb relish 198.00
鮮製泰式飛餅(宜配咖哩)
fresh made Roti
crispy Thai pancake (perfect with our curry!) 58.00
炒泰國通菜
wok fried Thai watercress
chili, garlic and yellow beans 88.00
泰國絲苗白飯
Thai jasmine rice ❌ 30.00
Curries 咖哩
泰北咖哩雞金麵
“Khao Soi” of curried chicken with fresh egg noodles
pickled mustard greens and herbs 158.00
泰北咖哩牛金麵
“Khao Soi” of curried beef with fresh egg noodles
pickled mustard greens and herbs 158.00
瑪莎曼咖哩和牛牛頸肉
“Massaman” curry of beef cheeks & potatoes
roasted onions and peanuts 258.00
特式姜黃咖哩虎蝦
spicy turmeric curry of tiger prawns & betel leaf ❌
Thai chilis and calamansi 248.00
泰式黃咖哩雞
aromatic curry of half a chicken & potatoes ❌
fried shallots and cucumber relish 238.00
Wok 鍋炒
泰式火車炒飯配和牛
fried rice of Wagyu beef, tomatoes & chili
baby kale and fried shallots 158.00
招牌泰式蟹肉炒飯
fried rice of crabmeat & spring onions ❌
crispy garlic and egg 168.00
泰式虎蝦炒金邊粉
pad Thai of tiger prawns ❌
peanuts, dried shrimp and bean sprouts 158.00
香辣泰式炒闊河粉(和牛)
stir fried spicy Wagyu beef & flat noodles
green peppercorns, chili and Thai basil 158.00
泰式炒闊河粉(雞)
stir fried chicken & flat noodles
sweet oyster sauce, baby corn and egg 148.00
泰式打抛和牛配油炸雞蛋
Wagyu beef wok fried with chili, garlic & holy basil
topped with a fried egg 158.00
泰式蟹肉奄列
Thai omelette of crabmeat & spring onions ❌
Siracha sauce 178.00
Sweet Roti 甜飛餅
鮮製泰式飛餅配朱古力醬或煉奶
fresh made roti with Nutella or condensed milk 78.00
鮮製泰式香蕉飛餅
fresh made banana Roti
with condensed milk or add Nutella 108.00
另加斑蘭、椰子或泰式奶茶雪糕
Top your roti with a scoop of pandan, coconut or Thai tea ice cream 40.00
Desserts 甜品
芒果糯米飯
Thai mango & sticky rice 98.00
泰式街頭椰子雪糕
coconut ice cream 88.00
泰式奶茶雪糕
Thai red tea ice cream
toasted peanuts and young coconut meat 88.00
泰式斑蘭雪糕
pandan ice cream
toasted peanuts and young coconut meat 88.00
斑蘭椰子湯圓
pandan & coconut dumplings
warm salted coconut cream 88.00
Salads 沙律
炭燒茄子虎蝦沙律
chargrilled eggplant & tiger prawn salad ❌
soft boiled egg, toasted rice and chili dressing 158.00
泰北肉碎生菜包(鴨)
chopped duck & Thai herb salad ❌
crispy pork rinds and spicy toasted rice dressing 138.00
青木瓜沙律
pounded green papaya salad with toasted peanuts ❌
dried shrimp, chili and tamarind 118.00
可應要求提供素食菜單
Vegetarian menu available upon request
不含殺蛋白
Can be made Gluten-free upon request
請注意所有食物可能包含果仁和甲殼類水產品!
如果你對任何食物過敏,請通知我們的服務員。
Be advised that all food may contain traces of nuts & shellfish.
Please inform us of any allergies or dietary requirements.
所有價格為港幣,不包括10%服務費
All prices are in HKD dollars and subject to an additional 10% service charge.
### 翻訳
Samsen - タイのストリートフード屋
タイからboldな風味を、香港の器に bringing bold flavours from Thailand to bowls in Hong Kong.
Skewers + Sides 串とサイド
沙爹鶏串焼
chargrilled chicken satay
黄瓜漬けと辛いピーナッツソース 138.00
香辣虎蝦串焼
chargrilled coconut & chili prawn skewers
ピーナッツとレモンの漬物 148.00 ❌
秘製和牛串焼
chargrilled Wagyu MB7 beef skewers (200gm) ❌
辛いトマトとタイの香草漬け 198.00
鮮製タイ式飛餅(咖哩にぴったり)
fresh made Roti
クŘいタイパンケーキ(咖哩にぴったり!) 58.00
炒泰國通菜
wok fried Thai watercress
ピーナッツ、カリと黄色い豆 88.00
泰國絲苗白飯
Thai jasmine rice ❌ 30.00
Curries 咖喱
タイ北咖喱鶏金麺
“Khao Soi” は、Curried chicken と fresh egg noodles のカレー
漬物mustard greensと草药 158.00
タイ北咖喱牛金麺
“Khao Soi” は、Curried beef と fresh egg noodles のカレー
漬物mustard greensと草药 158.00
マサマン咖喱和牛牛頸肉
“Massaman” は、beef cheeks & potatoes のカレー
焼きオニオンとピーナッツ 258.00
特式姜黃咖喱虎蝦
spicy turmeric curry は、tiger prawns & betel leaf
タイの辣椒とカルマンシー 248.00 ❌
タイ式黄咖喱鶏
aromatic curry は、half a chicken & potatoes
焼きshallotsと黄瓜漬け 238.00 ❌
Wok 鍋炒
タイ式火車炒飯配和牛
fried rice は、Wagyu beef, tomatoes & chili
ベビーケールと焼きshallots 158.00
招牌泰式蟹肉炒飯
fried rice は、crabmeat & spring onions
crispy garlicと卵 168.00 ❌
タイ式虎蝦炒金邊粉
pad Thai は、tiger prawns ❌
ピーナッツ、乾燥エビと豆芽 158.00
香辣泰式炒闊河粉(和牛)
stir fried spicy Wagyu beef & flat noodles
green peppercorns、chiliとタイのbasil 158.00
タイ式炒闊河粉(鶏)
stir fried chicken & flat noodles
sweet oyster sauce、baby cornと卵 148.00
タイ式打抛和牛配油炸雞蛋
Wagyu beefは、chili、garlic & holy basilで炒め
a fried eggでトッピング 158.00
タイ式蟹肉奄列
Thai omeletteは、crabmeat & spring onions ❌
Siracha sauce 178.00
Sweet Roti 甜飛餅
鮮製タイ式飛餅に朱古力醬或煉奶
fresh made rotiにNutellaやコンデンスミルク 78.00
鮮製泰式香蕉飛餅
fresh made banana Roti
コンデンスミルクやNutellaで 108.00
另加斑蘭、椰子或泰式奶茶雪糕
Top your rotiにpandan、coconut或Thai tea ice creamでトッピング 40.00
Desserts 甜品
芒果糯米飯
Thai mango & sticky rice 98.00
泰式街頭椰子雪糕
coconut ice cream 88.00
泰式奶茶雪糕
Thai red tea ice cream
toasted peanutsとyoung coconut meat 88.00
泰式斑蘭雪糕
pandan ice cream
toasted peanutsとyoung coconut meat 88.00
斑蘭椰子湯圓
pandan & coconut dumplings
warm salted coconut cream 88.00
Salads 沙拉
炭燒茄子虎蝦沙律
chargrilled eggplant & tiger prawn salad ❌
soft boiled egg、toasted riceとchili dressing 158.00
泰北肉碎生菜包(鴨)
chopped duck & Thai herb salad ❌
crispy pork rindsとspicy toasted rice dressing 138.00
青木瓜沙律
pounded green papaya saladにtoasted peanuts ❌
dried shrimp、chiliとtamarind 118.00
可應要求提供素食菜單
Vegetarian menuは要望に応じて提供可能
不含殺蛋白
Gluten-freeは要望に応じて作成可能
請注意所有食物可能包含果仁和甲殼類水產品!
所有食品には果仁や甲殼類水産品が含まれる可能性があります!
Be advised that all food may contain traces of nuts & shellfish.
ご注意ください、すべての食品には果仁や甲殼類の痕跡が含まれる場合があります。
Please inform us of any allergies or dietary requirements.
アレルギーや食生活の要望がある場合はお知らせください。
所有價格為港幣,不包括10%服務費
すべての価格は香港ドル(HKD)で表示され、10%のサービス料は別途適用されます。
All prices are in HKD dollars and subject to an additional 10% service charge.
すべての価格は香港ドルで表示され、10%の追加サービス料が適用されます。
なお、この画像の推論後は結構VRAM消費が上がった。
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.54.15 Driver Version: 550.54.15 CUDA Version: 12.4 |
|-----------------------------------------+------------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+========================+======================|
| 0 NVIDIA L4 Off | 00000000:00:03.0 Off | 0 |
| N/A 74C P0 33W / 72W | 22239MiB / 23034MiB | 0% Default |
| | | N/A |
+-----------------------------------------+------------------------+----------------------+
画像サイズが他とは異なった。
!ls -lt
total 7412
-rw-r--r-- 1 root root 165783 Aug 13 05:50 dogs.jpeg
-rw-r--r-- 1 root root 7051001 Aug 13 05:50 menu.jpeg
-rw-r--r-- 1 root root 360606 Aug 13 05:50 24-25-pl.png
物体検出してバウンディングボックスを描画するサンプルはスキップ。興味があれば。
こんな感じでできるみたい。
いくつか自分の手持ちの画像で試してみる。
!wget https://storage.googleapis.com/zenn-user-upload/82968d23b6c5-20250228.jpg -O kobe.jpg
!wget https://storage.googleapis.com/zenn-user-upload/caa14aef4b7e-20250226.png -O book.png
!wget https://storage.googleapis.com/zenn-user-upload/4697c3aef653-20250226.png -O invoice.png
神戸の風景
import re
messages = [
{
"role": "user",
"content": [
{
"type": "image",
"image": "kobe.jpg",
},
{"type": "text", "text": "この画像について、日本語で詳しく説明して。"},
],
}
]
output = inference(model, messages, temperature=0.2)#, do_sample=False)
thinking, answer = re.match(r'(?s)^<think>(.*?)</think>(.*)$', output[0]).groups()
print("===== THINKING =====")
print(thinking)
print("===== ANSWER =====")
print(answer)
用户现在需要用日语详细说明这张图片。首先看图片内容:神户港的景观,红色的 Kobe Port Tower(神戸ポートタワー),周围的建筑,水面,蓝天等。
首先,整体场景是神户港的海滨风光。先分解元素:水面(港湾)、建筑(现代建筑、塔楼、酒店、白色网状建筑、游轮等)、背景的山和蓝天。
然后组织语言:先介绍这是神户港的景色,中心是红色的神户ポートタワー,独特的红白相间,螺旋结构。左侧是现代风格的白色建筑,可能是神户海洋博物馆之类的?然后右侧有白色的网状建筑(神戸布引歯科医院?不对,应该是神戸的其他建筑,比如神戸大仓酒店(白色高楼),还有白色的帆状建筑(可能是神戸的某个文化设施?比如神戸美利坚公园附近的建筑?)。水面上有游轮或渡轮,码头设施。背景是远处的山峦,蓝天晴朗,天气好。
要详细说明每个元素:
1. 中央の赤いタワーは「神戸ポートタワー」で、日本有数の観光名所。螺旋状の構造が特徴で、高さ約108メートル。観光客や市民が展望を楽しむことができる。
2. 左側の白い現代派の建物は「神戸海洋博物館」(或其他?需要确认,不过可能是神户港的商业或文化建筑)。建物のデザインは流線型で、港湾の景観を調和させている。
3. 右側の白い網状の建物は「神戸布引歯科医院」?不,应该是「神戸の帆」?不对,看形状是白色的张拉结构,可能是「神戸大仓酒店」旁边的建筑?或者「神戸美利坚公园」附近的「神戸海洋塔」?不对,再查:神户港的标志性建筑,红色塔是ポートタワー,右侧白色高楼是大仓酒店(Hotel Okura Kobe),白色网状是「神戸の帆」?不,「神戸の帆」是另一个?哦,是「神戸布引歯科医院」不对,应该是「神戸の帆」是文化设施?不对,看图片右侧白色网状建筑是「神戸の帆」?不,正确的是「神戸の帆」是「神戸市立美術館」?不对,再想:神户港的建筑,红色塔是ポートタワー,右侧白色高楼是大仓酒店,白色网状是「神戸の帆」(Kobe's Sail)?不,其实是「神戸の帆」是「神戸海洋塔」?不对,用户需要准确但可能不需要太专业,所以描述视觉元素。
4. 水面は神戸港の港湾で、穏やかな波が立派な景観を演出。左側には小型の船が停泊しており、港湾の活気を表している。
5. 背景には緑豊かな山々が見え、晴れた空(青空)が都市景観と自然を調和させ、明るく開放的な雰囲気を醸し出している。
6. 右側の白い大型船はクルーズ船か客船で、港湾の交通や観光の繁栄を示唆している。
7. 建物群の中には商業施設やホテルが混在し、現代的な都市の雰囲気と港湾の歴史的な要素(?)が融合している。
总结:这张图片展示了神户港的标志性景观,以红色的神户ポートタワー为中心,周围环绕着现代建筑、酒店、独特的白色网状建筑,水面平静,背景是青山和蓝天,整体氛围明亮开阔,展现了神户作为港口城市的活力与自然景观的融合。
现在组织成日语详细说明:
この画像は、**神戸港**の風景を捉えた写真です。中央に立つ赤いタワーは「**神戸ポートタワー**」で、日本で有名な観光名所の一つです。螺旋状の構造が特徴で、高さは約108メートル。タワーの上部は白と赤の模様で装飾されており、明るく印象的な外観を呈しています。
左側の白い現代派の建物は、港湾と調和した流線型のデザインで、都市の活力を感じさせます。これは「神戸海洋博物館」や商業施設が集まるエリアの一部かもしれません。
右側には、白い網状の構造を持つ建物や、高層ホテル(「大倉ホテル 神戸」)が並びます。白い網状建物は独特のデザインで、港湾の景観をさらに魅力的にしています。右端には大型の白い船(クルーズ船や客船)が停泊しており、港湾の交通や観光の繁栄を物語っています。
前景は**神戸港の港湾**で、穏やかな波が水面を揺らしています。左側には小型の船が停泊しており、港湾の日常的な活気を反映しています。
背景には緑に覆われた**山々**が見え、上空は澄んだ**青空**で覆われています。都市の現代的な建築群と自然の山、空が調和し、明るく開放的な雰囲気を醸し出しています。
この風景は、神戸が「港元気都市」の役割を果たすとともに、自然と都市が融合した魅力的な空間を表現しており、観光客や住民にとって心地よい場所であることを示唆しています。
この画像は、**神戸港**の風景を捉えた写真で、日本有数の観光名所である「**神戸ポートタワー**」を中心とした都市と自然が調和した景観を映しています。以下に詳しく解説します。
### 1. 中央の赤いタワー:神戸ポートタワー
画像の中心に立つ赤い螺旋状のタワーは「**神戸ポートタワー**」です。高さ約108メートルのこの建物は、日本初の「螺旋型」構造で、観光客や市民が展望を楽しむ「展望台」や「レストラン」が設けられています。上部は白と赤の模様で装飾され、明るく印象的な外観を呈しており、神戸港のシンボルとして知られています。
### 2. 左側の現代派建物群
左側には、流線型のデザインが特徴的な白い建物が並びます。これらは「神戸海洋博物館」や商業施設が集まるエリアの一部で、港湾と調和した現代的な都市景観を醸し出しています。建物のガラス張りの外観や、開放的な構造は、日中の光を活かした明るい雰囲気を演出しています。
### 3. 右側の建物群と港湾の活気
右側には、3つの特徴的な建物が並ぶ:
- **高層ホテル(大倉ホテル 神戸)**:白い外観と縦長のデザインが都市の現代性を象徴。
- **白い網状構造の建物**:独特の「張拉構造」で、光と影のコントラストが景観をさらに魅力的に。
- **右端の大型船**:クルーズ船や客船で、港湾の交通・観光の繁栄を物語る。
建物の間には、港湾歩道や商業施設が広がり、都市の活力を感じさせます。
### 4. 前景:神戸港の港湾
前景は**神戸港の港湾**で、穏やかな波が水面を揺らしています。左側には小型の船が停泊しており、港湾の「日常的な活気」や「交通の機能性」を反映しています。水面はタワーの赤と建物の白を反射し、景観をより深みのある空間にしています。
### 5. 背景:自然と空の調和
背景には、緑に覆われた**山々**が連なり、上空は澄んだ**青空**で覆われています。都市の建築群と自然の山、空が調和し、明るく開放的な雰囲気を醸し出しています。山々は「港元気都市」の神戸が自然と共生する姿を象徴し、晴れた日の清々しい空気感を伝えています。
### 6. 総合的な雰囲気と意義
この風景は、神戸が「港湾都市」としての役割(交通・観光・商業)と、自然との調和を表現しています。明るい空と穏やかな港湾、現代的な建築群が融合した空間は、観光客にとって「開放的で癒やされる場所」、住民にとっては「日常に浸りやすい港湾文化の象徴」としての魅力を露わにしています。
神戸ポートタワーを中心としたこの景観は、日本海側の都市の「港湾と自然が共存する姿」を、鮮やかに捉えています。
書籍の画像
用户现在需要详细用日语解释这本书的封面信息。首先看封面结构:上半部分白色,下半部分绿色。
先分解各部分文字:
标题部分:ドキュメント・コミュニケーションの全体観(文档・沟通的全貌)。然后是副标题:提案書、報告書、会議資料の「質」と「作成スピード」を上げるXカナズム(提案书、报告书、会议资料的“质量”和“制作速度”提升的X系统)。作者:上巻 原則と手順 中川邦夫(上卷 原则与流程 中川邦夫)。
中间的图表:左边是“ローカル・コミュニケーション”(局部沟通),下面分支“文書を交換する”(交换文书)、“調整・調整技術”(调整·调整技术)、“問題解決・能力”(问题解决·能力)。右边是流程图:技法(Art)→ 理念(Idea)→ 手順(Process)→ 試行演習(Practice),还有“技法”连接到“理念”等,结构是关于沟通的流程和技法。
下半部分绿色区域:コミユニケーションはすべて「解・動・早」で進めよ(所有沟通都用“解、动、早”推进)。下面小字:解っていただく・動いていただく・できるだけ早く(请理解、请推进、尽可能快)。
整体是关于文档和沟通的书籍,上卷讲原则和流程,作者中川邦夫,主题是提升文档质量与速度的系统,强调用解、动、早的方法推进沟通,中间有沟通的局部和流程的图表,说明理论和实践的结合。
现在组织语言,详细说明各部分:
この画像は、日本語の書籍のカバー写真です。書籍のタイトルは「ドキュメント・コミュニケーションの全体観」で、副題には「提案書、報告書、会議資料の「質」と「作成スピード」を上げるXカナズム」とあります。さらに「上巻 原則と手順 中川邦夫」と書かれ、上巻(原則と手順編)で中川邦夫が執筆していることがわかります。
カバーの上部(白色部分)には、タイトル・副題・作者情報が配置され、中央にはコミュニケーションに関する図表が描かれています。左側の「ローカル・コミュニケーション」から「文書を交換する」「調整・調整技術」「問題解決・能力」といった要素が流れ、右側には「技法(Art)→ 理念(Idea)→ 手順(Process)→ 試行演習(Practice)」というプロセスフローが示されており、コミュニケーションの実践的な流れや方法論を視覚的に表現しています。
下部の緑色帯には、キーメッセージ「コミユニケーションはすべて「解・動・早」で進めよ」が大きく印刷され、その下に「解っていただく・動いていただく・できるだけ早く」という具体的なアプローチが記されています。これは、コミュニケーションを「理解(解)」「実行(動)」「高速化(早)」の3つの核となる要素で推進するというコンセプトを伝えています。
全体として、この書籍は「ドキュメント(文書類)とコミュニケーション」を対象に、提案書や報告書などの文書の「質」や「作成速度」を向上させる「Xカナズム(独自のシステム)」を解説する、上巻(原則と手順編)の教科書的な書籍で、理論(原則)と実践(手順)を組み合わせた学習型の内容が期待されるでしょう。図表や明確なキーワード(解・動・早)を通じて、ビジネスシーンでの文書作成やコミュニケーションの効率化・質の向上を導く内容であることがわかります。
この画像は、**日本語の書籍のカバー写真**で、以下の要素を详细に解説します。
### 1. タイトル・副題・作者情報
- **主要タイトル**:
「ドキュメント・コミュニケーションの全体観」
→ 「文書(ドキュメント)とコミュニケーション」を対象にした「全貌(全体の構成や考え方)」を解説する書籍。
- **副題**:
「提案書、報告書、会議資料の「質」と「作成スピード」を上げるXカナズム」
→ 具体的なビジネス文書(提案書・報告書・会議資料)の「質の向上」と「作成速度の加速」を、独自のシステム(Xカナズム)で実現する内容。
- **巻数・編集内容**:
「上巻 原則と手順 中川邦夫」
→ 「上巻」であり、「原則(理論的考え方)と手順(実践的な流れ)」を扱う。作者は**中川邦夫**。
### 2. 中央の図表(コミュニケーションのメカニズム)
カバー中央には、ビジネスコミュニケーションの「局部(ローカル・コミュニケーション)」と「全体の流れ(プロセス)」を視覚化した図表が配置されています。
- **左側:ローカル・コミュニケーション**
「文書を交換する」「調整・調整技術」「問題解決・能力」の3つの要素が並ぶ。
→ ビジネスで「文書を交換する場面」「調整を重ねる現場」「問題解決を目的としたコミュニケーション」などの「局部的なやり取り」を表しています。
- **右側:プロセスフロー**
「技法(Art)→ 理念(Idea)→ 手順(Process)→ 試行演習(Practice)」の流れが図解されています。
→ コミュニケーションを「技術(技法)→ 基調(理念)→ 実践(手順)→ 実践化(試行演習)」のステップで推進する「方法論」を示唆。
### 3. 下部の緑色帯(キーメッセージ)
カバー下部の緑色帯には、**ビジネスコミュニケーションの核となるコンセプト**が強調されています。
- 大文字:「コミユニケーションはすべて「解・動・早」で進めよ」
→ すべてのコミュニケーションは「解(理解)」「動(実行)」「早(高速化)」の3つの要素で推進されるべきだ。
- 小文字:「解っていただく・動いていただく・できるだけ早く」
→ 「相手に理解してもらう」「行動に移してもらう」「できるだけ速く」の具体的なアプローチを補足。
### 4. 全体のコンセプト
この書籍は、**ビジネス文書作成とコミュニケーションの「質・スピード向上」**を目的に、
- 「理論(原則)」と「実践(手順)」を組み合わせた上巻(原則と手順編)
- 「局部的なやり取り」から「全体のプロセス」まで、体系的な考え方を解説
- 「解・動・早」のキーワードで、効率的・効果的なコミュニケーションの方法論を伝える
教科書的な内容で、ビジネスシーン(提案書作成・会議管理・報告書作成など)で文書とコミュニケーションを最適化するための指針となる書籍です。
図表や明確なキーワード(解・動・早)を通じて、「どうして文書の質が上がるのか」「どうして作業速度が速くなるのか」「具体的にどう行動すればいいのか」を分かりやすく説明する本の雰囲気を読み取ることができます。
架空の請求書の画像
Got it, let's explain this image in detail. First, it's a "御請求書" which is an invoice in Japanese. Let's break down each section.
At the top, the title is 御請求書 (Invoice). Then 請求書番号: INV-2024-0820 is the invoice number.
Next section: 模範商事株式会社 is the company name, 模範 (Model) 商事 (Business) 株式会社 (Inc.). There's a red stamp 之印 (this seal, maybe a company seal). Then the address: 〒100-0001 東京都千代田区見本町1-1 (1-1, Mirumachi, Chiyoda-ku, Tokyo 100-0001). Phone and fax: 電話: 03-1234-5678 FAX: 03-1234-5679.
Then the client: 範例工業株式会社 御中 (To Hanri Kogyo Kabushikigaisha, meaning "To Hanri Industrial Co., Ltd.").
下記の通りご請求申し上げます。 (We request payment as follows.)
The table has 项目 (Item), 数量 (Quantity), 単価 (Unit Price), 金額 (Amount).
1. 特選和紙 (A4サイズ) - Special Selected Japanese Paper (A4 Size): 1000 units, ¥50 each, 1000*50=¥50,000.
2. 高級墨 (松煙) - Premium Ink (Sumi, a type of ink): 20 units, ¥2,000 each, 20*2000=¥40,000.
3. 筆セット (各種) - Pen Set (Various): 50 units, ¥1,000 each, 50*1000=¥50,000.
小計: ¥140,000 (Subtotal: 50k + 40k + 50k = 140k).
消費税(10%): ¥14,000 (Consumption Tax 10%: 140,000 * 10% = 14,000).
合計金額: ¥154,000 (Total Amount: 140k +14k=154k).
備考: (Notes:)
1. お支払いは請求書発行日より30日以内にお願いいたします。 (Payment is requested within 30 days from the invoice date.)
2. 振込手数料は貴社負担でお願いいたします。 (Bank transfer fees are your company's responsibility.)
3. 本書に関するお問い合わせは下記担当者までご連絡ください。 (For inquiries about this document, contact the person below.)
担当: 営業部 見本 太郎 (Responsible: Sales Department, Mihoto Tarou).
So this is a sample invoice from Model Business Co., Ltd. to Hanri Industrial Co., Ltd., listing three items, calculating subtotal, tax, and total, with payment terms and contact info.
This image is a **Japanese invoice (御請求書 - Goseikyoushu)**. Let’s break down each section in detail:
### 1. Header: Invoice Title & Number
- **御請求書** → “Invoice” (formal term for a bill/receipt in Japan).
- **請求書番号: INV-2024-0820** → “Invoice Number: INV-2024-0820” (unique identifier for the invoice).
### 2. Issuing Company: 模範商事株式会社 (Model Shōji Kabushikigaisha)
- **Company Name**: 模範商事株式会社 → “Model Business Co., Ltd.” (a fictional company name for demonstration).
- **Red Seal (之印)**: A red circular stamp (common in Japanese documents for authenticity).
- **Address**: 〒100-0001 東京都千代田区見本町1-1 → “1-1, Mirumachi, Chiyoda-ku, Tokyo 100-0001” (fictitious address).
- **Contact**: 電話: 03-1234-5678 FAX: 03-1234-5679 → “Phone: 03-1234-5678 / Fax: 03-1234-5678” (fictitious contact info).
### 3. Recipient: 範例工業株式会社 御中
- **Recipient**: 範例工業株式会社 御中 → “To: Hanri Kogyo Kabushikigaisha (Hanri Industrial Co., Ltd.)” (fictitious client).
- **Purpose Line**: 下記の通りご請求申し上げます。 → “We request payment as follows.”
### 4. Itemized Table (請求内容)
A table lists 4 columns: 项目 (Item), 数量 (Quantity), 単価 (Unit Price), 金額 (Amount).
| 项目 (Item) | 数量 (Quantity) | 単価 (Unit Price) | 金額 (Amount) |
|--------------------------|----------------|------------------|--------------|
| 特選和紙 (A4サイズ) | 1000 | ¥50 | ¥50,000 |
| 高級墨 (松煙) | 20 | ¥2,000 | ¥40,000 |
| 筆セット (各種) | 50 | ¥1,000 | ¥50,000 |
### 5. Totals
- **小計: ¥140,000** → “Subtotal: ¥140,000” (sum of all item amounts: 50,000 + 40,000 + 50,000 = 140,000).
- **消費税(10%): ¥14,000** → “Consumption Tax (10%): ¥14,000” (10% tax on the subtotal: 140,000 × 10% = 14,000).
- **合計金額: ¥154,000** → “Total Amount: ¥154,000” (subtotal + tax: 140,000 + 14,000 = 154,000).
### 6. Notes (備考)
- 1. お支払いは請求書発行日より30日以内にお願いいたします。 → “Payment is requested within 30 days of the invoice date.”
- 2. 振込手数料は貴社負担でお願いいたします。 → “Bank transfer fees are your company’s responsibility.”
- 3. 本書に関するお問い合わせは下記担当者までご連絡ください。 → “For inquiries about this document, contact the person below.”
### 7. Responsible Party (担当)
- 担当: 営業部 見本 太郎 → “Responsible: Sales Department, Mihoto Tarou” (fictitious employee name).
### Context & Purpose
This is a **sample invoice** (indicated by “範例” in the recipient line) used to demonstrate how Japanese business invoices are structured. It includes:
- Company/client details.
- Itemized goods/services.
- Tax calculation (Japan uses a 10% consumption tax on most goods).
- Payment terms and contact information.
In summary, this document is a formal request for payment from 模範商事株式会社 to 範例工業株式会社, outlining the goods sold, costs, tax, and payment instructions.
ざっと見た感じ、
- 日本語はちゃんと読めるし、知識もありそう。回答も一応できる。
- ただ、指示しても、英語や中国語での回答が出力される場合もそれなりにある。
- 出力された漢字が中国語の漢字になっていることもそれなりにある。
という感じで、日本語で使う上では多少安定性に欠けるかな。
まとめ
Reasoning対応VLMは過去にいくつか試した。
それらと比較すると、求められるリソースが一番低くて、日本語が(多少不安定さはあるが)使える、という点で一番使いやすいのではないかと思う。画像認識の精度についても問題ない印象で、やはりVLMでもReasoningがあれば精度は高くなる、と自分は改めて認識した。
もちょっと日本語が安定していればなーというところ。
今回試していないが、
-
/no_think
で推論無効化 - 動画を使った推論
もできるので興味があれば。動画を使った推論はGradioのサンプルアプリが参考になる様子。
MiMo-VL-7B シリーズは、デプロイおよび推論において Qwen2_5_VLForConditionalGeneration アーキテクチャとの完全な互換性を維持します。
ということは、GGUFに変換(mmproj含む)すれば、Qwen2.5-VLをサポートしているllama.cppでも動くんじゃなかろうか?しらんけど。