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.4.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.4.0-py3-none-win_amd64.whl (816.4 kB view details)

Uploaded Python 3Windows x86-64

weed_loader_cpu-0.4.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.4.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.4.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.4.0-py3-none-macosx_15_0_arm64.whl (1.9 MB view details)

Uploaded Python 3macOS 15.0+ ARM64

weed_loader_cpu-0.4.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.4.0.tar.gz.

File metadata

  • Download URL: weed_loader_cpu-0.4.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.4.0.tar.gz
Algorithm Hash digest
SHA256 72fef729b2cfe7090e9c632c89f554c92a1b568b4d36339261840e08d4f78eee
MD5 113b09381d3d78436a011ce2b6911df8
BLAKE2b-256 ee7240e566bddc70637bc66aad00438f0033de51485014ba41e74f100374e9eb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader_cpu-0.4.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 0d0d6891f6854d4acc201666290bc62a04e1441816e514c8efe4376aafe0bb49
MD5 21b4c1b49906673f069a76002a1c242b
BLAKE2b-256 43c83647233593df1c45c73be7ca4d886722ebdd3b531997877668da1c6d5a4d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader_cpu-0.4.0-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 dd569ce9b6c510ec88c1dd4250c619d0bbe962a2d05f6a1e1cf7bfa5d6426993
MD5 8f65864d09dd7474680c6277954104cf
BLAKE2b-256 53e549e9d31f7c87b5e5c7b50df39bf7744a9a9af104c15c5a256aff9d3ba42b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader_cpu-0.4.0-py3-none-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 94738a73f52a062b5456ca956b04a839e332e11ad9427db0ceeb47b326be3338
MD5 71edf1b5194e7b9121fb9d9838862268
BLAKE2b-256 c9f7448f4298f891f39a99ea3e1db8e7cb687b433ff2400c680689b0d24825b9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader_cpu-0.4.0-py3-none-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 3acf0ec99b2b66d791e5840f90965377d0a258499ce395f7709f897406d8beb3
MD5 ae1dc3219bcf2958e78acff40828cce1
BLAKE2b-256 6649d7c3383a8dcdb7e2a00c2fe2f03171c570aed9dc8a8fa48dc93a090c5add

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader_cpu-0.4.0-py3-none-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c29bed03ac5c4c0259627be2506307fbc1fe6599d2bfefec6ecb9962d7c65793
MD5 83cdbc6f3f31a352b3b84e7bd2379f61
BLAKE2b-256 7b7f3163e955992232ecb317cd2ef10e338aac82a05bb5e11e14eacbd646705b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader_cpu-0.4.0-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 e7bd5291e9aa74af3bb29eb5be43bcac073541709a0263df0fe56abd249a256c
MD5 fef9cf269d9050d3f1eccde8bfb37b5f
BLAKE2b-256 3d6f6cb428ad8504e6720cf17376bc5a980d763a8b79771a582046e97f63d8c4

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