Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFTTrainer support #682

Merged
merged 14 commits into from
Sep 5, 2024
8 changes: 4 additions & 4 deletions optimum/neuron/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

_import_structure = {
"hf_argparser": ["NeuronHfArgumentParser"],
"trainers": ["NeuronTrainer", "Seq2SeqNeuronTrainer"],
"trainers": ["NeuronTrainer", "Seq2SeqNeuronTrainer", "NeuronSFTTrainer"],
"training_args": ["NeuronTrainingArguments", "Seq2SeqNeuronTrainingArguments"],
"modeling_traced": ["NeuronTracedModel"],
"modeling": [
Expand Down Expand Up @@ -68,7 +68,7 @@
"ModelParallelismPlugin",
],
"pipelines": ["pipeline"],
"utils": ["get_peft_model"],
"utils": ["NeuronSFTConfig", "get_peft_model"],
}

if TYPE_CHECKING:
Expand Down Expand Up @@ -107,9 +107,9 @@
from .modeling_seq2seq import NeuronModelForSeq2SeqLM
from .modeling_traced import NeuronTracedModel
from .pipelines import pipeline
from .trainers import NeuronTrainer, Seq2SeqNeuronTrainer
from .trainers import NeuronSFTTrainer, NeuronTrainer, Seq2SeqNeuronTrainer
from .training_args import NeuronTrainingArguments, Seq2SeqNeuronTrainingArguments
from .utils import get_peft_model
from .utils import NeuronSFTConfig, get_peft_model

else:
import sys
Expand Down
Loading
Loading