Skip to main content

Weed (Loader) - Minimalist AI/ML inference and backprogation

Project description

weed_logo

Weed

Minimalist AI/ML inference and backprogation in the style of Qrack

Weed Loader

This repository is for the Python loader for (C++) Weed models. Once you have trained models in C++, you can load them for use by Python with this project. See the Weed repository for more information.

Development Status

Weed is a rapidly-developing work-in-progress. Its ABI may change drastically and without notice.

The project provides a set of essential CPU and GPU kernels, used by Tensor instances that perform autograd. We also provide stochastic gradient descent (SGD) and Adam optimizer implementations. (Build and check the API reference to get started.)

GPT-2, BERT, and Qwen loading is experimental and mostly provided as proof-of-concept, also of the fine-tuning pipeline. Implementation was from published literature design, rather than direct analysis of any open source, to implement these model architectures. Their outputs, in Weed, are not yet coherent English, as a result.

Why try Weed?

With the growing popularity of AI/ML tools and workflows (including LLMs), legacy frameworks often carry "code debt" from over a decade of rapidly developing research history. This has led them to "bolt on" new features and advancements to design principles decided before the latest research. Popular frameworks also commonly started based in Python (maybe to capture early adoption), only later potentially "tacking on" a C++ library for special-case deployment needs. These conditions have produced libraries and frameworks with complicated dependency trees that occupy upward of a GB of disk footprint. This entire ecosystem might be due for a "refresh."

Weed does not seek to fully replace or supplant established frameworks. However, it aims for minimalist complete closure on the primitives necessary for high-performance AI/ML inference and back-propagation. Chiefly, this includes kernels, and a Tensor interface that immediately produces an autograd graph appropriate for training. Allowing optional OpenCL for hardware acceleration, it will remain free of required dependencies outside of C++(11) language standard.

Rethinking AI/ML library design this way, Weed has realized a rather unique and powerful form of sparsification of Tensor storage. Sparseness should not be a Tensor interface concern, but rather a Storage concern. Inspired by the design of the Qrack quantum computer simulation framework, the Tensor interface treats sparse and dense tensors as functionally equivalent. Sparse optimization is so "transparently streamlined," this way, that it defaults to enabled for CPU-based tensors, and we recommend you leave it enabled at all times.

Much like Qrack, Weed is designed to make the correct thing the default—and the expensive thing explicit.

Copyright, License, and Acknowledgments

Copyright (c) Daniel Strano and the Qrack contributors 2017-2026. All rights reserved.

