lagent icon indicating copy to clipboard operation
lagent copied to clipboard

Update base_llm.py

Open seanxuu opened this issue 1 year ago • 3 comments

Increase code flexibility and backward compatibility

seanxuu avatar Mar 21 '24 08:03 seanxuu

We do not want to support **kwargs in BaseModel, for it wont raise error when wrong init parameter

Harold-lkk avatar Mar 21 '24 09:03 Harold-lkk

We do not want to support **kwargs in BaseModel, for it wont raise error when wrong init parameter

In fact, I ran into an issue where if I tried to pass in device_map='auto', it reported an error. But this is a useful parameter in AutoModelForCausalLM.from_pretrained. If there any other solution?

seanxuu avatar Mar 21 '24 09:03 seanxuu

we have model_kwargs for HFTransformer model, which will be passed to AutoModelForCausalLM

Harold-lkk avatar Mar 21 '24 09:03 Harold-lkk