chrisociepa / allamo

Simple, hackable and fast implementation for training/finetuning medium-sized LLaMA-based models
MIT License
152 stars 15 forks source link

[feature request] usage of trained model in python script #5

Closed phineas-pta closed 1 year ago

phineas-pta commented 1 year ago

hello, thanks for the great work

i know that sample.py, sample_api.py exist but i just want to use the model in a standalone python script

because of the way AllamoConfiguration.__post_init__() is defined, i cannot create a new instance AllamoConfiguration to use it

is there any way to do it properly without touching the source code?

many thanks

chrisociepa commented 1 year ago

Thank you for your feetback!

I've just pushed a small change that allows load/parse configuration conditionally. When you create an object of the AllamoConfiguration class, pass load_configuration=False in constructor:

config = AllamoConfiguration(load_configuration=False)
phineas-pta commented 1 year ago

tysm!