AIニュース最前線
最新ニュースAI日報Hacker日報週報動画AIツールトレンド企業

AIニュース最前線

世界中のAI最新情報を日本語で毎時更新

最新ニュース日報トレンド企業プレミアムRSS
© 2026 ainew.jp特定商取引法に基づく表記
ニュース一覧元記事を開く
Hugging Face Blog·2026年6月18日 09:00·約25分で読める

エージェント性は十分か?独自ツールを用いたオープンモデルのベンチマーク調査

#LLM#Agent#Open Source#Benchmarking#Hugging Face
TL;DR

Hugging Face は、既存のベンチマークの限界を克服するため、独自に構築したツール環境を用いてオープンソースモデルのエージェント能力を評価する新たな手法を発表しました。

AI深層分析2026年6月18日 22:02
4
重要/ 5段階
深度40%
4
関連度30%
5
実用性20%
4
革新性10%
3

キーポイント

1

独自ツール環境による評価

標準的なベンチマークでは捉えきれない複雑なタスクに対し、Hugging Face が構築した独自のツールセット上でモデルの動作を検証するアプローチを採用しています。

2

エージェント性の定量化

単なる知識の再生ではなく、ツールの選択、実行、結果の解釈といった「エージェント性」を数値化し、オープンソースモデルの実際の活用可能性を測ります。

3

ベンチマーク手法の公開

この評価フレームワークとツール環境はオープンソースとして提供され、コミュニティ全体がモデルの実用的なエージェント能力を比較・検証できる基盤を整備しました。

影響分析・編集コメントを表示

影響分析

この記事は、LLM が単なるチャットボットから自律的なタスク実行者へと進化するための重要な指標を提供します。特にオープンソースコミュニティにおいて、各モデルの実用的なエージェント能力を公平かつ厳密に比較する基準が確立され、開発者のツール選定やシステム設計に直接的な影響を与えるでしょう。

編集コメント

モデルの「賢さ」だけでなく、実際にツールを操って問題を解決できるかという実戦能力に焦点を当てた評価基準は、今後の AI エージェント開発において不可欠な指標となるでしょう。

記事一覧に戻る

  • エージェント活用向けソフトウェアのテスト:すべての成功が等しいわけではない
  • 評価はどのように実行するか?
  • ベンチマーク対象としてどのモデルを選ぶか?
  • 大規模なオープンモデル:モデルを固定し、リビジョンを変化させる
  • 小規模モデル:リビジョンを固定し、モデルを変化させる
  • ツールの調整:マーカーと結果とは何か?
  • CLI とスキルコミットは役立っているか?
  • 実際に試してみる
  • まとめ
  • 謝辞

*異なる指標におけるトランスフォーマー(transformer)リビジョンのベンチマーク*

**

これは人間が作成した、エージェントに焦点を当てたブログ記事です。

コーディングエージェントは、私たちと協力するのではなく、私たちのソフトウェア自体で作業を行うようになっています。タスクを記述するだけで、エージェントがライブラリを選択し、呼び出しコードを書き、実行し、自身のミスをデバッグします。ライブラリが邪魔になった場合、エージェントは喜んでそれを迂回し、ロジックを一から書き直します。これにより、ライブラリ開発において新たな概念が生じます:コードは単に正しく高速であるだけでなく、エージェントが効果的に操作できるように設計されている必要があります。使いにくい API や古くなったドキュメントは開発者にとって迷惑ですが、今やそれはエージェントをより長く、コストのかかる道へと誘導することにもなります。

既存のベンチマークの多くは最終的な答えのみを見ています。私たちはそのプロセス全体に焦点を当てました:単にエージェントが正解したかどうかではなく、そこに到達するためにどれほどの作業が必要だったか、そしてそれがモデルやライブラリのリビジョン、タスクの種類によってどのように変化するかです。私たちはトランスフォーマー(transformer)をケーススタディとして用い、まさにその点を測定しました。

ここでは、回答がどのように見つけられたかに焦点を当てたツール固有のベンチマークを紹介し、pi コーディングエージェントによって駆動されるオープンモデルのみで完全に実行されるそのようなハッチの実装例を提供します。ここでいう「ハッチ」とは、Hugging Face Jobs 上でモデル×リビジョン×タスクの全組み合わせを並列展開し、すべての実行で同一のハードウェア環境が保証される仕組みです。

しかし、*エージェント向けにソフトウェアを最適化するにはどうすればよいのでしょうか?*

私たちは以下の2つのソフトウェア原則を強く信じています:

  • テストされていないものは機能しない
  • 文書化されていないものは存在しない

これはエージェント最適化ツールリングの領域においても同様であり、今回はこの2つが直接的に結びついています。

エージェントにとってツールが存在するためには、発見可能である必要があります。API は明確でなければならず、ドキュメントは網羅的であるべきです。また、エージェントが有用なファイルや例を迅速にアクセスできるような構造になっていることが求められます。エージェント向けにツールが機能するようにしたいのであれば、エージェント利用のためのテストを行うべきです。

エージェント利用向けのソフトウェアテスト

本ブログ記事全体を通じて、transformers を例として使用します:ここではエージェントが ML タスク(テキスト分類、画像キャプション生成、音声文字起こし)を解決するためにこれを利用するケースを取り上げます。コードへの貢献は対象外ですが、このハッチはコマンドラインから操作可能なあらゆるツールで動作するように設計されています。

