1 & 3 & 4. After training the model, you can save graph with pre-processing and post-processing steps like below
...
...

# some training steps
model = ...
model.compile(...)
model.fit(...)

@tf.function
def inference_function(text):
  # do some preprocessing
  text = tf.strings.regex_replace(text, # ... some regex patterns...)
  token_ids, starts, ends = tokenizer.tokenize_with_offsets(text)

  model_inputs = # prepare model inputs using token_ids

  # inference model
  model_outputs = model(model_inputs)

  outputs = # do some post-processing with starts, ends, and model_outputs
  return outputs

# https://www.tensorflow.org/api_docs/python/tf/keras/Model#save
model.save(
  "some path to save the model",
  signatures={
    "inference_fn": inference_function.get_concrete_function(tf.TensorSpec([None], dtype=tf.string)),
  }
)


Yes! After training the sentencepiece model, you can load and use it with text.SentencepieceTokenizer 1 in TF graph.