1. Lära sig
  2. /
  3. Courses
  4. /
  5. Multi-Modal Models with Hugging Face

Connected

exercise

Multi-modal sentiment classification with Qwen

Now to integrate your prompt with the Qwen2 Vision Language Model! You'll use the prompt template you created previously, which is available as chat_template.

Let's see what the model thinks about this article! The model (vl_model) and processor (vl_model_processor) have been loaded for you.

Instruktioner

100 XP
  • Use the processor to preprocess chat_template.
  • Use the model to generate the output IDs, making sure to limit the new tokens to 500.
  • Decode the trimmed generated IDs, skipping special tokens.