stanrom commited on
Commit
faf309f
1 Parent(s): 22cba02

sp_model debug

Browse files
Files changed (1) hide show
  1. tokenization_InternLM_XComposer.py +8 -7
tokenization_InternLM_XComposer.py CHANGED
@@ -63,6 +63,13 @@ class InternLMXComposerTokenizer(PreTrainedTokenizer):
63
  **kwargs,
64
  ):
65
  self.sp_model_kwargs = {} if sp_model_kwargs is None else sp_model_kwargs
 
 
 
 
 
 
 
66
  super().__init__(
67
  bos_token=bos_token,
68
  eos_token=eos_token,
@@ -71,13 +78,7 @@ class InternLMXComposerTokenizer(PreTrainedTokenizer):
71
  clean_up_tokenization_spaces=clean_up_tokenization_spaces,
72
  **kwargs,
73
  )
74
- self.vocab_file = vocab_file
75
- self.add_bos_token = add_bos_token
76
- self.add_eos_token = add_eos_token
77
- self.decode_with_prefix_space = decode_with_prefix_space
78
- self.sp_model = spm.SentencePieceProcessor(**self.sp_model_kwargs)
79
- self.sp_model.Load(vocab_file)
80
- self._no_prefix_space_tokens = None
81
 
82
  """ Initialisation"""
83
 
 
63
  **kwargs,
64
  ):
65
  self.sp_model_kwargs = {} if sp_model_kwargs is None else sp_model_kwargs
66
+ self.vocab_file = vocab_file
67
+ self.add_bos_token = add_bos_token
68
+ self.add_eos_token = add_eos_token
69
+ self.decode_with_prefix_space = decode_with_prefix_space
70
+ self.sp_model = spm.SentencePieceProcessor(**self.sp_model_kwargs)
71
+ self.sp_model.Load(vocab_file)
72
+ self._no_prefix_space_tokens = None
73
  super().__init__(
74
  bos_token=bos_token,
75
  eos_token=eos_token,
 
78
  clean_up_tokenization_spaces=clean_up_tokenization_spaces,
79
  **kwargs,
80
  )
81
+
 
 
 
 
 
 
82
 
83
  """ Initialisation"""
84