Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add config to model card #1005

Merged
merged 11 commits into from
Dec 28, 2023
5 changes: 5 additions & 0 deletions src/axolotl/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,11 @@ def terminate_handler(_, __, model):
badge_markdown = """[<img src="https://github.com/raw/OpenAccess-AI-Collective/axolotl/main/image/axolotl-badge-web.png" alt="Built with Axolotl" width="200" height="32"/>](https://github.com/OpenAccess-AI-Collective/axolotl)"""
transformers.modelcard.AUTOGENERATED_TRAINER_COMMENT += f"\n{badge_markdown}"

if getattr(cfg, "axolotl_config_path"):
winglian marked this conversation as resolved.
Show resolved Hide resolved
raw_axolotl_cfg = Path(cfg.axolotl_config_path)
if raw_axolotl_cfg.is_file():
transformers.modelcard.AUTOGENERATED_TRAINER_COMMENT += f"\n## axolotl config\n```yaml\n{raw_axolotl_cfg.read_text(encoding='utf-8')}\n```"

LOG.info("Starting trainer...")
if cfg.group_by_length:
LOG.info("hang tight... sorting dataset for group_by_length")
Expand Down