トランスフォーマーに関する私たちの直感は、いくつかの変更によって利用を劇的に簡素化できるというものでした:CLI(コマンドラインインターフェース)、Skill(スキル)、そして自己完結型のタスク固有の例です。これは最近、エージェント最適化のために再設計された hf CLI にも適用された同じレシピであり、ここではエージェントが 1.3〜1.8 倍(最大で 6 倍)少ないトークン数で動作しました。私たちは、このような成果が一般化するか、そしてトランスフォーマーにおいても有用であるかどうかを知りたかったのです。

直感は強力なツールですが、transformers という広く使用されているコードベースに数千行のコードを追加する PR(プルリクエスト)を開く前に、より多くの証拠が必要でした。そこで私たちは、成功とはどのようなものかを測定することを目指しました。

すべての成功が等しいわけではない

2 つのエージェントが感情分類タスクに対して正しいラベルを出力したとしても、そのプロセスは異なります。

一方のエージェントは:

  • 40 行の Python スクリプトを作成し、transformers をインポートし、形状エラーをデバッグし、2 回再実行して最後に答えを印刷します;

他方のエージェントは:

  • transformers classify --model ... --text "..." と入力するだけで、1 つの呼び出しで完了します。

両方とも「POSITIVE (0.9999)」という結果に到達しますが、この正確なタスクに対して実際にエージェントが辿った 2 つの経路は以下の通りです:

タスク: "I absolutely loved the movie, it was fantastic!" の感情を分類する

  • # one agent: pipe a script into python and parse the output
  • python - <<'PY'
  • from transformers import AutoTokenizer, AutoModelForSequenceClassification
  • import torch
  • import torch.nn.functional as F

-

  • model = AutoModelForSequenceClassification.from_pretrained("distilbert/distilbert-base-uncased-finetuned-sst-2-english")
  • tokenizer = AutoTokenizer.from_pretrained("distilbert/distilbert-base-uncased-finetuned-sst-2-english")
  • inputs = tokenizer("I absolutely loved the movie, it was fantastic!", return_tensors="pt")
  • with torch.no_grad():
  • logits = model(**inputs).logits
  • probs = F.softmax(logits, dim=1)
  • idx = torch.argmax(probs, dim=1).item()
  • print(model.config.id2label[idx], probs[0][idx].item())
  • PY

+ # the other agent: one command

+ transformers classify \

+ --model distilbert/distilbert-base-uncased-finetuned-sst-2-english \

+ --text "I absolutely loved the movie, it was fantastic!"

Both methods reach the same result. But they have very different profiles in cost, latency, token usage, and failures.

If your evaluation only checks the final string, you're blind to these as well as

whether a change you shipped to the library (a CLI improvement, better error messages, a

Skill) actually helped agents.

Our goal with this harness is to evaluate how much work

an agent has to do to perform a given task, and whether changes to the library improve performance.

How do we run evaluations?

A few words on how we'll evaluate agents here.

すべてのタスクを3つのバリアント(または"ティア")の下で実行します。これは、エージェントがトランスフォーマーにアプローチする3つの異なる方法です:

bare pip install transformers を実行し、それ以外は何もしない

clone トランスフォーマーの完全なソースコードを作業ディレクトリにチェックアウトした状態

skill パッケージ化されたスキル:CLI のドキュメントとタスク例を含むもので、コンテキストに読み込まれる

これらはネストされていません。"skill"は"clone"を含んでいません(ソースツリーではなく、厳選されたドキュメントを同梱するため)であり、互いに厳密に包含する関係でもありません。それぞれがエージェントに異なる種類の支援を提供します。後ほど見るように、モデルによっては"skill"よりも"clone"の方がうまく機能することもあります。

さらにいくつかの選択事項があります:

  • 現時点では、正確な一致を提供できる決定論的タスクにのみ焦点を当てています。これらは実験のための非常に優れた基盤となるためです。モデルによる評価(Model-as-a-judge)やその他の手法は、他のタスクにおける明白な次のステップとなります。
  • すべての実行は個別の Hugging Face Job として扱われます:各 (モデル × リビジョン × タスク) ごとに1つずつ。これにより、一貫したハードウェア上で並列に全体のスウィープが実行され、大規模な比較でも公平性が保たれます。
  • 結果とトレースは Hugging Face Bucket に保存されます:高速でバージョン管理の必要がなく、非常に高い書き込み同時処理能力に対応しています。

ベンチマーク対象としてどのモデルを選ぶべきか?

エージェントを駆動するすべてのモデルが同等であるわけではなく、その違いによって実行時に注目すべき点も変化します。

*大規模なオープンモデル*

一端には、最大かつ最も能力の高いオープンモデルが存在します。比較的一般的なタスクにおいては、これらは最終的に正しい答えに到達するはずです。これらのモデルにとって、タスク完了率はほぼ 100% に飽和し、ツールに関する有用な情報をほとんど提供してくれなくなります。より関連性の高いベンチマークは、エージェントがそこに到達するために要した努力です:何ターン、トークン、秒数がかかったか、そしてクリーンな経路を歩んだのか、それとも非推奨の API を使用したのか。

*Local*

ローカルモデルはサイズも能力も大きく異なります。そのため、より大規模なモデル counterparts に対するものよりも「一致率 (match %)」などの指標が重要になります。これにより、モデルのサイズや能力が特定のツール上の結果にどのように影響するかを確認できるからです。

このハネス(枠組み)は、ライブラリメンテナに対してエージェントとの相互作用のためにリポジトリを改善する方法に関するガイダンスを提供するだけでなく、ユーザーが関心を持つタスクにおいて異なるエージェントやモデルがどのようにパフォーマンスを発揮するかを評価するためにも役立ちます。

