ml-explore / ml-explore/mlx-examples

I tried madlad400, but there is a problem with the output if it is float16

Open
#980 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
9k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

Hi.

I tried madlad400, but there is a problem with the output if it is float16

$ python convert.py --model google/madlad400-3b-mt
$ python t5.py --model google/madlad400-3b-mt --prompt "<2ja>A tasty apple"

[INFO] Generating with T5...
Input:  <2ja>A tasty apple
リンゴの味
Time: 20.28 seconds, tokens/s: 0.30

$ python convert.py --model google/madlad400-3b-mt --dtype float16
$ python t5.py --model google/madlad400-3b-mt --dtype float16 --prompt "<2ja>A tasty apple"

[INFO] Generating with T5...
Input:  <2ja>A tasty apple
<unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk><unk>
Time: 25.66 seconds, tokens/s: 3.90

Thank.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the reported behavior with convert.py and t5.py using google/madlad400-3b-mt, both with default precision and --dtype float16. Compare the generated output and trace the float16 path in those entry points; done means float16 no longer produces repeated tokens for the shown prompt.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.