[Engine] strata serve only treats an engine as Inkling when the exe basename starts with strata-inkling (behind a wrapper every reply ends with finish_reason "length")

オープン 初心者向け
#6,984 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 5 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
72/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
python
領域
backend

調査の方向性

terminal/serve/server.py:765 から始めてください。ここで self.inkling_engine は inkling_kind.is_inkling_exe(exe) から設定されます。次に inkling_kind.py を読み、is_inkling_exe と is_inkling(cfg) を比較します(arch inkling2_loop またはコンポーネント参照)。flag をたどって server.py:4142-4147 周辺の stop-id 設定と、それを反映する Hy4 チェックまで進みます。exe.sh wrapper プロファイルと max_tokens: 200 の chat リクエストで再現します。完了とは、wrapper 経由で finish_reason が stop であり、直接名指しした exe に回帰がないことです。

索引モデルが issue の本文から書いたものです。

説明

Area: serve (Inkling-2-Mini)
Version: found on 0.1.65 / main 26350e43, still present on main 6a6db7ff
Hardware: Intel Arc Pro B60 (SYCL), but the check is backend-independent

What happens

If the profile's exe points to a wrapper script (for example exe.sh, which sets env vars and then runs strata-inkling), the server does not recognise the engine as Inkling-2-Mini:

  • the Inkling end token <|content_model_end_sampling|> is not added to the stop ids, so every reply runs to max_tokens and ends with finish_reason: "length". Agent clients (we used pi) then refuse the tool calls in the reply;
  • Inkling's sampling keys and channel tags are not applied either.

The engine itself works fine: the same wrapper renamed to strata-inkling-b60 gives finish_reason: "stop" and normal tool calls.

Why

terminal/serve/server.py:765 sets self.inkling_engine = inkling_kind.is_inkling_exe(exe), which only looks at the basename prefix (inkling_kind.py:35, EXE_PREFIX = "strata-inkling"). The stop ids (server.py:4142-4147) follow from that flag. inkling_kind.is_inkling(cfg) already accepts cfg["arch"] == "inkling2_loop" or the component reference, but server.py does not use it.

Repro
  1. Profile for Inkling-2-Mini with "exe": "/path/to/exe.sh", where exe.sh is #!/bin/sh\nexec /path/to/strata-inkling "$@".
  2. strata serve, send any chat request with max_tokens: 200.
  3. Actual: the reply always ends at 200 tokens with finish_reason: "length". Expected: "stop" at the end token.
Suggested fix

Decide with the config as well, e.g. pass the profile cfg to the engine wrapper and use inkling_kind.is_inkling(cfg) or inkling_kind.is_inkling_exe(exe) at server.py:765 (the same for the Hy4 check), or log a warning when the model arch is inkling2_loop but the exe name does not match. Not tested.

主要言語
C++
スター
11.6k
フォーク
1k
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Niko1221/Strata のほかの issue

Niko1221/Strata の issue をすべて見る

似ている issue

C++ の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。