I recently encountered an issue while working with a locally saved finetuned model, and I was hoping to get some guidance. Here’s the situation:
I used trainer.save_model() to save my finetuned model and was able to use it locally in my Anaconda environment without any problems.
Later, I decided to create a requirements.txt file for my project. However, I noticed that my current environment had too many unnecessary packages.
To address this, I deleted the old environment (which, in hindsight, was not the best decision) and created a new, cleaner environment to only install the packages I need.
After creating the new environment, I tried to load the saved model, but I keep running into the following error:
ValueError: Unrecognized model in ./trained_model. Should have a `model_type` key in its config.json, or contain one of the following strings in its name: albert, align, altclip...
Here are the details of my current Anaconda environment:
python = 3.11
cuda version = 12.7
pytorch-cuda = 12.1
I would greatly appreciate any advice or insights on what might be causing this issue and how to resolve it. Thank you in advance for your help!