Unexpected output <eos><eos>.... on ios

#2
by neozhaoliang - opened
LiteRT Community (FKA TFLite) org

Hi, I’m a developer based in mainland China. I’m using this model on iOS, and I’m running mobile_actions_q8_ekv1024.litertlm with the LiteRT-LM Swift API and native Tool calling, but I’m seeing an intermittent issue and would really appreciate any help identifying the cause.

Sometimes sendMessage() succeeds, but the returned model output degenerates into repeated <eos> tokens instead of producing either a valid tool call or a normal final response after tool execution.

Environment:

  • Platform: iOS app / iOS Simulator
  • Runtime: LiteRT-LM Swift API
  • Model: mobile_actions_q8_ekv1024.litertlm
  • Tool mode: native LiteRT-LM Tool API
  • Config: ConversationConfig(tools: ...)
  • Sampling: topK = 20, topP = 0.9, temperature = 0.1
  • Flags:
    • convertCamelToSnakeCaseInToolDescription = true
    • enableConversationConstrainedDecoding = true

Current flow:

  1. Swift tools are registered with ConversationConfig(tools: ...)
  2. LiteRT-LM renders the tool schema internally
  3. LiteRT-LM executes the matched Swift tool
  4. Tool responses are fed back to the model automatically
  5. The app reads executed intents from local runtime state

This is not the old/manual path where the app parses raw FunctionGemma <start_function_call>... text.

Inputs that may trigger it include:

  • 太暗了,要亮点
  • 再亮一点
  • 放大一点
  • 打开补光灯
  • 恢复默认

Example:

let result = try await agent.handleUserUtterance("太暗了,要亮点")
print(result.intents)
print(result.responseText)

Actual output preview:

...

Has anyone seen this behavior with LiteRT-LM Swift native tools, constrained decoding, or this mobile-actions model? Any suggestions on how to debug whether this comes from decoding, tool schema rendering, tool response formatting, or model behavior would be very helpful. Thank you!

Sign up or log in to comment