-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
php-mlx architecture #1
Comments
@akondas hi! What do you think about the use of computational shaders to speed up work? I can provide OpenCL or Vulkan API (like this: https://github.com/BicEngine/Vulkan) for interacting with GPU |
Absolutely. I have already experimented with cuda bindings, but I can't find this library right now. I suggest you do a separate issue 😉 |
Would it be possible / efficient to use "php-ds" or the spl data structures as an alternative? I refactored an app I built from arrays to php-ds vectors and decreased memory by ~50%, However, going from 2GB of mem to 1GB was still too much so I resorted to streams (which maintained ~19MB of mem usage during runtime). |
I would like to see a random forest implementation ❤️ I'm also open for contributing to this project. |
Guys ! with FFI in our door steps , why dont we jump for highest ? |
Hell yeah! And not only for the interface, I believe. The upcoming PHP8 major release, with the JIT enabled, is much much faster than I expected. Some scripts are faster than Golang. And believe or not PHP8 with JIT enabled in Docker on Raspberry Pi3 is faster than running local on macOS' default PHP 7.3.11! (Thanks for @akondas' blog article) I believe from PHP 8.0 things will change and bring a recursive acronym escapade of Programmers Hate PHP. The only problem is that I am no good at math at all ... Σ( ̄□ ̄;)What?! |
I prefer SQLite3 as a storage of the datasets since it's simple, lightweight, stable, and fast. But what about I think many people use HDF5 format datasets. So, it would be handy if we can use them by default, wouldn't it? Something like The below was the only discussion I found about HDF5 in PHP. However, it didn't reach to the answer rather than switching to Python. The main reason seems to be by not having an extension for it. Since there's a Clang source, as a theory, an extension might be created. Yea, as a theory...
|
Storage is only a implementation details. And as we know, the devil is in the details 😉 There are two more topics left for me to close and I will be able to go back to the php-mlx implementation. I am assuming that particular algorithms (classifiers or regressors) should be interfaces and have different implementations. This will allow the use of an FFI, for example. I am eager to see a PoC solution like this, to be able to state whether it makes sense in general. In addition, I would also like to focus more on the dataset itself. Enable operations such as the Pandas library and the visualization method like Jupyter Notebooks. I have also described my main concerns in this article: https://arkadiuszkondas.com/3-reasons-why-php-is-not-yet-perfect-for-machine-learning/ If someone wants to start now, I am happy to help. |
So, you mean to define something like an API first so to be able to switch the backend? That makes sense.
Since I wasn't familiar with Jupyter Notebook, I implemented PHP8-RC2 Kernel to work on Jupyter to see how they work. And yea, I feel there is a lack of visualization method in PHP. Something like Is it reasonable to create something like |
I have already made it, except for the Jupyter. |
Looks very promising. Thanks to this job there is some slight chance of entering the mainstream. But you will have to put in a lot of work that no one pays for. Unfortunately, comments like "abandoned and disputed php-ml" (nextcloud/suspicious_login#375) do not encourage me to further work on this library. I am happy to accept / supervise the work (PR's), but in the near future I am not going to write the code myself, so far I have other interesting things to do. |
I'm sorry to hear that. I understand that anyone can lose one's drive, after working so hard all alone, and taken all down in no time by the subsequent projects' DMCA attack. I felt unfair with the rashness of them and DMCA. No matter what they say, it's as concrete as anything else that PHP-ML was the pioneer of machine learning in PHP! Take your time, do what you want to do. I'm always on your side dude. |
I am sorry to hear your problem. The honor of the pioneer remains unchanged. My hope is the spread of interoperable interfaces. I think that the data structure for high-speed numerical calculation that is aware of SIMD instructions and GPU is very important for PHP. I have the NDArray and LinearBuffer interfaces in the "interop-phpobjects" I'm using. That is the core of high-speed computing. The interface definition is independent of my library, so I aim to be able to replace and discard my library when other advanced libraries emerge. I aim for coexistence with other programs and free competition. |
@yuichiis @KEINOS thanks for the words of support. Don't get me wrong, I'm not a quit open source. I just have to complain out loud sometimes. I admit that https://rindow.github.io/mathematics/index.html encourages me to go back to php-mlx. |
you did advertise rubix ml by doing so. Now I looked at them, but am not sure if they are really better, or faster etc it isn't clear there is a guy training something and the training took him 6 hours for something... and they say they have no GPU support. Imho there really little reason to implement something NEW without GPU support. Or is there? |
I understand how life and priorities take precedence over building and maintaining open-source projects. We do thank you and appreciate your contributions tremendously. I'm just curious why the Hoping all is well. |
https://arkadiuszkondas.com/dmca-php-ml-and-copyright-boundaries/ Every time I read this blog post, my heart aches and I get a glimpse into why PHP can't take the next step in the ML world and why it can't overtake Python. |
Because it is a new library, we now have a moment to discuss architecture. php-ml in its implementation as a dataset used ordinary native arrays. This was associated with a large amount of memory loss. I would like to focus mainly on the architecture of datasets and its circulation among estimators, transformers, etc.
The text was updated successfully, but these errors were encountered: