def DecodeIds(self, Ids, type_token=False):
        """converts ids to wordpiece tokens and joins them as a text string"""
        if type_token:
            return ' '.join(Id.token if isinstance(Id, TypeToken)
                            else self.type_id_map[Id].token for Id in Ids)
        if isinstance(Ids, Tokenization):
            Ids = Ids.tokenization
        Tokens = []
        for Id in Ids:
            Tokens.append(self.text_tokenizer.ids_to_tokens[Id] if Id != -1 else '-1')
        Tokens = self.text_tokenizer.convert_ids_to_tokens(Ids)
        return ' '.join(Tokens)
converts ids to wordpiece tokens and joins them as a text string
megatron_lm/megatron/deprecated_data_utils/tokenization.py