{"id":18300499,"url":"https://github.com/comet-ml/blog-serving-hugging-face-models","last_synced_at":"2025-08-02T12:36:46.802Z","repository":{"id":41441800,"uuid":"362567882","full_name":"comet-ml/blog-serving-hugging-face-models","owner":"comet-ml","description":null,"archived":false,"fork":false,"pushed_at":"2021-04-28T18:26:43.000Z","size":10559,"stargazers_count":20,"open_issues_count":0,"forks_count":4,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-04-03T02:54:46.446Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/comet-ml.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-28T18:22:53.000Z","updated_at":"2025-01-09T01:25:41.000Z","dependencies_parsed_at":"2022-09-01T13:42:01.844Z","dependency_job_id":null,"html_url":"https://github.com/comet-ml/blog-serving-hugging-face-models","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comet-ml%2Fblog-serving-hugging-face-models","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comet-ml%2Fblog-serving-hugging-face-models/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comet-ml%2Fblog-serving-hugging-face-models/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/comet-ml%2Fblog-serving-hugging-face-models/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/comet-ml","download_url":"https://codeload.github.com/comet-ml/blog-serving-hugging-face-models/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247342718,"owners_count":20923643,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-05T15:12:39.730Z","updated_at":"2025-04-05T13:36:10.205Z","avatar_url":"https://github.com/comet-ml.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to easily and efficiently deploy Hugging Face models\nCode repository to reproduce the benchmarking results presented [here](https://www.comet.ml/site/how-to-10x-throughput-when-serving-hugging-face-models-without-a-gpu/)\n\nThe repo is broken down into 2 sections:\n* python-api: The Python inference services that we tested:\n  * baseline: Baseline inference service using default parameters - This is **not** optimized\n  * model-hardware-optimized: Optimized inference service for DistilBert - This is the most optimized inference service\n  * model-optimized: Optimized inference service that support both Bert and DistilBert models as well as optional quantization\n* load-testing: Utilities to run performance benchmarks\n\n## How to run the benchmarks\nGiven all our benchmarks are run on GCP, you will need to have a Google Cloud project.\n\nRunning the benchmarks is done in three steps:\n1. Create the docker images for each Python API:\n```bash\ncd python-api\nsh create_docker_images.sh \u003cGOOGLE_PROJECT_ID\u003e\n```\n2. Deploy a virtual machine for the python api we wish to test:\n```bash\ncd load_testing/machine_provisioning\n\nsh baseline_benchmark.sh GOOGLE_PROJECT_ID\u003e\n```\n3. We will now create a virtual machine from which to run our load testing software:\n```bash\ncd load_testing/machine_provisioning\nsh locust_machine.sh \u003cGOOGLE_PROJECT_ID\u003e\n```\n4. The last part of the script run in step 3 is to connect via ssh to the virtual machine. In this terminal we can run our load testing script:\n```bash\ncd /locust\nsh run_load_test.sh \u003cIP ADRESS printed in step 2\u003e \u003cNB_CONCURRENT_USERS\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomet-ml%2Fblog-serving-hugging-face-models","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomet-ml%2Fblog-serving-hugging-face-models","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomet-ml%2Fblog-serving-hugging-face-models/lists"}