| 1 | # Copyright 2025 the LlamaFactory team. |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | |
| 16 | from .loader import get_dataset |
| 17 | from .template import ( |
| 18 | IGNORE_INDEX, |
| 19 | TEMPLATES, |
| 20 | Role, |
| 21 | Template, |
| 22 | get_template_and_fix_tokenizer, |
| 23 | register_spatiallm_templates, |
| 24 | ) |
| 25 | from .collator import SFTDataCollatorWith4DAttentionMask |
| 26 | from .mm_plugin import ( |
| 27 | LAYOUT_S_PLACEHOLDER, |
| 28 | LAYOUT_E_PLACEHOLDER, |
| 29 | POINT_S_TOKEN, |
| 30 | POINT_E_TOKEN, |
| 31 | POINT_CLOUD_PLACEHOLDER, |
| 32 | ) |
| 33 | |
| 34 | __all__ = [ |
| 35 | "IGNORE_INDEX", |
| 36 | "TEMPLATES", |
| 37 | "LAYOUT_S_PLACEHOLDER", |
| 38 | "LAYOUT_E_PLACEHOLDER", |
| 39 | "POINT_S_TOKEN", |
| 40 | "POINT_E_TOKEN", |
| 41 | "POINT_CLOUD_PLACEHOLDER", |
| 42 | "Role", |
| 43 | "Template", |
| 44 | "get_dataset", |
| 45 | "get_template_and_fix_tokenizer", |
| 46 | "register_spatiallm_templates", |
| 47 | "SFTDataCollatorWith4DAttentionMask", |
| 48 | ] |