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

[WIP] add florence2 #5424

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

[WIP] add florence2 #5424

wants to merge 1 commit into from

Conversation

Sanster
Copy link

@Sanster Sanster commented Sep 12, 2024

  • Did you read the contributor guideline?
  • Did you write any new necessary tests? Added two test in test_mm_plugin.py
  • Fix the issues in the saved configuration file.

Running example data training:

llamafactory-cli train examples/train_full/florence2_full_sft.yaml

TODO: After training finished, modify saves/florence2-large/full/sft/config.json file(I still haven't figured out why the saved config has the following issues that need to be modified; it shouldn't be necessary.):

Change auto_map, from:

  "auto_map": {
    "AutoConfig": "configuration_florence2.Florence2Config",
    "AutoModel": "modeling_florence2.Florence2ForConditionalGeneration",
    "AutoModelForCausalLM": "microsoft/Florence-2-large-ft--modeling_florence2.Florence2ForConditionalGeneration"
  }

to

  "auto_map": {
    "AutoConfig": "configuration_florence2.Florence2Config",
    "AutoModelForCausalLM": "modeling_florence2.Florence2ForConditionalGeneration"
  }

Change vision_config's model_type

{
  "vision_config": {
    "model_type": "davit"
  }
}

Document of training table and figure detection on the yifeihu/TF-ID-arxiv-papers: https://github.com/Sanster/llama_factory_florence2_example

@hiyouga hiyouga self-requested a review September 12, 2024 09:34
@hiyouga hiyouga added the pending This problem is yet to be addressed label Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending This problem is yet to be addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants