[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")

Aperta Adatta ai principianti
#6,984 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 5 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Inizia da terminal/serve/server.py:765, dove self.inkling_engine è impostato da inkling_kind.is_inkling_exe(exe), poi leggi inkling_kind.py per confrontare is_inkling_exe con is_inkling(cfg) (arch inkling2_loop o riferimento al componente). Segui il flag fino alla configurazione degli stop-id intorno a server.py:4142-4147 e al controllo Hy4 che la rispecchia. Riproduci con un profilo wrapper exe.sh e una richiesta chat con max_tokens: 200; fatto significa che finish_reason è stop attraverso il wrapper, senza regressioni per exe nominati direttamente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.

Lingua principale
C++
Stelle
11.6k
Fork
1k
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Niko1221/Strata

Tutte le issue di Niko1221/Strata

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.