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

Turning LLaMA into LLaVA #1543

Open
yukiarimo opened this issue Jan 15, 2025 · 0 comments
Open

Turning LLaMA into LLaVA #1543

yukiarimo opened this issue Jan 15, 2025 · 0 comments

Comments

@yukiarimo
Copy link

Hello community! I’ve trained a custom LLaMA 3.1 16B model with custom tokens from the base model. It works great.

Now, I would like to create a LLaVA from it (a mmproj that I can use in kobold.cpp (based on llama.cpp)). Can you please help me out? How can I do that?

The pseudo-code:

llama_model.load(“my-model”)
llama_model.create_vision(config)

# dataset is like:
# <yuki>What is this?<data>{image_tokens_here}</data></yuki>\n<yuna>It is an Apple.</yuna>\n<yuki>What is this?<data>{image_tokens_here}</data></yuki>\n<yuna>It is a banana.</yuna>
# Note: all <> here are custom tokens!

dataset = “JSONL file”
llama_model.vision.train(dataset)
llama_model.save_projector()
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

1 participant