I want a generate(model: torch.nn.Module, tokenizer: Any, input text: str, max length: int, temperature…
I want a generate(model: torch.nn.Module, tokenizer: Any, input text: str, max length: int, temperature…: a task in MiMo-V2.6-RL-harbor-code: MiMo-V2.6-RL Code (Harbor) (Harbor dataset). The function should encode input text with tokenizer.encode(input text, return tensors="pt") , move the token…
The task
The function should encode `input_text` with `tokenizer.encode(input_text, return_tensors="pt")`, move the token tensor to `device`, then append exactly `max_length` sampled tokens before returning `tokenizer.decode(..., clean_up_tokenization_spaces=True)` for the full prompt plus continuation. If `max_length=0`, it…
Part of FineEnvs/MiMo-V2.6-RL-harbor-code.