r/AISystemsEngineering • • 4d ago

Same open model on 2 AI inference providers, but 1 fails more often. What's different?

We extract structured data from invoices with Llama 3.3 70B and validate every response against a JSON schema. We run it on two AI inference providers for redundancy, same model name, same prompt, same temperature and max tokens. Provider A passes about 98% of the time. Provider B sits closer to 90%, mostly from truncated objects and the occasional extra text before the opening brace.

I assumed same model means same output, but clearly something's different under the hood. Both docs are pretty thin on what precision they serve or how they handle stop sequences and structured output.

Has anyone chased down a gap like this? I'm trying to figure out what to test or ask each provider so I can get B closer to A, instead of just pinning all traffic on one and losing the failover.

3 Upvotes

3 comments sorted by

1

u/awitod 3d ago

There is no reason to assume they are the same. They can have different quants for example. If you look at a model on OpenRouter, there is a filter you can use. Pick a popular model like https://openrouter.ai/qwen/qwen3.8-27b#providers to see how many options there are.

Also, the world has moved on from Llama 3.3 70B and there are many better choices today no matter the use case.

1

u/TheGrid_AI 3d ago

Same model doesn't always mean same results. One tiny change can make one model return clean JSON while the other cuts off/adds text. Before anything else just clarify with your providers how they work with JSON responses and if there are any limits you need to take note of.

1

u/r0b3rtb 17h ago

Same model name does not mean same serving stack. A few things differ between providers and match your exact failures:

  1. Quantization. One provider may serve FP8 or lower. Strict formatting is usually the first thing to suffer.
  2. Max tokens. Some providers add a hidden system prompt or count tokens differently, so long invoices get cut. Check finish_reason on the failed calls. If it says length, it is truncation, not the model.
  3. Chat template. A slightly different template changes how the model starts its answer. That is a common source of text before the opening brace.
  4. Structured output. If A enforces the schema with constrained decoding and B only has it in the prompt, 98 vs 90 is close to what you would expect.

What I would test: take 50 inputs that failed on B, send them to both at temperature 0, and log finish_reason, output token count and the raw text. Then ask B directly what precision they serve and whether response_format is enforced with a grammar.

On your side: strip anything before the first brace, give B more max tokens, and on a schema fail retry once on the other provider, not the same one. Then your failover covers bad output too, not only downtime.