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

How to deploy a new model by torchchat? #1038

Open
liu8060 opened this issue Aug 16, 2024 · 4 comments
Open

How to deploy a new model by torchchat? #1038

liu8060 opened this issue Aug 16, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@liu8060
Copy link

liu8060 commented Aug 16, 2024

I want to use torchchat to load the trained model directly from the local. How to change the torchchat/config/data/models.json? Need to change download _ and _ convert in download.py?And, what other documents may need to be changed?

@Jack-Khuu
Copy link
Contributor

Glad to have you try things out

What file format is the local model you're working with?

@liu8060
Copy link
Author

liu8060 commented Aug 19, 2024

two formats
One is a folder format, which includes the model’s weight files, tokenizer files, and other necessary components.
The other format is a PyTorch .pth file, which contains the entire model.

The model's base model is llama3-8b

@Jack-Khuu
Copy link
Contributor

If the model is accessible from huggingface: Here's an example PR of how you can add it

#947 Specifically the known_model_configs and model.json

The other format is a PyTorch .pth file, which contains the entire model.

For this you can can add a known_model_config (based on your params.json with "use_tiktoken"=true for llama3 derivatives) and then point to your pth with --checkpoint-path

For example: python torchchat.py generate --checkpoint-path ~/Desktop/test/consolidated.00.pth --prompt "What should I do in Manhattan Chinatown?" --device mps --num-samples 3

@Jack-Khuu
Copy link
Contributor

One is a folder format, which includes the model’s weight files, tokenizer files, and other necessary components.

Similar to this case? #1040

@Jack-Khuu Jack-Khuu added the bug Something isn't working label Aug 19, 2024
@mikekgfb mikekgfb mentioned this issue Nov 8, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants