lalamo 0.3.3__py3-none-any.whl → 0.3.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- lalamo/__init__.py +1 -1
- lalamo/model_import/common.py +7 -1
- lalamo/model_import/huggingface_tokenizer_config.py +1 -2
- {lalamo-0.3.3.dist-info → lalamo-0.3.4.dist-info}/METADATA +1 -1
- {lalamo-0.3.3.dist-info → lalamo-0.3.4.dist-info}/RECORD +9 -9
- {lalamo-0.3.3.dist-info → lalamo-0.3.4.dist-info}/WHEEL +0 -0
- {lalamo-0.3.3.dist-info → lalamo-0.3.4.dist-info}/entry_points.txt +0 -0
- {lalamo-0.3.3.dist-info → lalamo-0.3.4.dist-info}/licenses/LICENSE +0 -0
- {lalamo-0.3.3.dist-info → lalamo-0.3.4.dist-info}/top_level.txt +0 -0
lalamo/__init__.py
CHANGED
lalamo/model_import/common.py
CHANGED
|
@@ -138,7 +138,13 @@ def import_message_processor(
|
|
|
138
138
|
raise ValueError("Conflicting chat template specifications.")
|
|
139
139
|
prompt_template = tokenizer_config.chat_template
|
|
140
140
|
tokenizer = Tokenizer.from_file(str(tokenizer_file))
|
|
141
|
-
|
|
141
|
+
|
|
142
|
+
added_tokens = tokenizer_config.added_tokens()
|
|
143
|
+
added_special_tokens = [token for token in added_tokens if token.special]
|
|
144
|
+
added_not_special_tokens = [token for token in added_tokens if not token.special]
|
|
145
|
+
tokenizer.add_special_tokens(added_special_tokens)
|
|
146
|
+
tokenizer.add_tokens(added_not_special_tokens)
|
|
147
|
+
|
|
142
148
|
message_processor_config = MessageProcessorConfig(
|
|
143
149
|
prompt_template=prompt_template,
|
|
144
150
|
output_parser_regex=model_spec.output_parser_regex,
|
|
@@ -73,8 +73,7 @@ class HFTokenizerConfig:
|
|
|
73
73
|
if self.added_tokens_decoder is None:
|
|
74
74
|
return []
|
|
75
75
|
return [
|
|
76
|
-
|
|
77
|
-
for token in self.added_tokens_decoder.values()
|
|
76
|
+
token.to_added_token() for token in self.added_tokens_decoder.values()
|
|
78
77
|
]
|
|
79
78
|
|
|
80
79
|
@classmethod
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
lalamo/__init__.py,sha256=
|
|
1
|
+
lalamo/__init__.py,sha256=cWcHQPJNpb1aArj0uMzq45TRPIzyKfPxC19kiv3mVzs,217
|
|
2
2
|
lalamo/common.py,sha256=5NUFD26yQgOnEEk3LaQnce8n-VwJxILkEpFesHZhtQU,3820
|
|
3
3
|
lalamo/language_model.py,sha256=wZGucNCPP9ReHn6fYO5TlFHTXun1QIMwaxniq9z7K5Q,10639
|
|
4
4
|
lalamo/main.py,sha256=Ta3ZW-Xw3uNPEVvb2YlBOH9UhhLDV7PZjRCg6giu0ao,12275
|
|
@@ -8,9 +8,9 @@ lalamo/registry_abc.py,sha256=ENjXiD_wEH100fNjG-W5Em1L_EQ0Lf0pdRhRGvf3qZk,2197
|
|
|
8
8
|
lalamo/sampling.py,sha256=g_dNiJyZrRqoQIiLid4cr6nRT9N5tSz3GtHr8Bt4n-E,3404
|
|
9
9
|
lalamo/utils.py,sha256=Jm54CKFc6lJSggXVwF_lgiUuKEtQ55c58U-ALU6oxuk,2922
|
|
10
10
|
lalamo/model_import/__init__.py,sha256=Z8pS9rbKKx1QgUy7KZtHxiNWlZhII3mdovT9d37vAxg,168
|
|
11
|
-
lalamo/model_import/common.py,sha256=
|
|
11
|
+
lalamo/model_import/common.py,sha256=puMyMm2HivQ_qUt6iPcAcdzq6wal93owyBg88B3EVks,7906
|
|
12
12
|
lalamo/model_import/huggingface_generation_config.py,sha256=mot6VQ6ezCtEhN6VjhnvaU-nR5P5T2BuBUgpFNnWJxU,1495
|
|
13
|
-
lalamo/model_import/huggingface_tokenizer_config.py,sha256=
|
|
13
|
+
lalamo/model_import/huggingface_tokenizer_config.py,sha256=34oZiY9RQVAYSPFSM0-epwr2Su3XzipSUl4V9dz71PU,2524
|
|
14
14
|
lalamo/model_import/decoder_configs/__init__.py,sha256=Ru_lI1IjahyXZBSB5J0eWwVM6gn2ilRZW65m2sU2hMw,460
|
|
15
15
|
lalamo/model_import/decoder_configs/common.py,sha256=L1oUilS4KwfnwKyWegoSZ3Tha5CqRjN6gjMhCie4Ymk,1849
|
|
16
16
|
lalamo/model_import/decoder_configs/executorch.py,sha256=Kx_T-B5jumfWf9vj20We4FF0GkSkTmIYeWOss88-qYA,5266
|
|
@@ -51,9 +51,9 @@ lalamo/modules/normalization.py,sha256=YecmA0hnVVYd473FzVgxunHYA377NWMKZRfuQNB8D
|
|
|
51
51
|
lalamo/modules/rope.py,sha256=IlL4Jz4fw6eTKXXMls1BXBAgbuB3GnP0aVB9GrF1nA8,10012
|
|
52
52
|
lalamo/modules/torch_interop.py,sha256=-mujd1zI4ec2w92Hd50RtDa0K3jl6ZSnPxc5r3Fp9nU,916
|
|
53
53
|
lalamo/modules/utils.py,sha256=5QTdi34kEI5jix7TfTdB0mOYZbzZUul_T1y8eWCA6lQ,262
|
|
54
|
-
lalamo-0.3.
|
|
55
|
-
lalamo-0.3.
|
|
56
|
-
lalamo-0.3.
|
|
57
|
-
lalamo-0.3.
|
|
58
|
-
lalamo-0.3.
|
|
59
|
-
lalamo-0.3.
|
|
54
|
+
lalamo-0.3.4.dist-info/licenses/LICENSE,sha256=diHRfjSEJHD1nnEeMIfMRCjR3UERf8bT3eseD6b1ayA,1072
|
|
55
|
+
lalamo-0.3.4.dist-info/METADATA,sha256=YnFSMWXzI5YyOSHGa8wWJ9QUaO5rJhnGS7GIUo9QDBM,2854
|
|
56
|
+
lalamo-0.3.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
57
|
+
lalamo-0.3.4.dist-info/entry_points.txt,sha256=qli7qTfnBk5WP10rOGXXEckHMtt-atJMDWd8jN89Uks,43
|
|
58
|
+
lalamo-0.3.4.dist-info/top_level.txt,sha256=VHvWL5JN5XRG36NsN_MieJ7EwRihEOrEjyDaTdFJ-aI,7
|
|
59
|
+
lalamo-0.3.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|