configuration.py 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. # Copyright 2021-2022 The Alibaba DAMO NLP Team Authors.
  2. # Copyright 2018 The Google AI Language Team Authors.
  3. # Copyright 2020 The HuggingFace Inc. team.
  4. # Copyright (c) 2018, NVIDIA CORPORATION.
  5. # All rights reserved.
  6. #
  7. # Licensed under the Apache License, Version 2.0 (the "License");
  8. # you may not use this file except in compliance with the License.
  9. # You may obtain a copy of the License at
  10. #
  11. # http://www.apache.org/licenses/LICENSE-2.0
  12. #
  13. # Unless required by applicable law or agreed to in writing, software
  14. # distributed under the License is distributed on an "AS IS" BASIS,
  15. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16. # See the License for the specific language governing permissions and
  17. # limitations under the License.
  18. """Space configuration, mainly copied from :class:`~transformers.configuration_xlm_roberta` """
  19. from modelscope.models.nlp.structbert import SbertConfig
  20. from modelscope.utils import logger as logging
  21. logger = logging.get_logger()
  22. class SpaceConfig(SbertConfig):
  23. """
  24. This class overrides [`SbertConfig`]. Please check the superclass for the appropriate
  25. documentation alongside usage examples.
  26. """
  27. model_type = 'space'