Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I need to load my custom model from pre trained model #2

Open
shaileshp367 opened this issue Jun 27, 2023 · 0 comments
Open

I need to load my custom model from pre trained model #2

shaileshp367 opened this issue Jun 27, 2023 · 0 comments

Comments

@shaileshp367
Copy link

Hello

I need to load my custom model from pre trained model

Here is the code but he giving error like 'HFValidationError: Repo id must use alphanumeric chars or '-', '_', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is'

Please Help

model = "shaileshp/trained-test-model-1-merged"

dtype = torch.bfloat16 if torch.cuda.get_device_capability()[0] == 8 else torch.float16

model = AutoModelForCausalLM.from_pretrained(
model,
return_dict=True,
device_map="auto",
load_in_8bit=True,
torch_dtype=dtype,
#trust_remote_code=True,
)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant