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.5.0.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.5.0-py3-none-win_amd64.whl (816.9 kB view details)

Uploaded Python 3Windows x86-64

weed_loader_cpu-0.5.0-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.5.0-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.5.0-py3-none-macosx_15_0_x86_64.whl (2.1 MB view details)

Uploaded Python 3macOS 15.0+ x86-64

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

Uploaded Python 3macOS 15.0+ ARM64

weed_loader_cpu-0.5.0-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.5.0.tar.gz.

File metadata

  • Download URL: weed_loader_cpu-0.5.0.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.5.0.tar.gz
Algorithm Hash digest
SHA256 e45d67111563d3d5412de3a490d75af7751124b773b6144cd6598c9099be9a33
MD5 14453fb5dffcd07945fbfbdc1b218e0a
BLAKE2b-256 ace93b913b4a74210bd0f71ae0dce4389dd5546ee768fa1a300a7dfbc27419d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader_cpu-0.5.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 51a947d32dcb443822c26561c642d3f1eb5e9adb0240bc8f83f1ffff078d47e4
MD5 ac56405f8c2a817c6e20cfc10a71edf8
BLAKE2b-256 fe4cd48e3545f1975a5f3ee69bb6230c14992e6fee6823700f7153b52baf1fc0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader_cpu-0.5.0-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 be3b16e3f360229ea27919a68f8204ef4224485d585f22a669c6e5087e61a4f3
MD5 660fc85a0e5fdfd739c07443d940db5e
BLAKE2b-256 66d00330701e8c779c61efc544bbdfea2776427f8788376bdb68bdf4a7f122e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader_cpu-0.5.0-py3-none-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 c932f29683ec067be0d20cba6275f544ce983aac8ea6e8675e65c55345e15257
MD5 89f0b6340bca764e0e0602647e27f1b9
BLAKE2b-256 1a60efa1f94b7e18c81c2abc2c96e85e851407239981eb6fa04e523899f2b284

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader_cpu-0.5.0-py3-none-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 88a15324e865ededaeb6d0fcddf9cdb1fcd99dccd27364cfe82f187cca79621c
MD5 f31d123cad903fa6b6e6c4000d16c30a
BLAKE2b-256 34600b79ae858e04662c8ab4c30cc3da81016d852f0dea1262d69ace3433115a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader_cpu-0.5.0-py3-none-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 4b4d578a78c436a30f53ae5b9ebc67a5b3a1c2762f83bb5c9629704a556e0a44
MD5 daa48da5d2265efd688e1415f65bbd62
BLAKE2b-256 be8610da409d545299dce5208a37863403ad71727b30fbab1a5b1243426d392e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader_cpu-0.5.0-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 fd88c4b8f1e6a35172f56ca4bba681eaf5f7c687de630f8432f53560f7ffd345
MD5 6fba7cc90c852911abd374a69ce79030
BLAKE2b-256 c1fdc598df27959b7ad9da01a0a48e8a8e73cbbb4ca45e94220c34af71fe55e8

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