このハネスは、各実行を複数の軸でスコアリングします。これにより、各クラスのモデルにとって実際に何が重要かを問うことができます:

  • 一致率 (match %):最終回答に期待される結果が含まれていたか(タスク別、大文字小文字を区別しない部分一致 / 正規表現 / 完全一致。すべてレポートで明示されています);
  • メディアン時間とメディアントークン数(新規 vs. キャッシュ済み vs. 生成済み);
  • エラー発生率を含む実行 %:何も出力しなかった(0 トークン、ツール呼び出しなし、回答なし)実行をフラグするガード機能を含み、サイレントフォールトが「0」として偽装されないようにします;
  • マーカー採用率:ツール定義の動作マーカー。詳細は後述します。

これらすべてが、直接確認できるレポートにまとめられます:

**

*ライブレポート:概要、カバレッジ、結果はすべてクライアントサイドで提供されます。

各実行のネイティブエージェントトレースを記録するため、数値は始まりに過ぎません。エージェントが何をしたかを、コマンドごとに正確に読み取ることができます。これらのトレースは、Hub の agent-traces ビューアー を通じて共有可能です:

imageimage

*Hub の agent-traces ビューアーでレンダリングされた実行例:MiniMax-M2.7 を回答質問タスクで使用。

このトレースを Hub で開く ↗

結果の前に、セットアップの簡単な復習をします。各実行では 4 つの要素が異なります:エージェントを駆動するモデル、対象となるtransformers リビジョン、タスク、そしてティア(bare / clone / skill)です。前述した通り、2 つの異なるモデルカテゴリに対しては異なる指標を確認します。

大規模オープンモデル:モデルを固定し、リビジョンを変化させる

大規模なオープンモデルは通常、正しい結果に到達するため、実際に測定しているのはそのための努力量です。10 ターン必要だったのか、それとも 1 つで済んだのか?信頼していた古いドキュメントのために廃止された API パスに従ってしまったりしたのでしょうか?予期していなかったエラーに遭遇したりしたのでしょうか?

自然実験としては、強力なモデルを一つ固定し、ツールの改訂版を変化させることです。つまり、v5.8.0 や v5.9.0 といったリリースタグから、CLI と Skill を導入する特定のコミットに至るまで、テスト対象とする transformers の連続する git バージョンです。エージェントにかかる負荷が増加するか減少するかを観察したいのです。私たちは、専用 CLI と Skill を追加することが実際にエージェントの作業を軽減したかどうかを確認するために、transformers に対してハネス(検証枠組み)を使用しました。

テストに使用した3つの大規模モデルにおいて、すべてのタスクに費やされた平均時間を分析すると、Skill のコミットによりタスクへの作業時間が短縮されていることが示されています:

imageimage**

*バージョン別中央値所要時間:スキルコミット(緑色の点)が最速です。

一方、リポジトリをクローンした実験では、CLI と例示コードを導入するコミットによりトークン消費量が顕著に増加していることが確認できます。これは後ほど詳しく説明します。

imageimage

*バージョン別中央値新規トークン数:CLI がリポジトリに導入されると、クローンバリアントで急増します。

