Install tpu-perf to build and run model cases.
# Time only cases
python3 -m tpu_perf.build --list default_cases.txt --time
python3 -m tpu_perf.run --list default_cases.txt
# Precision benchmark
python3 -m tpu_perf.build --list default_cases.txt
python3 -m tpu_perf.precision_benchmark --list default_cases.txt
On default, cloning this repository will not download any models. Install
Git LFS with pip install git-lfs
.
To download a specific model:
git lfs pull --include="path/to/model" --exclude=""
To download all models:
git lfs pull --include="*" --exclude=""
You can see visualizations of each model's network architecture by using Netron.
Please lint in your local repo before PR.
# Install tools
sudo npm install -g markdownlint-cli
pip3 install yamllint
yamllint -c ./.yaml-lint.yml .
markdownlint '**/*.md'
python3 .github/workflows/check.py
Model | Path | NNTC | MLIR |
---|---|---|---|
bert | language/nlp/bert | ✅ | |
bert_base_transformers-2.11.0 | language/nlp/Huggingface_bert_squadv1 | ✅ | |
bert_base_transformers-4.23.0 | language/nlp/Huggingface_bert_squadv1 | ✅ | |
bert_large_transformers-2.11.0 | language/nlp/Huggingface_bert_squadv1 | ✅ | |
bert_large_transformers-4.23.0 | language/nlp/Huggingface_bert_squadv1 | ✅ | |
bert_paddle | language/nlp/bert_paddle | ✅ | |
ConformerEncoder | language/asr/conformer | ✅ | |
gpt2 | language/generative/gpt2 | ✅ | |
GRU | language/nlp/GRU | ✅ | ✅ |
mobilebert-tflite | language/nlp/mobilebert_tflite | ✅ | |
ScoringIds | language/asr/conformer | ✅ | |
TransformerDecoder | language/asr/conformer | ✅ | |
TransformerLM | language/asr/conformer | ✅ | |
WenetDecoder | language/asr/wenet | ✅ | |
WenetEncoder | language/asr/wenet | ✅ |