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

How to fine-tune and align KoLLAVA Dataset (korean) #2

Open
abrahimzaman360 opened this issue Feb 6, 2024 · 1 comment
Open

How to fine-tune and align KoLLAVA Dataset (korean) #2

abrahimzaman360 opened this issue Feb 6, 2024 · 1 comment

Comments

@abrahimzaman360
Copy link

I want to finetune KoLLAVA Dataset on this VLM.
How to do it?
I will really appreciate your help.

@Zhazhan
Copy link

Zhazhan commented Feb 26, 2024

Hi, to finetune on the KoLLAVA Dataset, you can convert its data into a parquet file, which can be read by pandas through 'pandas.read_parquet("parquet path")'. Each row of this loaded DataFrame should consist of 3 elements:

  1. prompt: prompt received by the large language model
  2. ground_truth: your desired model output
  3. image: image stored in byte string format, which can be encoded by cv2.imencode

An example of the prepared dataset is shown below:
example

Then replace the 'data_path' in scripts/pretrain.sh and scripts/finetune.sh with the path containing the above parquet file and pass '--is_parquet True'. Finally, as long as you properly configure the vision encoder and LLM according to your needs, you can train your own VLM.

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

No branches or pull requests

2 participants