AI-Hypercomputer / AI-Hypercomputer/maxtext

Conversion to unscanned format failed

Đang mở
#2,176 2 bình luận 0 reaction 2 người được giao Được @A9isha nhận Xem trên GitHub
bug
Ngôn ngữ chính
Python
Star
2.4k
Fork
607
Merge trung bình
2 ngày 19 giờ
Pull request đã merge (30 ngày)
158

Mô tả

### 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_

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.