Giter Club home page Giter Club logo

Comments (4)

maxreciprocate avatar maxreciprocate commented on June 2, 2024 1

@doyled-it that should be the case, yes

from trlx.

maxreciprocate avatar maxreciprocate commented on June 2, 2024

Thanks @doyled-it for opening this issue! Can confirm this is the case and will try to resolve it shortlly.

from trlx.

doyled-it avatar doyled-it commented on June 2, 2024

@maxreciprocate thanks for looking into it! I also forgot to mention that in order for it to load, I have to copy in the model's config.json into the checkpoint directory.

from trlx.

doyled-it avatar doyled-it commented on June 2, 2024

Thank you @maxreciprocate for merging that so quickly. I see that it does now in fact load when I point to the hf_model directory and give me an output that makes sense:

path = Path("path/to/best_checkpoint/hf_model")
pipe = pipeline(
    "text2text-generation",
    model=str(path),
    tokenizer="declare-lab/flan-alpaca-gpt4-xl",
)

text = pipe("tell me a joke")

print(text)

Output:

[{'generated_text': "Why don't scientists trust atoms? Because they make up everything!"}]

Just to make sure: With PR #551, trlx is now saving a trained version of the model with updated weights? And that's what I'm loading when I use the code above?

from trlx.

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.