---
title: Four Models Built an Arabic RTL Page. One Got the Slash Right.
description: 'All four built a working Arabic RTL docs page from one prompt. Only Claude kept inline /analyze paths LTR. Median time: 18.1s to 2:34.'
url: https://nerdleveltech.com/arabic-rtl-docs-bakeoff
language: en
date: '2026-11-29'
updated: '2026-11-29'
category: ai-ml
tags:
  - Qwen3.8
  - Gemma 4
  - Inkling 2 Mini
  - Claude Haiku 5.5
  - Arabic RTL
  - Arabic
  - RTL
  - local LLMs
  - benchmarking
markdown_url: https://nerdleveltech.com/arabic-rtl-docs-bakeoff.md
attribution: 'Source: NerdLevelTech — https://nerdleveltech.com/arabic-rtl-docs-bakeoff'
terms: https://nerdleveltech.com/llms.txt
---

# Four Models Built an Arabic RTL Page. One Got the Slash Right.

All four models produced a complete Arabic RTL documentation page from one prompt. All four set `dir="rtl"`, wrote Arabic prose, built the nav, search and dark mode, and cleared the functional bar in at least two runs.

Then I looked at the endpoint table. Three of them rendered `/analyze` as `analyze/`.

That is bidi. The slash has no strong direction. Inside an RTL paragraph, an inline `<code>` element inherits the RTL direction, so the browser puts the slash on the right. The page still passes a basic "is it RTL?" check. It is still wrong.

This is one prompt, four models, three runs each. Claude Haiku 5.5 was fastest and the only one that got inline bidi right. Gemma 4 31B was the fastest local model. Qwen3.8 27B produced the most page for the most tokens. Inkling 2 Mini was slowest and deterministic.

## TL;DR

- **Claude Haiku 5.5:** 18.1 s median, 4,573 tokens, 18/18 checks in all three runs, and **4/4** inline paths correct. API wall time includes network.
- **Gemma 4 31B:** 46.8 s median, 2,874 tokens, 18/18 in all three runs, but **0/3** inline paths correct. This is the fastest local model and the token-efficiency winner.
- **Qwen3.8 27B:** 2:27 median, 12,919 tokens, a 37.6 KB page with a hero, stats and a sidebar. It scored 17/18 in run 1 (a 451 px mobile overflow) and 18/18 in runs 2 and 3. Inline paths: **0/6**.
- **Inkling 2 Mini:** 2:34 median, 6,739 tokens, 18/18 in all three runs, **0/4** inline paths. The three outputs are byte-identical.
- **215 of 216 functional checks passed.** The only miss is Qwen run 1. The functional checklist is a floor, not a grade.
- The bidi fix is one CSS rule: `code { direction: ltr; unicode-bidi: isolate; }`. Only Claude shipped it.
- The 12 raw pages, exact prompt, 18-check suite, bidi audit and screenshots are in the [pack](https://nerdleveltech.com/benchmarks/arabic-rtl-docs-bakeoff/index.html) ([zip](https://nerdleveltech.com/benchmarks/arabic-rtl-docs-bakeoff/arabic-rtl-docs-bakeoff-pack.zip)).

## What I tested

| Item | Value |
|---|---|
| Date | 2026-11-29 |
| Host | Mac Studio, Apple M3 Ultra, 96 GB, macOS 15.7.4 |
| Task | One-page Arabic docs site for a fictional NLT API, single `index.html` |
| Models | Qwen3.8 27B, Gemma 4 31B, Inkling 2 Mini, Claude Haiku 5.5 |
| Runs | 3 per model, 12 pages total |
| Decoding | temperature 0, 24,576 output cap, 32,768 context |
| Local state | warm. Cold load was 3.9 to 4.3 s and is excluded from the timed runs |
| Checks | 18 functional checks, fixed before the runs |
| Bidi audit | separate from the 18. Added after the pages were generated |
| Selection | run 1 is the published representative. All runs are in the pack |

The prompt asked for five Arabic sections (`نظرة عامة`, `البدء السريع`, `المصادقة`, `نقاط النهاية`, `الأخطاء`), exact section IDs, a search box with a no-results message, a dark-mode button, LTR code blocks, responsive layout at 390 px and 1440 px, and no external assets. The full text is in the pack at `prompt.md`.

The models:

Qwen3.8 27B runs as `qwen3.8:27b-mlx` on Ollama 0.40.16 in NVFP4. Gemma 4 31B runs as `gemma4:31b-mlx` on the same server. Inkling 2 Mini runs as `inkling-local-chat` on an isolated Ollama 0.40.18 build with the `inkling2` renderer and parser. Claude Haiku 5.5 runs as `claude-haiku-5-5` through the Anthropic Messages API.

Qwen3.8-27B and Gemma 4 31B are Apache 2.0 vision-language models[^qwen][^gemma]. Inkling 2 Mini is Apache 2.0 and runs here through an isolated Ollama 0.40.18 build[^inkling]. Claude ran through the Messages API with thinking disabled[^haiku]. Local generation used Ollama[^ollama].

## Results

| Model | Median | Tokens | Bidi |
|---|---:|---:|---:|
| Claude Haiku 5.5 | **18.1 s** | 4,573 | **4/4** |
| Gemma 4 31B | 46.8 s | **2,874** | 0/3 |
| Qwen3.8 27B | 2:27 | 12,919 | 0/6 |
| Inkling 2 Mini | 2:34 | 6,739 | 0/4 |

Claude, Gemma and Inkling passed 18/18 in all three runs. Qwen scored 17/18 in run 1 and 18/18 in runs 2 and 3. Page sizes were 8.3 KB, 11.1 KB, 37.6 KB and 15.3 KB respectively. "Tokens" means output tokens. "Bidi" is the inline-path audit, not one of the 18 checks.

![Chart of median wall time and inline bidi correctness. Claude 18.1 seconds and 4/4 paths, Gemma 46.8 seconds and 0/3, Qwen 2:27 and 0/6, Inkling 2:34 and 0/4.](https://nerdleveltech.com/images/arabic-rtl-docs-bakeoff-chart.png)

Median end-to-end throughput was 253.3 tok/s for Claude, 91.2 for Qwen, 61.4 for Gemma and 43.7 for Inkling. Claude's number is API throughput and includes network. The local numbers include prefill and a warm model. Do not read the four numbers as one decode benchmark.

The time spread is the practical story. Claude and Gemma wrote a usable page in under a minute. Qwen and Inkling needed about two and a half minutes. Qwen's end-to-end rate was higher than Gemma's, but it wrote 4.5× as many tokens, so it finished later. The extra tokens bought a hero, four stat cards, a sticky sidebar and copy buttons. They did not buy bidi correctness or a stable mobile layout in run 1.

## The slash is the story

The 18 checks asked whether block code was LTR. All four passed. The checks did not ask whether inline code stayed LTR inside Arabic prose.

Consider this table cell:

```html
<td><code>/analyze</code></td>
```

If the `<code>` element inherits `direction: rtl` and is not isolated, the Unicode bidi algorithm can place the slash on the wrong side. The DOM still reads `/analyze`. The reader sees `analyze/`. The block code below it can be perfectly LTR at the same time.

![Zoomed comparison of the three endpoint paths. Claude shows /analyze, /translate and /models with the slash on the left. Gemma, Qwen and Inkling show analyze/, translate/ and models/ with the slash on the right.](https://nerdleveltech.com/images/arabic-rtl-docs-bakeoff-bidi.png)

The audit finds every `<code>` whose text is a single path such as `/analyze`, then compares the x-position of the slash and the next character. If the slash is to the right of the next character, the visual order is wrong. The counts in the table are the results.

Claude is the only page that includes an explicit isolation rule:

```css
code {
  direction: ltr;
  unicode-bidi: isolate;
}
```

Inkling is the interesting near miss. It sets `direction: ltr` on `code` and `pre`, but leaves `unicode-bidi: normal`. The inline paths still flip. Direction alone is not isolation[^mdn][^uax9].

The fix is cheap. The hard part is noticing. A page can pass every functional check and still ship this bug.

## What each model actually shipped

![Four screenshots of the generated pages: Claude and Gemma compact docs layouts, Qwen a large hero with a sidebar, Inkling a numbered docs layout.](https://nerdleveltech.com/images/arabic-rtl-docs-bakeoff-pages.png)

**Claude Haiku 5.5** wrote the most compact page: 8.3 KB, a sticky header, a search field, a dark-mode button and five sections. It is the only page that isolates inline code. It is also the fastest. The trade-off is an API dependency and a network round trip. For a docs page that has to be correct on the first try, that was the best result here.

**Gemma 4 31B** wrote an 11.1 KB page with the same core features and no hero. It was the fastest local model at 46.8 s and used 2,874 tokens. It scored 18/18 in every run. The endpoint table still flips the slash, which is one CSS rule away from correct. If I had to ship a local page from this test, this is the one I would fix and use.

**Qwen3.8 27B** wrote the most page: 37.6 KB, a large Arabic hero, four stat cards, a sticky sidebar, syntax-highlighted code windows and copy buttons. It also used 12,919 tokens and 2:27. Run 1 overflowed a 390 px viewport to 451 px, which is a real mobile bug. Runs 2 and 3 passed. All six inline paths flipped. The extra design work is visible, but it did not make the page more correct.

**Inkling 2 Mini** wrote a 15.3 KB page with numbered sections and a clean reading column. It was the slowest at 2:34 and produced byte-identical output in all three runs. It passed 18/18 every time. The inline paths still flipped because it set direction without isolation. A deterministic page is useful for caching and review, but this one is not fast enough to be the default for a one-page build.

## Why the checklist passed

The 18 checks ran in Playwright[^playwright]. They cover the things that usually break in a generated docs page: doctype, `lang="ar"`, `dir="rtl"`, Arabic prose, nav targets, search filtering, a no-results state, dark mode, contrast, code blocks, mobile and desktop overflow, external requests, console errors, the footer and single-file isolation.

They do not cover inline bidi. They also do not score design quality, Arabic copy quality or whether the page is pleasant to read. Those need an editor.

Qwen's run 1 is the useful warning. Runs 2 and 3 passed every check, but the first run had a 451 px scroll width at a 390 px viewport. One run in twelve failed a check that the other eleven passed. A single green run is not a stable result.

The suite is a floor. It catches broken pages. It does not certify a good one.

![Terminal capture of the four-model summary: Claude 18.1 seconds and 4/4 bidi, Gemma 46.8 seconds and 0/3, Qwen 2:27 and 0/6, Inkling 2:34 and 0/4.](https://nerdleveltech.com/images/arabic-rtl-docs-bakeoff-terminal.png)

## Which one would I ship?

- **If an API call is acceptable:** Claude Haiku 5.5. It was fastest, it passed every check in every run, and it was the only model that got inline bidi right. The three test pages cost under one cent in output tokens.
- **If the page must stay local:** Gemma 4 31B plus the CSS isolation rule. It was the fastest local model, the most token-efficient, and it passed 18/18 in all three runs. The bidi bug is a one-rule fix.
- **If you want the elaborate design and can spend the time:** Qwen3.8 27B. Budget about 2.5 minutes and 13k tokens per page, then fix the mobile overflow and the bidi. The page is the most designed of the four, but it is not the most correct.
- **If you need deterministic output:** Inkling 2 Mini. The three runs are byte-identical. It is also the slowest, and it still needs the bidi fix.

The broader lesson is about the last 5% of an RTL page: inline code, table cells, punctuation and the mobile edge. A model that writes 37 KB of CSS can still miss a slash.

## Production notes

The local models cost $0 in API spend. Claude used 13,608 output tokens across three runs, about **$0.007** at $0.50 per million output tokens, plus input tokens. Under one cent for the set.

Local model load was 3.9 to 4.3 s. The timed runs are warm. Claude's wall time includes network.

The published pages are static and sandboxed with a CSP that blocks external requests. The fictional `api.nlt.example` endpoint is never called.

The only credential-shaped strings are the literal placeholders `Bearer YOUR_API_KEY` and `$NLT_API_KEY`. The pack has no API key.

## FAQ

### Did any model break RTL?

No. All four set `<html lang="ar" dir="rtl">` and rendered Arabic correctly. The failure is narrower: inline LTR code inside RTL prose and table cells. Three models let the slash move.

### Why did Claude pass the bidi check?

Its CSS includes `direction: ltr` and `unicode-bidi: isolate` on inline code. The other pages either omit direction on inline code (Qwen, Gemma) or set direction without isolation (Inkling). `unicode-bidi: isolate` is the part that keeps the inline run from being reordered by the surrounding RTL paragraph.

### Is Qwen's page better because it is bigger?

It is more designed. It has a hero, stat cards, a sidebar and copy buttons. It is not more correct: 12,919 tokens, 2:27, a 451 px mobile overflow in run 1, and 0/6 inline paths. Bigger is a design choice, not a quality score.

### Why is Claude's throughput 253 tok/s?

That is end-to-end output tokens divided by wall time. It includes the API network and the service's serving stack. The local numbers are warm Ollama runs on one machine. The four throughput numbers are not a like-for-like decode benchmark.

### Can I reproduce it?

Yes. The [pack](https://nerdleveltech.com/benchmarks/arabic-rtl-docs-bakeoff/index.html) has the exact prompt, all 12 raw pages, every run's timings and token counts, the 18-check results, the bidi audit, screenshots and the scripts. The [zip](https://nerdleveltech.com/benchmarks/arabic-rtl-docs-bakeoff/arabic-rtl-docs-bakeoff-pack.zip) is self-contained.

### Which model should I use?

For an API-backed docs build, Claude Haiku 5.5. For a local build, Gemma 4 31B plus the bidi CSS. For a more elaborate local design, Qwen3.8 27B, with the mobile and bidi fixes. Inkling 2 Mini is the deterministic option, not the fast one.

### Did you use thinking mode?

No. All three local models ran with `think: false`. Claude ran with thinking disabled. Inkling produced a complete page without thinking, so the comparison did not need a reasoning budget. That also keeps the wall times closer to a first-shot build.

### Is this a general model ranking?

No. It is one prompt, one page, three runs, one machine and one target language. The useful result is the failure mode, not a leaderboard position.

## Limitations

- **One prompt, one page, three runs.** This is not a general model ranking.
- **No human evaluation.** The 18 checks are automatic. The bidi audit is targeted. A native editor would still find copy and typography issues.
- **Chrome only.** No Firefox, Safari or screen-reader pass.
- **Different runtimes.** Qwen and Gemma ran on Ollama 0.40.16. Inkling ran on an isolated 0.40.18 build. Claude is an API model. The comparison is not parameter-matched.
- **Warm local runs.** Cold load is reported separately and excluded from the medians. Claude includes network latency.
- **Qwen run 1 is published as-is.** Its 451 px mobile overflow is real. Runs 2 and 3 pass. The pack includes all three.
- **The bidi audit was added after the pages were generated.** It applies the same rule to every model, but it is not part of the pre-registered 18 checks.
- **The NLT API is fictional.** The endpoint is never called. The pages are static artifacts, not a production service.

## Related reads

- [Hy-MT3 vs Qwen3.8 vs Haiku 5.5: Arabic Translation Test](https://nerdleveltech.com/hy-mt3-qwen3-8-haiku-arabic-translation-benchmark)
- [Hy-MT3 1.8B: Small Arabic Translation Model Test](https://nerdleveltech.com/hy-mt3-1-8b-arabic-translation-test)
- [Inkling 2 Mini on Mac Studio: Real Local Tests](https://nerdleveltech.com/inkling-2-mini-mac-studio-local-tests)
- [Running LLMs Locally: The Complete Practitioner's Guide](https://nerdleveltech.com/running-llms-locally-the-complete-2025-guide)

[^qwen]: Qwen, "Qwen3.8-27B-FP8" model card: 27B dense vision-language model, 262,144-token context, Apache 2.0. https://huggingface.co/Qwen/Qwen3.8-27B-FP8
[^gemma]: Google, "Gemma 4 31B" model card: 31B vision-language model, Apache 2.0. https://huggingface.co/google/gemma-4-31B-it
[^inkling]: Thinking Machines, "Inkling 2 Mini" model card: 26.4B total / 3.4B active mixture-of-experts, Apache 2.0. https://huggingface.co/thinkingmachines/Inkling-2-Mini
[^haiku]: Anthropic, "Pricing," Claude Haiku 5.5: $0.10 input / $0.50 output per million tokens up to 100K-token prompts. https://platform.claude.com/docs/en/about-claude/pricing
[^ollama]: Ollama, local model runtime. https://ollama.com
[^mdn]: MDN Web Docs, "unicode-bidi" CSS property. https://developer.mozilla.org/en-US/docs/Web/CSS/unicode-bidi
[^uax9]: Unicode Consortium, "Unicode Bidirectional Algorithm," UAX #9. https://www.unicode.org/reports/tr9/
[^playwright]: Playwright, browser automation used for the 18 checks. https://playwright.dev
