Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

MLEM-loaded model performs consistently worse #641

Description

@rocco-fortuna

I have a Pytorch text classification model I cannot disclose the architecture of. Whenever the model is loaded with the relative library, it consistently performs slightly better than the model saved and then loaded with MLEM.
As detailed on the Discord discussion with @aguschin:

It's a Pytorch sequence classification model. Ran the eval four times each:

  1. the original model
  2. the mlem_model saved and loaded with:
# load the model with Pytorch model class
model = MyModel.from_pretrained('./model_path')

# save
from mlem.api import save
save(model, "./checkpoints/v070_mlem")

#
from mlem.api import load
mlem_model = load("./checkpoints/v070_mlem")

And did eval 4 times each on 5k samples, getting the accuracies:

  1. original:
  • 0.7868
  • 0.7874
  • 0.7844
  • 0.7864
  1. mlem_model:
  • 0.7778
  • 0.783
  • 0.7808
  • 0.7816

So almost the same, but consistently lower by about 0.6% on average.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingml-frameworkML Framework supportserializationDumping and loading Python objects

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions