Macaw-LLM icon indicating copy to clipboard operation
Macaw-LLM copied to clipboard

How to get the whisper, clip, and llama model used by macaw?

Open chatsci opened this issue 1 year ago • 5 comments

I used the following code to get the pretrained models:

from transformers import CLIPModel, LlamaModel
clip_model = CLIPModel.from_pretrained("openai/clip-vit-base-patch16")
from transformers import WhisperForConditionalGeneration
whisper_model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-base")
llama7b_model = LlamaModel.from_pretrained("decapoda-research/llama-7b-hf")
clip_model.save_pretrained('trained_models/clip_model/')
whisper_model.save_pretrained('trained_models/whisper_model/')
llama7b_model.save_pretrained('trained_models/llama7b_model/')

Is this correct?

chatsci avatar Jul 16 '23 14:07 chatsci

I also want to know how to get the whisper, clip, and llama model used by macaw?

BinZhu-ece avatar Sep 07 '23 12:09 BinZhu-ece

I used the following code to get the pretrained models:

from transformers import CLIPModel, LlamaModel
clip_model = CLIPModel.from_pretrained("openai/clip-vit-base-patch16")
from transformers import WhisperForConditionalGeneration
whisper_model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-base")
llama7b_model = LlamaModel.from_pretrained("decapoda-research/llama-7b-hf")
clip_model.save_pretrained('trained_models/clip_model/')
whisper_model.save_pretrained('trained_models/whisper_model/')
llama7b_model.save_pretrained('trained_models/llama7b_model/')

Is this correct?

Hello, have you run through this code? I encountered the following error:

assert self.head_dim * num_heads == self.embed_dim, "embed_dim must be divisible by num_heads" AssertionError: embed_dim must be divisible by num_heads

BinZhu-ece avatar Sep 09 '23 04:09 BinZhu-ece

Hi,

I used the following code to get the pretrained models:

from transformers import CLIPModel, LlamaModel
clip_model = CLIPModel.from_pretrained("openai/clip-vit-base-patch16")
from transformers import WhisperForConditionalGeneration
whisper_model = WhisperForConditionalGeneration.from_pretrained("openai/whisper-base")
llama7b_model = LlamaModel.from_pretrained("decapoda-research/llama-7b-hf")
clip_model.save_pretrained('trained_models/clip_model/')
whisper_model.save_pretrained('trained_models/whisper_model/')
llama7b_model.save_pretrained('trained_models/llama7b_model/')

Is this correct?

Hello, have you run through this code? I encountered the following error:

assert self.head_dim * num_heads == self.embed_dim, "embed_dim must be divisible by num_heads" AssertionError: embed_dim must be divisible by num_heads

Have U managed to run macaw-llm?

satvikgarg27 avatar Nov 23 '23 08:11 satvikgarg27

I have the same issue. I found that in run_clm_lls.py files, attention_heads defaults to 220. How did you solve it, please

Arbor334 avatar Jul 28 '24 00:07 Arbor334

Me,too.Any updates?

Cece1031 avatar Aug 26 '24 02:08 Cece1031