Recent

Author Topic: [AI][Machine Learning] Tensorium - A platform agnostic tensor library for pascal  (Read 887 times)

hshatti

  • New Member
  • *
  • Posts: 13
  • Be kind!
Greetings everyone...
Im happy to share with you my recent work on Tensorium, a platform agnostic fast and intuitive tensor manipulation library written completely in pure pascal (and sometime SIMD assembly instructions for x86 CPUs, OpenCL for GPUs).
Hence the name Tensorium for now im still considering to change the name, yet I didn't settle on a better one.

This library is supposed to be a replacement of my old library LightNet which is another pascal neural network library that can run and train YOLO Object Detection models completely and self dependently in pure pascal.

The library is intended to be self dependant pascal (FPC or Delphi) tool for AI and Machine Learning algorithms.

The library contains
  • Tensor arithmetic operations and permutations
  • Basic Linear algebra
  • Regressions and fitting (Linear and Polynomial)
  • Neural networks (Examples provided for training MNIST, CIFAR, and  inference for YOLO3 Object Detection)
  • Console based tensor colorful visualization and plotting (works even with SSH terminals no need for a GUI)
  • Lots of good stuff that I can't list them all here but if you like Python's NumPy this is my humble attempt to unreptile the world and dePythonize the machine learning hype and make pascal great again

The tensor types
Code: Pascal  [Select][+][-]
  1. var tensor:TTensor<T>; //Generic Type

 or better optimized
Code: Pascal  [Select][+][-]
  1. var sTensor :TSingleTensor; iTensor: TInt32Tensor; //... etc
consist of managed records not classes so it should reside in the stack and any heap allocations or disposal operation will automatically follow the tensor variable life time within the code scope.

I have posted some initial instructions on how to use the library but there lots of good functionalities that needs to be documented with a code examples such as regressions and polynomial fitting,

If you find the library useful please don't forget to star ⭐ the library.

due to my limited free time please note that I'm looking for good pascal enthusiast's contibuters to help with the WIKI page and to write more examples along with the library improvements, if anyone interested I can provide a quick tutorial to kickstart, any pull requests in this regards are welcome just let me know.

All the best
« Last Edit: January 26, 2025, 05:33:34 pm by hshatti »
Comrades!, Unpython the world

nouzi

  • Sr. Member
  • ****
  • Posts: 314
Nice job
My English is  bad
Lazarus last version free pascal last version
Lazarus trunk  free pascal trunk 
System : Linux mint  64bit  Windows 7 64bit

Delphi100

  • Newbie
  • Posts: 6
This open source large language modeling application development framework is tiktok's parent company using Golang to write the development , if someone can convert it to Pascal would be great.
Eino Project address: https://github.com/cloudwego/eino, https://github.com/cloudwego/eino-ext
« Last Edit: January 26, 2025, 01:56:29 am by Delphi100 »

TRon

  • Hero Member
  • *****
  • Posts: 3995
if someone can convert it to Pascal would be great.
Isn't that ironic ;D
I do not have to remember anything anymore thanks to total-recall.

 

TinyPortal © 2005-2018