def METHOD_NAME(input_message: bytes, model_name: str) -> torch.Tensor:
  """Encodes input text into token tensors.
  Args:
      input_text: Input text for the LLM model.
      model_name: Name of the LLM model.
  Returns: Tokenized input tokens.
  """
  input_text = input_message.decode('utf-8')
  logging.info('Converting "%s" to tensors...', input_text)
  tokenizer = build_tokenizer(model_name)
  return tokenizer(input_text, return_tensors="pt").input_ids[
    0]