Skip to content

How to load a fine-tuned model with HF trainer script and save it into local #2270

Answered by rwightman
abdelkareemkobo asked this question in Q&A
Discussion options

You must be logged in to vote

'facebook/dinov2-base' is a transformers model not a timm model, timm options that work with timm.create_model are:

Whene there are architectures that exist across both timm and transformers like this, the weights are almost always in different formats with different key names, sometimes different structure in terms of nesting and qkv vs q, k, v being separate or fused layers, etc. There's always a way to remap them but you have to have a bit of experience to do that easily (or give Claude the two model impl and ask for a weight translation, it's …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@abdelkareemkobo
Comment options

@rwightman
Comment options

@abdelkareemkobo
Comment options

Answer selected by abdelkareemkobo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants