Code Monkey home page Code Monkey logo

Comments (2)

cg123 avatar cg123 commented on June 18, 2024

This is somewhat expected. I believe that the issue is that base gpt2 (openai-community/gpt2) doesn't actually have a classification head - it gets randomly initialized when you fine tune it. In this case, though, you actually want to use one of your checkpoints as the base_model anyway - SLERP expects it to be one of the two models you're merging, not a "common ancestor" like other merge methods.

Hope this helps, and sorry for the slow response!

from mergekit.

llsj14 avatar llsj14 commented on June 18, 2024

I have the same issue when merging GPT-2 models.
I can't merge them in either way, using one of my checkpoints as the base model or using a 'common ancestor' as the base model.

It's strange that the GPT-2 model has 'ln_f.bias' and 'ln_f.weight', but they can't be found and lead to runtime errors like the following:
'RuntimeError: Tensor 'ln_f.bias' required but not present in the model.'

When I skipped the 'ln_f' terms, there was another error like the following:
'RuntimeError: Tensor 'h.11.mlp.c_fc.bias' required but not present in the model.'

I believe there might be a naming issue.


I resolved this issue for my usage.
In my loader.index.tensor_paths it was 'transformer.ln_f.bias' instead of 'ln_f.bias'.
I don't know the reason.

from mergekit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.