Skip to content

Studio: translate the live generation figures, the reply timing tooltip and the weight placement row - #16452

Merged
danielhanchen merged 5 commits into
unslothai:mainfrom
oobabooga:studio-generation-details-i18n
Nov 2, 2026
Merged

danielhanchen merged 5 commits into
unslothai:mainfrom
oobabooga:studio-generation-details-i18n

Conversation

@oobabooga

@oobabooga oobabooga commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

A review of #14909 reported that in another language its new strings stay English, while the Generation details setting itself is translated.

Problem

With the UI in German, a GGUF chat shows "Processing prompt 15% · 4s left · 2.049 / 13.626 tokens · 2.710 tok/s": German digits, English words. The same goes for "Working...", the live line under a streaming reply, every row of the reply's timing tooltip including the new "Stop reason" values, and the "Weight placement" row in Run settings.

Cause

#14909 kept these strings in the code, as its description says ("The live strings are English, like the 'Working...' they replace"). generation-progress.ts and partial-offload.ts build the sentences around numbers already passed through toLocaleString. message-timing.tsx had no translation at all before #14909, which added "Stop reason" and "Draft accepted" to it.

Fix

  • A generationStats namespace in en.ts holds whole templates with placeholders ("{count} tokens", "{eta} left", "{gpu} of {total} layers on the GPU, {cpu} on the CPU"), so each language can order the words around the numbers.
  • formatPrefillDetails, formatPrefillTimeLeft, formatLiveDecode and describePlacement take the t function from useT(), as scheduled-tasks/results.ts does, so they stay plain functions for the tests. The Run settings panel passes the memory pool as "unified" / "shared" instead of English words.
  • The prompt line ("Working..." included, since the two alternate in one span), the live line, the whole timing tooltip with its button label, and the Weight placement row read from the catalog.
  • All 24 overlays carry the new keys, in a separate commit as the i18n README asks, reusing each overlay's existing words for token, prompt, cache, layers, experts, draft and unified memory.
  • The catalog has only a one/other pair, which cannot give Russian "2 токена" and "21 токен" next to "5 токенов". So Russian, Ukrainian, Polish, Czech and Arabic put the count after a label ("токены: 21") wherever it stands before a noun.

Behavior boundaries

  • English output is unchanged; the existing English assertions in generation-details.test.ts pass as they were.
  • "tok/s", GPU, CPU, RAM, VRAM, GiB, MiB and the compact durations ("12s", "2m 10s") stay as they are, as elsewhere in the app.
  • Only these four pieces are moved. The rest of the Run settings panel, the reply's action bar and "Cancelled." were English before Studio: show prompt progress, live generation details and where a GGUF loaded #14909 and still are.

Verification

Live A/B with Playwright on fresh Studio homes, gemma-3-270m-it UD-Q4_K_XL on the CPU, a 13.6K-token prompt, Generation details on, UI in German; main was d8efd157ab for the run below and 6401ceda29 for the screenshot. With this PR the prompt line reads "Prompt-Verarbeitung 15% · noch 4s · 2.049 / 13.645 Tokens · 2.520 tok/s", the live line "130 Tokens · 115,1 tok/s · Draft 107/128 akzeptiert (84%)", and the placement row "Platzierung der Gewichte · Alle 19 Schichten auf der CPU". The same four places render in Japanese, and the tooltip keeps its layout with the longer German labels.

Tests:

  • New: the formatters and the placement description render the German overlay's templates with German number formatting; the prompt line, tooltip, placement row and generation-progress.ts no longer hold the English sentences; in Russian, Ukrainian, Polish, Czech and Arabic no count stands before a noun.
  • i18n:check:strict passes with no missing keys. The 830 tests in files touching these formatters, components or the locale files pass. Typecheck passes; ESLint has no new findings.
  • The startup bundle stays within budget; the i18n chunk grows by 1.6 KB raw (0.6 KB transfer).

Not checked by a native speaker: the 24 overlays.

Screenshots

UI in German on both sides:

Prompt line, live line, timing tooltip and Weight placement in German, before and after

Verified before and after

Separate Studio installs at base ac7229860e and integrated head 7cdeff4ae7, with German selected and identical recorded progress frames. The fitted estimate from #16450 stays at 20s on both sides; the prompt-progress and draft-acceptance labels become German while all numbers remain identical. These pictures verify presentation, not model throughput.

Generation details before and after 1

Generation details before and after 2

Validation at this head: 26 focused generation-details tests pass, full frontend suite 14,644 passed and zero failed, production build passes, and strict parity passes for all 25 catalogs. The merge resolution explicitly checks the fitted estimate renders as "noch 20s".

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-02T04:24:30.485409Z
We couldn’t complete this review. Comment @codex review to try again.
bd0e3bb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@shimmyshimmer

shimmyshimmer commented Nov 2, 2026 •

Copy link
Copy Markdown
Member

Review record for #16452, carried over from the mirror it was reviewed on: danielhanchen/unsloth-staging-review#690.

Findings are quoted as posted and attributed to the account that posted them. The reactions shown are the triage recorded on the mirror; none were re-applied here. Commits are named as the mirror's, with this PR's equivalent where one was found.

Round 1: reviewed mirror 7cdeff4ae (this PR's identical commit 7cdeff4ae7)

chatgpt-codex-connector[bot] (on the mirror)

Codex Review: Didn't find any major issues. Breezy!

Reviewed commit: 7cdeff4ae7

No triage reaction was recorded on the mirror

Verdict

The round converged at mirror 7cdeff4ae (this PR's identical commit 7cdeff4ae7).

This is the review as it stood at that commit. Anything pushed to this PR afterwards was not part of it.

danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 2, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 2, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 2, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants