| import sys | |
| import os | |
| # Add the current directory to sys.path so Python can find `configuration_sapnous.py` | |
| sys.path.append(os.path.dirname(os.path.abspath(__file__))) | |
| from transformers import AutoModel, AutoConfig | |
| from configuration_sapnous import SapnousT1Config # Now it should work | |
| model_path = r"E:\git\Sapnous-47B\Sapnous-6B" | |
| config = AutoConfig.from_pretrained(model_path, trust_remote_code=True) | |
| model = AutoModel.from_pretrained(model_path, config=config, trust_remote_code=True) | |
| print("Model loaded successfully!") | |