Skip to content

Instantly share code, notes, and snippets.

Optimizing BAAI general embedding (BGE) with OpenVINO

This guide provides detailed instructions for optimizing the BAAI general embedding (BGE) - https://huggingface.co/BAAI/bge-reranker-base model with OpenVINO and Optimum Intel.

Environment Setup

To prepare your environment for model optimization and inference:

sudo apt update
@ravi9
ravi9 / openvino-TrOCR-readme.md
Last active April 25, 2024 22:48
openvino-TrOCR-Readme

Optimizing TrOCR with OpenVINO

This guide provides detailed instructions for optimizing the https://huggingface.co/microsoft/trocr-base-printed model with OpenVINO.

Environment Setup

To prepare your environment for model optimization and inference:

sudo apt update
@ravi9
ravi9 / download_mo_bit_models.sh
Last active October 7, 2022 17:53
See Medium blog: Accelerate Big Transfer (BiT) model inference with Intel® OpenVINO™
#!/bin/bash
# Copyright (c) 2022 Intel Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ravi9
ravi9 / run_ov_tf_perf.py
Last active October 7, 2022 17:53
See Medium blog: Accelerate Big Transfer (BiT) model inference with Intel® OpenVINO™
"""
Copyright (c) 2022 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@ravi9
ravi9 / tf_freeze_graph.py
Last active September 27, 2022 19:10
See Medium blog: Accelerate Big Transfer (BiT) model inference with Intel® OpenVINO™
"""
Copyright (c) 2022 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""
Copyright (c) 2022 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
"""
Copyright (c) 2022 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
"""
Copyright (c) 2022 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@ravi9
ravi9 / segyio-play.py
Last active September 16, 2020 16:34
segyio-playground
import segyio
filename = 'f3.segy'
src_data = segyio.tools.cube(filename)
k1,k2,k3 = 300, 500, 400
factor = 125
il_s = k1 - factor
il_e = k1 + factor
@ravi9
ravi9 / install_haloagent_aws.sh
Last active July 30, 2018 21:42
Install Halo agent on AWS (Linux)
#https://github.intel.com/CloudPassage/AWS-Halo-Deployment-Script
wget https://www.dropbox.com/s/imh6zsh8nrpubzd/AWS-Halo-Deployment-Script-master.zip
unzip AWS-Halo-Deployment-Script-master.zip
cd AWS-Halo-Deployment-Script-master/
sudo python HaloAgent.py