{"id":19024176,"url":"https://github.com/raykitajima/bart-coreml","last_synced_at":"2026-06-18T06:31:56.260Z","repository":{"id":186556573,"uuid":"614820610","full_name":"RayKitajima/Bart-coreml","owner":"RayKitajima","description":"experimental repo to convert Bart model to CoreML.","archived":false,"fork":false,"pushed_at":"2023-03-16T11:49:14.000Z","size":110,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-01T08:00:05.677Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/RayKitajima.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,"governance":null}},"created_at":"2023-03-16T11:45:31.000Z","updated_at":"2023-03-16T11:49:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"a75ff757-a785-4438-87a9-6ba382ecd498","html_url":"https://github.com/RayKitajima/Bart-coreml","commit_stats":null,"previous_names":["raykitajima/bart-coreml"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/RayKitajima/Bart-coreml","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RayKitajima%2FBart-coreml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RayKitajima%2FBart-coreml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RayKitajima%2FBart-coreml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RayKitajima%2FBart-coreml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RayKitajima","download_url":"https://codeload.github.com/RayKitajima/Bart-coreml/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RayKitajima%2FBart-coreml/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34479552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-18T02:00:06.871Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08T20:35:25.629Z","updated_at":"2026-06-18T06:31:56.243Z","avatar_url":"https://github.com/RayKitajima.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n\n# Bart-coreml\n\nThis is an experimental repo to convert [Bart](https://github.com/NVIDIA/DeepLearningExamples/tree/master/PyTorch/LanguageModeling/BART) model to CoreML.\n\n* We have to convert two decoder model, one for first iteration and one for the rest of iterations.\n* We can't use fixed shape for inputs \n* This repository is not clean due to lots of trial and error 😆\n\nsee also:\n\nRun encoder on Apple Neural Engine #548  \nhttps://github.com/ggerganov/whisper.cpp/discussions/548\n\n\n# Env\n\n## python \n\n[Python 3.10.9](https://www.python.org/downloads/macos/)\n\n\n### coremltools\n\nverify uninstallation of existing ANE-related modules that may conflict with coremltools.\n\n```\npip3 uninstall tensorboard\npip3 uninstall tensorflow-metal\npip3 uninstall tensorflow-macos\npip3 uninstall ane-transformers\n```\n\ncoremltools 6.2 supports pytorch 1.13.1 with numpy 1.24.0\n\n```\npip3 uninstall numpy\npip3 install numpy==1.24.0\n\npip3 uninstall torch torchvision\npip3 install torch==1.13.1 torchvision==0.14.1\n```\n\ninstall dependencies\n\n```\npip3 install packaging\npip3 install protobuf\npip3 install google\npip3 install google-api-python-client\npip3 install shutils\n```\n\nbuild coremltools\n\n```\ncd coremltools\nzsh -i scripts/build.sh --python=3.10.9 --dist\n\ncd build/dist\nrm coremltools-6.1-cp310-none-macosx_10_15_x86_64.whl\npip3 uninstall coremltools\npip3 install coremltools-6.2-cp310-none-macosx_10_15_x86_64.whl\n```\n\n## bart dependencies\n\nfor nvidia bart\n\n```\npip3 install tokenizers\npip3 install filelock\npip3 install nvidia-pyindex\npip3 install nvidia-dllogger\npip3 install nvidia-ml-py\npip3 install psutil\npip3 install nlp\npip3 install py3nvml\npip3 install apex\npip3 install GitPython\npip3 install fairseq\n```\n\n# source model\n\nput the target model on the same level of this repo\n\n```\ncd ..\ncd HuggingFaceModels\ngit clone https://huggingface.co/sshleifer/distilbart-xsum-12-3\n```\n\n# convert model\n\n```\ncd Bart-coreml\npython convert.py ../HuggingFaceModels/distilbart-xsum-12-3\n```\n\n# evaluate model\n\n```\npython cml_beam_search.py \u003cpath\u003e/\u003cto\u003e/\u003csummarize target\u003e.txt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraykitajima%2Fbart-coreml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fraykitajima%2Fbart-coreml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fraykitajima%2Fbart-coreml/lists"}