Liquid AI、CPU で高速な 8K コンテキスト対応バイディレクショナルエンコーダーを公開
Liquid AI は CPU で 8K コンテキストを高速に処理できる双方向エンコーダー「LFM2.5-Encoder」シリーズを公開し、大規模モデルと同等の精度を小型で実現した。
AI深層分析を開く2026年7月29日 19:16
AI深層分析
キーポイント
CPU 最適化された双方向エンコーダーの公開
Liquid AI は LFM2.5-Encoder-230M と 350M の二つのオープンウェイトモデルをリリースし、GPU を使用せずに CPU で 8,192 トークンのコンテキストを高速処理可能とした。
デコーダーからの転用とアーキテクチャ変更
両モデルは既存のデコーダーバックボーンから初期化され、因果的アテンションマスクを双方向へ変更し、対称パディングによる非因果的短縮畳み込みを導入して構築された。
高精度なベンチマーク結果
17 タスクの平均スコアで 350M モデルが 81.02 を記録し、XLM-R XL や ModernBERT-large などより大型のモデルに匹敵する性能を発揮した。
多言語対応とライセンス
両モデルは 1,024 トークンでの一般言語能力習得後に 8,192 トークンへ拡張して訓練され、15 か国語に対応し LFM Open License v1.0 で公開される。
ベンチマークでの高性能
LFM2.5-Encoder-230M は EuroBERT や Liquid AI 自身の検索用モデルを凌駕するスコアを記録し、特に長文処理において優位性を示している。
重要な引用
Liquid AI has released two open-weight bidirectional encoders, LFM2.5-Encoder-230M and LFM2.5-Encoder-350M.
LFM2.5-Encoder-350M posts a 17-task mean of 81.02 (±1.00), ranking fourth.
The top model is nearly 10 times its size.
8,192 tokens is roughly 13 to 15 pages. One forward pass covers a full contract or a complete patient record.
編集コメントを表示
編集コメント
本モデルは GPU 依存からの脱却と長文処理の両立という、実務現場の課題に直接応えるアプローチを示している。特に CPU 環境での高速化は、コスト敏感なユースケースにおいて即座に採用検討の対象となり得る。
Source Article
元記事を日本語で読む
本文に関係しない購読案内、埋め込み通知、サイト内プロモーションは除いています。
Liquid AI は、LFM2.5-Encoder-230M と LFM2.5-Encoder-350M という 2 つのオープンウェイト双方向エンコーダーを公開しました。これらは LFM2 ハイブリッドバックボーンを基盤としたマスク言語モデルで、8,192 トクンのコンテキスト長に対応しています。
エンコーダーは、分類器や意図ルーター、安全フィルター、PII(個人識別情報)検出器などの下層に位置し、これらのタスクは GPU を使わずに継続的に実行されることが多く、入力長も次第に伸びています。BERT がこのカテゴリを確立し、ModernBERT が精度・速度・コンテキスト長をさらに向上させました。Liquid AI の主張は、LFM2 アーキテクチャがこの流れを引き継ぐ点にあります。それは、入力が長くなるにつれてコストの増加が緩やかだからです。
デコーダーからエンコーダーへの変換方法
これらのエンコーダーはゼロから訓練されたわけではありません。LFM2.5-230M および LFM2.5-350M のデコーダーバックボーンを初期値とし、以下の 3 つの変更を加えて変換しました。
第一に、因果的なアテンションマスクを双方向のものに置き換え、すべてのトークンが両側の情報を参照できるようにしました。
第二に、LFM2 の短距離コンボリューションを非因果的なものに変換します。対称的な中央パディングを用いることで、各トークンのコンボリューションが左右の近傍トークンを混合できるようになります。
第三に、モデルは 30% のマスクレートでマスク言語モデリング(MLM)目標のもとで訓練されます。これは BERT の 15% よりも密度が高く、Liquid AI が引用するエビデンスによると、この規模では高いマスクレートが有効であるという根拠に基づいています。
学習は 2 つのステージで行われます。
第一段階では、大規模なウェブコーパスを用いて 1,024 トクンの短コンテキストで MLM 目標を達成し、一般的な言語能力を確立します。
第2段階では、データセット全体を用いてコンテキスト長を 8,192 トークンに拡張し、事実認識能力、法的知識、多言語対応力を強化しました。
アーキテクチャ面では、ゲート付き短距離畳み込みブロックとグループ化クエリアテンションを交互に配置したバックボーンを採用しています。これは LFM2 技術レポートで記述された設計と同じです。両モデルとも隠れ層サイズは 1024、語彙数は 65,536 トークンで、15 か国語に対応します。ライセンスは「LFM Open License v1.0」です。
以下の埋め込みコードでは、変換プロセス、全体ランキング表、各タスクごとのスコア、CPU レイテンシの数値を詳しく解説しています。
ベンチマーク結果
Liquid AI は GLUE、SuperGLUE、多言語分類から抽出した 17 のタスクにおいて、14 モデルを評価しました。すべてのモデルは各タスクごとに完全にファインチューニングされており、報告されているスコアはそのファインチューニング済みモデルの結果です。
LFM2.5-Encoder-350M は 17 タスクの平均スコアが 81.02(±1.00)で、4 位にランクインしました。それより上位の 3 モデルはいずれもサイズが大きいです。具体的には、XLM-R XL が 3.5B で 83.06、ModernBERT-large が 395M で 81.68、XLM-R large が 560M で 81.34 です。トップモデルは LFM2.5-Encoder-350M の約 10 倍のサイズです。
LFM2.5-Encoder-230M は 79.29 (±1.02) のスコアを記録し、総合ランキングで 6 位に食い込みました。これは ModernBERT-base の 78.19 を上回るだけでなく、表に掲載されているすべての EuroBERT モデル(EuroBERT-610M: 75.87、EuroBERT-2.1B: 72.19)も凌駕しています。さらに、Liquid AI 自社の検索用モデルである LFM2.5-ColBERT-350M (76.18) や LFM2.5-Embedding-350M (75.68) よりも高いスコアを叩き出しました。
この差こそが、Liquid AI が既存の検索用モデルを流用するのではなく、汎用的なエンコーダーを新たに構築した理由です。
より興味深いのはその手法で、こちらは Apache-2.0 ライセンスの下でオープンソース化されています。すべてのモデルは fp32 のマスター重みを読み込み、bf16 autocast を適用しています。つまり、この比較表は数値形式の違いではなく、モデル自体の性能差を示しているのです。
学習には EuroBERT のカードに記載されている AdamW のレシピをそのまま採用しました。学習率については、各モデルとタスクごとに 10 種類の候補から選択し、3 つのシードで評価を行いました。最終的なスコアは、選定プロセスに一度も関与していない 5 つの新しいシードの結果平均として報告されています。
また、依存関係のズレが制御不能な変数となるのを防ぐため、transformers のバージョンは 4.56.2 に固定しています。
使用例とデプロイ環境
今回のリリースでは、3 つの主要なユースケースを想定しています。
まず挙げられるのはエッジデバイスや組み込み機器です。自動車の車載コンピューターや産業用コントローラーには余剰な GPU がなく、クラウドへの往復通信にかかるコストも許容できません。
次に、金融、医療、法務分野における規制対応型およびオンプレミスシステムです。これらの領域では文書が長く、機密性が高いため、社内のインフラからデータが流出することは絶対に避けなければなりません。
そして最後に、大量処理かつコスト敏感なパイプラインです。ここでは小型のエンコーダーを、より大規模なモデルの前段に配置する「安価な第一段階」として活用します。
Liquid AI は、コンテキストウィンドウの規模についても具体的な数値を示しています。8,192 トークンはおよそ 13〜15 ページ分に相当し、1 回の順方向計算で契約書全体や患者記録を完全に処理できます。
微調整済みエンコーダーがどのようなものかを実演するために、研究チームは 5 つのデモを用意しました。いずれも CPU のみで動作する Hugging Face Space で実行可能です。これらはゼロショットプロンプトラウティング、ゼロショットポリシーリンティング、スペルチェックをカバーしています。また PII(個人識別情報)検出器は、16 か国語にわたる 40 種類の情報を処理します。さらに、マスク付き拡散モデルのデモでは、エンコーダーをチャットボットとして活用し、反復的にマスクを解除しながら生成を行う仕組みも実装されています。
実行方法について
両方のエンコーダーは transformers ライブラリを通じて読み込まれます。本体は Lfm2BidirectionalModel として公開され、マスク付き LM の読み込みには Lfm2BidirectionalForMaskedLM が使用されます。auto_map を通じて接続されているため、すべての読み込み呼び出しで trust_remote_code=True を設定する必要があります。
ベースとなるエンコーダーは汎用的な表現を生成するものであり、タスクごとの出力そのものではありません。そのため、微調整が必須となります。Liquid AI の微調整チュートリアルでは、8k コンテキスト設定での長文の法律ドキュメントを例に解説されています。モデル選択の指針もシンプルで、精度が最優先の場合は 350M モデルを、ハードウェア制約が厳しい場合やスループット重視の場合は 230M モデルを選ぶのが推奨されます。
主なポイント
Liquid AI は、8,192 トークンのコンテキスト長をサポートするオープンウェイトの双方向エンコーダー「LFM2.5-Encoder-230M」と「LFM2.5-Encoder-350M」をリリースしました。
両モデルは、双方向マスクや因果関係を持たない短い畳み込み(convolutions)、そして 30% の語彙予測(MLM)タスクを通じて、元々の LFM2.5 デコーダーをエンコーダーへと変換しています。
8,192 トークンのコンテキスト長での評価では、LFM2.5-Encoder-350M は 14 モデル中 4 位(スコア 81.02)を獲得しました。上位 3 つのモデルはいずれもパラメータ数がより大きいものです。
CPU 上で 8K トークンを処理する際、LFM2.5-Encoder-230M は約 28 秒で 1 フォワードパスを完了します。一方、同等規模の ModernBERT-base では 90 秒以上を要しました。
詳細は Liquid AI の公式ブログ、Hugging Face の解説記事、および各モデルカードをご確認ください。
原文を表示
Liquid AI has released two open-weight bidirectional encoders, LFM2.5-Encoder-230M and LFM2.5-Encoder-350M. Both are masked language models built on the LFM2 hybrid backbone. Both carry an 8,192-token context.
Encoders sit underneath classifiers, intent routers, safety filters, and PII detectors. Those jobs run continuously, usually without a GPU, and increasingly on longer inputs. BERT established the class. ModernBERT pushed its accuracy, speed, and context. Liquid AI’s argument is that the LFM2 architecture continues that line, because its cost grows more slowly as inputs get longer.
How a decoder became an encoder
The encoders are not trained from scratch. They are initialized from the LFM2.5-230M and LFM2.5-350M decoder backbones, then converted with three changes:
First, the causal attention mask is replaced with a bidirectional one, so every token attends to both sides.
Second, the LFM2 short convolutions are made non-causal using symmetric center padding, so each token’s convolution mixes in neighbours on both sides.
Third, the model is trained with a masked language modeling objective at a 30% mask rate. That is denser than BERT’s 15%, following evidence Liquid AI cites that a higher mask rate helps at this scale.
Training runs in two stages:
Stage one establishes general language competence with a short-context MLM objective on a large web corpus at 1,024 tokens.
Stage two extends context to 8,192 tokens on the full data mix, strengthening factual, legal, and multilingual competence.
Architecturally, the backbone interleaves gated short-convolution blocks with grouped-query attention, the same design described in the LFM2 technical report. Both checkpoints use a hidden size of 1024 and a 65,536-token vocabulary, and support 15 languages. The license is the LFM Open License v1.0.
The embed below breaks down the conversion, the full ranking table, the per-task scores, and the CPU latency figures.
The benchmark results
Liquid AI evaluated 14 models on 17 tasks pulled from GLUE, SuperGLUE, and multilingual classification. Every model is fully fine-tuned per task, and the reported score is that fine-tuned model’s result.
LFM2.5-Encoder-350M posts a 17-task mean of 81.02 (±1.00), ranking fourth. The three models ahead of it are all larger. They are XLM-R XL at 3.5B (83.06), ModernBERT-large at 395M (81.68), and XLM-R large at 560M (81.34). The top model is nearly 10 times its size.
LFM2.5-Encoder-230M posts 79.29 (±1.02), ranking sixth. It beats ModernBERT-base at 78.19 and every EuroBERT model in the table, including EuroBERT-610M (75.87) and EuroBERT-2.1B (72.19). Both new encoders also score above Liquid AI’s own retrieval siblings, LFM2.5-ColBERT-350M (76.18) and LFM2.5-Embedding-350M (75.68). That gap is the stated reason Liquid AI built a general-purpose encoder instead of reusing the retrievers.
The methodology is the more interesting part, and it is open-sourced under Apache-2.0. Every model is loaded with fp32 master weights and bf16 autocast, so the table compares models rather than number formats. Every model uses the same AdamW recipe, taken from the EuroBERT card. Learning rate is selected per model and task across 10 rates and 3 seeds. Scores are then reported as the mean over 5 fresh seeds that never touched selection. The transformers version is pinned to 4.56.2 so dependency drift is not an uncontrolled variable.
Use Cases and Deployment Environments
The release names three settings. Edge and embedded devices come first. A car’s onboard compute or an industrial controller has no spare GPU, and cannot afford a cloud round trip. Regulated and on-premise systems in finance, healthcare, and legal, where documents are long, sensitive, and cannot leave in-house infrastructure. And high-volume cost-sensitive pipelines, where a small encoder acts as a cheap first pass in front of a larger model.
Liquid AI also puts a useful number on the context window: 8,192 tokens is roughly 13 to 15 pages. One forward pass covers a full contract or a complete patient record.
To show what a fine-tuned encoder looks like, the research team shipped five demos. Each runs in a CPU-only Hugging Face Space. They cover zero-shot prompt routing, zero-shot policy linting, and spell checking. A PII detector handles 40 information types across 16 languages. A bonus masked-diffusion demo runs the encoder as a chatbot that generates by iteratively unmasking.
Getting them running
Both encoders load through transformers. The body is exposed as Lfm2BidirectionalModel and masked-LM loading uses Lfm2BidirectionalForMaskedLM. Both are wired through auto_map, so trust_remote_code=True is required on every load call.
A base encoder produces general-purpose representations, not task outputs, so fine-tuning is mandatory. Liquid AI’s fine-tuning tutorial walks through long legal documents at an 8k context configuration. The model selection guidance is straightforward: 350M when accuracy matters most, 230M for tighter hardware or higher throughput.
Key Takeaways
Liquid AI released LFM2.5-Encoder-230M and LFM2.5-Encoder-350M, open-weight bidirectional encoders with 8,192-token context.
Both convert LFM2.5 decoders into encoders via bidirectional masking, non-causal short convolutions, and 30% MLM.
LFM2.5-Encoder-350M ranks 4th of 14 models at 81.02; the three above it are all larger.
At 8K tokens on CPU, the 230M runs one forward pass in ~28s versus over 90s for ModernBERT-base.
Check out the Liquid AI blog post, the Hugging Face write-up, and the model cards for LFM2.5-Encoder-230M and LFM2.5-Encoder-350M.
The post Liquid AI Releases LFM2.5-Encoder-230M and LFM2.5-Encoder-350M: Bidirectional Encoders That Stay Fast at 8K Context on CPU appeared first on MarkTechPost.
AI算出
主要ニュースainew評価標準
LFM2.5 ベースの双方向エンコーダーという新モデルと、8K コンテキストでの CPU 最適化という技術的実装が明記されており、AI モデルの最新動向として高い関連性と新規性を持つ。ただし、日本企業や日本語特有の文脈は含まれていないため、日本の関連性は低めとなる。
6つの評価軸を見る
- AI関連度
- 100
- 情報源の信頼性
- 25
- 新規性
- 75
- 調べる価値
- 75
- 重複の少なさ
- 100
- 日本での有用性
- 25
関連記事
今日のまとめ
AIデイリーブリーフで今日の重要ニュースをまとめ読み