{"id":25442152,"url":"https://github.com/interactivetech/finetune-deploy-model-mlis","last_synced_at":"2025-11-01T14:30:24.743Z","repository":{"id":277613368,"uuid":"932974605","full_name":"interactivetech/finetune-deploy-model-mlis","owner":"interactivetech","description":"This repo demonstrates how to finetune a fb-125m model and deploy it to MLIS","archived":false,"fork":false,"pushed_at":"2025-02-14T23:23:01.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T23:26:12.701Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","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/interactivetech.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-02-14T21:46:16.000Z","updated_at":"2025-02-14T23:23:05.000Z","dependencies_parsed_at":"2025-02-14T23:26:24.006Z","dependency_job_id":"cbcfc3b2-d0a3-4c3e-9ce2-336652f0dac6","html_url":"https://github.com/interactivetech/finetune-deploy-model-mlis","commit_stats":null,"previous_names":["interactivetech/finetune-deploy-model-mlis"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interactivetech%2Ffinetune-deploy-model-mlis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interactivetech%2Ffinetune-deploy-model-mlis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interactivetech%2Ffinetune-deploy-model-mlis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interactivetech%2Ffinetune-deploy-model-mlis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interactivetech","download_url":"https://codeload.github.com/interactivetech/finetune-deploy-model-mlis/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239293926,"owners_count":19615043,"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":"2025-02-17T13:17:09.521Z","updated_at":"2025-11-01T14:30:24.699Z","avatar_url":"https://github.com/interactivetech.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Finetune and deploy LLMs on MLIS\n\n# Requirements:\n* Need PCAI environment to create a notebook server and notebooks\n* Need PCAI environment that has MLIS deployed\n\n# Environment install instructions\n* `pip install vllm datasets 'accelerate\u003e=0.26.0'`\n* for torchtune, install: `pip install torchtune torchao bitsandbytes`\n\n# Main demo: finetune and deploy llm \n* create notebook server: 2 vCPU and 20GB of Memory\n* run cells in `ft.ipynb` to show finetuning\n* go to MLIS, show deployed endpoint\n    * go to Tokens tab on the left, and copy the token in `finetuned-opt-125m`\n* go back to `ft.ipynb` and run the cell to paste token interactively\n* run cell in `ft.ipynb` to make API request of deployed finetuned model\n\n# Steps to deploy finetuned fb-125m model on MLIS\n* create registry and add huggingface token\n* create packaged model\n    * select custom model format, name model `finetuned-opt-125m`\n    * enter image: `mendeza/vllm-openai:0.0.1` this is a custom VLLM container that support CPU only deployment\n    * In advanced, add environment variable `HUGGING_FACE_HUB_TOKEN` and enter hugging face token in value\n    * For resources, select `cpu tiny`\n    * paste the following to the arguments text field: `--model mendeza/opt-125m-synthetic-finetuned --dtype bfloat16 --port 8080`\n* create deployment\n    * create deployment named: `finetuned-opt-125m`\n    * select package model named `finetuned-opt-125m`\n    * for scaling select fixed-1\n    * for advanced, add two environment variables:\n        * Name: `CPU`, value: `10`\n        * Name: `Memory`, value: `10Gi`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finteractivetech%2Ffinetune-deploy-model-mlis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finteractivetech%2Ffinetune-deploy-model-mlis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finteractivetech%2Ffinetune-deploy-model-mlis/lists"}