Update pseudo_moe_st_module.py

#4

Fix three issues in the Sentence Transformers module

domain="general" raised ValueError, although it is the documented default route; it's not in config.domain_names. It is now accepted and listed in the error message.
Tokenizer options were silently ignored on Sentence Transformers 5.x and 6.x, which pass them as processor_kwargs (formerly tokenizer_kwargs). Both names are now accepted.
model.save() followed by a reload failed with ModuleNotFoundError: No module named 'pseudo_moe_st_module', because the module was saved in a subfolder. save_in_root = True keeps it in the root folder, matching this repo's layout.

Tested with Sentence Transformers 4.1.0, 5.7.0 and 6.1.0 (on Transformers 4.51.3, 4.57.1 and 5.18.0, combined with the modeling-file PR): default embeddings are unchanged, all domains work, and a saved model reloads with the same embeddings.

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment