Skip to content

examples don't work #1656

@yechenzhi

Description

@yechenzhi

I run examples you provided here, it says AttributeError: 'NoneType' object has no attribute 'model_init_kwargs'.

Then I also run the example you provided in the README, like this:

# imports
from datasets import load_dataset
from trl import SFTTrainer

# get dataset
dataset = load_dataset("imdb", split="train")

# get trainer
trainer = SFTTrainer(
    "facebook/opt-350m",
    train_dataset=dataset,
    dataset_text_field="text",
    max_seq_length=512,
)

# train
trainer.train()  

still the same error. Any plan to update these examples?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions