# How to train a combination model

**URL:** <https://discuss.huggingface.co/t/how-to-train-a-combination-model/103710>\
**Category:** Models\
**Created:** [August 23, 2024, 2:47pm UTC](https://discuss.huggingface.co/t/how-to-train-a-combination-model/103710 "2024-08-23T14:47:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fickerZHANG](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/fickerzhang/32/30779_2.png) [@fickerZHANG](https://discuss.huggingface.co/u/fickerZHANG)\
**Post date:** [August 23, 2024, 2:47pm UTC](https://discuss.huggingface.co/t/how-to-train-a-combination-model/103710/1 "2024-08-23T14:47:08Z")

</div>

I am a beginner in Huggingface, but I really enjoy the Huggingface community. I have a question about how to use huggingface to train a combination model. For example, I want to train an image captioning model. But I want to extract the Sam and clip features of an image and input them into GPT2 (or Llama 3.1) to generate a natural language description（or classification task）. Can someone here tell me how to build code with Huggingface?
