LLMデータをキュレーションするツール
AI研究者のHamel Husainは、LLM開発において自社でデータ注釈・キュレーションツールを構築することの重要性を主張し、既存ツールの評価とShiny For Pythonなどの汎用フレームワークの活用を推奨している。
キーポイント
自社ツール構築の重要性
LLM開発においてデータ注釈・キュレーションは外部委託すべきでない重要なタスクであり、ベンダーツールの制約を受けずに自社でツールを構築することが高インパクトな活動である。
既存ツールの評価と限界
Spacy Prodigy、Argilla、Lilacなどの既存ツールを評価したが、特定のニーズに合わせたカスタマイズが困難であり、自社の技術スタックとの統合に課題があることが明らかになった。
汎用フレームワークの推奨
Shiny For Pythonなどの汎用フレームワークを使用して自社ツールを構築することが推奨されており、柔軟なカスタマイズと迅速なデータ確認が可能になる。
データ手動確認の価値
優れたAI研究者は大量のデータを手動で確認し、問題に対する直感を得ることで、データキュレーションが評価とファインチューニングの両方で重要であると指摘されている。
影響分析・編集コメントを表示
影響分析
この記事は、LLM開発におけるデータ準備プロセスの重要性を再認識させ、既存ツールへの依存から自社開発への転換を促す実践的な指針を提供している。特に中小規模の開発チームや研究機関にとって、コスト効果の高い開発アプローチを示しており、AI開発の民主化に貢献する可能性がある。
編集コメント
実務経験に基づく具体的なツール評価と自社開発のメリットが明確に述べられており、LLM開発現場で直面する実際の課題に対する実用的な洞察が得られる内容となっている。
多くの方は、LLM向けに独自のデータアノテーション/キュレーションツールを構築すべきだと考えています。多くの状況、特に汎用フロントエンドフレームワークを利用する場合、そのメリットはコストを大きく上回ります。この作業は、慎重な検討なしに外部委託するには重要すぎるタスクです。さらに、ベンダー提供ツールの制限によって早期に縛られることは避けたいでしょう。
ここで述べた理由から、私はShiny for Pythonの使用を推奨します。また、ここで論じた理由により、Streamlitは推奨しません。
私が気付いた一つのパターンは、優れたAI研究者は多くのデータを手動で検査することを厭わないということです。それだけでなく、彼らはデータを素早く手動検査できるインフラを構築します。地味な作業ではありますが、データを手動で精査することで、問題に関する貴重な直感が得られます。この典型的な例が、Andrej Karpathy自身がImageNetの2000クラス分類タスクを実施したことです。
– Jason Wei, OpenAI AI研究者
Jasonの意見にはまったく同感です。人々は自身のデータを十分に観察していないと思います。データを素早く選別・キュレーションできる独自ツールを構築することは、LLMを扱う上で最も影響の大きい活動の一つです。自身のデータを観察し、キュレーションすることは、評価とファインチューニングの両方において極めて重要です。
最初は、自分で何かを構築することを避けようとしました。データキュレーション/レビューのためのツールを提供する以下のベンダーを試しました:
これらのツールは成熟度が様々です。これら全ての製品の開発者とやり取りしましたが、彼らは非常に応答が速く、親切で、これらの制限を認識していました。これらのツールは時間とともに大幅に改善されていくものと期待しています。
Spacy Prodigy: これは私が最も気に入った「事前パッケージ化された」ツール/フレームワークでした。最も洗練されたUIを備えています。しかし、特定のニーズに合わせて素早く改造するのは、少し難しいと感じました。様々なNLPタスクに対応する優れた機能を有しています。結局、私は彼らのUIから着想を得て、独自のツールを構築することにしました。
Argilla: このプラットフォームは多くの機能を備えていますが、LLM機能は私の目的には不十分でした。ソート、フィルタリング、ラベル付けといった単純な作業も行えませんでした。LLM機能と非LLM機能ではAPIが大きく異なり、現時点ではかなり分断されている印象です。成熟すれば可能性があると思います。
Lilac: これはデータセットビューアーという性格が強く、データにラベルを付けたりキュレーションしたりするツールとしては機能不足だと感じました。そのため、私のニーズには合いませんでした。ユーザーインターフェース(UI)も、改造や拡張が容易そうには見えませんでした。
これらのベンダーツールを試す中で明確になったのは、特定のニーズに合わせてツールを改造できることの重要性です。関わるすべての企業には独自の技術スタックがあり、このデータアノテーションツールに統合したいツールが存在するでしょう。この気付きが、汎用フレームワークを用いて独自ツールを構築する決め手となりました。
汎用フレームワーク
Pythonには、Gradio、Panel、Streamlitなど、使いやすい優れたフロントエンドフレームワークが存在します。新たな選択肢であるShiny for Pythonは、全てを評価した上で私が最も気に入ったフレームワークです。
私がShinyを最も高く評価する理由:
Quartoとのネイティブ統合。
反応が速く、強力なリアクティブモデル。
習得が容易で、把握しやすいコンパクトなAPI。
優れたWASMサポート(例えば、このブログ記事にアプリを埋め込んでいます!)。
Shinyアプリは、他のフレームワークと比べて常にはるかに少ないコード量で済み、かつ理解しやすいことが分かりました。
原文を表示
I think many people should build their own data annotation/curation tools for LLMs. The benefits far outweigh costs in many situations, especially when using general-purpose front-end frameworks. It’s too critical of a task to outsource without careful consideration. Furthermore, you don’t want to get constrained by the limitations of a vendor’s tool early on.
I recommend using Shiny For Python for reasons discussed here. I wouldn’t recommend Streamlit for reasons discussed here.
One pattern I noticed is that great AI researchers are willing to manually inspect lots of data. And more than that, they build infrastructure that allows them to manually inspect data quickly. Though not glamorous, manually examining data gives valuable intuitions about the problem. The canonical example here is Andrej Karpathy doing the ImageNet 2000-way classification task himself.
– Jason Wei, AI Researcher at OpenAI
I couldn’t agree with Jason more. I don’t think people look at their data enough. Building your own tools so you can quickly sort through and curate your data is one of the highest-impact activities you can do when working with LLMs. Looking at and curating your own data is critical for both evaluation and fine-tuning.
At the outset, I tried to avoid building something myself. I tried the following vendors who provide tools for data curation/review:
These tools are at varying levels of maturity. I interacted with the developers on all these products, and they were super responsive, kind and aware of these limitations. I expect that these tools will improve significantly over time.
Spacy Prodigy: This was my favorite “pre-packaged” tool/framework. They have the cleanest UI. However, I found it a bit difficult to quickly hack it for my specific needs. They have excellent features for lots of different NLP tasks. In the end, I ended up drawing inspiration from their UI and building my own tool.
Argilla: This platform has lots of functionality, however the LLM functionality fell short for me. I couldn’t do simple things like sorting, filtering, and labeling. Their LLM vs non-LLM functionality has very different APIs, which makes things quite fragmented at the moment. I think it could have potential once it matures.
Lilac: I found that this was more of a dataset viewer rather than something that allowed me to label data and curate it. So it didn’t really fit my needs. The user interface did not seem that hackable/extendable.
One thing that became clear to me while trying these vendors is the importance of being able to hack these tools to fit your specific needs. Every company you work with will have an idiosyncratic tech stack and tools that you might want to integrate into this data annotation tool. This led me to build my own tools using general-purpose frameworks.
General Purpose Frameworks
Python has really great front-end frameworks that are easy to use like Gradio or Panel and Streamlit. There is a new kid on the block, Shiny For Python, was my favorite after evaluating all of them.
Reasons I liked Shiny the most:
Native integration with Quarto.
A powerful reactive model that is snappy.
A small API that is easy to learn and keep in your head.
Amazing WASM support, for example I have embedded a version of the app in this blog post!
I found that Shiny apps always required much less code and were easier to understand than the other frameworks.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み