Xiaoting He commited on
Commit
3c8bbd7
1 Parent(s): 0b8561b
Files changed (3) hide show
  1. config.json +1 -1
  2. quantize_config.json +1 -1
  3. tokenization_baichuan.py +5 -6
config.json CHANGED
@@ -35,6 +35,6 @@
35
  "sym": true,
36
  "true_sequential": true,
37
  "model_name_or_path": null,
38
- "model_file_base_name": null
39
  }
40
  }
 
35
  "sym": true,
36
  "true_sequential": true,
37
  "model_name_or_path": null,
38
+ "model_file_base_name": "model"
39
  }
40
  }
quantize_config.json CHANGED
@@ -7,5 +7,5 @@
7
  "sym": true,
8
  "true_sequential": true,
9
  "model_name_or_path": null,
10
- "model_file_base_name": null
11
  }
 
7
  "sym": true,
8
  "true_sequential": true,
9
  "model_name_or_path": null,
10
+ "model_file_base_name": "model"
11
  }
tokenization_baichuan.py CHANGED
@@ -68,6 +68,11 @@ class BaichuanTokenizer(PreTrainedTokenizer):
68
  if isinstance(pad_token, str)
69
  else pad_token
70
  )
 
 
 
 
 
71
  super().__init__(
72
  bos_token=bos_token,
73
  eos_token=eos_token,
@@ -79,12 +84,6 @@ class BaichuanTokenizer(PreTrainedTokenizer):
79
  clean_up_tokenization_spaces=clean_up_tokenization_spaces,
80
  **kwargs,
81
  )
82
- self.vocab_file = vocab_file
83
- self.add_bos_token = add_bos_token
84
- self.add_eos_token = add_eos_token
85
- self.sp_model = spm.SentencePieceProcessor(**self.sp_model_kwargs)
86
- self.sp_model.Load(vocab_file)
87
-
88
  def __getstate__(self):
89
  state = self.__dict__.copy()
90
  state["sp_model"] = None
 
68
  if isinstance(pad_token, str)
69
  else pad_token
70
  )
71
+ self.vocab_file = vocab_file
72
+ self.add_bos_token = add_bos_token
73
+ self.add_eos_token = add_eos_token
74
+ self.sp_model = spm.SentencePieceProcessor(**self.sp_model_kwargs)
75
+ self.sp_model.Load(vocab_file)
76
  super().__init__(
77
  bos_token=bos_token,
78
  eos_token=eos_token,
 
84
  clean_up_tokenization_spaces=clean_up_tokenization_spaces,
85
  **kwargs,
86
  )
 
 
 
 
 
 
87
  def __getstate__(self):
88
  state = self.__dict__.copy()
89
  state["sp_model"] = None