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

Uploaded Python 3Windows x86-64

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

Uploaded Python 3macOS 15.0+ x86-64

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

Uploaded Python 3macOS 15.0+ ARM64

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

File metadata

  • Download URL: weed_loader-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-0.5.0.tar.gz
Algorithm Hash digest
SHA256 00fba50fe36dd1b3e1cfb55a47a0d317229ea7f3b2b059ce0e35d2030c526df4
MD5 d03a6d41a2481422d2b003905f2dfa60
BLAKE2b-256 171572612a2bae98ed6c99624bff9fd6eaf54e1eb2a9a7a0d5442ec3cba5d023

See more details on using hashes here.

File details

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

File metadata

  • Download URL: weed_loader-0.5.0-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.0-py3-none-win_amd64.whl
Algorithm Hash digest
SHA256 8accb9c7210371c9944dc60913e3c9ca361af5b2d4d2d5da585dec7f05c941d0
MD5 9383c4754337002b5e1e873732baae59
BLAKE2b-256 8d2aeedf472dec952c1e135730df5141290e7ef66e440ac79defae1c0f841dc8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader-0.5.0-py3-none-manylinux_2_39_x86_64.whl
Algorithm Hash digest
SHA256 0849503476ce28b7f47969f2550735ed9e4ffb613aeee75f7035a75e4643ddf5
MD5 201f7acda97584fa6b5497bcf5d2937e
BLAKE2b-256 1574fc3d2c72d5cf896bf2493c12ee292fe798b627024b23dff5f37372247c88

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader-0.5.0-py3-none-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 90ee765ca5c49e15f1c76e6f25d075a73d2fda7b25376be5b16837ff7cc4c041
MD5 4f573ff6f9120d5d675e7483e5825286
BLAKE2b-256 40362775668b963ae5cab4daba50fb4ba9e8c67624b65907ad813b4549307b18

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader-0.5.0-py3-none-macosx_15_0_x86_64.whl
Algorithm Hash digest
SHA256 67f5379d177b7b081657a166cc54956ae4cee998e31ed0dd82c52b16df9163bb
MD5 91bbc380f2c6d8f5386d8ea7080d11d0
BLAKE2b-256 e51f2b83b907414f9ba220cf86f9b7ca6cc325d699a9997a4e81b18d511e6685

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader-0.5.0-py3-none-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 4ec29c53b241428f0b9d4eb817585855b8eec0984978360e707685fb93c11808
MD5 ca5d3aa17a22b6a5c447b5d178b19518
BLAKE2b-256 f2159f19e597fc0f1aec267ba4273b523048f96249d67823b089bc8f5dea46f7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for weed_loader-0.5.0-py3-none-macosx_14_0_arm64.whl
Algorithm Hash digest
SHA256 20e6912d8aae5fa437164032762926cab1641bd0e43f7afa267dff28d998b8e4
MD5 a0aa3b104137eb9042c2bffa4ab79d3d
BLAKE2b-256 52d7bade7fb6d1f08b7bbd778e881c2adcc2e4db1d6bbf0d2a57df9d8b4da23b

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