SpatialLM icon indicating copy to clipboard operation
SpatialLM copied to clipboard

Inquiry about how to train from scratch

Open AuthorityWang opened this issue 1 year ago • 5 comments

Hi, thanks for your great work! I'm trying to adopt this model on custom data, but currently, the training code only supports finetuning from the provided SpatialLM weights. I wonder if there is a way to load from Qwen2.5 and Sonata pretrained weights and train the model? Thanks in advance.

AuthorityWang avatar Sep 26 '25 03:09 AuthorityWang

Hi @AuthorityWang, thank you for your interest.

I prepared a weight initialization script here, let me know if you encountered any issues.

SamMaoYS avatar Sep 26 '25 15:09 SamMaoYS

Hi @SamMaoYS , this script works. Many thanks for your help. I will close this issue.

AuthorityWang avatar Sep 27 '25 06:09 AuthorityWang

Hey guys, thanks for the lovely work @SamMaoYS first of all! I also have been thinking to train the Spatiallm with the encoder from scratch. There are scripts for fine-tuning the model. Could this be just simply used to train the model from scratch? If yes, what changes, apart from removing checkpoints, initialising random weights for the encoder and learning rate would i have to make? A little help would be great! :) Thanks in advance

Sincerely, Esas

eyegotthis avatar Jan 27 '26 10:01 eyegotthis

An update from my side. I managed to use the weights initialisation script to initialise the models, thank you!

eyegotthis avatar Feb 02 '26 09:02 eyegotthis

Hi @eyegotthis, I haven't tried train from scratch without using the pretrained weights, all you need is use the initial random weights without loading the pretrained encoder weights. I am not sure if the performance will degrade if doing so.

SamMaoYS avatar Feb 02 '26 11:02 SamMaoYS