Skip to content

Add CogVLM#27718

Closed
NielsRogge wants to merge 30 commits into
huggingface:mainfrom
NielsRogge:add_cogvlm
Closed

Add CogVLM#27718
NielsRogge wants to merge 30 commits into
huggingface:mainfrom
NielsRogge:add_cogvlm

Conversation

@NielsRogge

@NielsRogge NielsRogge commented Nov 27, 2023

Copy link
Copy Markdown
Collaborator

What does this PR do?

This PR adds CogVLM natively into the Transformers library (it's already usable with trust_remote_code=True, but with this PR one can run it without the xformers, einops and triton dependencies).

To do:

Comment on lines 50 to 57

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @ydshieh for this model, I need to store 2 attributes to the processor, however we currently don't have a processor_config.json file. Can we add support for this in from_pretrained and save_pretrained?

Comment on lines 50 to 57

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cc @ydshieh for this model, I need to store 2 attributes to the processor, however we currently don't have a processor_config.json file. Can we add support for this in from_pretrained and save_pretrained?

@NielsRogge

Copy link
Copy Markdown
Collaborator Author

A cleaner implementation I'm working on is here: https://github.com/NielsRogge/transformers/tree/add_cogvlm_cleaner. It implements the model like llava, by adding the image tokens inside the model, rather than creating them in the processor class.

@ydshieh ydshieh mentioned this pull request Dec 19, 2023
@NielsRogge NielsRogge mentioned this pull request Dec 22, 2023
5 tasks
@NielsRogge

Copy link
Copy Markdown
Collaborator Author

Closing this one in favor of the PR above.

@NielsRogge NielsRogge closed this Dec 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants