File size: 545 Bytes
2e2a204
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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!")