AI-Hypercomputer / AI-Hypercomputer/maxtext

Conversion to unscanned format failed

オープン
#2,176 コメント 2 件 リアクション 0 件 担当者 2 名 @A9isha が担当を希望しています GitHub で見る
bug
主要言語
Python
スター
2.4k
フォーク
607
平均マージ
2日 19時間
マージ済み PR(30日)
158

説明

### Bug report

hi, I first convert Llama HuggingFace checkpoints to Maxtext-compatible checkpoints using [llama_or_mistral_ckpt.py](https://github.com/AI-Hypercomputer/maxtext/blob/main/MaxText/llama_or_mistral_ckpt.py) .
Then I use generate_param_only_checkpoint.py to convert the checkpoint into unscanned format. The error occurs here:
```
File "/project/maxtext/MaxText/generate_param_only_checkpoint.py", line 78, in unroll_layer_group
new_layer = jax.jit(slice_ith, out_shardings=new_layer_sharding)(layers)
File "/project/maxtext/MaxText/generate_param_only_checkpoint.py", line 94, in _possibly_unroll_params
unroll_layer_group(config.num_decoder_layers, layer_name="layers")
File "/project/maxtext/MaxText/generate_param_only_checkpoint.py", line 195, in generate_decode_checkpoint
_possibly_unroll_params(config, training_state, training_state_annotations, mesh)
File "/project/maxtext/MaxText/generate_param_only_checkpoint.py", line 211, in main
generate_decode_checkpoint(config)
File "/opt/miniconda3/envs/maxtext/lib/python3.10/site-packages/absl/app.py", line 261, in _run_main
sys.exit(main(argv))
File "/opt/miniconda3/envs/maxtext/lib/python3.10/site-packages/absl/app.py", line 316, in run
_run_main(main, args)
File "/Users/siqi/project/maxtext/MaxText/generate_param_only_checkpoint.py", line 215, in
app.run(main)
File "/opt/miniconda3/envs/maxtext/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/opt/miniconda3/envs/maxtext/lib/python3.10/runpy.py", line 196, in _run_module_as_main (Current frame)
return _run_code(code, main_globals, None,
TypeError: Argument 'input_layers['mlp']['mlp_layer_norm']['scale']' of shape float32[2048,16] of type is not a valid JAX type.
```

How can I fix this bug, or what's the best practise to run HuggingFace model?
thank you.

### Logs/Output

_No response_

### Environment Information

_No response_

### Additional Context

_No response_

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。