You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the example TensorRT LLM engine builder for Bert models simply ignores model weights if those are present in the model directory, it only reads the config.json file, making it essentially impossible to generate a working engine from a pretrained model.
@symphonylyh Perhaps this bug shall be reopened given that the problem persists?
A similar issue was mentioned in a (much later) bug #2379 but the fix did not cover the original case AFAIU.
System Info
Currently the example TensorRT LLM engine builder for Bert models simply ignores model weights if those are present in the model directory, it only reads the
config.json
file, making it essentially impossible to generate a working engine from a pretrained model.A possible fix is available in #2187
Who can help?
@byshiue
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
Scenario 1 (simplest)
config.json
and the weights file).examples/bert/build.py --model_dir input_model
Scenario 2 (use of the weights)
config.json
and the weights file).examples/bert/build.py --model_dir input_model
Expected behavior
Scenario 1 (simplest)
build.py
shall show an error message complaining about invalid weights file.Scenario 2 (use of the weights)
The output tensors shall have numerically close components.
actual behavior
Scenario 1 (simplest)
build.py
finished successfully, generatingbert_outputs/config.json
andbert_outputs/BertModel_float16_tp1_rank0.engine
.Scenario 2 (use of the weights)
The output tensors look totally unrelated and different from each other.
additional notes
The problem is that the script code only loads the config and does not do anything to load the weights. The fix is available in #2187.
The text was updated successfully, but these errors were encountered: