OpenSource-Hub

GLM-5

データセット・モデル

zai-org/GLM-5

GLM-5 は、長期間にわたるエージェントタスク向けの一連の大規模言語モデルです。

概要

GLM-5 シリーズには 5、5.1、5.2 の各バージョンが含まれ、パラメータ数は最大 744B に達します。複雑なシステムエンジニアリングや長期的なエージェントタスクに対応し、1M token のコンテキストをサポートしており、強力なコーディング能力を備えています。コーディングおよびエージェントのベンチマークテストで最高水準に達しています。

README プレビュー

# GLM-5.2 & GLM-5.1 & GLM-5\n\n\n\n\n\n    👋 Join our Wechat or Discord community.\n    \n    📖 Check out the GLM-5.2 blog and GLM-5 Technical report.\n    \n    📍 Use GLM-5.2 API services on Z.ai API Platform. \n    \n    🔜 Try GLM-5.2 at z.ai.\n\n\n## Introduction\n\n### GLM-5.2\n\nGLM-5.2, our latest flagship model for long-horizon tasks. It marks a substantial leap in long-horizon task capability over its predecessor GLM-5.1 and, for the first time, delivers that capability on a **solid 1M-token context**. \n\nGLM-5.2's new capabilities include:\n- **Solid 1M Context:** A solid 1M-token context that stably sustains long-horizon work\n- **Advanced Coding with Flexible Effort**: Stronger coding capabilities with multiple thinking effort levels to balance performance and latency\n- **Improved Architecture**: We propose [IndexShare](https://arxiv.org/abs/2603.12201), which reuses the same indexer across every four sparse attention layers, reducing per-token FLOPs by 2.9× at a 1M context length. We also improve GLM-5.2’s MTP layer for speculative decoding, increasing the acceptance length by up to 20%\n\n\n\nOn standard coding benchmarks, GLM-5.2 is the strongest open-source model, improving on GLM-5.1 by a wide margin: 81.0 vs. 62.0 on Terminal-Bench 2.1 and 62.1 vs. 58.4 on SWE-bench Pro. It also closes much of the gap to the closed-source frontier — on Terminal-Bench 2.1 (81.0) it lands within a few points of Claude Opus 4.8 (85.0) — while staying ahead of Gemini 3.1 Pro.\n\nFor more detail, check our [blog](https://z.ai/blog/glm-5.2).\n\n### GLM-5.1\n\nGLM-5.1 is our next-generation flagship model for agentic engineering, with significantly stronger coding capabilities than its predecessor. It achieves state-of-the-art performance on SWE-Bench Pro and leads GLM-5 by a wide margin on NL2Repo (repo generation) and Terminal-Bench 2.0 (real-world terminal tasks).\n\n\n\nBut the most meaningful leap goes beyond first-pass performance. Previous models—including GLM

FAQ (3)

トラブル対応
GLM-5.1が英語の会話中に中国語に切り替わるのはなぜですか?また、それを防ぐにはどうすればよいですか?

これは GLM-5.1 における既知の言語アンカリングの問題です。中国の企業名、製品、.cn ドメインなど、中国に関連するエンティティが中国語の出力を引き起こす可能性があり、プロンプトなしの切り替わりが発生することもあります。報告されている問題には、モデル側での完全な修正はありません。部分的な回避策として、システムプロンプトの先頭に明示的なルールを追加します。例: Always respond in English only. Do not output Chinese or any other language, even when discussing Chinese companies, products, domains, or sources. これにより切り替わりは減少しますが、完全に排除できるとは限りません。

参照 Issue #54
トラブル対応
GLM-5.3-Flashがreasoning_contentで「Hmm」を繰り返すのはなぜですか?また、それをフィルタリングするにはどうすればよいですか?

これはモデル/重みレベルの推論スタイルに関する動作です。GLM-5.3-Flash は、choices[0].message.reasoning_content 内で "Hmm" のような内省フィラーを過剰に生成することがあり、"Hmm hmm hmm" のような連なりも含まれます。これは必ずしもクライアントやプロンプトに起因するものではありません。thinking を有効にした OpenAI 互換のリクエストで直接検証し、reasoning_content を確認してください。

一時的なクライアント側の回避策として、message.content を変更せずに、表示する前に推論トレースをサニタイズしてください。例:

import re

def clean_reasoning(text: str) -> str:
    text = re.sub(r'(?i)(?:\bhmm?[\s,.!?-]*){2,}', '', text)
    text = re.sub(r'\s+', ' ', text)
    return text.strip()

reasoning = response["choices"][0]["message"].get("reasoning_content", "")
shown = clean_reasoning(reasoning)

この issue では、公式のモデル側の修正や設定変更は提供されていません。恒久的な解決には、更新されたモデル重み、またはベンダー側での生成処理の対応が必要です。

参照 Issue #146
トラブル対応
画像から作成したPDFをアップロードしたのに、チャットでPDFが添付されていないと表示される場合、どうすれば修正できますか?

メッセージ入力欄のクリップ(📎)アイコンを使用してPDFを再アップロードし、デバイスからファイルを選択して、送信を押す前にファイルがチャット作成欄に表示されるまで待ってください。添付ファイルのプレビューまたはファイルチップが表示されない場合、アップロードは完了していません。PDFがデバイス上で正しく開くことを確認してから、アップロードを再試行してください。

参照 Issue #156