“OSError: Model name './XX' was not found in tokenizers model name list” - cannot load custom tokenizer in Transformers

No this should always work since the object is always present in the init (if tokenziers is not installed, an error is raised when you try to actually use that object). If it does not work, it means you don’t have v4 of transformers in your environment.