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

Any solution to save the converted model? #29

Open
aliseyfi opened this issue Aug 14, 2023 · 3 comments
Open

Any solution to save the converted model? #29

aliseyfi opened this issue Aug 14, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@aliseyfi
Copy link

aliseyfi commented Aug 14, 2023

Converting the loaded model using to_neuron() method takes a long time. Is there any way to Save the neuron_model on disk and load it again? This is for GPT-NeoX.

@hannanjgaws hannanjgaws added the enhancement New feature or request label Aug 18, 2023
@hannanjgaws
Copy link
Contributor

Hi @aliseyfi:

We are working on adding serialization support for all models in an upcoming release. We will update this ticket when serialization support is available.

@jimburtoft
Copy link

Hey @aliseyfi , does model.save work for you?

Example code from https://huggingface.co/aws-neuron/Mistral-neuron:

model_neuron = MistralForSampling.from_pretrained('mistralai/Mistral-7B-Instruct-v0.1-split', batch_size=1, \
    tp_degree=2, n_positions=256, amp='bf16', neuron_config=neuron_config)
model_neuron.to_neuron()

#save compiled neff files out to the same directory
model_neuron.save("mistralai/Mistral-7B-Instruct-v0.1-split")

@aliseyfi
Copy link
Author

aliseyfi commented Jan 8, 2024

Hey @aliseyfi , does model.save work for you?

Example code from https://huggingface.co/aws-neuron/Mistral-neuron:

model_neuron = MistralForSampling.from_pretrained('mistralai/Mistral-7B-Instruct-v0.1-split', batch_size=1, \
    tp_degree=2, n_positions=256, amp='bf16', neuron_config=neuron_config)
model_neuron.to_neuron()

#save compiled neff files out to the same directory
model_neuron.save("mistralai/Mistral-7B-Instruct-v0.1-split")

Sorry, I don't work on that project anymore. Thanks for the update though.

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

No branches or pull requests

3 participants