Instructions to use somosnlp/gua-a with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Local Apps Settings
- Unsloth Desktop
Update tokenizer_keeper.py
Browse files- tokenizer_keeper.py +14 -14
tokenizer_keeper.py
CHANGED
|
@@ -22,20 +22,20 @@ class KeeperTokenizer(PreTrainedTokenizer):
|
|
| 22 |
self.tokenizer_retriever = None
|
| 23 |
self.tokenizer_model = None
|
| 24 |
|
| 25 |
-
if cfg:
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
else:
|
| 37 |
-
|
| 38 |
-
|
| 39 |
|
| 40 |
|
| 41 |
|
|
|
|
| 22 |
self.tokenizer_retriever = None
|
| 23 |
self.tokenizer_model = None
|
| 24 |
|
| 25 |
+
# if cfg:
|
| 26 |
+
# print("Initializing KeeperTokenizer with cfg")
|
| 27 |
+
# # Inicialización con configuración
|
| 28 |
+
# self.tokenizer_retriever = AutoTokenizer.from_pretrained(cfg.retriever_config['_name_or_path'])
|
| 29 |
+
# self.tokenizer_model = AutoTokenizer.from_pretrained(cfg.model_config['_name_or_path'])
|
| 30 |
+
|
| 31 |
+
# # Almacena kwargs para la serialización y carga futura
|
| 32 |
+
# self.init_kwargs = {'cfg': cfg}
|
| 33 |
+
|
| 34 |
+
# super().__init__() # Inicializa la clase base al principio
|
| 35 |
+
# print("Initialization complete")
|
| 36 |
+
# else:
|
| 37 |
+
# # Si cfg no se proporciona, esto se manejará en el método from_pretrained
|
| 38 |
+
# print("Initializing KeeperTokenizer without cfg")
|
| 39 |
|
| 40 |
|
| 41 |
|