Skip to content

QVAC-23970 feat[api]: describe NMT modelConfig union arms - #4066

Open
lauripiisang wants to merge 1 commit into
mainfrom
QVAC-23970-describe-nmt
Open

QVAC-23970 feat[api]: describe NMT modelConfig union arms#4066
lauripiisang wants to merge 1 commit into
mainfrom
QVAC-23970-describe-nmt

Conversation

@lauripiisang

Copy link
Copy Markdown
Contributor

🎯 What problem does this PR solve?

  • The NMT (nmtcpp-translation) load-time modelConfig — a discriminated union of the Bergamot and IndicTrans arms plus shared generation params — shipped without descriptions, so the generated contract (consumed by qvac configure and the generated clients) couldn't say what any field means.

📝 How does it solve it?

  • Adds .describe() to the shared generation params (mode, beamsize, lengthpenalty, maxlength, repetitionpenalty, norepeatngramsize, temperature, topk, topp), both engine arms (engine, from, to; Bergamot srcVocabSrc/dstVocabSrc/normalize/pivotModel), and the pivot-model sub-fields.
  • Semantics sourced from @qvac/translation-nmtcpp README. Descriptions state this schema's transform defaults (temperature 0.3, topk 0, maxlength 512, …), not the README's example values.
  • Generation params have full effect on IndicTrans2; Bergamot has limited generation-parameter support (noted in-file). mode is a JS-side selector currently fixed to 'full'.
  • Regenerates contract/schema.json and the Python generated models.

Part of QVAC-23933.

🧪 How was it tested?

  • bun run contract:export regenerated; contract:check, typecheck, lint, format, and full test:unit (incl. contract-export freshness) pass.
  • packages/inference typecheck + lint pass.
  • packages/sdk-python generate.py --check passes.

🔌 API Changes

Additive only:

// nmtConfigBaseSchema.options[0] is the Bergamot arm
nmtConfigBaseSchema.options[1].shape.temperature.description
// "Sampling temperature (0–2). Default 0.3."

@lauripiisang
lauripiisang requested review from a team as code owners August 25, 2026 15:03
@github-actions

Copy link
Copy Markdown
Contributor

Review Status

Current Status: ❌ PENDING
Approvals so far: none

Pending reviews: Needs 1 Management or Team Lead, and 1 more from Management, Team Lead, or Member.

@github-actions

Copy link
Copy Markdown
Contributor

License compliance — clean

No new dependency license findings in this PR.

Warn-only (shadow) mode — this check does not block merges yet.

Updated automatically by the canonical license compliance workflow.

NOTICE presence (advisory)

Missing NOTICE (advisory, does not block):

  • ./.github/actions/release-merge-guard
  • ./docs/website
  • ./packages/ggml-coload-smoke
  • ./packages/fabric/test/integration
  • ./packages/inference-addon-cpp/mobile
  • ./packages/sdk/e2e
  • ./packages/llm-llamacpp/benchmarks/performance
  • ./packages/llm-llamacpp/benchmarks/server
  • ./packages/vla-ggml/sim/server
  • ./packages/embed-llamacpp/benchmarks/performance
  • ./packages/embed-llamacpp/benchmarks/server
  • ./packages/asr-ggml/benchmarks/server

- Add .describe() to the shared generation params (mode, beamsize, lengthpenalty, maxlength, repetitionpenalty, norepeatngramsize, temperature, topk, topp), both engine arms (engine/from/to, Bergamot srcVocabSrc/dstVocabSrc/normalize/pivotModel), and the pivot-model sub-fields
- Semantics from @qvac/translation-nmtcpp README; describes state this schema's transform defaults (not the README example values)
- Regenerate contract/schema.json and the Python generated models
@lauripiisang
lauripiisang force-pushed the QVAC-23970-describe-nmt branch from a6d01c1 to 676121f Compare August 26, 2026 14:37
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.

1 participant