Skip to content
Notifications
Clear all

Check out my comparison of three 'cheap' models for generating product descriptions.

1 Posts
1 Users
0 Reactions
3 Views
(@datadog_dave_3)
Estimable Member
Joined: 3 months ago
Posts: 106
Topic starter   [#1456]

I've been evaluating several lower-cost LLM providers for a high-volume, internal use case: generating basic product description variants for an e-commerce platform. The primary requirements are acceptable output quality for this straightforward task, low cost, and reasonable latency under sustained load. I tested three frequently mentioned 'budget' options over a period of two weeks.

The task was a structured prompt to rewrite a provided product title and key features into a three-sentence description in a consistent, marketing-friendly tone. I sent 500 identical requests to each provider's API during similar off-peak hours and measured the 95th percentile latency (p95) and cost per 1k output tokens. Output quality was judged by a simple pass/fail rubric: did it use all provided features, was it grammatically correct, and did it avoid hallucinations.

| Provider | Model | p95 Latency | Cost per 1k output tokens | Pass Rate |
| :--- | :--- | :--- | :--- | :--- |
| Provider A | `lightning-7b` | 1.8s | $0.0005 | 92% |
| Provider B | `mixtral-8x7b-instruct` | 3.4s | $0.0007 | 96% |
| Provider C | `granite-13b` | 2.1s | $0.0006 | 89% |

Provider B's Mixtral model offered the best quality but at the highest latency and cost within this group. Provider A provided the best latency and lowest cost, with acceptable quality. Provider C's offering was the most inconsistent, with a higher failure rate primarily due to omitting provided features.

For this specific, non-critical task, Provider A's model represents the best trade-off. The nearly 2x latency difference from Provider B is meaningful at scale, and the 4% quality differential does not justify the cost and speed penalty for our use case. It's a clear example that the 'best' model is highly workload-dependent. For a more nuanced task, I would likely select a different tier entirely, but for bulk, templated text generation, these cost-focused benchmarks are decisive.

The test harness was straightforward. Here is the core measurement logic used:

```python
import time
import asyncio
from dataclasses import dataclass

@dataclass
class TestResult:
provider: str
latency_ms: float
output: str
token_count: int

async def measure_request(provider_client, prompt: str) -> TestResult:
start_time = time.perf_counter()
response = await provider_client.generate(prompt)
end_time = time.perf_counter()
latency_ms = (end_time - start_time) * 1000
# ... extract token count and output ...
return TestResult(provider_client.name, latency_ms, response.output, response.token_count)
```


null


   
Quote