pykan icon indicating copy to clipboard operation
pykan copied to clipboard

Is it only suitbale for small-scale model?

Open HelloWorldLTY opened this issue 9 months ago • 3 comments

Hi, thanks for your great work. I am thinking about implementing a KAN with 3072 as input dims and 2000 as output dims. Do you think the GPU is capable for running it? I have tried fourierKANs but always got killed.

HelloWorldLTY avatar May 03 '24 23:05 HelloWorldLTY

Hi, I found this linear projection trick from GraphKAN useful: https://github.com/WillHua127/GraphKAN-Graph-Kolmogorov-Arnold-Networks. In short, it's better to implement KAN in latent space so it would be nice to first linear map 3072D to some low-dimension space (latent space), use KAN to process the information in the latent space, and then use a linear layer to map back to 2000. Also, just a bit curious, what is your dataset about? Where does this high dimension come from?

KindXiaoming avatar May 04 '24 04:05 KindXiaoming

Thanks, I have tried enisum but failed. I will try your suggestions as well as suggestions from fourier transformer.

I think combining KAN with MLP is a good idea and I am exploring it.

The high dimension comes from the embeddings of LLMs. 3000+ is not very high, for a matrix with genes as features, the dimension will be approx 20,000.

HelloWorldLTY avatar May 04 '24 12:05 HelloWorldLTY

Also, reducing the grid size works for me.

HelloWorldLTY avatar May 04 '24 13:05 HelloWorldLTY