forked from AkariAsai/OpenScholar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
__init__.py
60 lines (58 loc) · 1.53 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Copyright (c) Meta Platforms, Inc. and affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
# LICENSE file in the root directory of this source tree.
from torchtune.data._chat_formats import (
ChatFormat,
ChatMLFormat,
Llama2ChatFormat,
MistralChatFormat,
Llama3ChatFormat
)
from torchtune.data._common import CROSS_ENTROPY_IGNORE_IDX
from torchtune.data._converters import get_openai_messages, get_sharegpt_messages
from torchtune.data._instruct_templates import (
AlpacaInstructTemplate,
InstructTemplate,
StackExchangedPairedTemplate,
)
from torchtune.data._messages import (
InputOutputToMessages,
JSONToMessages,
Message,
Role,
ShareGPTToMessages,
)
from torchtune.data._prompt_templates import (
ChatMLTemplate,
GrammarErrorCorrectionTemplate,
PromptTemplate,
PromptTemplateInterface,
SummarizeTemplate,
)
from torchtune.data._utils import truncate, validate_messages
__all__ = [
"AlpacaInstructTemplate",
"ChatFormat",
"CROSS_ENTROPY_IGNORE_IDX",
"GrammarErrorCorrectionTemplate",
"InstructTemplate",
"SummarizeTemplate",
"Llama2ChatFormat",
"MistralChatFormat",
"ChatMLFormat",
"JSONToMessages",
"ShareGPTToMessages",
"truncate",
"Message",
"validate_messages",
"StackExchangedPairedTemplate",
"Role",
"PromptTemplateInterface",
"PromptTemplate",
"InputOutputToMessages",
"ChatMLTemplate",
"get_openai_messages",
"get_sharegpt_messages",
]