クローンバリアントのトレースを読み解くことでその理由がわかります。このコミットはコマンドを追加するだけでなく、CLI の実装と cli/agentic/*.py における使用例セットを直接リポジトリ内に提供しているからです。

クローンバリアントでは、エージェントの前に完全な transformers のチェックアウトがあり、約 3 分の 1 の実行では、それを呼び出す前に新しいインターフェース(/cli/ ツリーとサンプルスクリプト)を読み込んで学習します。これにより、中央値の入力トークン数は約 4k から約 6.4k に上昇します。

2 つのチャートは、まさに一つのトレードオフの両面を表しています:コミットは、大規模モデルが Python のデバッグではなく CLI を利用する時間を短縮しますが、その代償として、CLI の使い方を教えるコードを読み込むためのトークン数が増加します。PR をマージする前に知っておくべきトレードオフです。

ただし、CLI に有利に働く要因でまだベンチマークされていないものがあります:それを読むコストは、連続する実行によって相殺されるということです。私たちのセットアップは単発の実験のために構築されたものです。各実行は CLI を最初から再発見する新しいエージェントであり、毎回発見コストを支払うことになります。実際の使用では、エージェントはインターフェースを一度学習し、その後のタスクを同じセッション内で次々と解決するため、そのコストは多数のリクエストにわたって相殺されます。ここで測定したトークン数の増加は、日常ユーザーが経験するものよりもむしろ最悪の場合に近いものです。

小規模モデル:リビジョンを固定し、モデルを変化させる

オープンモデルは、ここでは最も重要な変数に対して微細な制御を可能にします:サイズ、構成、量子化、プロバイダー、トレーニング、そしてモデル間で異なるあらゆる要素です。また、優れたツール表面が最も重要となる場所でもあります。裸の環境で「transformers を使用して X を行う」と指示された小規模モデルは、数回のリリース前に変更された API を推測したり、不要なツール呼び出しを行ったり、間違った回答を得たりする可能性があります。

そこで今回の実験は上記とは逆のアプローチです:リビジョンを固定し、モデルをスウィープします。これにより、単にトークン数や時間で判断されるのではなく、実際にタスクを処理できるモデルがどれか、そしてどのモデルがツール呼び出しを信頼して扱えないかを明らかにできます。私たちの直感は、モデルが小さいほど、ツール使用とタスクの両方が困難になるというものです。これを正確にテストするために、さまざまなサイズのモデル範囲でハネスを実行しました:

imageimage

*ティア別モデル間の一致率:スキルティアは大規模モデルを向上させますが、小規模モデルでは低下します。

これはまた、取り込まれたトークン数と相関しているようにも思われます

imageimage

*ティア別モデル間の中央値新規トーク数。

公平な比較に関する注記:カバレッジに偏りがある場合、タスク間で単純に平均値を計算するのは誤解を招きます(迅速なタスクのみ完了したモデルは高速に見えるため)。レポートには「共通タスクのみ」の切り替えスイッチがあり(モデル間および/またはリビジョン間で)、これにより同等条件での比較が可能になります。また、「カバレッジ」ヒートマップも用意されており、どのタスク×リビジョン×モデルのセルが実際に実行されたかを正確に確認できます。

ツールの微調整:マーカーと結果

ここでは2つの要素が絡み合っています。一つは、エージェントが成功したかどうかではなく、何を行い、どのように行ったかに注目する方法です。もう一つは、ハネスから引き出した最初の結果です。

マーカーとは何か?

一致率(Match %)、トークン数、実行時間は、1回のランのコストを示しますが、内部で何が起きたかについてはあまり教えてくれません。

そのため、私たちは「マーカー」という概念を導入しました。マーカーとは、プロファイル(ハネスが特定のライブラリを構築・駆動する方法を教える、ツールごとの小規模プラグイン)がランに対して照合する名前付きパターンです。

これは、エージェントが実行したシェルコマンド、作成したコード、読み込んだファイル、あるいは最終回答に対してチェックされる、あなたが関心を持つ行動に対する1行のラベルです。1回のランでは複数のマーカーが発火することもあれば、発火しないこともあります。レポートでは、各モデルおよび各リビジョンごとに、それぞれのマーカーがどの頻度で発火したかを示します。

トランスフォーマー(transformers)についてはいくつか定義していますが、ここでは最も関連性の高い2つのみを取り上げます:

  • cli: エージェントがPythonを記述する代わりに、トランスフォーマーのコマンドラインツール(例:transformers classify …)を呼び出したこと。
  • pipeline: 高レベルの Python API である pipeline(...) を使用したこと。

これらの指標は、変更が実際にエージェントの行動を変化させたかどうかを確認するために監視しています。興味深いことに、モデルが大きくなるほど、その記憶に頼るのではなく新しい文脈を活用し、したがって新しく導入された CLI を利用するようになります。

imageimage**

*モデルのティア別における CLI 採用状況:スキルティアのみがこれに手を伸ばし、モデルが大きくなるほどその傾向が強まります。*

CLI の導入は新しい試みです:この CLI は単一のコミットで導入され、どのモデルのトレーニングデータにも含まれておらず、文書化も軽微なものです。その効果は明確で、実際にこれに手を伸ばすのは CLI のドキュメントを同梱する「スキル」バリアントであり、その採用率は 55.3% です。

CLI とスキルのコミットは役立っているのか?

モデルサイズ間でこのコミットを比較すると、CLI とスキルの組み合わせは大規模モデルに有益です:スキルティアにおいて、Kimi や他の大規模エージェントは CLI に手を伸ばし、より少ないターンで完了します。(クローン版では前述の通り、まず新しい CLI コードを読み込むために*より多くの*入力トークンを消費するため、勝利は生じるのはトークン数ではなく時間とターン数においてです。)

imageimage

*Kimi-K2.6、GLM-5.1、MiniMax-M2.7 の各リビジョンにわたる比較*

しかし、より小さなモデルの設定においては、パフォーマンスを低下させるように見える。もっともらしい説明としては、小型モデルは記憶された API パターンに依存し、トレーニングデータで見たパイプライン (...) スニペットを再現しているというものである。新しい概念は、それらが誤るためのより大きな表面領域となる。ハーン(harness)上でこれを直接観察できる:マッチング率の低下、リトライ数の増加、CLI マーカーがほとんど発火しないことだ。特に Qwen3-4B モデルにおいて顕著である:スキルによるマッチング率はほとんど変化しないにもかかわらず、コスト分布は大幅に影響を受ける。

そのほとんどはクローン層(clone tier)に由来するものである。チェックアウトには CLI の実装と cli/agentic/*.py 例が含まれており、4B エージェントはこれらをバッチで読み込む:その中央値の新しいトークン数は約 2.4k から約 23k に跳ね上がり、時間と出力も急増するが、精度には何らの向上もない。

image
image

*Qwen3-4B の各リビジョンにわたる比較。CLI とスキルのコミットによりコスト分布が大幅に拡大し、クローン層ではエージェントが新しく出荷された CLI ソースをバッチで読み込む(新しいトークン数が約 10 倍)。マッチング率には何らの向上もない。(リピートトークンは横ばい:この設定ではプロンプトキャッシングは使用されていない。*)

しかし、時にはスキルが正しさを完全に崩壊させることがあります。トレースを読むと、例えば Qwen3-14B の場合において、その様子がわかります:スキルを追加すると全体の一致率が 67%(ベースライン)から 43% に低下し、最も単純なタスクにおける崩壊は非常に顕著です:classify-sentiment はクローン版では 100% ですが、スキル付きバージョンでは 0%**にまで落ち込みます。

imageimage**

*classify-sentiment における Qwen3-14B の結果をティア別に示す:クローン版(青)は改訂を通じて 100% を維持しますが、スキル付きバージョン(緑)は CLI + スキル改訂で 0% に崩壊します。

トレースを見ると、モデルは CLI を「直接呼び出せるツール」(ウェブ検索のようなアジェンシー・ハーネスのツールの例のように)と誤認しています。しかし、このスキルは実行可能なツールではありません:これはエージェントのコンテキストに読み込まれたドキュメントであり、transformers CLI はシェル(bash 経由)からのみ実行されることを意図したものです。したがって、このアプローチは機能しません。

Qwen3-14B はスキルを読み込み、56 回のスキル実行のうち 39 回で、transformers(command="classify", ...) というツール呼び出しを出力します(これは登録されたことのないツールです)、あるいは読み込んだ bash/edit/write ツールの中に類似のものが見つからないため、モデルを実行できないと結論付け、あきらめます。どちらの場合も、クローンチェックアウトでは 100% のスコアを獲得した単一行の pipeline(...) にフォールバックするのではなく、タスクが不可能であると宣言してしまいます。

imageimage**

*Qwen3-14B を classify-sentiment (Skill バリアント) で実行した結果:* 読み取り、bash、編集、書き込みコマンドではモデルを実行できないと推論し、断念しました。

これはまさに、私たちがハルネス(評価枠組み)を構築して捕捉しようとした現象です。大規模モデルの速度向上をもたらす同じ変更が、小規模モデルの動作を壊してしまうという事実は、当初私たちには少し直感に反するものであり、そのままリリースしていた可能性さえありました。維持者への教訓は、エージェント指向 API はモデルサイズ全体で評価すべきだということです。新しい機能(アフォーダンス)が強力なモデルでは作業量を減らす一方で、小規模モデルには曖昧さを生む可能性があるからです。また、これは解決策のヒントにもなります: 手動で Skill を記述して事後に検証するのではなく、まず弱めのモデルに対して生成・検証された Skill を用意することです。

これはまさに Upskill が行っていることです: 強力なモデルの解決策が、小規模モデルにとって計測可能なメリットをもたらす場合にのみ、それを Skill として変換します。

実際に試してみる

ハルネスは単一の CLI ツール agent-eval です。これをインストールし、スイートを実行し、Hugging Face Jobs でモデルとリビジョンの組み合わせに分散実行し、レポートを Hugging Face Space として公開します。

ローカル利用のみ信頼してください。 このハーンは、権限をバイパスしたコーディングエージェントを実行し、あなたが指定するリビジョンからのコードを実行します。また、トレースにはプロンプト、出力、ローカルパスが含まれる可能性があります。自分で書かないコードや結果の共有を行う前に、必ず SECURITY.md を参照してください。

完全なセットアップと最新の使用手順は、README に記載されています。

結び

最終回答を確認することは、エージェントがあなたのライブラリを*使用できるか*を知るためのものです。しかし、それにはコスト(ターン数、トークン数、エラー、到達までの経路)が含まれるかどうかまでは示しません。このハーンは、あなたが選択したリビジョンやモデル全体において、そのコストを測定します。

Transformers においては、我々が信頼に基づいて出荷していたものを検出しました:CLI と Skill は、最大のオープンソースモデルには役立ちますが、最小のモデルには悪影響を与えます。マージする前に知っておく価値があります!

これはプロファイルベースであり、適応可能に設計されています。自分のライブラリを指し示し、いくつかのタスクとその期待される回答を定義するだけで、同じレポートが得られます。コードとタスクは repo にあり、トレースは Hub にあります。プロジェクトで使用した場合はぜひお知らせください!

謝辞

このハルネスは、Mario Zechner のコーディングエージェント CLI である pi に完全に依存しています。これはすべてのオープンモデルの実行を駆動し、モデルを提供する際に必要なのは HF_TOKEN だけであり、これがオープンモデルの一斉評価を実用的なものにした理由です。

私たちが評価したモデルの背後にあるモデルビルダーおよび推論プロバイダーに感謝します。全体的に見て、彼らのパフォーマンスは単なるベースラインが示唆するものよりもはるかに上回っていました。

原文を表示

Back to Articles

  • Testing software for agentic-use Not all successes are equal
  • How do we run evaluations?
  • Which models to benchmark against?
  • Large open models: hold the model, vary the revision
  • Small models: hold the revision, vary the model
  • Tweaking the tool: markers and results What's a marker?
  • Is the CLI + Skill commit helping?
  • Trying it yourself
  • Closing
  • Acknowledgements

*Benchmarking transformers revisions across different metrics*

**

This is a human-made, agent-focused blogpost.

Coding agents increasingly work with our software instead of us: describe a task, and the agent picks the library,

writes the calls, runs them, and debugs its own mistakes. When the library gets in the way, it will

happily bypass it and rewrite the logic from scratch. This introduces a new concept in library development:

the code should not only be correct and fast, but should be designed so that an agent can drive it effectively. A clunky API

or stale docs annoy us developers, but it now also sends the agent down a longer, more expensive path.

Most benchmarks just look at the final answer. We wanted the whole process instead: not just whether the agent got

it right, but how much work it took to get there, and how that shifts across models, library revisions, and

tasks. We measured exactly that, using transformers as our case study.

Here, we will introduce a tool specific benchmark focusing on how the answer was found, and provide a simple

implementation of one such harness, running entirely on open models driven by the

pi coding agent, with the full sweep of

models × revisions × tasks fanned out across Hugging Face Jobs

so every run sees identical hardware.

But, *how do you optimize software for agents?***

We're strong believers in the following two software principles:

  • If it isn't tested, then it doesn't work
  • If it isn't documented, then it doesn't exist

This remains the same within the realm of agentic-optimized tooling, and, for once, the two are directly tied to

each other.

You want your tool to exist for an agent: it needs to be discoverable. The API needs to be clear and the docs

need to be extensive. They need to be structured in a way that the agent has rapid access to the useful files and

examples. If you want your tool to work for an agent, then you should test it for agentic-use.

Testing software for agentic-use

We'll use transformers as an example throughout this blogpost: agents *using* it to solve ML tasks (classifying

text, captioning images, transcribing audio), not contributing code to it; though the harness was designed to work

with any tool that can be operated from the command line.

Our intuition on transformers was that usage could be dramatically simplified

with a few changes: a CLI, a Skill, and self-contained, task-specific examples. This is the same recipe

recently applied to the hf CLI, redesigned to be agent-optimized,

where agents used 1.3–1.8× (and up to 6×) fewer tokens. We wanted to know whether that kind of win generalizes, and

whether it could be useful for transformers as well.

Intuition is a powerful tool, but we wanted more evidence before we opened PRs that add several thousand lines of code to such a widely used codebase as transformers. We set out to measure what success looks like.

Not all successes are equal

Two agents can both produce the correct label for a sentiment-classification task,

but one:

  • writes a 40-line Python script, imports transformers, debugs a shape error,

re-runs twice, and finally prints the answer;

while the other

  • types transformers classify --model ... --text "..." and is done in one call.

Both reach POSITIVE (0.9999), and here are the two paths an agent actually took on this exact task:

code
# Task: classify the sentiment of "I absolutely loved the movie, it was fantastic!"

- # one agent: pipe a script into python and parse the output
- python - <<'PY'
- from transformers import AutoTokenizer, AutoModelForSequenceClassification
- import torch
- import torch.nn.functional as F
-
- model = AutoModelForSequenceClassification.from_pretrained("distilbert/distilbert-base-uncased-finetuned-sst-2-english")
- tokenizer = AutoTokenizer.from_pretrained("distilbert/distilbert-base-uncased-finetuned-sst-2-english")
- inputs = tokenizer("I absolutely loved the movie, it was fantastic!", return_tensors="pt")
- with torch.no_grad():
-     logits = model(**inputs).logits
- probs = F.softmax(logits, dim=1)
- idx = torch.argmax(probs, dim=1).item()
- print(model.config.id2label[idx], probs[0][idx].item())
- PY

+ # the other agent: one command
+ transformers classify \
+   --model distilbert/distilbert-base-uncased-finetuned-sst-2-english \
+   --text "I absolutely loved the movie, it was fantastic!"

Both methods reach the same result. But they have very different profiles in cost, latency, token usage, and failures.

If your evaluation only checks the final string, you're blind to these as well as

whether a change you shipped to the library (a CLI improvement, better error messages, a

Skill) actually helped agents.

Our goal with this harness is to evaluate how much work

an agent has to do to perform a given task, and whether changes to the library improve performance.

How do we run evaluations?

A few words on how we'll evaluate agents here.

We run every task under three variants (or "tiers"); three different ways an agent can come at transformers:

code
bare     pip install transformers, and nothing else
clone    the full transformers source, checked out in the working directory
skill    a packaged Skill: the CLI's docs + task examples, loaded in context

These aren't nested: skill doesn't contain clone (it ships curated docs, not the source tree), and neither

strictly contains the other, each gives the agent a different kind of help. As we'll see, a model can sometimes

do better on clone than on skill.

A few more choices:

  • For now we only focus on deterministic tasks which can provide an exact match, as they provide a very nice ground for experimentation. Model-as-a-judge and other schemes are the obvious next steps for other tasks.
  • Every run is its own Hugging Face Job: one per (model × revision × task), so the whole sweep runs in parallel on identical hardware, which keeps the comparison fair at scale.
  • Results and traces land in a Hugging Face Bucket: fast, no versioning needed, and handles very high write concurrency.

Which models to benchmark against?

Not all models driving agents are equal, and their difference changes what you should look at when running them.

*Large open models*

At one end, you have the largest, most capable open models. On reasonably common tasks,

these should get the right answer, eventually. For them, task completion saturates near

100% and stops telling you much about your tool; a more relevant benchmark is the effort

it took the agent to get there: how many turns, tokens and seconds it took, and whether they walked a clean

path or used deprecated APIs.

*Local*

Local models vary widely in size, and so do their abilities.

Metrics such as "match %" are more relevant than for their larger counterparts,

as you can see how model sizes/capabilities affect results on your specific

tool.

This harness not only provides guidance to library maintainers on how to improve a repository for agent interactions, it also helps assess how different agents and models perform on the tasks users care about.

The harness scores every run on several axes, so that you can ask what actually matters

for each class of model:

  • match %: did the final answer contain the expected result (per-task,

case-insensitive substring / regex / exact, all explicit in the report);

  • median time and median tokens (new vs. cached vs. generated);
  • runs with error %: including a guard that flags runs which produced nothing

(0 output tokens, no tool calls, no answer) so silent failures don't masquerade

as "0";

  • marker adoption: tool-defined behavior markers; see below for an explanation

of what this is.

All of it lands in a report you can directly examine:

**

*The live report: Overview, Coverage, and Results, all client-side.*

And because it captures the native agent trace of every run, numbers are just the beginning: you

can read exactly what the agent did, command by command. The traces are shareable

through the Hub's agent-traces viewer:

A run rendered in the Hub
A run rendered in the Hub

*A run rendered in the Hub's agent-traces viewer: MiniMax-M2.7 on the answer-question task.*

Open this trace on the Hub ↗

Before the results, a quick recap of the setup. Each run varies four things: the model** driving the agent,

the transformers revision it runs against, the task, and the tier (bare / clone / skill).

As discussed, we look at different metrics for the two different model categories.

Large open models: hold the model, vary the revision

Since a large open model will usually get to the correct result, what you're really

measuring is the effort it took to do so. Did it take ten turns or one? Did it follow

an API path you deprecated because it trusted obsolete documentation? Did it hit an

error you hadn't foreseen?

The natural experiment is to fix one strong model and vary the tool's

revisions: the successive git versions of transformers we test against, from released tags like

v5.8.0 and v5.9.0 to the specific commit that introduces the CLI and Skill. We want to watch whether the load

it puts on the agent goes up or down. We used the harness on transformers to check

whether adding a dedicated CLI and Skill actually lightened the agents' work.

For the three large models we used in our tests, the average time spent on all tasks indicates that the Skill commit

results in less time spent working on the tasks:

Median time per revision, by tier
Median time per revision, by tier

**

*Median time per revision, by tier: the skill commit (green dot) is the fastest.*

On the other hand, in the experiments in which we cloned the repository, we can see a significant increase

in token consumption due to the commit that introduced the CLI and examples, as we'll see in a moment.

Median new tokens per revision, by tier
Median new tokens per revision, by tier

*Median new tokens per revision, by tier: the clone variant jumps once the CLI lands in the repo.*

Reading the clone-variant traces explains why. The commit adds a command, but it also ships the

CLI's implementation and a set of cli/agentic/*.py usage examples into the repository directly.

On the clone variant the agent has a full transformers checkout in front of it, and roughly a third of the runs go read the new

surface (the /cli/ tree and the example scripts) to learn the interface before calling it. This raises the

median input from ~4k to ~6.4k tokens.

The two charts are then two sides of one tradeoff: the commit buys the large models less time

(they reach for the CLI instead of debugging Python) at the cost of more

tokens (they read the code that taught them the CLI). A tradeoff worth knowing about before merging PRs.

One caveat works in the CLI's favor, though, which isn't benchmarked yet: the cost of reading it is amortized

with successive runs. Our setup is built for one-off experiments. Each run is a fresh agent that rediscovers

the CLI from scratch, so it pays the discovery cost every time. In real usage an agent learns the interface

once and then solves task after task within the same session, amortizing that cost across many requests. The

token bump we measure here is closer to a worst case than to what a user would see day to day.

Small models: hold the revision, vary the model

Open models give us fine-grained control over the variables that matter most here: size, configuration, quantization,

provider, training, and anything that would differ from one model to the next. They're also where a good tool surface

matters most: a small model asked to "use transformers to do X" on a bare environment can

guess an API that changed some releases ago, may do unnecessary tool calls, and can

get the wrong answer.

So here the experiment is the opposite of the above: hold the revision and sweep the model. This helps

see which models actually take care of the task, not just by token count and time,

but down to which ones can't reliably handle the tool calls. Our intuition is

that the smaller the model, the harder both tool use and the task get; we ran the

harness across a range of model sizes to test exactly that:

Match % across models, by tier
Match % across models, by tier

*Match % across models, by tier: the skill tier lifts the larger models but drops the smaller ones.*

which also seems to be correlated with the number of tokens ingested

Median new tokens across models, by tier
Median new tokens across models, by tier

*Median new tokens across models, by tier.*

A note on fair comparison: naively averaging across tasks is misleading when

coverage is uneven (a model that only finished the quick tasks looks fast). The

report has a "shared tasks only" toggle (across models and/or revisions) so

you compare like-for-like, and a Coverage heatmap so you can see exactly which

task × revision × model cells actually ran.

Tweaking the tool: markers and results

Two things come together here: how to look past whether the agent succeeded to what it did and how it

did it; as well as the first results we pulled out of the harness.

What's a marker?

Match %, tokens, and time tell you the cost of a run but don't tell you much about what happened under the hood.

This is why we've introduced the concept of markers. A marker is a named pattern the profile (the

small per-tool plugin that teaches the harness how to build and drive a given library) matches against

a run.

It is a one-line label for a behavior you care about, checked against the shell

commands the agent ran, the code it wrote, the files it read, or its final

answer. A run can fire several markers or none; the report shows how often each one fired,

per model and per revision.

For transformers we declare a handful but we'll only look at the two most relevant ones:

  • cli: the agent invoked the transformers command-line tool (e.g.

transformers classify …) instead of writing Python.

  • pipeline: it reached for the high-level pipeline(...) Python API.

These are what we watch to see whether a change actually shifted the agent's behavior. Interestingly here,

the larger the model, the more it leverages the new context instead of using its memory; therefore leveraging

the newly introduced CLI.

CLI adoption by tier across models
CLI adoption by tier across models

*CLI adoption by tier across models: only the skill tier reaches for it, and more so as models grow.*

CLI adoption is new: the CLI lands in a single commit, isn't in any model's training data, and is only

lightly documented. The effect is clear: it's the Skill variant, the one that ships the CLI's

documentation, that actually reaches for it, at 55.3%.

Is the CLI + Skill commit helping?

Comparing the commit across model sizes, the CLI + Skill helps the bigger models: on the skill tier, Kimi and the other large agents reach for the CLI and finish in fewer turns. (On clone they spend *more* input tokens first, reading the new CLI code, as we saw above, so the win shows up in time and turns, not raw tokens.)

Kimi-K2.6, GLM-5.1, and MiniMax-M2.7 across revisions
Kimi-K2.6, GLM-5.1, and MiniMax-M2.7 across revisions

*Kimi-K2.6, GLM-5.1, and MiniMax-M2.7 across revisions*

But in some smaller-model settings, it appears to hurt performance. One plausible explanation is that small

models lean on memorized API patterns, reproducing pipeline(...) snippets

they've seen in their training data. The new concepts are then a larger

surface for them to get wrong. You can watch this directly on the harness: lower

match %, more retries, the cli marker barely firing. It is particularly striking on the Qwen3-4B model:

the Skill barely changes its match rate yet its cost distribution is significantly affected.

Almost all of that comes from the clone tier. The checkout now contains

the CLI's implementation and cli/agentic/*.py examples, and the 4B agent reads them in bulk: its median new

tokens jump from ~2.4k to ~23k, with time and output skyrocketing as well, for no gain in

accuracy.

Qwen3-4B cost distributions across revisions: elapsed, new tokens, repeat tokens, out tokens
Qwen3-4B cost distributions across revisions: elapsed, new tokens, repeat tokens, out tokens

*Qwen3-4B across revisions. The CLI + Skill commit fans the cost distribution wide open, on the clone tier the agent reads the newly-shipped CLI source in bulk (~10× the new tokens), for no gain in match %. (repeat tokens stays flat: this setup uses no prompt caching.)*

Sometimes, though, the Skill breaks correctness outright. Reading the traces shows how, for example for Qwen3-14B:

adding the Skill drops its overall match rate from 67% (bare) to 43%, and on the simplest tasks the collapse is very

visible: classify-sentiment goes from 100% on the clone variant to 0%** with the Skill.

Qwen3-14B classify-sentiment match % by tier across revisions
Qwen3-14B classify-sentiment match % by tier across revisions

**

*Qwen3-14B on classify-sentiment, by tier: clone (blue) holds at 100% across revisions, but the Skill variant (green) collapses to 0% at the CLI + Skill revision.*

Looking at the traces, the model mistakes the CLI for a *tool it can call directly* (as in an agentic-harness

tool, like web-search). The Skill is not** an executable tool: it's documentation loaded

into the agent's context, and the transformers CLI is only ever meant to be run from the shell (via bash); so this

will not work.

Qwen3-14B reads the Skill and, in 39 of its 56 Skill runs, either emits a transformers(command="classify", ...)

tool call (a tool that was never registered) or, finding nothing like it among its read/bash/edit/write

tools, concludes it *can't* run a model and gives up. Either way, rather than fall back to the one-line

pipeline(...) that scored 100% on the clone checkout, it declares the task impossible.

Qwen3-14B gives up on classify-sentiment under the Skill variant
Qwen3-14B gives up on classify-sentiment under the Skill variant

**

*Qwen3-14B on classify-sentiment (Skill variant): it reasons that read/bash/edit/write can't run a model, and gives up.*

This is exactly what we built the harness to catch: the same change that speeds the large models

ends up breaking the small ones, which seemed a bit counterintuitive to us at first and something we'd likely have

shipped as-is. The takeaway for maintainers: agent-facing APIs should be evaluated across model sizes, because a

new affordance can reduce work for strong models while adding ambiguity for smaller ones.** It also hints at a fix:

rather than hand-write a Skill and check it after the fact, you could generate and validate one against the weaker

models up front.

This is exactly what Upskill does: it turns a strong model's solution into

a Skill only when it measurably helps the smaller ones.

Trying it yourself

The harness is one CLI, agent-eval. Install it, run a suite, fan it out across models × revisions on HF Jobs, and publish the

report as a Hugging Face Space.

Trusted local use only. The harness runs a coding agent with bypassed permissions and executes code from

whatever revision you point it at, and traces can contain prompts, output, and local paths. See

SECURITY.md before pointing it at code you didn't write or sharing results.

The full, kept-current setup and usage instructions live in the README.

Closing

Checking the final answer tells you whether an agent *can* use your library. It

doesn't tell you what it costs: the turns, tokens, errors, and the path it took to

get there. This harness measures that, across the revisions and models you pick.

On transformers, it caught something we'd have shipped on faith: the CLI + Skill

helps the largest open models and hurts the smallest ones. Worth knowing before merging!

It's profile-based, and designed to be adaptable: point it at your own library, define

a few tasks and their expected answers, get the same report. Code and tasks are in

the repo, traces are on the Hub.

Let us know if you use it for your project!

Acknowledgements

This harness stands entirely on

pi, Mario

Zechner's coding-agent CLI: it drives every open-model run, and only needs an

HF_TOKEN to serve a model, which is what made the open-model sweep practical at

all.

Thanks to the model builders and inference providers behind the models we

swept. Across the board they performed well above what the bare baseline would

suggest.

この記事をシェア

関連記事

Latent Space★42026年6月19日 14:53

[AINews] GLM は GPT より優れているか?GLM-5.2 が実用性を証明、Z.ai が 12 月までに「Open Fable」を公開予定

Latent Space のニュースでは、中国のモデル「GLM-5.2」がベンチマークで優れた結果を示し実用性があると評価されたことと、Z.ai が 12 月までにオープンソースプロジェクト「Open Fable」を発表する見込みについて報じられています。

Hugging Face Blog★42026年6月19日 03:13

MosaicLeaks:研究エージェントは秘密を守れるか?

Hugging Face は、AI エージェントが機密情報を漏洩するリスクを検証する「MosaicLeaks」という評価フレームワークを発表した。

Allen AI (AI2)★42026年6月18日 17:00

Domyn と AISquared が Ai2 のオープンリリースをどう活用したか

Domyn と AISquared は、透明性やライセンス管理が不可欠な規制業界向けに AI モデルを開発する際、Ai2 のオープンソースリリースを活用している。これにより顧客の信頼とコンプライアンス確保を実現している。

今日のまとめ

AI日報で今日の重要ニュースをまとめ読み

ニュース一覧に戻る元記事を読む