Let's go! Custom generation code has landed in 
text
Let's go! Custom generation code has landed in 
transformers
`transformers`
inline_code
 🚀
text
 🚀
new_line
new_line
Have you designed a new cool KV cache? Maybe you're comparing new test-time compute ideas you've been researching? Have you found a way to do diffusion with existing models? You can now easily share your findings with the community with custom generation code, sharing the well-known 
text
Have you designed a new cool KV cache? Maybe you're comparing new test-time compute ideas you've been researching? Have you found a way to do diffusion with existing models? You can now easily share your findings with the community with custom generation code, sharing the well-known 
generate
`generate`
inline_code
 interface 🤓
text
 interface 🤓
new_line
new_line
In a nutshell, we have expanded the support of custom modeling code on the Hub with *model-agnostic* custom generation code. Write for one model, reuse with any model -- hopefully, this will democratize access to new generation ideas 🫡
text
In a nutshell, we have expanded the support of custom modeling code on the Hub with *model-agnostic* custom generation code. Write for one model, reuse with any model -- hopefully, this will democratize access to new generation ideas 🫡
new_line
new_line
As a creator, you gain the ability to get your ideas in 
text
As a creator, you gain the ability to get your ideas in 
transformers
`transformers`
inline_code
 with minimal effort. You'll also have access to all Hub features: a landing page for your creation, discussions, usage metrics, ... 🤓
text
 with minimal effort. You'll also have access to all Hub features: a landing page for your creation, discussions, usage metrics, ... 🤓
new_line
new_line
💎 Resources 💎
text
💎 Resources 💎
new_line
- docs: 
text
- docs: 
https://huggingface.co/docs/transformers/generation_strategies#custom-decoding-methods
https://huggingface.co/docs/transformers/generation_strategies#custom-decoding-methods
link
new_line
- minimal example: 
text
- minimal example: 
https://huggingface.co/transformers-community/custom_generate_example
transformers-community/custom_generate_example
model
resource
https://huggingface.co/transformers-community/custom_generate_example
new_line
- discussion: 
text
- discussion: 
https://huggingface.co/spaces/transformers-community/support/discussions/10
transformers-community/support
space
resource
https://huggingface.co/spaces/transformers-community/support/discussions/10
Let's go! Custom generation code has landed in `transformers` 🚀

Have you designed a new cool KV cache? Maybe you're comparing new test-time compute ideas you've been researching? Have you found a way to do diffusion with existing models? You can now easily share your findings with the community with custom generation code, sharing the well-known `generate` interface 🤓

In a nutshell, we have expanded the support of custom modeling code on the Hub with *model-agnostic* custom generation code. Write for one model, reuse with any model -- hopefully, this will democratize access to new generation ideas 🫡

As a creator, you gain the ability to get your ideas in `transformers` with minimal effort. You'll also have access to all Hub features: a landing page for your creation, discussions, usage metrics, ... 🤓

💎 Resources 💎
- docs: https://huggingface.co/docs/transformers/generation_strategies#custom-decoding-methods
- minimal example: https://huggingface.co/transformers-community/custom_generate_example
- discussion: https://huggingface.co/spaces/transformers-community/support/discussions/10
🚀
John6666
🤗
John6666