localGPT icon indicating copy to clipboard operation
localGPT copied to clipboard

added the option to use a custom model or embedding instead of the hardcoded ones

Open Allaye opened this issue 2 years ago • 10 comments

  • added cli option to specify embedding model, LLAMA, and AutoGTPQ model
  • annotate the functions with expected argument types

Allaye avatar Jun 11 '23 19:06 Allaye

The embedding should be configurable in both ingest.py and run_localGPT.py as in #139

Tchekda avatar Jun 11 '23 22:06 Tchekda

@Allaye When we are adding the model choice to CLI, we have the default model_basename set to WizardLM-7B-uncensored-GPTQ-4bit-128g.compat.no-act-order.safetensors. The unquantized models do not have the model_basename and I think it will cause issues when we try to load the model. Probably its better to add a check on the model type when we are calling the load_model function. What do you think?

PromtEngineer avatar Jun 11 '23 22:06 PromtEngineer

I will look into it..

On Sun, Jun 11, 2023, 11:48 PM PromptEngineer @.***> wrote:

@Allaye https://github.com/Allaye When we are adding the model choice to CLI, we have the default model_basename set to WizardLM-7B-uncensored-GPTQ-4bit-128g.compat.no-act-order.safetensors. The unquantized models do not have the model_basename and I think it will cause issues when we try to load the model. Probably its better to add a check on the model type when we are calling the load_model function. What do you think?

— Reply to this email directly, view it on GitHub https://github.com/PromtEngineer/localGPT/pull/138#issuecomment-1586364801, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEEPRYRZYCOVDK3N2PEUZ5TXKZDLZANCNFSM6AAAAAAZCQVHGE . You are receiving this because you were mentioned.Message ID: @.***>

Allaye avatar Jun 11 '23 22:06 Allaye

@PromtEngineer i think that check is been done in the load_model function already.

Allaye avatar Jun 12 '23 06:06 Allaye

@Allaye based on the if condition in the load_model function, irrespective of whether the model is quantized or not, since we will be providing a default model_basename, it will always use the AutoGPTQForCausalLM for loading the model. That's what's seems to be happening. Can you double-check?

PromtEngineer avatar Jun 12 '23 07:06 PromtEngineer

@Allaye based on the if condition in the load_model function, irrespective of whether the model is quantized or not, since we will be providing a default model_basename, it will always use the AutoGPTQForCausalLM for loading the model. That's what's seems to be happening. Can you double-check?

oh okay

Allaye avatar Jun 12 '23 08:06 Allaye

@PromtEngineer currently if a non_quantized model is used even with the default model_basename one of the elif or else will used.

Allaye avatar Jun 14 '23 21:06 Allaye

@PromtEngineer can you take a look at this now??

Allaye avatar Jun 15 '23 18:06 Allaye

@Allaye thanks for the update, I will have a detailed look at it later today and will merge it if I dont' see any further changes that need to be made. Thanks for the help.

PromtEngineer avatar Jun 15 '23 19:06 PromtEngineer

@Allaye, sorry was out. The PR is failing the pre-commit. can you please look at it? The update looks good to me and I will merge it once this is resolved. Thanks,

PromtEngineer avatar Jun 19 '23 00:06 PromtEngineer