{"id":39274676,"url":"https://github.com/foundation-model-stack/tuning-config-recommender","last_synced_at":"2026-01-21T15:00:37.574Z","repository":{"id":322779847,"uuid":"1076079507","full_name":"foundation-model-stack/tuning-config-recommender","owner":"foundation-model-stack","description":"⚡️⚡️ Supercharge your fine-tuning users with completely automated tuning configurations!","archived":false,"fork":false,"pushed_at":"2025-12-14T02:54:14.000Z","size":250,"stargazers_count":4,"open_issues_count":3,"forks_count":2,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-16T02:40:11.052Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/foundation-model-stack.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-14T11:26:58.000Z","updated_at":"2025-12-14T02:54:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"adcd91aa-6db6-423f-85dc-9e0a7c75cea6","html_url":"https://github.com/foundation-model-stack/tuning-config-recommender","commit_stats":null,"previous_names":["foundation-model-stack/tuning-config-recommender"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/foundation-model-stack/tuning-config-recommender","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundation-model-stack%2Ftuning-config-recommender","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundation-model-stack%2Ftuning-config-recommender/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundation-model-stack%2Ftuning-config-recommender/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundation-model-stack%2Ftuning-config-recommender/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/foundation-model-stack","download_url":"https://codeload.github.com/foundation-model-stack/tuning-config-recommender/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/foundation-model-stack%2Ftuning-config-recommender/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28635120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T14:50:40.221Z","status":"ssl_error","status_checked_at":"2026-01-21T14:48:59.225Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":"2026-01-18T00:53:04.247Z","updated_at":"2026-01-21T15:00:37.545Z","avatar_url":"https://github.com/foundation-model-stack.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tuning Config Recommender\n\n⚡️ Supercharge your fine-tuning users with completely automated tuning configurations for their choice of model, and dataset enabling instant one-click tuning deployment 🚀.\n\n## Installation\n\n```\npip install -e .\n```\n\n## Library Usage\n\nAn example is given in `lib_usage.py` file which generates tuning configuration for [fms-hf-tuning](https://github.com/foundation-model-stack/fms-hf-tuning) stack given model `ibm-granite/granite-4.0-h-350m` and dataset with HF ID `ought/raft`.\n\n```\npython lib_usage.py\n```\n\n## CLI usage\n\n```\npython src/recommender/cli.py --tuning-data-config ./artifacts/test/data_config.yaml --accelerate-config ./artifacts/test/accelerate_config.yaml --tuning-config ./artifacts/test/tuning_config.yaml --compute-config ./artifacts/test/compute_config.yaml --output-dir ./output\n```\n\nCustom rules-dir usage\n\n```\npython src/recommender/cli.py --tuning-data-config ./artifacts/test/data_config.yaml --accelerate-config ./artifacts/test/accelerate_config.yaml --tuning-config ./artifacts/test/tuning_config.yaml --compute-config ./artifacts/test/compute_config.yaml --output-dir ./output --rules-dir custom_rules_dir\n```\n\nWriting custom action rules for custom modification would require following the below\n1. Should start with name \"Custom_\"\n2. Should subclass from `Action` class\n\nAn example can be found at [custom_rules_dir](./custom_rules_dir/).\n\n## Architecture\n\n![](./artifacts/architecture.png)\n\n### Concepts\n\n#### Intermediate Representation (IR)\nIR is the standard format that all input formats have to be converted to so that rule engine can work on the IR without worrying about the exact input or output formats which could differ from one stack to another. There is a caveat with IR, not all arguments in the IR are strictly defined in the sense that the actions currently written may add some new arguments and IR or rule engine are restrictive about it. Its up to do the adapter if it wishes to consume it or not for the target format.\n\n#### Action\nAn action takes IR as input at its current state and performs some heuristics and constructs a new IR object which is used as a JSON Merge patch by the rule-engine. Addtionally, the returned new IR object can also hold various information about the patch such as severity, type and natural language comments. As shown in the architecture, an action would be called multiple times by the rule engine until it explicitly calls out skip. When to skip is the responsibility of the action which could be a heuristic based on the state of the IR when its called. Some example actions can be seen [here](./src/recommender/actions).\n\n#### Rule Engine\nRule engine passes the IR across actions in the sequence they are defined and collects all JSON merge patches. These JSON merge patches are then applied over the IR. This process is again iterated until all actions call out for a skip. Finally, JSON patches (is different from the merge patch) with respect to the orginal IR provided to the rule engine is prepared while preserving all the metadata (comments etc) for each of the patch along with the final IR to adapters.\n\n#### Adapter\nAdapter converts source format to required IR format and consumes final IR and json patches as needed to deliver the target format. Adapters can be found [here](./src/recommender/adapters.py).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoundation-model-stack%2Ftuning-config-recommender","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffoundation-model-stack%2Ftuning-config-recommender","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffoundation-model-stack%2Ftuning-config-recommender/lists"}