CrystaLLM icon indicating copy to clipboard operation
CrystaLLM copied to clipboard

Example how to retrain model on user data?

Open Youjin1985 opened this issue 6 months ago • 2 comments

Could you please provide an example or dicumentation how to re-train existing model on user cifs?

Youjin1985 avatar Jun 11 '25 06:06 Youjin1985

Hi, thanks for your message.

Can you provide more details about what you are trying to do? If you would like to train a new model from scratch on your own set of CIFs, the instructions for preparing a custom CIF dataset are here.

However, fine-tuning an existing model on custom CIF files was not explored during development, and is outside the scope of this project. If you're interested in experimenting, I recommend checking out nanoGPT, which provides an example of fine-tuning a pretrained natural language model (e.g., on Shakespeare text). This approach might adaptable for CIFs.

lantunes avatar Jul 19 '25 14:07 lantunes

Just to clarify, it is possible to fine-tune an existing model with the code in this repo. In your config file, set:

init_from: 'resume'

Make sure the out_dir points to the directory containing the pre-trained model checkpoint. Fine-tuning is typically done with a lower learning rate than was used during pre-training.

But, again, fine-tuning wasn't explored during the development of this project, so we can't say how well it will work in practice.

lantunes avatar Jul 19 '25 14:07 lantunes