# How to rewrite this code?

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-rewrite-this-code%2F96698%3E%5C
**Category:** 🤗Transformers\
**Created:** [July 11, 2024, 12:01am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-rewrite-this-code%2F96698 "2024-07-11T00:01:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![blackmagic02881](https://avatars.discourse-cdn.com/v4/letter/b/e47c2d/32.png) [@blackmagic02881](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fblackmagic02881)%5C
**Post date:** [July 11, 2024, 12:01am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fhow-to-rewrite-this-code%2F96698%2F1 "2024-07-11T00:01:05Z")

</div>

Saw this great blog and tried to reproduce it. [Fine-tuning Florence-2 - Microsoft's Cutting-edge Vision Language Models](https://huggingface.co/blog/finetune-florence2)  
The blog handwrites the train step. I noticed that transformer.Trainer() only take tokenizer as parameter. Wonder if something similar to Trainer() can take a processor?
