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-0.5.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-0.5.1-py3-none-win_amd64.whl (1.1 MB view details)

Uploaded Python 3Windows x86-64

weed_loader-0.5.1-py3-none-manylinux_2_39_x86_64.whl (3.8 MB view details)

Uploaded Python 3manylinux: glibc 2.39+ x86-64

weed_loader-0.5.1-py3-none-manylinux_2_35_x86_64.whl (3.8 MB view details)

Uploaded Python 3manylinux: glibc 2.35+ x86-64

weed_loader-0.5.1-py3-none-macosx_15_0_x86_64.whl (2.1 MB view details)

Uploaded Python 3macOS 15.0+ x86-64

weed_loader-0.5.1-py3-none-macosx_15_0_arm64.whl (1.9 MB view details)

Uploaded Python 3macOS 15.0+ ARM64

weed_loader-0.5.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-0.5.1.tar.gz.

File metadata

  • Download URL: weed_loader-0.5.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-0.5.1.tar.gz
Algorithm Hash digest
SHA256 7de0473398f9f12c9f526d2d939685abd5417ff1ab3e45809f9235eec0694002
MD5 10e0e862e3f535d65a8f1956780ce059
BLAKE2b-256 81eeaf8fee754b5ea55d2df1e4a68dce85a917edf4c238a21d6286b315afacec

See more details on using hashes here.

File details

Details for the file weed_loader-0.5.1-py3-none-win_amd64.whl.

File metadata

  • Download URL: weed_loader-0.5.1-py3-none-win_amd64.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for weed_loader-0.5.1-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 94e6ac7d5925fea32e5c2cb504c2054f57548b0afc141dd2e80092cce1741792
MD5 c848cb6b78e14f8cdcc3c6f6cf24d3bc
BLAKE2b-256 f8515770c44a18c077f351130c1ad7a08769894f4705d32630eb38e2a6bb2bb6

See more details on using hashes here.

File details

Details for the file weed_loader-0.5.1-py3-none-manylinux_2_39_x86_64.whl.

File metadata

File hashes

Hashes for weed_loader-0.5.1-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 c6879ba94228c94a6f1ac16a5cecc4034e334e2246eba9aaab7942fed10355e8
MD5 c1c84ebd98dbf6984e46415ae9431839
BLAKE2b-256 91397564457fb9292695ba884f0d7b4563157885f0f3d6f3af709230af3f4602

See more details on using hashes here.

File details

Details for the file weed_loader-0.5.1-py3-none-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for weed_loader-0.5.1-py3-none-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 d10606397e75143e889829c06aa68f4621af5b46649e97aeda7d4df9917ee5c8
MD5 f79d29860601b2284d3fb2aea76f9e60
BLAKE2b-256 76d63ba847f70b5ae7f98360a35f9f3f98b40a4d81c6a529390192cb1986fdfd

See more details on using hashes here.

File details

Details for the file weed_loader-0.5.1-py3-none-macosx_15_0_x86_64.whl.

File metadata

File hashes

Hashes for weed_loader-0.5.1-py3-none-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 491d437137b6e401adf6edc39a7f31b4cbfb6c4a787705b6d953a9f806e53e8e
MD5 fb4c66776208a0f63e72eb7406a4cd88
BLAKE2b-256 e092ce5b1f99b03beaf5aa581130ee28cdc42c59cf28b7629fc6f6be29e3da89

See more details on using hashes here.

File details

Details for the file weed_loader-0.5.1-py3-none-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for weed_loader-0.5.1-py3-none-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 f3b9afeefb8c34175e1720e3f66d421699e781b978ec376eb6881c95b61688e0
MD5 b79279d78659e0ac92e99b304b555014
BLAKE2b-256 2f620c4502837017cc4b6106eee5b05bcdd47c02952ed66e01b5980a0adf79ec

See more details on using hashes here.

File details

Details for the file weed_loader-0.5.1-py3-none-macosx_14_0_arm64.whl.

File metadata

File hashes

Hashes for weed_loader-0.5.1-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 9493ceb10284a5527c0a3baadedc2fab5ecdf72cbe9b7e1f3816698cb33103e6
MD5 6f3451e0f0f42558982580196fc0d80d
BLAKE2b-256 9e91ec689b870dc3ca67ed9de36c3766efbc46236c7180cb2feeadce124202d0

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