from transformers import MusicgenForConditionalGeneration
model = MusicgenForConditionalGeneration.from_pretrained("facebook/musicgen-small")
inspect the default generation config
model.generation_config
increase the guidance scale to 4.0
model.generation_config.guidance_scale = 4.0
decrease the max length to 256 tokens
model.generation_config.max_length = 256