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

Create a model file from the generated training_state.dat #22

Open
manojmanivannan opened this issue Jul 16, 2024 · 5 comments
Open

Create a model file from the generated training_state.dat #22

manojmanivannan opened this issue Jul 16, 2024 · 5 comments

Comments

@manojmanivannan
Copy link

Apologies if my question is stupid, is it at all possible to create a model so we can run this generated model on , say, ollama ?

@keyvank
Copy link
Owner

keyvank commented Jul 16, 2024

Unfortunately, the file format femtoGPT is generating is something special to femtoGPT and not a standardized one, so no, you can't directly load training_state.dat into ollama. Although, maybe in the future, we can add the ability to generate standard model formats to femtoGPT :)

@manojmanivannan
Copy link
Author

thanks @keyvank for the quick response. So how can i run the model in inference mode ?

@keyvank
Copy link
Owner

keyvank commented Jul 17, 2024

@manojmanivannan Just change the main.rs file and keep this:

let inference = gpt.infer(
    &mut rng,
    &tokenizer.tokenize("YOUR INPUT TO THE MODEL"),
    100,
    inference_temperature,
    |_ch| {},
)?;

// Generate 100 character with the currently trained model before
// starting the training loop.
println!("{}", tokenizer.untokenize(&inference));

@nitirajrathore
Copy link

@keyvank : Thanks for developing such a nice project. Can you also help by writing the full code for this inference in the project itself. I am a coder, but don't know rust. I tried the snippet you gave but it is giving lots of error that I don't understand. Now just to test the model generated, I will have learn rust.
Can you please complete the inference part as well so that newbies can directly run the generated model.

@keyvank keyvank closed this as completed in 1af3258 Sep 6, 2024
@keyvank
Copy link
Owner

keyvank commented Sep 6, 2024

@nitirajrathore Please check my last commit

@keyvank keyvank reopened this Sep 6, 2024
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

3 participants