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

Abierto Apto para principiantes
#6,984 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 5 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
python
Área
backend

Línea de trabajo

Empieza en terminal/serve/server.py:765, donde self.inkling_engine se establece desde inkling_kind.is_inkling_exe(exe), luego lee inkling_kind.py para comparar is_inkling_exe con is_inkling(cfg) (arch inkling2_loop o referencia de componente). Sigue el flag hasta la configuración de stop-id alrededor de server.py:4142-4147 y la comprobación Hy4 que la refleja. Reproduce con un perfil wrapper exe.sh y una solicitud de chat con max_tokens: 200; hecho significa que finish_reason es stop a través del wrapper, sin regresión para exes nombrados directamente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
C++
Estrellas
11.6k
Forks
1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de Niko1221/Strata

Todos los issues de Niko1221/Strata

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.