caikit / caikit-nlp

Apache License 2.0
12 stars 48 forks source link

Issue converting mpt-7b-instruct to caikit format #182

Open dagrayvid opened 1 year ago

dagrayvid commented 1 year ago

Describe the bug

Unable to load model mpt-7b-instruct from the files generated during converting/bootstrapping to caikit-format.

Platform

Using caikit-nlp pip installed from latest version in opendatahub-io/caikit-nlp

git clone https://github.com/opendatahub-io/caikit-nlp  && \
python3 -m pip install ./caikit-nlp/

Sample Code

Conversion script: https://github.com/opendatahub-io/caikit-tgis-serving/blob/main/utils/convert.py

Expected behavior

Should be able to load model from the output files from the convert.py script (config.yml and artifacts/). This seems to work with other models such as flan-t5-large and gpt-neox-20b.

Observed behavior

During model loading I see this error:

Shard 0: OSError: /mnt/models/mpt-7b-instruct/artifacts does not appear to have a file named configuration_mpt.py. Checkout 'https://huggingface.co//mnt/models/mpt-7b-instruct/artifacts/None' for available files.

Additional context

I tried copying all .py files from the huggingface repo for this model into the artifacts/ dir, but model loading failed with different errors related to missing triton modules: ModuleNotFoundError: No module named 'triton_pre_mlir'

I was able to load the model by just replacing the artifacts/ directory with the full huggingface repo contents. /cc @gkumbhat

chakrn commented 1 year ago

@dagrayvid does this still reproduce on latest tuning code?