{"id":13709503,"url":"https://github.com/Trainy-ai/llm-atc","last_synced_at":"2025-05-06T16:31:49.530Z","repository":{"id":185445055,"uuid":"672460360","full_name":"Trainy-ai/llm-atc","owner":"Trainy-ai","description":"Fine-tuning and serving LLMs on any cloud","archived":true,"fork":false,"pushed_at":"2023-12-02T10:52:19.000Z","size":1795,"stargazers_count":89,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-30T02:38:46.392Z","etag":null,"topics":["finetuning","llama2","llms","vllm"],"latest_commit_sha":null,"homepage":"https://llm-atc.readthedocs.io/en/latest/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Trainy-ai.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-07-30T06:50:15.000Z","updated_at":"2025-02-26T20:00:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"a4bf42b4-62b4-4482-86c8-481e65e4c688","html_url":"https://github.com/Trainy-ai/llm-atc","commit_stats":{"total_commits":42,"total_committers":1,"mean_commits":42.0,"dds":0.0,"last_synced_commit":"5eb890a231318143ca0441d148f888c5e2927d88"},"previous_names":["trainy-ai/llm-atc"],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trainy-ai%2Fllm-atc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trainy-ai%2Fllm-atc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trainy-ai%2Fllm-atc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Trainy-ai%2Fllm-atc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Trainy-ai","download_url":"https://codeload.github.com/Trainy-ai/llm-atc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252721080,"owners_count":21793748,"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":["finetuning","llama2","llms","vllm"],"created_at":"2024-08-02T23:00:40.385Z","updated_at":"2025-05-06T16:31:49.524Z","avatar_url":"https://github.com/Trainy-ai.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg height='100px' src=\"https://www.ocf.berkeley.edu/~asai/static/images/trainy.png\"\u003e\n\u003c/p\u003e\n\n![GitHub Repo stars](https://img.shields.io/github/stars/Trainy-ai/llm-atc?style=social)\n[![](https://img.shields.io/badge/Twitter-1DA1F2?style=for-the-badge\u0026logo=twitter\u0026logoColor=white)](https://twitter.com/TrainyAI)\n[![](https://dcbadge.vercel.app/api/server/d67CMuKY5V)](https://discord.gg/d67CMuKY5V)\n\nLLM-ATC (**A**ir **T**raffic **C**ontroller) is a CLI for fine tuning and serving open source models using your own cloud credentials. We hope that this project can lower the cognitive overhead of orchestration for fine tuning and model serving.\n\n**Refer to the docs for the most up to date usage information. This README is updated less frequently**\n\n## Installation\n\nFollow the instructions here [to install Skypilot and provide cloud credentials](https://skypilot.readthedocs.io/en/latest/getting-started/installation.html). We use Skypilot for cloud orchestration. Steps to setup an environment is shown below.\n\n```bash\n# create a fresh environment\nconda create -n \"sky\" python=3.10 \nconda activate sky\n\n# install llm-atc\npip install llm-atc\n\n# For Macs, macOS \u003e= 10.15 has a conflict with grpcio\npip uninstall grpcio; conda install -c conda-forge grpcio=1.43.0 --force-reinstall\n\n# Configure your cloud credentials. This is a GCP example. See https://skypilot.readthedocs.io/en/latest/getting-started/ installation.html for examples with other cloud providers.\npip install google-api-python-client\nconda install -c conda-forge google-cloud-sdk\ngcloud init\ngcloud auth application-default login\n\n# double check that your credentials are properly set for your desired provider(s)\nsky check\n```\n\n### From PyPi\n\n```bash\npip install llm-atc\n```\n\n### From source\n\n```bash\npip install -e .\n```\n\n## Finetuning\n\nSupported fine-tune methods.\n- Vicuna-Llama (chat-finetuning)\n\nTo start finetuning a model. Use `llm-atc train`. For example\n\n```bash\n# start training\nllm-atc train --model_type vicuna --finetune_data ./vicuna_test.json --name myvicuna --description \"This is a finetuned model that just says its name is vicuna\" -c mycluster --cloud gcp --envs \"MODEL_SIZE=7 WANDB_API_KEY=\u003cmy wandb key\u003e\" --accelerator A100-80G:4\n\n# shutdown cluster when done\nsky down mycluster\n```\n\nIf your client disconnects from the train, the train run will continue. You can check it's status with `sky queue mycluster`\n\nWhen training completes, by default, your model, will be saved to an object store corresponding to the cloud provider which launched the training instance. For instance,\n\n```\n# s3 location\ns3://llm-atc/myvicuna\n# gcp location\ng3://llm-atc/myvicuna\n```\n\n## Serving\n\n`llm-atc` can serve both models from HuggingFace or that you've trained through `llm-atc serve`. For example\n\n```bash\n# serve an llm-atc finetuned model, requires `llm-atc/` prefix and grabs model checkpoint from object store\nllm-atc serve --name llm-atc/myvicuna --accelerator A100:1 -c servecluster --cloud gcp --region asia-southeast1 --envs \"HF_TOKEN=\u003cHuggingFace_token\u003e\"\n\n# serve a HuggingFace model, e.g. `lmsys/vicuna-13b-v1.3`\nllm-atc serve --name lmsys/vicuna-13b-v1.3 --accelerator A100:1 -c servecluster --cloud gcp --region asia-southeast1 --envs \"HF_TOKEN=\u003cHuggingFace_token\u003e\"\n```\n\nThis creates a OpenAI API server on port 8000 of the cluster head and one model worker.\nMake a request from your laptop with.\n```bash\n# get the ip address of the OpenAI server\nip=$(grep -A1 \"Host servecluster\" ~/.ssh/config | grep \"HostName\" | awk '{print $2}')\n\n# test which models are available\ncurl http://$ip:8000/v1/models\n\n# stop model server cluster\nsky stop servecluster\n```\nand you can connect to this server and\ndevelop your using your finetuned models with other LLM frameworks like [LlamaIndex](https://github.com/jerryjliu/llama_index). Look at `examples/` to see how to interact with your API endpoint.\n\n## Telemetry\n\nBy default, LLM-ATC collects anonymized data about when a train or serve request is made with PostHog. Telemetry helps us identify where users are engaging with LLM-ATC. However, if you would like to disable telemetry, set\n\n```bash\nexport LLM_ATC_DISABLE=1\n```\n\n## How does it work?\n\nTraining, serving, and orchestration are powered by [SkyPilot](https://github.com/skypilot-org/skypilot), [FastChat](https://github.com/lm-sys/FastChat/), and [vLLM](https://github.com/vllm-project/vllm). We've made this decision since we believe this will allow people to train and deploy custom LLMs without cloud-lockin.\n\nWe currently rely on default hyperparameters from other training code repositories, but we will add options to overwrite these so that users have more control over training, but for now, we think the defaults should suffice for most use cases. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTrainy-ai%2Fllm-atc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FTrainy-ai%2Fllm-atc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FTrainy-ai%2Fllm-atc/lists"}