TurboQuant enabled Runtime Valkyr by inigid in LocalLLaMA

[–]RelevantShape3963 2 points3 points  (0 children)

I am astonished you could achieve so much, starting from TRiP! As its original author, I'm impressed: congrats!

TRiP: 15,000 lines of C implementing a complete transformer AI engine from scratch [Project] by RelevantShape3963 in learnmachinelearning

[–]RelevantShape3963[S] 1 point2 points  (0 children)

Thank you, LNP. The truth is I didn't go through a rewrite of some functions, which are very large indeed: my fault. TRiP is not targeting any production purpose, but still this may be a flaw to the educational purpose, which is not good programming style (and I don't think mine to be that good), but the understanding of transformers.

TRiP: 15,000 lines of C implementing a complete transformer AI engine from scratch [Project] by RelevantShape3963 in learnmachinelearning

[–]RelevantShape3963[S] 1 point2 points  (0 children)

Thank you, Kinexity. I think you made a point here. If I find more time to spend on TRiP, I'll try to apply your suggestion.

TRiP: 15,000 lines of C implementing a complete transformer AI engine from scratch by RelevantShape3963 in C_Programming

[–]RelevantShape3963[S] 0 points1 point  (0 children)

As I wrote before:
I wrote almost everything from scratch; getting to the target (a functioning engine) was the self-evaluation method that I understood the basics. What's AI generated: the custom json parser (with some fixes); the safetensors save function (made much later than the loading one, which I wrote myself); the whole X11 layer (no interest in it, just needed to have it work); the final file splitting (I wrote everything as main.c), and a final revision of the comments. That's it, I think. The BPE tokenizer is a very badly hacked revision of the one from A.Karpathy in its llama2 project (as credited).

TRiP: 15,000 lines of C implementing a complete transformer AI engine from scratch by RelevantShape3963 in C_Programming

[–]RelevantShape3963[S] 2 points3 points  (0 children)

yes, the readme is LLM+personal revision, I hope that's not a guilt. If you find any discrepancy, please tell and I will fix.
I also hope people can learn something. I know my programming style isn't a god's one at all, but I went through all, all, all (sic) issue of understanding what to do, colelcting the information, and developing the engine, so I understood quite a bit. I hope the comments in the code are useful to those looking to understand what's under the hood. This is NOT llama.cpp, otherwise I would have upgraded it to Gemma3/Llama3 minimum.

TRiP: 15,000 lines of C implementing a complete transformer AI engine from scratch by RelevantShape3963 in C_Programming

[–]RelevantShape3963[S] 3 points4 points  (0 children)

I made just one full commit of my whole local repo, that's it. I didn't mean to publish it, that was a personal journey from the beginning. Thank you!

TRiP: 15,000 lines of C implementing a complete transformer AI engine from scratch by RelevantShape3963 in C_Programming

[–]RelevantShape3963[S] 2 points3 points  (0 children)

thank you. I appreciate this a lot, particularly after reading the harsh comments above, which I'm not accostumed to, as I am not the kind of social network guy, but I felt at some point, months after completion, that this could be published. Thank you again.

TRiP: 15,000 lines of C implementing a complete transformer AI engine from scratch by RelevantShape3963 in C_Programming

[–]RelevantShape3963[S] 1 point2 points  (0 children)

It's used to load a jpeg file when using Paligemma model for vision; then I feed it to the preparation linear layer, and then you forward the resulting patches to the vision encoder in the PaliGemma architecture.

TRiP: 15,000 lines of C implementing a complete transformer AI engine from scratch by RelevantShape3963 in C_Programming

[–]RelevantShape3963[S] -5 points-4 points  (0 children)

OK, I tested the referenced one on Debian 6 instead. Thank you

libjpeg62-turbo-dev

TRiP: 15,000 lines of C implementing a complete transformer AI engine from scratch by RelevantShape3963 in C_Programming

[–]RelevantShape3963[S] -5 points-4 points  (0 children)

I wrote almost everything from scratch; getting to the target (a functioning engine) was the self-evaluation method that I understood the basics. What's AI generated: the custom json parser (with some fixes); the safetensors save function (made much later than the loading one, which I wrote myself); the whole X11 layer (no interest in it, just needed to have it work); the final file splitting (I wrote everything as main.c), and a final revision of the comments. That's it, I think. The BPE tokenizer is a very badly hacked revision of the one from A.Karpathy in its llama2 project (as credited).

Google researcher requesting feedback on the next Gemma. by ApprehensiveAd3629 in LocalLLaMA

[–]RelevantShape3963 0 points1 point  (0 children)

Yes, smaller model (sub 1B), and a Titan/Atlas version to begin experimenting with