Skip to content

Commit

Permalink
improving docs
Browse files Browse the repository at this point in the history
  • Loading branch information
gfursin committed Feb 14, 2024
1 parent 187ad13 commit b67bcc2
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
18 changes: 16 additions & 2 deletions cm-mlops/script/app-loadgen-generic-python/README-extra.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,28 @@ You can also specify any custom onnx model file as follows:
cm run script "python app loadgen-generic _onnxruntime" --modelpath=<CUSTOM_MODEL_FILE_PATH>
```


### Benchmark Hugging Face model

```bash
cm run script "python app loadgen-generic _onnxruntime _custom _huggingface _model-stub.alpindale/Llama-2-13b-ONNX" --adr.hf-downloader.model_filename=FP32/LlamaV2_13B_float32.onnx
cmr "python app loadgen-generic _onnxruntime _custom _huggingface _model-stub.ctuning/mlperf-inference-bert-onnx-fp32-squad-v1.1" --adr.hf-downloader.model_filename=model.onnx
```

*See more examples to download Hugging Face models via CM [here](../get-ml-model-huggingface-zoo/README-extra.md).*

### Benchmark using ONNX CUDA

```bash
cm rm cache -f
cmr "python app loadgen-generic _onnxruntime _cuda _retinanet" --quiet
cmr "python app loadgen-generic _onnxruntime _cuda _custom _huggingface _model-stub.ctuning/mlperf-inference-bert-onnx-fp32-squad-v1.1" --adr.hf-downloader.model_filename=model.onnx
```

TBD: some cases that are not yet fully supported:
```bash
cmr "python app loadgen-generic _onnxruntime _cuda _custom _huggingface _model-stub.microsoft/Mistral-7B-v0.1-onnx" --adr.hf-downloader.model_filename=Mistral-7B-v0.1.onnx,Mistral-7B-v0.1.onnx.data
cmr "python app loadgen-generic _onnxruntime _cuda _custom _huggingface _model-stub.alpindale/Llama-2-13b-ONNX" --adr.hf-downloader.model_filename=--model_filename=FP32/LlamaV2_13B_float32.onnx --adr.hf-downloader.full_subfolder=FP32
cmr "python app loadgen-generic _onnxruntime _cuda _custom _huggingface _model-stub.Intel/gpt-j-6B-int8-static" --adr.hf-downloader.model_filename=model.onnx --adr.hf-downloader.full_subfolder=.
```

### Other variations and flags:

Expand Down
4 changes: 0 additions & 4 deletions cm-mlops/script/get-ml-model-huggingface-zoo/README-extra.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
# Examples

```bash
cmr "get ml-model huggingface zoo _model-stub.alpindale/Llama-2-13b-ONNX" --model_filename=FP32/LlamaV2_13B_float32.onnx
```

```bash
cmr "get ml-model huggingface zoo _model-stub.alpindale/Llama-2-13b-ONNX" --model_filename=FP32/LlamaV2_13B_float32.onnx --full_subfolder=FP32
```
Expand Down
1 change: 1 addition & 0 deletions cm-mlops/script/gui/playground_scripts.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ def page(st, params):
A few other popular commands:
```bash
cmr "{}" --help
cmr "{}" --shell
cm run script "{}" --shell
cm docker script "{}"
Expand Down

0 comments on commit b67bcc2

Please sign in to comment.