Skip to content

Commit

Permalink
HF / FEAT: Optimize HF tags (#1425) [skip ci]
Browse files Browse the repository at this point in the history
* optimize tags

* chore: lint

---------

Co-authored-by: Wing Lian <[email protected]>
  • Loading branch information
younesbelkada and winglian authored Mar 21, 2024
1 parent 7803f09 commit 7d55607
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/axolotl/core/trainer_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,12 @@ def __init__(self, cfg, model, tokenizer):
self.model = model
self.tokenizer = tokenizer

# in case the model supports tagging, add the axolotl tag.
# This makes sure the tag is correctly pushed even if a user calls
# model.push_to_hub instad of trainer.push_to_hub.
if hasattr(model, "add_model_tags"):
model.add_model_tags(["axolotl"])

@property
def model_ref(self):
return self._model_ref
Expand Down

0 comments on commit 7d55607

Please sign in to comment.