Skip to content

from_pretrained() errors in loading state_dict for FastFit #21

@bartschuller

Description

@bartschuller

FastFit 1.2.1

I've been trying to use FastFit for Dutch using the solution in #15 but after training export_model() errors out. Or rather, the reloading using from_pretrained() that it does.
The same happens if I use model.save_pretrained() myself and then from_pretrained().

These are the errors:

RuntimeError: Error(s) in loading state_dict for FastFit:
	While copying the parameter named "all_docs.0", whose dimensions in the model are torch.Size([86, 13]) and whose dimensions in the checkpoint are torch.Size([86, 13]), an exception occurred : ('Only Tensors of floating point and complex dtype can require gradients',).
	While copying the parameter named "all_docs.1", whose dimensions in the model are torch.Size([86, 13]) and whose dimensions in the checkpoint are torch.Size([86, 13]), an exception occurred : ('Only Tensors of floating point and complex dtype can require gradients',).

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