diff --git a/README.md b/README.md index 80ce401..c33ad55 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,38 @@ cargo build --target=x86_64-apple-ios --release 5.run app -## Model +## Model for Testing + +### Convert Model to OnnX + +Tools: [https://github.com/huggingface/optimum](https://github.com/huggingface/optimum) + + +1.setup + +```bash +pip install optimum[exporters,onnxruntime] +``` + +2.convert onnx + +```bash +optimum-cli export onnx -m Helsinki-NLP/opus-mt-zh-en --optimize O2 optus-mt-zh-en-onnx +``` + +3.quantize Onnx + +```bash +optimum-cli onnxruntime quantize \ + --avx512 \ + --onnx_model bert-tiny-onnx \ + -o quantized_bert-tiny-onnx +``` + + +Examples: [https://github.com/unit-mesh/onnx-convert-test](https://github.com/unit-mesh/onnx-convert-test) + +### Embedding Model IntelliJ IDEA Search Everywhere Model: @@ -92,6 +123,8 @@ Bloop Model: ## FAQ +### Failed to load Huggingface native library. + ``` Caused by: ai.djl.engine.EngineException: Failed to load Huggingface native library. at ai.djl.huggingface.tokenizers.jni.LibUtils.(LibUtils.java:43)