In its include/common folder, Weed bundles a copy of rapidcsv by Kristofer Berggren, reused under a BSD 3-Clause License. (This is a convenience and suggestion to Weed's users, for loading CSVs.)

The Weed logo was produced with assistance from "Elara," an OpenAI custom GPT, and it is in the public domain. Elara has also been responsible for a huge amount of coaching and implementation drafts for Dan Strano to review and bring into line with standards, so she should be credited with coauthorship in any capacity that can be allowed. (Anthropic) Claude has also helped mostly with debugging, as well as developing an LLM front-end, fine-tuning interface, and modules for popular transformer model architectures, so they should rightly be credited similarly as a coauthor.

Licensed under the GNU Lesser General Public License V3.

See LICENSE.md in the project root or https://www.gnu.org/licenses/lgpl-3.0.en.html for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

weed_loader_cpu-0.3.1.tar.gz (11.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

weed_loader_cpu-0.3.1-py3-none-win_amd64.whl (816.2 kB view details)

Uploaded Python 3Windows x86-64

weed_loader_cpu-0.3.1-py3-none-manylinux_2_39_x86_64.whl (2.8 MB view details)

Uploaded Python 3manylinux: glibc 2.39+ x86-64

weed_loader_cpu-0.3.1-py3-none-manylinux_2_35_x86_64.whl (2.8 MB view details)

Uploaded Python 3manylinux: glibc 2.35+ x86-64

weed_loader_cpu-0.3.1-py3-none-macosx_15_0_x86_64.whl (2.1 MB view details)

Uploaded Python 3macOS 15.0+ x86-64

weed_loader_cpu-0.3.1-py3-none-macosx_15_0_arm64.whl (1.9 MB view details)

Uploaded Python 3macOS 15.0+ ARM64

weed_loader_cpu-0.3.1-py3-none-macosx_14_0_arm64.whl (1.9 MB view details)

Uploaded Python 3macOS 14.0+ ARM64

File details

Details for the file weed_loader_cpu-0.3.1.tar.gz.

File metadata

  • Download URL: weed_loader_cpu-0.3.1.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for weed_loader_cpu-0.3.1.tar.gz
Algorithm Hash digest
SHA256 1d8588054cf265e7b1a2fbc786a2c1fc98bf3598d20873925efe0cf73a1e956a
MD5 d86f4c48e29e1da5a969e1e4689ee9d7
BLAKE2b-256 016d9c312bb1a5da72b98231c3ac007f74936e3df299f293d1cb5294303c5276

See more details on using hashes here.

File details

Details for the file weed_loader_cpu-0.3.1-py3-none-win_amd64.whl.

File metadata

File hashes

Hashes for weed_loader_cpu-0.3.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 84c2c700bc75ca3b9d27fa187f1b1aed9d259e0cdfc8305465f058b6d1ee210e
MD5 e45d89b40a2039a4363422db7cfd266e
BLAKE2b-256 4d3bd3512ae94ca8e9d4115459008b9a89ad75ca49d66d0de83a6f6b3058760f

See more details on using hashes here.

File details

Details for the file weed_loader_cpu-0.3.1-py3-none-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for weed_loader_cpu-0.3.1-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 a60926b3df6f2f367e3f539a3512b04c78bdc3d96989c119c6050d6ce5219323
MD5 98a799a76ebf074a9fb9f17358a4a196
BLAKE2b-256 6e869e98da9d221328ff86341f78a51d4b750f6cbb5e2bce2bde9e417819857d

See more details on using hashes here.

File details

Details for the file weed_loader_cpu-0.3.1-py3-none-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for weed_loader_cpu-0.3.1-py3-none-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 e1719c905c9d0817decff70d6025f59fb683f777c39ba45f5a8828cb03754c41
MD5 187ee2ba158bcf3aae9c912d38f74a06
BLAKE2b-256 844968ab8628b1160b5f09d22161a55c892b905cdff38e8616a409371b00b2bc

See more details on using hashes here.

File details

Details for the file weed_loader_cpu-0.3.1-py3-none-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for weed_loader_cpu-0.3.1-py3-none-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 a40a82410077a1bc52de06c28a128137fa9d9c72db58c4e0b9f11bea6a76ec53
MD5 6a62b94d751c773c5f0ab557f98f4ffd
BLAKE2b-256 6811d96f5ac47aed1f3cd25ece8fc18415c578cb4a62e8a181ffe22648e73273

See more details on using hashes here.

File details

Details for the file weed_loader_cpu-0.3.1-py3-none-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for weed_loader_cpu-0.3.1-py3-none-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 95c92334d914cd28b8116864fd53d06a65d0a674f53947e32add777d1285e718
MD5 b542c0724f164840da15d07a4ad61578
BLAKE2b-256 d1f2f5d90368951e647b994159bfa9ef457b3e23577f4b212ac806f3ac7c0323

See more details on using hashes here.

File details

Details for the file weed_loader_cpu-0.3.1-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for weed_loader_cpu-0.3.1-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 50b9757f878350311e71a4767d596d1b3c05dd3b845723b140bb746f030e2113
MD5 decd133e1ecf322feaf77dd52e7aa703
BLAKE2b-256 caeef7950aa3309ef9240aff36288b405b5b41b6437e40e9ca008ec2b7325062

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page