Skip to content

Fix madlad400-3b loading, TER normalization and install instructions - #6

Merged
xixianliao merged 3 commits into
langtech-bsc:mainfrom
xixianliao:main
Oct 1, 2026
Merged

xixianliao merged 3 commits into
langtech-bsc:mainfrom
xixianliao:main

Conversation

@xixianliao

Copy link
Copy Markdown

Fixes found while testing a fresh install of v2 from this repository.

  • madlad400-3b-mt gave garbage output with Transformers 5. Transformers 5 always ties the T5 LM head to the input embeddings. The madlad400-3b checkpoint has no shared.weight, so the shared embeddings were filled from lm_head.weight. The embeddings and LM head are now reloaded from the checkpoint. madlad400-7b was not affected.
  • TER was computed with normalized: True for all languages, which changed TER compared with v1. It is computed unnormalized again (the sacrebleu default, as in v1), and normalized only for Chinese, Japanese and Korean targets, where asian_support requires it.
  • Install instructions. Added the PyTorch index needed for torch==2.6.0+cu124, and the pinned requirements are now installed with --no-deps and without PYTHONPATH or user site packages, so that packages from cluster modules do not interfere.

Validation

  • madlad400-3b en→es FLORES dev, fresh install: BLEU 27.88, chrF 55.80, TER 57.12, COMET 0.8649 (v1: 27.88, 55.78, 57.10, 0.8644).
  • SalamandraTA es→ja/ko/zh: TER uses Asian support, as expected.

…nsformers 5

Transformers 5 always ties the T5 LM head to the input embeddings. For
madlad400-3b-mt, whose checkpoint has no shared.weight, it fills the shared
embeddings from lm_head.weight, so the encoder reads the wrong embeddings and
the model outputs garbage. Reload both tensors from the checkpoint.
normalized: True had been set globally so that asian_support works for
Chinese, Japanese and Korean, which changed TER for every other language.
Use the sacrebleu default again and set normalized only with asian_support.
Add the PyTorch cu124 index for torch==2.6.0+cu124, and install the pinned
requirements with --no-deps and without PYTHONPATH or user site packages,
which otherwise make pip skip packages that cluster modules already provide.
@xixianliao
xixianliao marked this pull request as ready for review October 1, 2026 15:03
@xixianliao
xixianliao merged commit 6496459 into langtech-bsc:main Oct 1, 2026
4 of 5 checks passed
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