Repository navigation
FEAT: add HF tagging in unsloth - #170
Merged
Merged
Conversation
Contributor
Author
|
I quickly tested the implementation with this snippet: from unsloth import FastLanguageModel
# Load Llama model
model, tokenizer = FastLanguageModel.from_pretrained(
model_name = "HuggingFaceM4/tiny-random-LlamaForCausalLM", # Supports Llama, Mistral - replace this!
max_seq_length = 512,
dtype = None,
load_in_4bit=False
)
print(model.model_tags)and it seems to work fine: https://huggingface.co/ybelkada/test-tiny-llama-unsloth |
Member
|
@younesbelkada Oh thanks!! Oh yes definitely adding tags directly makes sense! Definitely can add this in - thanks so much again! :) |
|
this is really cool! 🦥+🤗 |
Member
|
@julien-c :)) Love the model tags feature! :) |
cm2435
pushed a commit
to cm2435/unsloth
that referenced
this pull request
Feb 26, 2024
abiswas-realadvice
pushed a commit
to abiswas-realadvice/unsloth
that referenced
this pull request
May 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi @danielhanchen 👋 !
This PR adds the model tagging feature so that you can easily filter all models that use unsloth that have been pushed on the Hub through a simple filter search on the Hub, e.g.: https://huggingface.co/models?other=unsloth
We do add the tag
"unsloth"on SFTTrainer but this PR makes it possible to add the tags for all Trainer / non-Trainer usage for the FastLanguageModel from unsloth.As this feature is only available from transformers >= 4.37.0 I guarded the call with a
Let me know what do you think !